How to hide country&city labels?

21 views
Skip to first unread message

Gabriel Sampol

unread,
May 6, 2018, 1:08:52 PM5/6/18
to Leaflet
I am new to leaflet.js and I can't find the way to hide the country and city labels that appear by default.  I am familiar with Google Maps API but it seems there is nothing similar to the "map.setOptions({styles: stylesOff});"

I want the user to be able to enable/disable the visualization of country, city, etc. labels.  How can I achieve this?

You have a sample of my tests at http://www.dxmaps.com/maptest.html in case you want to have a look at the source code

Thanks for any possible help or sample code!

Gabriel





Peter Thomson

unread,
May 6, 2018, 1:37:00 PM5/6/18
to leafl...@googlegroups.com
You might find it easier to start with the simplest demos from the leafeltjs website. https://leafletjs.com/

Or look at my tutorials at https://peter-thomson.com/leaflet-map-tutorial/index.html

Further tutorials are linked at the bottom of that page.

In your test page you have linked to other JavaScript files that add the data that you see. The result is a very complicated example of a leaflet map.


--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages