Questions tagged [leaflet]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
113 views

Enable WMS GetFeatureInfo request in Leaflet using R?

I've been using R with Leaflet and Shiny to produce a web map that is accessible to the public online. It is a real-time air temperature map of Tasmania, Australia based on current Bureau or ...
1
vote
0answers
29 views

Error while rendering Leaflet map on Shiny

I have been trying to reproduce a Leaflet map on a Shiny webpage. I have made this code so far: library(shiny) library(shinydashboard) library(leaflet) library(rgdal) library(dplyr) library(DT) Map &...
2
votes
0answers
20 views

Adding JAXA weather map tiles in Leaflet

Is there any way I can add JAXA rainfall layer as a Leaflet layer. If not what other options are available for rainfall/ppt layer other than OpenWeather map?
1
vote
0answers
159 views

Input KMZ files into leaflet map

Is it possible to input a zipped .kml file (.kmz) int Leaflet? I was trying the code: fetch('Cov.kmz') .then( res => res.text() ) .then( kmltext => { // Create new kml ...
1
vote
1answer
29 views

Add geotaged images to Leaflet

I have a problem adding my images to the popup features of my Geojson. I can do it for one image but i would like to have them for multipels images. <html> <head> <title>A Leaflet ...
0
votes
1answer
22 views

ESRI-Leaflet updateFeature with a changed attribute or property

I'm updating a feature in ESR-Leaflet from a feature layer based on a call to a function. What I'm having trouble with is submitting this change to the feature service. Currently I: Get the feature ...
0
votes
1answer
26 views

Esri-Leaflet getFeature returns 'undefined'

I'm using Esri-Leaflet and whenever I try to use getFeature() the console.log returns "undefined". There are no other errors to accompany the undefined message. var service = L.esri.featureLayer({...
0
votes
2answers
257 views

Leaflet - select markers within the radius given with details provided

I know the tool in Leaflet, provided by this link: http://www.gistechsolutions.com/leaflet/DEMO/Select/SelectPoints3.html which enables me to select a markers within 150mi distance. This is fine, ...
1
vote
1answer
53 views

Appending data from Google spreadsheet into Leaflet LineString feature properties?

How would I add several properties into a set of leaflet LineStrings from google spreadsheet via Tabletop? I've created LineStrings from the google spreadsheet linked above and need to add the data ...
2
votes
2answers
131 views

Reading JSON features from a Google spreadsheet using Tabletop into Leaflet web map?

I'd like to read a table of JSON formatted cells into a Leaflet map using the Tabletop extension of leaflet. However, my script only reads the first object. Any advice on how to create an array of ...
0
votes
0answers
28 views

Resize divIcon HTML on zoom in Leaflet [duplicate]

I am displaying zip code geometry on the map and also a marker with divIcon at the centroid of zip code. The divIcon with HTML looks like a label, for instance 23929. I would like to change the size ...
0
votes
1answer
69 views

Leaflet: flyToBounds location of bounding box returned by PostGIS

I want to simply center my map on the search result of a polygon using leaflet. I thought to return the bounding box, as this is closer to what I actually need. I want to use flyTo() I see a ...
1
vote
0answers
32 views

Load KML to GeoJSON [closed]

I want to let Marker to other style. This is my code: <script> var url = 'leaflet/WGS84.kml'; doSomething(url); function doSomething(url) { var runlayer = omnivore.kml(...
1
vote
0answers
109 views

Change maxZoom level on Leaflet Marker Cluster Group?

Our leaflet web app allows users to switch between tile layers. The tile layers sometimes have different max zoom implemented by the tile provider or local config. We have another layer with ...
0
votes
0answers
49 views

Leaflet function to track point coords on map move

New to the forum. I also posted this question on Stackoverflow, not sure it is the same forum. I am trying to build a Vt of 360 degree panopictures with OSM map using Leaflet. I would need a ...
1
vote
0answers
98 views

Remove a Drawn Polyline from LeafLet Map

How can I simply just remove this polyline from the map? var pointA = L.latLng(From.lat, From.lng); var pointB = L.latLng(To.lat, To.lng); var pointList ...
1
vote
0answers
128 views

Get min/max of Lat and Long leaflet map getBounds [closed]

I have the bounding box of a map in leaflet with map.getBounds() which returns the NorthEast LatLng and SouthWest LatLng. How do I get the minimum and maximum of bothLat and Lng from this bounding box....
1
vote
0answers
41 views

Leaflet catch window position

This is what I want to do: When loading the map, it will first grab the window coordinates of the current screen, and then load the data points of the current screen. The next screen is as ...
1
vote
1answer
55 views

Leaflet side by side plugin is not working with imageOverlay

I'm trying to use the side by side plugin. I already check in the issues and change the getContainter() with getPane() in the .js file. this._divider.style.left = dividerX + 'px' this.fire('...
0
votes
1answer
51 views

Overlay with the feature collection properties

I have the GeoJSON: [{"type":"FeatureCollection", "features":[ {"type":"Feature","properties":{"id":27,"name":"F001"},"geometry":{"type":"LineString","coordinates":[[-100.231018,47....
2
votes
2answers
123 views

Scaling tiles for missing zoom levels in Leaflet?

I have two sets of tiles. One for zoom level 10 and one for zoom level 14. However, I want to be able to see tiles on my map at zoom levels 9 through 15. For the nonexistent sets of tiles I want to ...
-2
votes
1answer
34 views

Are Leaflet extensions plugins compatible with TomTom web SDK? [closed]

TomTom in their developer site says: Does this mean that Leaflet extensions and plugins are also compatible with their SDK?
0
votes
0answers
59 views

Searching with Leaflet search control in layers added with Layers control?

How do I notify the search control about the layers that are added to the map? This is my web viewer: Actually, i can search only one layer, cannot search in the layers added from leaflet control ...
1
vote
1answer
476 views

Leaflet JS - open popup on button click

New to JavaScript, coming from Python background. Created a custom control and have added buttons inside the _div using a for loop and innerHTML. I want to zoom to and open the popup of a layer of ...
0
votes
1answer
148 views

Connect GeoServer WMS data to Leaflet.js

I have WMS Layer in GeoServer, I've made it following the walk through tutorial in https://www.e-education.psu.edu/geog585/node/701 I'm confused on how to connect my WMS to leaflet.js.
0
votes
0answers
30 views

Leaflet: Unable to filter GeoJSON beyond the `properties` element level

I have the following code which displays a Layer in my Leaflet map from some remote GeoJSON: // Create Layer: Airspace var featuresUTMAirspace= L.geoJson(dataGuardianUTM, { filter: FuncAirspace, ...
0
votes
1answer
134 views

Handling popups with overlapping layers in Leaflet

I have two polygon layers (polygons) that overlap. I've created a leaflet map using qgis2web. The issues is that, if I click on the overlapping area, the popup only shows information for the topmost ...
1
vote
1answer
92 views

Passing multiple arguments to callback function in Leaflet layer method bindTooltip()

I have a few GeoJSON layers on a Leaflet map that I am using the bindTooltip method on. Specifically, I am trying to use a function as the argument to bindTooltip so that I can produce some custom ...
1
vote
0answers
39 views

Visualizing street shape data for London?

I am trying to visualise some street-level data I got, but since I'm very new to GIS I don't know the correct terminology to Google. My data looks like this: Street, Incident Count Congo Road, 12 ...
0
votes
3answers
62 views

Linked popup image in GeoJSON file

Developing the issue solved in this post: Trying to pop up image in GeoJSON file? I would like to have each GeoJSON image thumbnail possible to open in larger window. I was trying to connect with ...
1
vote
1answer
79 views

Display .kml file in Leaflet

I would like to show my .kml file in my leaflet map.~ There is a plugin: https://github.com/windycom/leaflet-kml whixh unfortunately doesn't work. It show only a blank map in the coordinates provided....
1
vote
1answer
52 views

Trying to pop up image in GeoJSON file?

I am trying to put an image inside the geoJSON file. I know, that Geojson works as string and I cannot input the image directly, however I found some stuff, like this below: http://www....
1
vote
1answer
38 views

Binding multiple Leaflet image overlays as one

I am planning to put at least ten single image overlays, spread across the country. I have got two so far: var priorycourt = 'Priory_court.PNG', imageBounds = [[52.399892, -1.531154], [52.400837, -1....
2
votes
1answer
124 views

How to write hyperlinks to local files in GeoJSON properties?

I am wondering how to make a hyperlink from GeoJSON file properties to the local drive file. I found two options here: Clickable hyperlink from GeoJSON field in feature this option refers to a whole ....
1
vote
1answer
88 views

Resizing Leaflet CircleMarkers after zoom level changes?

I am trying to find a way to have my CircleMarkers resize themselves after zooming in or out so that they scale properly with the map. So far, I have tried firing map.InvalidateSize() on the zoomend ...
0
votes
1answer
71 views

Checking if a specific leaflet.draw control is enabled?

Where exactly are the leaflet controls stored that are added to the map? So at anytime in the app, I can check something like if(controls.polyline.enabled==true) My guess is its somewhere in the map....
1
vote
1answer
30 views

Iterating through sub-element `sections` of GeoJSON on a Leaflet map?

I have the following code which I use to display a marker on my map with a popup containing the feature.properties.name element from my GeoJSON: var featuresUTMGroundHazards = L.geoJson(...
0
votes
1answer
169 views

Custom functions for SAVE and CANCEL on Leaflet.draw edit control

I have added an edit control on my map which is working fine (On the Frontend); var editControls = new L.Control.Draw({ draw: false, edit: { featureGroup: this.updateGeomLyr ...
0
votes
0answers
61 views

Leaflet control window is not a function

I trying to add a leaflet control window to my map, but i get an error in the console of browser. The error is in console is: Uncaught ReferenceError: L is not defined at L.Control.Window.js:1 ...
0
votes
0answers
72 views

Leaflet GeoJSON legend with custom icons

I have been developed a legend, details are here: Leaflet GeoJSON map legend Now I am wondering how to take into account my custom icons, set for GeoJSON file. var myIcon = L.icon({ iconUrl: '...
4
votes
1answer
589 views

Leaflet mouse move to get coordinate

I hope to be able to display the coordinates on the map when the mouse moves, not to use marker. But my code can't run successfully. This is my code: <html lang="en-US" xmlns="http://www.w3.org/...
0
votes
2answers
130 views

Leaflet GeoJSON map legend

I am struggling with creation of the map legend adequate to my GeoJSON stylization. The code looks like below: var geojsonMarkerOptions = { radius: 8, fillColor: "#ff7800", color: "#000", weight: 1, ...
1
vote
0answers
48 views

Display route and the two markers in Leaflet routing Machine?

How do I make the route and the two markers appear in Leaflet routing Machine? Here is my code: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> ...
1
vote
1answer
79 views

Leaflet load JSON data

Does my code have problem? Because if I run in Visual Studio, it doesn't show error, but the file didn't load on my map. I put the JSON file and HTML on my desktop. This is my code : ...
1
vote
1answer
106 views

Leaflet Foreach point in GeoJSON check Distanceto

So I was wondering how I can get the points from the GeoJSON located here. and then for each of them separately check if the distance of Markers is within 5 meters range of these. I have tried but ...
0
votes
0answers
31 views

Adding JSON layer in Leaflet just like GeoJSON data? [duplicate]

I am trying to add different layers to a leaflet map. Now i really want these layers in order to add features like zoom. With GeoJSON file this was easy but I am not getting a good way to plot array ...
1
vote
0answers
36 views

Load JSON data Problem

Why my file only read data3 popup data? data1 and data2 just popup the data3 data <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> <head profile="http://gmpg.org/xfn/11"> &...
0
votes
0answers
32 views

Leaflet load GeoTIFF file from browser [duplicate]

I want to load a GeoTIFF file from a browser using Leaflet. I have created a custom control button that on click loads a file from local computer. fileInput.Change() is the function that is called, ...
1
vote
1answer
195 views

Unable to use fillColor values from GeoJSON with Leaflet

I have a web page which fetches some remote GeoJSON and displays a combination of marker points, polygons and lines on my map. Within that JSON is the fillColor, fillOpacity, etc that I wish to use ...
0
votes
1answer
148 views

GeoJSON search box for multiple layers

I am wondering how to make the GeoJSON search more efficient. I would like to get the search result from more than 1 layer in GeoJSON. My code is (I attached one of two GeoJSON examples): var test = ...