Skip to main content

All Questions

0 votes
1 answer
1k views

Trouble figuring out how to use GeometryUtil with React-Leaflet

I'm building an application with JavaScript, React & Leaflet(+React-Leaflet plugin). I want to get coordinates of closest marker to my location, but I'm having trouble figuring out how to use ...
aksoco's user avatar
  • 191
3 votes
0 answers
1k views

Display ECharts map using OpenStreetMap without Leaflet

I would like to render a geographical map inside my web page using the ECharts library. ECharts needs a third party service to retrieve the images of the geographical region that it must display and I ...
Sirion's user avatar
  • 917
0 votes
1 answer
409 views

Show map markers on hover

I have a list of links to several locations. I would like to add map marker to my OSM map and remove it when I hover out, while adding new one I hover over etc. I've been been able to add marker to ...
santa's user avatar
  • 12.4k
0 votes
1 answer
851 views

Get Leaflet map tile image for polygon

For a project I need to generate previews of polygons that we store in the backend. A polygon typically has this format: [lat,long] const polygon = [ [ 4.329064, 51.276626 ], ...
Florestan Korp's user avatar
1 vote
2 answers
1k views

OpenStreetMap tile opacity

is there a way to set the opacity of just the tiles using leaflet and OpenStreetMap? I want the map to have 50% opacity, but keep 100% opacity on the markers. Setting opacity like this, does not work: ...
perand's user avatar
  • 15
0 votes
0 answers
317 views

Get all generated route points (of lines) to check if you hear route deviation - Leaflet Js [duplicate]

I create the route using Leaflet to plot the generated route on the map. var route = L.Routing.Control({ waypoints: receivedWaypoints, routeWhileDragging: true, fitSelectedRoutes: true, ...
gabrielcassimiro's user avatar
2 votes
1 answer
431 views

Leaflet markers aggregating when dezooming the map

I am new to Leaflet and I am trying to show a map with markers. The problem I have is that the markers disappear when I zoom out, and are replaced with a number: I used CircleMarkers to be able to ...
Flamby's user avatar
  • 21
1 vote
0 answers
98 views

Trying to implement own function in an existing GitHub project

L.interpolatePosition = function(p1, p2, duration, t) { var k = t/duration; k = (k > 0) ? k : 0; k = (k > 1) ? 1 : k; return L.latLng(p1.lat + k * (p2.lat - p1.lat), p1....
Eke Jacobs's user avatar
2 votes
1 answer
1k views

How to add custom leaflet error handler for open streat map timeouts?

For a few hours I got timeout errors and parts of the map were blue. Also see OpenStreetMap often sends Gateway Timeout error https://forum.openstreetmap.org/viewtopic.php?id=68026 The issue seams ...
Stefan's user avatar
  • 11.6k
0 votes
1 answer
3k views

Leaflet js working on localhost, but not working when opening from Harddisk

I have a JS which uses Leaflet to display a map. It works, when I open it on a remote server or using XAMPP on localhost. But the Openstreetmap Tiles are NOT displayed / working when opening it just ...
tim's user avatar
  • 10.1k
0 votes
1 answer
756 views

Leaflet Providing invalid Lng/Lat coordinates when location duplicates on display

Question Is the lng/lat provided by leaflet not a GPS coordinate? Do I have a way to convert it into GPS coordinates or is this a bug in leaflet? Steps to reproduce Setup a map that repeats. Click on ...
hendr1x's user avatar
  • 1,487
4 votes
1 answer
3k views

Leaflet map marker dragging is not working properly on mobiles when disabling scrolling

I added an OpenStreetMap map on my project using Leaflet. I wanted to disable scrolling on mobiles and wheel scroll on desktops. I used the following options found here and managed to achieve this. ...
Giannis Lps's user avatar
0 votes
0 answers
254 views

How align gpx track with leaflet map Javascript

I have a problem with my gpx track on leaflet map. My track is displayed on the map but not aligned with road. I use this library to display the track : https://github.com/mpetazzoni/leaflet-gpx I don'...
Tann's user avatar
  • 1
0 votes
0 answers
264 views

How to access a local directory instead of URL of OSM server?

I am playing with the Leaflet.html demo provided on their website to try and build a offline map application. I am trying to change the following line of code // add the OpenStreetMap tiles ...
Fernando's user avatar
  • 109
1 vote
1 answer
88 views

How to set active region correctly in this Leaflet map?

I want to hightlight active region with nid=105. I did it in "color: feature.nid == 105 ? '#fa9f1a' : 'white'". But I have a problem, when I clicked to another region, region with nid=105 ...
user14846818's user avatar

15 30 50 per page
1 2 3
4
5
19