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
13,971
questions
10
votes
1
answer
528
views
Load Quarto html map data from json for Leaflet map generated in R
I have created a Quarto blog post which contains many leaflet maps, generated in R. As the data for each map is embedded within the html file, the file itself is very large. This is causing problems ...
1
vote
2
answers
84
views
How to draw the shortest path between circles
I am building a web app (in Qwik) that requires parsing a .xctsk file (paragliding competition tasks), and drawing the task on a map. A task consists of a bunch of circles in a given order.
I have ...
0
votes
0
answers
90
views
Vue Leaflet adding a select / unselect all in Layer groups control
I am using Vue.js 3, Leaflet and Vueleaflet.
My map displays the layers groups containing markers (LLayerGroup) :
I want to add "Select all" / "Unselect all" checkboxes at the top ...
0
votes
0
answers
124
views
Vue.js Leaflet : bounds change does not update correctly
I am having a bounds update issue with Vue Leaflet.
How it works :
I am getting info from an API
I add markers to display on the map
I fit bounds to display markers and get the right zoom and ...
0
votes
0
answers
17
views
remove last route line if i check multiple vehicles and the other route lines still draw on map after i uncheck all vehicles
export const drawOnMap = (info, map, L) => {
if (info?.Latitude != 0 && info?.Longitude != 0) {
let pointA = new L.LatLng(info?.Latitude, info?.Longitude);
let pointB = new L....
0
votes
0
answers
43
views
Marker(Canvas icons) disappears when zoomed in and dragging on the react leaflet map
When I am zoom in and then drag canvas icons on react-leaflet map, so that time others canvas icons disappears but when I zoom in or out again all the canvas icons appears properly.
Before the zooming ...
45
votes
9
answers
49k
views
leaflet map shows up grey
I'm starting leaflet.js with the quickstart but my map shows as grey... is there something I'm missing?
script.js:
var leafletMap = L.map('leafletMap').setView([51.505, -0.09], 13);
L.tileLayer('...
44
votes
10
answers
62k
views
Assign ID to marker in leaflet
So i try to achieve a result as on foursquare: https://foursquare.com/explore?cat=drinks&mode=url&near=Paris which is when you clik on a marker on the map, it scrolls through the listed of ...
0
votes
0
answers
14
views
vue3 and Leflet Map geoJson bounds
How do I set the center and define the bounds for given getJSON data?
Each geoJson object is like this:
{
"type": "FeatureCollection",
"features":[
{
...
0
votes
2
answers
1k
views
Adding keyboard controls to a Leaflet js Choropleth map
I have a leaflet.js choropleth map that is almost exactly like the tutorial map
http://leafletjs.com/examples/choropleth.html
I want to be able to tab through the map and have the states info show ...
0
votes
0
answers
32
views
Grid in the picture from leaflet-simple-map-screenshoter
I use to leaflet-simple-map-screenshoter to take screenshots in a leaflet. I use to the default plugin. Why do I see a grid in the pictures?
let pluginOptions = {
cropImageByInnerWH: true, // crop ...
0
votes
1
answer
32
views
leaflet not set the marker at real position over custom map
I search info about the markers and why doesn't appear into the position coordinates. Include here in stackoverflow aren't info about my problem. The most near that found something similar it's this: ...
2
votes
1
answer
56
views
Correct way to extend leaflet classes with TypeScript
I am trying to extend the Marker class in leaflet.
I have read the tutorial on extending the class system and have managed to extend Marker with my desired functionality. However, I am unable to get ...
0
votes
0
answers
20
views
Use Tom-Select inside Leaflet Control
I'm trying to use TomSelect inside of a Leaflet control layer. Displaying it works as expected, but I'm not able to select anything.
It seems like the click event is not getting through to the ...
0
votes
2
answers
56
views
Is there a way to make Leaflet accept long/lat points assuming a spherical geometry?
I have two sets of coordinates: one from a sphere and the other WGS-84. I'd like to get them both into Leaflet. But Leaflet assumes long/lat points are WGS. As far as I can tell, its quite difficult ...