Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 144014

An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

1 vote
1 answer
1k views

Dynamically change layers on feature click in Leaflet

I need to dynamically change layers on a leaflet map on click, having two GeoJSON files, one for states and other for cities, like a dashboard. … I'm starting from the sample code from Leaflet tutorial of choropleth map https://leafletjs.com/examples/choropleth/ which already have the zoom on click function. …
CaD's user avatar
  • 417
8 votes

Loading external GeoJSON file into Leaflet map?

The fetch function does the job: fetch("filepath/filename.geojson") .then(function(response) { return response.json(); }) .then(function(data) { L.geoJSON(data).addTo(map); });
CaD's user avatar
  • 417
4 votes
2 answers
5k views

Leaflet GeoJSON style and labeling

I'm trying to add a GeoJSON polygon layer from a file, give it a specific style and show the label (ToolTip) but couldn't find a way to do it in a single function call . I only found different code sa …
CaD's user avatar
  • 417
3 votes
Accepted

Leaflet GeoJSON style and labeling

function style(feature) { return { fillColor: '#E31A1C', weight: 2, opacity: 1, color: 'white', dashArray: '3', fillOpacity: 0.7 }; } L.geoJson …
CaD's user avatar
  • 417