Skip to main content

Questions tagged [leaflet]

Leaflet is an open-source JavaScript library for mobile-friendly, cross-browser, interactive maps. For the R leaflet package, please use the r-leaflet tag.

0 votes
0 answers
43 views

How to access options when extending a leaflet class?

I am trying to extend a Leaflet class, and looking at the documentation it gives this example: var MyBoxClass = L.Class.extend({ options: { width: 1, height: 1 }, ...
0 votes
0 answers
36 views

How to get rid of React Leaftlet map gray area while scrolling vertically

Hey guys I have use React Leafnet in my web app, everything seems working fine when I scroll map horizontally it loads new map images nicely but when I scroll map vertically, than after some position ...
2 votes
2 answers
120 views

Weird overlap with russian street names

I am not sure why but on my website with leaflet, since yesterday the map is blurry, the tiles border are visible and on some tiles I have this weird overlap with english and russian street names: I ...
2 votes
1 answer
8k views

setOpacity for multiple markers at the time

I'm using leaflet for my project and I want to use filter marker in it. To do it, I will setOpacity to 0 for all markers and re setOpacity to 1 for my targets. I know leaflet allow to setOpacity for ...
0 votes
1 answer
32 views

Trying to clear markers when toggling checkbox

I'm trying to resolve an issue with regards on how I can clear the markers when listening to changes on the checkbox. I've been building a map plotter with the combination of libraries from leaftlet....
3 votes
4 answers
19k views

What is the best way to load KML layers on Leaflet?

I have to load a KML layer on a Leaflet app. After some browsing I found a library called leaflet-kml that does this. There are two ways that I can load the KML layer: either by the KML layer's URI or ...
0 votes
0 answers
34 views

Map doesn't load after fetching current location. How can I fix?

I am building a dashboard for a potential package tracking application. I am using Leaflet and OpenStreetMap for now. I am trying to fetch the user's current location and show it on the map. ...
4 votes
1 answer
3k views

Typescript auto generated JS file: "Uncaught TypeError: Failed to resolve module specifier"

Currently working on a Blazor project where I want advanced mapping functionality, using the Leaflet.js library with typescript bindings. I have added leaflet and @types/leaflet as node modules for ...
0 votes
0 answers
27 views

what is the 'this' keyword in the .on method's callback function of leaflet library?

Im curious because the this keyword inside of JavaScript's event handler function is the element in which the .eventListener() is attached to. And the .on() method of leaflet library is similar to ....
0 votes
0 answers
28 views

How can i set tooltip text for dash-leaflet edit/draw control?

I'd like to set the draw control tooltip text in dash leaflet. The Leaflet.draw docs here, provide the following recipe: // Set the button title text for the polygon button L.drawLocal.draw.toolbar....
1 vote
2 answers
3k views

Leaflet open a popup on marker click from GeoJSON layer

I have made a leaflet map. Data is loaded using GeoJSON on the onEachFeature event I have bound the popup with a dynamic content text taken from some property of the feature. The problem is that with ...
1 vote
1 answer
984 views

How to fix 'TypeError: leaflet__WEBPACK_IMPORTED_MODULE_7___default.a.markerClusterGroup is not a function'

I am trying to implement marker cluster on my multiple markers but I keep getting type error. TypeError: leaflet__WEBPACK_IMPORTED_MODULE_7___default.a.markerClusterGroup is not a function this....
0 votes
0 answers
32 views

How to link to marker on Leaflet map from another URL

This works perfectly for activating a popup on a leaflet map on the same page: {<a class="mplk" href="#where" onclick="t5.fire('click')">See on map</a>}. The ...
1 vote
2 answers
261 views

angular 17+ SSR and leaflet, ngx-leaflet, ngx-leaflet-draw

recently i updated my angular aopp to the newest version of 18 to make use of the new feature introduced in angular 17 native SSR (server side rendering) one can add SSR quickly but after adding a ...
0 votes
0 answers
38 views

How to dynamically use fallback tiles from the previous zoom level of the same server in Leaflet?

I'm working on a mapping application using React with Leaflet for tile rendering. When tiles fail to load (due to network issues, server downtime, tiles not available), I want to dynamically use ...

15 30 50 per page
1
4 5
6
7 8
926