Questions tagged [leaflet]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
20 views

Leaflet map - legend with custom icons

Continuing the query: Leaflet GeoJSON legend with custom icons I am struggling with the implementation of the custom icon to the legend. I found an another example also here: http://www....
3
votes
1answer
72 views

Resize vector marker according to zoom (i.e. marker constant size in meters) in Leaflet?

I have a map with 20 markers on a geojson layer. They are all from the same SVG and represent a certain area on the map (meaning they represent a circle of constant radius in meter on the map). I need ...
0
votes
0answers
39 views

Serving a QGIS Project to Leaflet / MediaWiki Maps Extension

I'm currently serving a custom map with qgis-mapserver and that works well. However, my next step is Mediawiki integration, and for reasons of GeoJSON overlays, I must use the Leaflet option there. ...
1
vote
0answers
40 views

Correctly formating Leaflet popups

I'm working on a Leaflet map, currently adding content to my popups. In .bindPopup ([" "]) is there any way to format a paragraph of writing on the backend into multiple lines of code within those ...
0
votes
0answers
12 views

R: Creating custom polygons based on geom of subset data [duplicate]

I hope that I titled this question correctly. Reproducible code: library(tigris) library(leaflet) colorado <- counties("colorado") leaflet(colorado) %>% addProviderTiles("CartoDB.Positron"...
0
votes
0answers
22 views

Maptiler with leaflet.js npm package renders incorrectly

I had no issues rendering a map with leaflet.js and MapTiler when I imported the leaflet script and css files like this... <link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/...
1
vote
2answers
55 views

Leaflet select markers from multiple JSON files within the radius given

Continuing work with the issue presented here: Leaflet - select markers within the radius given with details provided I am going to a further step and I want to use more than 1 json file to fetch ...
0
votes
1answer
51 views

Changing image size in JSON file [closed]

I am wondering how to change image size, available under the link in JSON file. I base on the example: http://www.gistechsolutions.com/leaflet/DEMO/baseball/BaseballPanel.html which uses a links ...
1
vote
1answer
35 views

Show Leaflet markers that falls inside mapbounds, based on geocode location entered from database

I have a GUI application where data from my database are displayed on a table and also displayed as markers on Leaflet map. I have added the Geocode (L.Control.geocoder()) function into my application,...
1
vote
1answer
38 views

GeoJSON file generation based on MS Excel

I am wondering how to CLEARLY generate the JSON file from the data based in Excel file. I know some ways to do it, although as a result I have got sth like this: {"type":"FeatureCollection","...
0
votes
1answer
42 views

Input multiple KML files into Leaflet API

As we know, since the WIndy Leaflet-kml plugin has been developed we are able to input our KML files into the Leaflet map. However I have one query regarding this: How we can input a huge (at least ...
1
vote
0answers
74 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
22 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
18 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
66 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
21 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
18 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
74 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
44 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 ...
1
vote
2answers
50 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
27 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
38 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
30 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
54 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
33 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
34 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
48 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
30 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
29 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
34 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
75 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
29 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
27 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
120 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
43 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
26 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
67 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
36 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
32 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
47 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
41 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
28 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
77 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
42 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
39 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
19 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
63 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
39 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 ...