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.

leaflet
0 votes
2 answers
2k views

Display Marker Using Latitude And Longitude From SQL Database With Leaflet Map In ASP.NET CORE MVC

for my website, I am using ASP.net Core MVC on Visual Studios 2019 and SQL Server Management Studio for my database. I am trying to display markers using data(Latitude and Longitude) from my Database ...
0 votes
0 answers
18 views

VueJS leaflet fitBounds not working without timeout

I have an issue with leaflet in VueJS 3. I'm creating a leaflat map with markers, but I have to use a setTimeout-function to make the fitBounds() work. Without the setTimeout I see the map with ...
7 votes
4 answers
14k views

Leaflet: Uncaught TypeError: L.markerClusterGroup is not a function

I am trying to add markercluster into leaflet. var markers = L.markerClusterGroup(); My header file include: script(src='https://unpkg.com/[email protected]/dist/leaflet.js') link(type='text/css'...
12 votes
3 answers
12k views

How to display vector tiles generated by geojson-vt in leaflet?

I have a lot of GeoJSON spatial data that I want to display on a leaflet map. Around 35,000 GeoJSON objects. Because the amount of points can get very large, I wanted to use the geojson-vt library to ...
-1 votes
0 answers
14 views

Issue with TYPE react-leaflet-supercluster, SuperClustering on Leaflet Map

This is my code and im using this optional props: "radius={300} minPoints={2} maxZoom={12} extent={500}" import { SuperClustering } from "react-leaflet-supercluster"; import "...
0 votes
0 answers
16 views

How can I ensure that all line weights are adjusted at once?

I have linked a Geo section to my site where the routes of my trips are listed. In most cases, the polygons are clustered in groups of a day, which in turn consist of various (colored) line segments, ...
0 votes
0 answers
39 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
32 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
111 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
31 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
31 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
25 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 ....

15 30 50 per page