protomaps / protomaps-leaflet

Lightweight vector map rendering + labeling and symbology for Leaflet
https://protomaps.com/docs/frontends/leaflet
BSD 3-Clause "New" or "Revised" License
764 stars 43 forks source link

Feature request: example of selecting layers in Protomaps Leaflet maps #136

Closed jaanli closed 8 months ago

jaanli commented 8 months ago

Use case: Protomaps is amazing, and I would love to see an example of enabling a user to select layers to hide or show in a Protomaps + leaflet map. Here is an example of one type of UI/UX supported by Leaflet - https://opengeo.tech/maps/leaflet-panel-layers/

If there is no example I’d be happy to try to make one!!

bdon commented 8 months ago

Nice demo! that's a general Leaflet example though, not one specific to protomaps-leaflet, which just adds a normal layer, so I don't think it's relevant.

jaanli commented 8 months ago

Got it, thank you Brandon - will try to get it working alongside a protomaps-leaflet later then. Happy to contribute it if it could help others reuse!