Questions tagged [leaflet-plugins]

The tag has no usage guidance.

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

Display features OSM buildings

Using Leaflet, I've installed OSMBuildings, yet I'm unable to display buildings features although it's allowed on https://osmbuildings.org/ It seems like there is a latitude and longitude once we ...
user avatar
  • 1
1 vote
0 answers
15 views

Leaflet draw change line weight while drawing

I don't have much experience with Leaflet and I have the drawing control var drawControl = new L.Control.Draw({ edit: { featureGroup: drawnItems, edit: { selectedPathOptions: { ...
user avatar
  • 177
1 vote
1 answer
49 views

FeatureGroup polygon and polyline cannot be edited with Leaflet-draw

I don't have much experience in Leaflet and I'm trying to learn from my mistakes. I have multiple polygons (just polygons) and some that have a polyline on top of it grouped as a featureGroup like: ...
user avatar
  • 177
1 vote
1 answer
39 views

Leaflet - add circle around mouse icon on draw

I'm a beginner in Leaflet and I have the draw control added for polygon drawing: var drawControl = new L.Control.Draw({ draw: { marker: false, polyline: false, rectangle: false, circle:...
user avatar
  • 177
2 votes
0 answers
39 views

Drawing buffer zones in React-Leaflet

I am working with a Leaflet in react.js and using react-leaflet-draw. I can't draw a buffer on shapes drawn by react-leaflet-draw. Just like a “leaflet-buffer”.
user avatar
  • 21
1 vote
1 answer
53 views

Display a Leaflet Heatmap with a gpx file and Omnivore

I first displayed a Leaflet Heatmap with the plugin : "leaflet-heat.js" and a geojson file with this code found on Gis.Stackexchange var geoJsonUrl = "link to the geojson file" ...
user avatar
  • 135
0 votes
1 answer
64 views

Leaflet vectorigrid Uncaught Error: Unimplemented type: 6

I am using Leaflet vectorgrid plugin with a folder of .pbf files(created from a .mbtiles file using mbutil) to load a map using Apache server.However,when I load the map on the browser,I take this ...
user avatar
  • 101
0 votes
0 answers
192 views

Leaflet and MBtiles rendering using Leaflet.TileLayer.MBTiles

I would like to render a map with Leaflet from a MBTiles file using the Leaflet.TileLayer.MBTiles library. I added the MBTiles file on the same folder with index.php. I am NOT using a web server like ...
user avatar
  • 101
1 vote
1 answer
40 views

Move Leaflet.TimeDimension plugin slider with keyboard?

I added a time dimension slider to a leaflet map to display a series of points in a range of time. This is the code: var mymap = L.map('mapid', { zoom: 3, center: [50.4, 10.7], ...
user avatar
  • 227
0 votes
2 answers
163 views

Get info for all features upon click with betterWms Leaflet plugin?

var layer = L.tileLayer.betterWms("http://localhost:8080/geoserver/wms", { layers: 'data', format: 'image/png', transparent: true, }).addTo(map); When adding this GROUP WMS ...
user avatar
0 votes
0 answers
140 views

Implementing Leaflet plugin "Leaflet.Control.Layers.Tree" in R leaflet

I want to use "Leaflet.Control.Layers.Tree" in my R script. I am using the leaflet R-package to draw my map. I found this great leaflet plugin: "Leaflet.Control.Layers.Tree". How ...
user avatar
1 vote
1 answer
166 views

Using L.Control.Opacity plugin with GeoJSON layer in Leaflet

I have a fully working map with a few base layers and some buttons, each of which loads and displays different resources. One loads some historical map overlays and uses the L.Control.Opacity plugin ...
user avatar
0 votes
1 answer
95 views

Hide Wikipedia plugin layer below certain zoom level in Leaflet

How can I turn the following code into a variable, so that I can choose, or not, to load it in the layer control? and not anymore on moving the map or reaching this zoom level. I added a var wikilayer ...
user avatar
2 votes
1 answer
297 views

Unable to remove marker cluster group completely from the map in Leaflet

I am having a weird issue with removing a MarkerClusterGroup layer from the map. When at a zoom level more than 5, I want to show markers on the map in a MarkerClusterGroup layer. When zoomed to less ...
user avatar
  • 223
1 vote
1 answer
332 views

Getting coordinates after address has been picked in Leaflet geosearch control?

I'm using leaflet to make a web map with an address search bar. For that I'm using leaflet-geosearch plugin I need to retrieve the result once the user has picked the correct address from the search ...
user avatar
1 vote
1 answer
61 views

Leaflet Flickr photos and Marker cluster small image broken relation

I intend to use Jose Mamira's Flickr plugin to show clustered photos from Flickr, with their thumbnail (first all photos, for this exemple, then I would easily change the code to display only my own ...
user avatar
0 votes
1 answer
119 views

Zoomfit to the selected polygon of WMS Layer using Leaflet Js

I have problem in zoom fitting the selected polygon of WMS Layer. For example, I have a World shapefile. I make a dropdown menu for country names, I did when I choose a country from dropdown menu only ...
user avatar
0 votes
1 answer
138 views

Use Leaflet.MultiOptionsPolyline and leaflet.motion plugins together for the same polyline

I already search through the web but no clue on how to use Leaflet.MultiOptionsPolyline and leaflet.motion plugins together for same polyline. There are two functions, one is: L.motion.polyline([[50,0]...
user avatar
1 vote
0 answers
136 views

refilter method on geoJSON created with leaflet-ajax throws error, filtering works on load, no jQuery

I am building a map with a few hundred markers from a separate geoJSON file. Some of these are in the same spot, so I am using leaflet-markercluster to display them nicely. Each marker has two ...
user avatar
0 votes
0 answers
152 views

Side by side Leaflet plugin with GeoJSON still not working

According to this answer and this another answer, I already changed the getContainer() method with getPane() method (I only got 4 calls and changed all of them). I inserted two map panes: map....
user avatar
0 votes
0 answers
78 views

Any examples using "eventedClasses" in plugin Leaflet.Control.Layers.Tree

I'm trying to use the Leaflet plugin "Leaflet.Control.Layers.Tree" and i would like to check the option "eventedClasses". This may give me some info about the current layers, I ...
user avatar
  • 301
2 votes
1 answer
643 views

Show shapefile data by Leaflet

I am trying to load a shapefile in Leaflet but no luck, It just loads the map. not sure what I am missing. Here is the file: http://data-atgis.opendata.arcgis.com/datasets/...
user avatar
1 vote
1 answer
229 views

Leaflet MarkerCluster - extra marker underneath the cluster circle before it is exploded

I am programmatically adding new markers to my map with this code: const geojsonLayer = L.geoJSON(null,{ pointToLayer: function(feature, latlng) { return new L.marker(latlng) ...
user avatar
  • 113
1 vote
0 answers
56 views

Local GeoJSON in Leaflet using leaflet-ajax [duplicate]

My aim is to include a local geojson file in my Leaflet map application using leaflet-ajax , as suggested by this earlier answer. In my root directory, I have: index.html entire contents of Leaflet ...
user avatar
0 votes
0 answers
541 views

React leaflet map print

I want to print a leaflet map in PDF/Image formats and It will be contained, WMS layers Polygon, Markers, Polylines etc I'm using a leaflet map with React Typescript. Related versions are, react-...
user avatar
1 vote
0 answers
26 views

Intersection using turf js [duplicate]

I am giving this for intersection of a polyline using Leaflet draw plugin with polygons feature class. Here is my code function intersectPolyByPolyFC(poly,fcPoly){ var fgp=[];//variable for ...
user avatar
1 vote
0 answers
298 views

Finding closest marker to user location Leaflet KNN

I am using Leaflet KNN and would like the closest station to a users location, from the web browser, to have a pop up saying it is their closest station. How can I find the nearest marker to the user ...
user avatar
  • 101
0 votes
1 answer
122 views

Using large data JSON file in Leaflet markercluster [closed]

I want to show the JSON file consisting of many points on the map using the leaflet marker cluster plugin. My JSON file looks like: [ { "json_featuretype" : "Output", "...
user avatar
  • 63
1 vote
0 answers
114 views

How to add and delete the Leaflet OpenStreetMap dynamically

I have to place the Leaflet maps to be placed in the bootstrap grids (maps has to place dynamically with the number of elements coming from the backend i.e number of elements = no of Leaflet maps). ....
user avatar
  • 11
1 vote
1 answer
537 views

Open marker popup show when chosen from list in Leaflet

When I choose a spot from list it zooms in to it but it doesn't open/popup with label/text. Any one knows? suggestions?? This is my code; // - SEARCH ENGINE - // var clusterSpots = L....
user avatar
0 votes
1 answer
204 views

How to add and remove the pop-up text based on the condition by using Leaflet

I want to show and hide the popup text based on the condition given below. .component.ts var insidecirclespace1 = (lat, long) => { for (var i = 0; i < this.sensors.length; i++) { ...
user avatar
  • 1
0 votes
0 answers
1k views

Cannot access GeoJSON layer in react-leaflet

I am using React Leaflet to render Leaflet map and its GeoJSON component to render polygons. I am trying to implement dragging multiple polygons. I added Leaflet.Path.Drag library and tried to reuse ...
user avatar
  • 73
1 vote
0 answers
848 views

Creating the Leaflet map offline(load the leaflet tiles without internet)

I have created the Leaflet map which works in online. But now my requirement is to create the Leaflet open street map in offline. How do I load the Leaflet map offline?
user avatar
  • 11
2 votes
1 answer
900 views

Picking up the coordinates inside this polygon draw

I already have a geojson being consulted and that is plotting these black dots. And then I inserted the leaflet-geoman plugin to give users the freedom to create polygons on the map. Basically draw ...
user avatar
1 vote
1 answer
596 views

Leaflet control window - how to get image & text to appear together in the content of the modal window?

I have implemented leaflet-control-window plugin into my map and it works. Modal opens on marker click and shows text. I need image to go below the text in the window but can't get it to work. When I ...
user avatar
0 votes
1 answer
34 views

Access individual feature properties when running l.esri.find or l.esri.query

Here is what my site looks like: https://brandonlprice.github.io/landrecords/. How can I access the feature properties for a layer when running a find or a query on a layer? I have the the feature....
user avatar
-1 votes
1 answer
204 views

qgis2web basemaps sit on top of all other layers in Leaflet and OpenLayers on webpages

Generating a webpage from a map always elevates the basemap from the bottom (within the QGIS Project) to the top (on the webpage map). This means the additional layers can never be overlaid to fully ...
user avatar
  • 164
1 vote
1 answer
194 views

RemoveMarkers() is not working for PruneCluster markers in Leaflet

I have a set of markers clustered with PruneCluster plugin. The data of these markers is rendered from GeoJSON layers, the way to do it is like this: var propsAmp = amphibiens.features var ...
user avatar
0 votes
0 answers
174 views

Interaction of leaflet.browser.print and esri.geosearch

I am using leaflet.browser.print: L.control.browserPrint({ documentTitle:'Verify Me!', closePopupsOnPrint:false }).addTo(map); with an esri geocode search: var searchControl = L.esri....
user avatar
1 vote
2 answers
283 views

Request Multiple WMS for Raster Calculations in Leaflet JS

I need to display in leafletJS a Layer that is the difference of two rasters received from a regular WMS. With the help of this repo I figured out how to manipulate the values of a raster tile in ...
user avatar
1 vote
1 answer
387 views

Leaflet.streetlabels with leaflet-side-by-side not working

I was trying to mix some Leaflet Plugins, namely leaflet-side-by-side (https://github.com/digidem/leaflet-side-by-side), Leaflet.streetlabels ( https://github.com/triedeti/Leaflet.streetlabels ), the ...
user avatar
  • 111
0 votes
1 answer
362 views

Regular-grid-cluster plugin for Leaflet

I am starting with Leaflet and I am trying to use the Regular-grid-cluster plugin with no success. The following code works until the definition of the 'const grid' element. So, I can see the markers ...
user avatar
  • 771
1 vote
0 answers
236 views

leaflet-kml loads entire KML of 15-20 MB at client browser in one go or in chunks as and when user drags to other locations of country?

I am trying Leaflet KML plugin as below: https://github.com/windycom/leaflet-kml Here is full code: <html> <head> <meta name="viewport" content="width=device-width, ...
user avatar
0 votes
0 answers
99 views

leaflet-kml Lat Lng changes and zoom don't work with KML

I am trying Leaflet KML plugin as below: https://github.com/windycom/leaflet-kml const map = new L.Map('map', { center: new L.LatLng(28.412, 77.317), zoom: 11 }); It works, loads the KML over OSM, ...
user avatar
1 vote
1 answer
417 views

Combine leaflet-tilelayer-mask and Leaflet.TileLayer.ColorFilter plugins

I am trying to color my tileLayer mask differently and I found the colorFilter plugin. I can't seem to figure how to use the color filter tile created in my mask tileLayer. let map = L.map("map&...
user avatar
0 votes
0 answers
530 views

Leaflet PlayBack

I am trying to animate with the https://github.com/linghuam/Leaflet.TrackPlayBack plugin. I have approximately 100 coordinates and ID numbers defined in each coordinate. Can different symbols be used ...
user avatar
2 votes
1 answer
1k views

Avoiding overlapping charts on a map with Leaflet?

I'm currently developing an online GIS with Leaflet and need to plot bar charts on a map. I'm using leaflet.minichart (https://rte-antares-rpackage.github.io/leaflet.minichart/) for the charts. My ...
user avatar
1 vote
1 answer
1k views

Interactively Display Values of a Heatmap.js leaflet.js Heatmap Layer

In this example of the heatmap.js tool, I see how the values of the heatmap is returned by using heatmapINstance.getValueAt(): demoWrapper.onmousemove = function(ev) { var x = ev.layerX; var y =...
user avatar
2 votes
0 answers
354 views

Cannot add a leaflet.pattern pattern to Leaflet map

I'm using the leaflet.pattern npm package. What am I missing? My Leaflet map is in a Vuejs application. Maybe I need to correct the import statements? import L from "leaflet"; import "leaflet....
user avatar
  • 373
0 votes
0 answers
125 views

Is there any elevation profile plugin working in MVC5?

I have MVC5 project where I use Mapbox maps to display hiking trails (based on geojson file). Lately, I decided to add elevation profile of these trails to the bottom of the map. However, thats easier ...
user avatar
  • 101