-
Notifications
You must be signed in to change notification settings - Fork 33
add a start to take labels expressions from esri. #146
base: master
Are you sure you want to change the base?
Conversation
related: Esri/esri-leaflet#916 |
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.
very cool! thanks for sharing what you've come up with so far.
scaleToZoom: function (scaleValue) { | ||
if (scaleValue >= 500000000) { | ||
return 0; | ||
} | ||
if (scaleValue >= 250000000) { | ||
return 1; | ||
} | ||
if (scaleValue >= 150000000) { | ||
return 2; |
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.
this function could be collapsed with a little more math.
Esri/esri-leaflet#426 (comment)
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.
Okay, i'll check that.
Nice! I've marked this PR as Work In Progress. Some things I am thinking of:
What do you think? |
I don't work at @Esri anymore but that sounds like a good plan to me. if no one swoops in to help you land your work here, you could always publish it on your own. |
Hi,
I've made a starting point for adding labels to the esri-leaflet-renderers.
I see this is requested by: ynunokawa/L.esri.WebMap#74 .
I wanted this feature also for my own project.
There is more work to be done in this area. For example only center and topright position is supported now. The expression language is far more complicated than currently implemented.
This is a breaking change. Some users did probably work arround the missing label feature themself.
So a major version bump is required in my opinion.
Kind regards,
Pieter