Wednesday 30 May 2018

How to label geojson points in Leaflet?


How to show labels for geojson points in a Leaflet map?


There is Leaflet.label that is now deprecated in favour of L.Tooltip, but that only shows text on hover. I want to show the text labels directly on the map without needing user interaction.


Sample input - https://gist.github.com/maphew/e168430e999fc738eeb3448feda121cd


Desired result (green points with text labels, the other graphic elements are just for context):


simulated map of points with text labels



Update: I want to create text that blends in with the map like the image below, not a popup tooltip.


image with unwanted part crossed out




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...