All Questions
Tagged with leaflet openstreetmap
556
questions
0
votes
0
answers
18
views
How to properly zoom and update OpenStreetMap tiles on my JS Maps
When I launch the file everything works fine and the mouse movements are correct however the zoom is catastrophic and it does not zoom/refresh the next tiles of OpenStreetMap
class CustomMap {
...
0
votes
0
answers
18
views
setZoom not working in Chrome but is working in other browsers
I am unable to get setZoom or any of the zoom features to work on my leaflet map in Chrome.
It works fine in Firefox and Edge but I need it to work in Chrome also and cannot find anything on this.
Any ...
0
votes
0
answers
24
views
Polyline starts from main world map instead of nearest point [duplicate]
I am using Leaflet map to draw polylines and connect waypoints by clicking on the map.
I also cloned the route and waypoints to the left and right world map.
Sometimes, the route is drawn incorrectly. ...
0
votes
0
answers
23
views
Can I load basemap without center or set view in map initialization
I have the center coming from a different layer, however, that layer is loading slowly so initially you see a blank map container.so, I want the basemap to be visible.
view.map = L.map('map_' + mapId, ...
1
vote
1
answer
90
views
custom zoom-in zoom-out buttons in leaflet using pico.css
Coming from this answer to customization of marker in leafleat: remove blue background from markers, now i have the following problem:
.html file:
<!DOCTYPE html>
<html lang="it">...
3
votes
1
answer
107
views
remove blue background from markers
how to remove the blue background from the markers?
this happen using default icon and a custom one (png with transparent background)
am I doing something wrong?
<!DOCTYPE html>
<html lang=&...
0
votes
0
answers
28
views
Cannot achieve live navigation using js,openstreetmap and leaflet
I'm currently working on implementing live navigation functionality in a web application using JavaScript. The goal is to update a tracker marker on a map according to the user's position on a ...
1
vote
0
answers
35
views
Leaflet OpenStreetMap Changes View based on window size
I am using Leaflet and OpenStreetMap to generate an interactive map. The map generates fine and you are able to interact with the map. The issue I am encountering is if the user has a large screen ...
0
votes
1
answer
76
views
How can I get geoJSON file read correctly in JavaScript?
I am using Leaflet and OpenStreetMap's to display a map on my page. I followed the steps to create a simple map on the page. Once I was able to generate a map, I follow the steps on creating a geojson ...
0
votes
0
answers
31
views
Leaflet map turns white when adding coordinates for Polyline
My version of nuxt is "^3.10.3", "nuxt3-leaflet" version: "^1.0.12". In nuxt.config: "nuxt3-leaflet"
The problem is that when I transfer the coordinates to the ...
0
votes
1
answer
74
views
How to add arrow-marked lines in Leaflet map to indicate direction from one location to another?
I'm working on a project involving Leaflet maps, and I'm trying to find a way to add arrow-marked lines to indicate direction from one location to another. Can someone please provide guidance or code ...
0
votes
2
answers
55
views
Adding Map of tunisia at the open street map with polygon
i need help i am trying to show the map of tunisia at the map there is nothing shown , this my code of javascript :
`
<script>
$(function () {
var polygon = null;
var ...
1
vote
0
answers
44
views
Leaflet draws location pins, but not path; "Uncaught TypeError: Cannot read properties of undefined (reading 'x')"
I'm trying to use the latest stable version of Leaflet (1.9.4) with OpenStreetMap and Nuxt3 to show the route between two given locations, but it only shows the pins. I have confirmed that the ...
0
votes
0
answers
60
views
Obtaining List of Coordinates for Route Along Nearest Edge Using OSMnx, Python and Leaflet
I am currently working on a mapping project using Leaflet, where I need to obtain a list of coordinates representing a route between an origin marker and a destination marker. Specifically, I want the ...
0
votes
0
answers
19
views
why my maps using openstreetmap not rander fully [duplicate]
why my maps using openstreets map not rander fully on laravel 10 like this
var map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
...
0
votes
0
answers
58
views
How to use Leaflet Terminator together with the Heatmap
I have a code where, upon running the Leaflet terminator, the heatmap disappears, but the terminator runs successfully. However, when I remove the terminator, the heatmap appears. Below is my code ...
0
votes
0
answers
36
views
Leaflet Marker Cluster - click button in table to open popup inside cluster spiderfy
i will click button in table to open popup inside cluster spiderfy, but it not open the popup
but if not cluster spiderfy disable popup is work
var tiles = L.tileLayer('https://{s}.tile.openstreetmap....
1
vote
1
answer
182
views
WebView in javaFX not showing leaflet map correct
I'm trying to add a webview and webengine into java.
When I try it with openstreetmap, it is not problem.
<html>
<head>
<script src="http://www.openlayers.org/api/OpenLayers.js&...
1
vote
1
answer
66
views
How to put png image over openstreemap map in wix site that the png image will be integral part of the map?
first in general:
I want to put a weather radar image with clouds over openstreetmap map of my country.
this is the png image the radar image:
and this is how it looks like in the Israeli official ...
0
votes
1
answer
107
views
In openstreemap/leaflet how to display in real time the coordinates in a small tooltip when the mouse moves over the map
I want that when i move the mouse over the map it will display like in a small tool tip balloon the coordinates in real time on the mouse cursor for example like: 35.56, 56.765
I tried this code in ...
0
votes
0
answers
109
views
Issue using MapContainer from react-leaflet: TypeError: Cannot read properties of null (reading 'useState')
I'm trying to use React Leaflet to add a map from OpenStreetMap on my website. Everything seems to go well syntax wise, however when I try to use I encounter this error:
Uncaught TypeError: Cannot ...
0
votes
1
answer
219
views
Scrape leaflet map coordinates from a dynamic website
I am trying to scrape the marker coordinates from a website containing a leaflet map (osm data). I have been trawling the web for answers and it appears that a simple query to the parsed html will not ...
0
votes
0
answers
54
views
Using PNG tiles (QTiles) for publishing offline basemap
I need to add a map with some vector objects to my Django web-application to interact with object using Leaflet library. Now I have a vector map of a region, which was made with QGIS, and I made some ...
0
votes
0
answers
126
views
Leaflet Map open popup in markercluster from outside with react-leaflet and react-leaflet-markercluster
I encountered an issue with combining two functionalities: placing Markers in a group using the MarkerCluster plugin (https://tomickigrzegorz.github.io/react-leaflet-examples/#/marker-grouping-...
1
vote
0
answers
40
views
Best fit of two geojson
I have two sets of geojson data. The first is a fetch from OSM of all nodes within a box. The second is a set of points along a square.
Now i want to best fit the square onto the OSM nodes. Any idea ...
0
votes
1
answer
455
views
Converting osm maps to mbtiles
I am working on an project which is completely offline (windows), the frontend is in react where i display a base map using react-leaflet library, and i serve the base map through a node backend from ...
0
votes
0
answers
109
views
How to use OpenLayer ZoomSlider with Leaflet
I tried to display a map with Leaflet and OSM. The project uses C# Blazor and .NET 8 but the map parts are just javascript. I added a slider to zoom using ZoomSlider from OpenLayers.
The slider does ...
0
votes
0
answers
26
views
How can I build on top of someone else's map? I want to get their layer
Mapping novice here! I work for a humanitarian organization and we want to take a map that was built using leaflet and OSM and then build on top of it (basically adding our own location markers).
It ...
0
votes
1
answer
70
views
Leaflet redraw polyline performance
I created Leaflet OSM map and menu where user can choose one of the options. Each option causes the map to remove previous polyline and draw another. On desktop devices it works smooth, but as soon as ...
1
vote
1
answer
69
views
How to prevent click on outside of polygons in Leaflet map js?
We have multiple arrays of lat long, ( here 3 arrays are stored in success_content_mapareas )
Accordingly, we have created the map and it looks like this, which seems okay in the image below.
We need ...