Skip to content

Tag: leaflet

How do I edit the popups bound to a polygon object

Currently, wherever I click on the map a popup appears with the country’s name. The country is determined by a geoJSON file that has the names and multi-polygon lnglat coordinates that sets the borders for each country to save me entering each one individually. However, I want each popup bound to a leaf…

Download shapes from leaflet map

I have online access to a leaflet map, but cannot reach the authors. Is there a way to download shapes from this map (to shp, geojson, etc.)? I thought of running some leaflet-related javascript code in browser console, but I couldn’t find any relevant commands in the documentation. Answer When you look…

Leaflet controls not responding to click

Not sure how I have managed this but my leaflet zoom controls are not clickable? They do show up on the screen but there is no mouse change when hovering over them. Do I need to create another layer for the controls or am I missing something else from my code? update: The map will also not scroll or zoom

How to generate markers from an api in leaflet?

I’m making in app using vue and leaflet and I need to generate markers from and API. But for some reason, only the default markers are showing. I can access the api data in the DOM. I just can’t figure out how to iterate over it and show the data on the DOM. pls help here’s the code Answer Y…