New answers tagged leaflet
1
vote
Accepted
Increasing size of chart inside pop-up window - Leaflet - d3.js?
It takes a bit of playing with browser debugger to find out what will make chart.js happy. The fact is that it modifies canvas attributes before drawing chart on it.
To get desired results, relevant ...
0
votes
Setting specific zooms when clicking on different circle markers from the same layer in Leaflet?
I found out the answer was pretty silly. I just wasn't passing map as a parameter in the function, but it's all good and working now. Sorry for the dumb question.
1
vote
Accepted
GeoJSON layer development
Exporting GeoJSON from uMap is explained here in the OpenStreetMap Wiki.
(image source: OSM Wiki)
Select "geojson" instead of "Full map data" in the download section.
The simplest ...
1
vote
Error when creating polygons with turf.js from existing GeoJSON polygon rings
When you create polygon from selected feature coordinates with turf.polygon function, you have to take into account that selected feature might be polygon or multipolygon.
You have to check geometry ...
1
vote
Accepted
Highlight polygon in Leaflet
To identify which polygon you want to select, you need to assign some id to polygon features:
let data = {
"type":"FeatureCollection",
"features":[
{
"...
5
votes
Accepted
removeLayer or removeFrom(map) not working on betterwms layer from leaflet map
The problem in your code is that with var camadabairro = requestBairro(nomeBairro); you create a new layer every time check box is checked/unchecked.
Solution is to put camadabairro layer variable at ...
6
votes
Accepted
Control Layer Order/Z-Index of Custom DivIcon() Marker in Folium Map
Solution for your problem are Leaflet map panes (see https://leafletjs.com/reference.html#map-pane), which are DOM elements used to control the ordering of layers on the map. Each map pane has it's ...
3
votes
Accepted
Binding id to each layer in Leaflet?
On way to bind id to each GeoJSON layer is to use onEachFeature option function, by adding to the layer some property that does no interfere with standard Leaflet layer properties.
Relevant part of ...
2
votes
Accepted
Use grouped layer control plugin with empty "dummy" layer groups that are only used to enable or disable filters for the GeoJSON layer
If you look at the answer to your previous question, the solution of which you used here, you added additional group level in your overlayMaps definition, so overlayMaps[evt.name].myId does not work ...
1
vote
Accepted
Multiple on-the-fly filtering in the layers control based on markers' features properties on Leaflet
One possible solution is to create empty "dummy" layer groups which are used just to turn filters for GeoJSON layer on or off when selected/deselected in the layers control. Map overlayadd ...
0
votes
No applicable method for 'metaData' applied to an object of class "NULL" with Leaflet map
I had that problem when using fillColor, and the way I solved it was using pal(cpop) instead of ~pal(cpop), not sure why though.
1
vote
Leaflet plugin Leaflet-WMS.js Gives sometimes weird x-y coodinates
I edited Leaflet-WMS plugin code. I changed the request parameter URL from
requestParamaters[version >= 1.3 ? 'i' : 'x'] = point.x;
requestParamaters[version >= 1.3 ? 'j' : 'y'] = point.y;
to:
...
1
vote
Accepted
Using marker drag event instead mouseover on each polygan layer in Leaflet?
Solution where you have to iterate over all GeoJSON polygons at each marker drag event can be quite costly when there is a big number of polygons.
One possible solution to avoid this is using the ...
0
votes
Using marker drag event instead mouseover on each polygan layer in Leaflet?
i solved it .
i define marker drag event and get current latlng of marker.
then i check in my geojson file for each polygan layer .
i check if the new marker position falls within the layer.
thank you ...
0
votes
Display route layer between current user location and geocoded search locaton in Leaflet?
To catch geocoder event when location is found you can use markgeocode geocoder control event.
To prevent default geocoder action you can use defaultMarkGeocode: false option.
To zoom on route found ...
Top 50 recent answers are included
Related Tags
leaflet × 4120javascript × 883
geojson × 757
geoserver × 237
markers × 204
wms × 196
popup × 168
mapbox × 167
web-mapping × 143
openstreetmap × 138
leaflet-draw × 126
coordinate-system × 124
r × 121
html × 115
layers × 110
postgis × 102
qgis × 100
leaflet-plugins × 94
esri-leaflet × 89
tiles × 88
jquery × 84
polygon × 82
json × 81
carto × 77
zoom × 72