Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [leaflet]

An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

0
votes
0answers
3 views

Leaflet - Moving all the polylines connected to a marker

I am trying to move all the polylines connected to the marker. I have tried everything but I am only able to move the last drawn one only along with marker. Here is the code I want to move all the 3 ...
0
votes
0answers
11 views

Leaflet routing machine get route summary without drawind route

I am using LRM to calculate routes. And I need data about this routes. Now I'm just learning how to exctract this data so I can use it further. I have two routes var routing1 = L.Routing.control({ ...
0
votes
0answers
30 views

Leaflet display PHP data on GeoJSON popups

I want to display data from my database which I get in JSON format with getJSON function. I want to display these data on all GeoJSON features based on a condition. I am trying to do that with the ...
0
votes
0answers
14 views

Leaflet _ ReactJS - Where find the invalidateSize's property?

I have tried to found it in: this.mapRef.current.leafletElement this.mapRef.current.getLeafletElement() invalidating this.mapRef.current.getLeafletElement().invalidateSize this.mapRef.current....
0
votes
0answers
16 views

Cluster markers in the geojson-dashboard [on hold]

I have a problem with cluster markers using geojson-dashboard, a configurable framework for building webGIS. I'd like to cluster the markers and maintain synchronize with the table.
0
votes
1answer
33 views

How to cluster markers using the “Geojson-dashboard” in Leaflet JavaScript

I know how to use Leaflet.markercluster, but for some reason I can't use with geojson-dashboard framework template for Leaflet (http://fulcrumapp.github.io/geojson-dashboard/). But I have a simple ...
0
votes
0answers
10 views

Why does an Error occur when Publishing Leaflet with Shapefile to ShinyApps.io?

This shiny leaflet works in rStudio, but when I publish to shinyapps.io, I get this error. This is the R code for this : ##Sheridan County library(shiny) library (leaflet) library(readr) library (...
1
vote
0answers
25 views

My Leaflet map doesn't appear on my webpage [on hold]

Currently my Leaflet fails to fill the whole parent div on my page, in fact it doesn't appear at all. Here is my Leaflet snippet: const Wrapper= styled.div` width:${props => props.width}; ...
0
votes
0answers
11 views

Leaflet.Control.Layers.Tree plugin - Click on Parent and remove all Markers from all children [on hold]

How can we realize this: when click to parent in the list tree - then so close this tree and so remove all markers from children? And, we can Center/zoom map to click of markers from this list?
0
votes
1answer
17 views

Increase max zoom for large scale raster with GeoServer

I'm serving a large scale raster (warehouse map) with GeoServer. I consume the WMS in a Leaflet web client and coordinates are projected according to EPSG:3857. But it seems that maximum zoom is ...
2
votes
1answer
19 views

Using shapefile from MT.gov in Leaflet with R?

I would like to use shape files from http://ftp.geoinfo.msl.mt.gov/Data/Spatial/MSDI/Cadastral/Parcels/Sheridan/ However, the shape files are not showing up. My code is working with files from a ...
0
votes
0answers
22 views

Leaflet Map - Addition of GeoJSON causes markers to move [closed]

Steps Leaflet map is initialized with a tile layer About 24 markers are added to the map When the user clicks a different view, and event is triggered causing any GeoJSONs that are inside the map ...
1
vote
0answers
39 views

Setting bounds for image overlay in Leaflet

I'm using LeafletJS map. I need to use an image overlay. I have done it like so: onMapReady(event: any) { this.layers.push(imageOverlay(this.imgSrc + "map.png", [[35.334847, 25.328072], [35.337847,...
1
vote
1answer
25 views

Custom marker colours in leaflet based on attribute

I'm aiming to customize my markers (leaflet maps) into 3 different colours based on different values in an attribute column. Each marker is assigned a value A-C and I would like to represent each ...
0
votes
0answers
21 views

Showing / Hiding routes in Leaflet.js L.Layers.control? [closed]

Beginning with the Leaflet.Js API, I am looking to create a map with multiple routes in leaflet.js using the L.Routing.Control plugin, but with the ability to select which routes to display in a L....
2
votes
1answer
25 views

Client-Side Polygon split

I wanted to know if there is a way to split a polygon using JavaScript. So I have a web map which uses Leaflet API, and the user needs to cut polygons which are shown in the map using a straight line. ...
0
votes
0answers
14 views

Submit form in leaflet popup makes blank page

I have a problem with a leaflet popup. I made a form in it and when I try to send form with jquery & AJAX to postgis, data inserts correctly but blank page loads. How to update popup with response ...
0
votes
0answers
41 views

Visualizing GeoServer web map in other computers of company?

I made a Leaflet web map that I have no problem visualizing in my computer. It is a simple web map that contains a basemap and a few shapefiles (it's only use is to visualize the spatial data and when ...
0
votes
1answer
35 views

Leaflet Time Series

I am trying to create a code using leaflet and am having trouble animating a series of weather radar images using WMS. My code is as follows: <!DOCTYPE html> <html> <head> <...
1
vote
1answer
27 views

Returning data based on clicked marker using Leaflet?

How do I get the data according to the marker I clicked on? for(i in data) { var title = data[i].title, id = data[i].id, position = data[i].position, kriteria = data[i]....
0
votes
0answers
17 views

Box Select using leaflet by modifying box zoom with turf intersect

I have been trying to select multiple polygons using box select. I have modified box zoom for this purpose and included turf.js for intersect function. The problem is if i select a particular area and ...
0
votes
0answers
23 views

Leaflet - determine number of walls an AP intersects [duplicate]

We are trying to identify Leaflet script or plugin which can determine where all does a ray of signal intersects in a given room. See image for reference. What we are looking for as result is "the ...
0
votes
1answer
26 views

Map data do not show up under the Leaflet magnifier

I tried to add Leaflet magnifier to my map and it is perfectly working on the base map, but it doesn't magnify or show my own data on the map. My own data is loaded as GeoJSON to map and its visible ...
0
votes
0answers
36 views

Creating popups in Folium (Leaflet) for GeoJSON polygon layer

Looking through the Folium documentation I can't find how to add a popup to a polygon GeoJSON layer in Folium. Looking through the Leaflet documentation it seems like its possible, but I dont know how ...
0
votes
0answers
26 views

Applying symbology to Folium (Leaflet) polygon layers

I am trying to create a Folium map in Python that includes multiple polygon and line layers. I would like to be able to change the symbology of each layer to differentiate it from the others. I've ...
0
votes
0answers
18 views

Create a custom draw Toolbar

I would like to create my own custom toolbar for leaflet.draw plugin but I don't know how to approach this solution. To be more clear, I am trying to create a side-panel with buttons for each action, ...
0
votes
1answer
26 views

Leaflet 'Click' event on line portion

I have a polyline as GeoJSON layer in Leaflet. I need a JavaScript event when the user click on the portion of the line. I have to highlight the selected line segment. Is it possible this?
3
votes
1answer
43 views

Prevent user from drawing a feature with Leaflet.draw

In my application using Leaflet.draw the user can set point markers on a map. I would like to allow the setting only in a certain area. The function isMarkerInsidePolygon(marker, polygon) returns ...
0
votes
0answers
20 views

Creating a Leaflet Overlay from JSON

I am trying to make an interactive map using leaflet where the user can toggle an overlay of multi-polygons. So far the following code works using a checkbox to display dummy point data, and radio ...
0
votes
1answer
22 views

Leaflet layer control improperly selects basemaps when displaying multiple maps

As described on github, there seems to be an issue in Leaflet 1.4.0 when displaying multiple maps on a same page: base layers aren't properly selected. In Leaflet 0.7.2 however, this seemed to work ...
1
vote
0answers
33 views

Zooming on Leaflet map within iframe causes Samsung Galaxy to freeze map

Situation We need our map to capture pointer events to interact with 6.000+ canvas shapes, plotted on a GridLayer. We need to check for click events, mouse moves, etc. on the canvases. All works fine ...
0
votes
0answers
15 views

In Leaflet is uGeoJSONLayer the correct approach to get smaller amounts of Point data from GeoDjango?

I have a GeoDjango model containing a PointField. There are about 200,000 records spread over a large area. We view these records with Leaflet. The data only has relevance at a small scale (zoom level ...
1
vote
1answer
32 views

Which architecture to adopt when working with tile layers and Cartesian coordinates?

I'm currently working on a webmapping application dedicated to warehouse management. Where data is based on indoor geolocation and Cartesian coordinates system. More precisely, the map background is ...
0
votes
0answers
27 views

Leaflet popup design not working properly on IE11

I am using Leaflet on my map and I styled popup using Bootstrap 4. Design works good for all browsers expect IE11. Can someone help me to find the problem and fix it? How popup looks in Firefox: ...
0
votes
2answers
49 views

Changing Color and Opening Label on Hover

I'm initializing GeoJSON markers in Leaflet, and I'm trying to change the color and open a label on mouseover. Upon mouseout, I want to change back to the default color and close the label. However, ...
1
vote
1answer
38 views

Combine Leaflet with DataTables to show attributes based on map extent

I've seen a great implementation of both Leaflet and DataTables at the UK Centre for Ecology and Hydrology's National River Flow Archive (see here https://nrfa.ceh.ac.uk/data/search). How might it be ...
0
votes
0answers
37 views

Start a tile server on Android app

We want to have a offline Leaflet map on mobile. For this we want to use some kind of Android app which will serve as a tile provider when offline. The Leaflet will refer to this Android app as tile ...
0
votes
1answer
37 views

Terrain and Satellite maps in Open Street Map

For our project we are exploring Terrain and Satellite maps using LeafLet.js While exploring Internet got this https://leaflet-extras.github.io/leaflet-providers/preview/#filter=OpenTopoMap OpenToPo ...
2
votes
1answer
44 views

Leaflet dm and semicircle

I am trying to measure and show angle using semicircle library. It would measure angle between two vertices being drawn with PM Leaflet library. Measuring angles is good, however, drawn semicircle ...
0
votes
1answer
39 views

WMS tile overlay displays only after map pan

I am new to Leaflet and OSM. I am trying to overlay a radar layer which is WMS tile layer. The map will load, but the WMS tile layer does not show unless I pan the map and then it displays. It also ...
1
vote
1answer
32 views

Preventing map move on zoom in Leaflet?

How to prevent the map from moving when a user zooms in with scrollwheel? I would like the center to be preserved in any case. var mymap = L.map('spotmap', { dragging: false }).setView(...
2
votes
1answer
63 views

GeoDjango web mapping application can only view single point at one time?

I am very new to Geodjango and have been running into some issues with a web mapping application. Currently, I am trying to make it so I can view all the schools on a map at once, as well as view ...
0
votes
1answer
48 views

Map container is already initialized

In Leaflet, I want all my markers to be hidden at the same time and show on the click of a checkbox. Here is my code: var cordnt=this.coordinates; var overlayMarker = {}; console.log("testing ...
0
votes
0answers
34 views

Leaflet draw: prevent drawing through a custom overlay

I have a leaflet draw implementation (in Angular) with a custom sidebar that overlaps the Map. It should not be possible to draw through that sidebar. For circlemarkers I could solve this problem ...
1
vote
0answers
25 views

Leaflet photo plugins library compatiblity issue

I am using the Leaflet photos plugin, it runs perfectly using the Leaflet v0.7.7 but using the newest version of Leaflet v1.4.0 it doesn't work and it gives the error Uncaught TypeError: Cannot read ...
0
votes
1answer
78 views

Download tile layers for use offline

I would like to download tile layers in this form: {atlas_name}/{z}/{x}/{y}.png Because I want to use them offline with my leaflet map. However, I can't find what are the approaches to download ...
1
vote
0answers
44 views

Labeling when using qgis2web

I'm having trouble getting labels to appear in a web map, both Leaflet and OpenLayers, using qgis2web. I can't get either label buffers or backgrounds to show up and even a Bold style only works in ...
0
votes
0answers
20 views

Trigger click on geoJSON layer on dragend

I have a map where users can click on municipality polygones and the lat/lon values of the clicked position as well as the respective municipality name are saved in form fields for later use. I want ...
0
votes
1answer
45 views

Open the popups of all markers that are visible on the map with a zoom > 10

I need to open all the markers that are visible on the map at Zoom > 10. I am using leaflet.markercluster plugin. Init map: initMap() { this.map = L.map('map', { center: [55.55, 37.61], ...
0
votes
0answers
41 views

Leaflet markers at same geo location (ClusterGroup)

I have a map created with leaflet with different markers. Sometimes the markers have the same (1:1) geo position. I have already tested the great addon clustergroup, but I need the function to be ...