Leaflet Hide Markers

Hi folks. I’m using Leaflet to post markers on my OSM map.

Is there a way of hiding marker information from the user? Information is sensitive and valuable and I just don’t want to hand it off to users. Can this be done?

Any insight appreciated.


If I understand you correctly, you want to show markers on the user’s computer with Leaflet, but don’t want the user to have easy access to the markers’ latitude and longitude coordinates?

I would guess that’s not supported by Leaflet, because it does the placement on the client side, and the user’s browser needs access to the markers’ coordinates for that. One option to make extracting your data harder would be to use a raster tile layer instead of markers. That is, send the user images (generated on your server) instead of raw data.

Sorry, I didn’t get any notification of this.

Yes, you are correct. I’d like to have markers without providing them as plain text in the HTML source.

I will look into tile generation. Is this something that can be done quickly on the fly? I’ve never even heard of this.