-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(Style): points can now be displayed as icons #1715
base: master
Are you sure you want to change the base?
Conversation
72fb2f7
to
8250e82
Compare
src/Layer/LabelLayer.js
Outdated
this.style.icon = this.style.icon || {}; | ||
this.style.icon.source = canvas.toDataURL(); | ||
this.style.point.color = undefined; | ||
this.style.point.line = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure to keep this part....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this.style.icon.source
is necessary so that the canvas drawing is displayed as icon. The following two lines prevent drawing points projected on ground, as can be seen in the attached screenshot. Moreover, they do not actually change the Style
object defined by the user. Do you still think I should remove them ?
8250e82
to
7ed379f
Compare
7ed379f
to
377e739
Compare
959624c
to
4ea5fef
Compare
1ef6de6
to
5041fcb
Compare
5e6c230
to
eb581e6
Compare
d05e7ed
to
8632725
Compare
5431108
to
cc5de42
Compare
cc5de42
to
628a6bc
Compare
Description
Add support to display points as label icons in a
ColorLayer
or aLabelLayer
.If user defines
Style.point
of aColorLayer
, and set theColorLayer
addLabelLayer
parameter to true, points will be displayed as label icons. IfaddLabelLayer
is unset or set to false, point will be kept rasterized.User can also define
Style.point
for aLabelLayer
, in which case points will obviously be displayed as label icons.