Skip to main content

Questions tagged [leaflet-plugins]

A set of plugins for Leaflet

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

Leaflet Mini Map Not Displaying with Esri Basemaps [closed]

I am trying to add a mini map to my Leaflet map that uses Esri basemaps. However, the mini map is not displaying correctly. I have included the necessary libraries and followed the setup instructions, ...
Rony Golder's user avatar
0 votes
1 answer
63 views

Leaflet markercluster: getting the zoom level at which a specific marker is no longer clustered?

I'm using Leaflet markercluster in an app. I have an endpoint where a specific marker is selected (eg. ../marker/12); so the maps centers on that marker and displays its popup when the page loads. But ...
gordie's user avatar
  • 274
1 vote
1 answer
72 views

Make Leaflet geocoder search marker open popup containing GeoJSON data

The following JSFiddle uses Leaflet and leaflet geocoder control search plugin. Code below HTML: <div id="map"></div> CSS: #map { height: 100%; position: ...
Discover's user avatar
-1 votes
1 answer
53 views

Seeking Leaflet printing library that is flexible (not browser print)

I'm a junior developer and I've been tasked with updating the leaflet part of the website. Do you know a good printing library where I could just export the map shown on the screen and manipulate it a ...
François Poulin's user avatar
1 vote
1 answer
89 views

Install Leaflet plugins in Python based environment for web GIS building purpose

I am in the middle progress of building a webgis that utilize python Flask as backend and Leaflet to build the maps. I can still manage until the step where I implemented the vanilla Leaflet and just ...
duns's user avatar
  • 23
1 vote
1 answer
77 views

Get events fired for all objects in a protobuf layer when clicked on in Leaflet.VectorGrid?

I am using Leaflet.VectorGrid to display a Vector Tiles layer that is loaded from pbf tiles from a tile server. <html> <head> <title>Vector Map</title> <body> <...
user3147507's user avatar
0 votes
1 answer
121 views

Displaying layer marker only after feature found with search plugin in Leaflet

I have been playing with different Leaflet plugins. One I am especially interested in is the Leaflet search plugin (https://github.com/stefanocudini/leaflet-search). I have been able to implement it ...
Bfox's user avatar
  • 1
3 votes
2 answers
498 views

Create wider selection area to select lines on map using LeafletJS

When there are thin lines on the map, it is very difficult to click them with the mouse cursor. So is there any option to wider the selection area for lines in LeafletJS, without increasing the line ...
Kishor's user avatar
  • 536
0 votes
1 answer
202 views

MarkerCluster element popup does not appear when clicking a spiderfy element, instead unspiderfy is triggered in Leaflet

I have created a custom popup that appears whenever an element on my map is clicked. However, when spiderfy happens (when a marker cluster is clicked and the map cannot zoom to a level that would ...
ysi_d's user avatar
  • 23
1 vote
0 answers
375 views

MarkerCluster does not zoom when cluster clicked if it cannot reach a zoom level that will separate elements. How can I check for this? [closed]

I have a map with a maximum zoom level of 18. It is possible to have data points that are so close together that they are still clustered at zoom 18, and it is also possible to have multiple data ...
ysi_d's user avatar
  • 23
1 vote
1 answer
390 views

Clipping raster layer created by Georaster plugin in Leaflet?

I want to clip a raster layer inside Leaflet. I want it to clip by a GeoJSON. I couldn't find an effective method to do it. The below code is what I have done so far. Can anyone suggest a method? var ...
Hasitha Bandara's user avatar
1 vote
0 answers
112 views

Loading local GeoJSON file into Leaflet [closed]

I have an issue with loading a local GeoJSON file into a simple Leaflet map. I followed the answer from Loading external GeoJSON file into Leaflet map?: I included the path to the leaflet.ajax.min.js ...
Pawel's user avatar
  • 408
3 votes
1 answer
654 views

Leaflet KML imported with Omnivore filled only with default blue and not the color set in KML file

I have a KML file which I need to import in a map using Leaflet. If I use leaflet-kml I can see all polygons with color set from KML file. But because I need to show only one polygon extracted for ...
user6634742's user avatar
2 votes
1 answer
207 views

Show only one polygon from KML loaded with Leaflet

I'm using Leaflet with Leaflet-KML plugin to show a KML file with multiple polygons. In this KML file there are 125 polygons. I want to pick only one to show on the map. The choice is made directly ...
user6634742's user avatar
1 vote
1 answer
232 views

Leaflet shapefile plugin doesn't show the shapefile layer

I'm trying to use the Leaflet Shapefile plugin (https://github.com/calvinmetcalf/leaflet.shapefile). A demo page also shows the plugin's output (http://calvinmetcalf.github.io/leaflet.shapefile/). I ...
Melanie's user avatar
  • 159
0 votes
1 answer
130 views

Bootstrap control modals plugin changing icons in Leaflet? [closed]

I'm using Leaflet plugin L.Control.BootstrapModal (see https://github.com/gregallensworth/L.Control.BootstrapModal) to add a few layer controls on my map which toggle a modal displaying some country ...
Simone Ghilotti's user avatar
3 votes
1 answer
711 views

Polygon fill pattern not visible in screenshot taken with Leaflet simpleMapScreenshoter plugin

We are using Leaflet to display polygons with fill patterns using the leaflet-polygon.fillPattern.js plugin. Additionally, we are using the leaflet-simple-map-screenshoter.js plugin to allow users to ...
Pavan Yogi's user avatar
1 vote
1 answer
216 views

Pass GeoPackage layer attributes to marker popup in leaflet without click on the marker

I am working on querying a GeoPackage layer based on leaflet and leaflet-geosearch. Here is the plain js code. import './style.css' import 'leaflet/dist/leaflet.css' import 'leaflet-geosearch/dist/...
darthvaderlives's user avatar
1 vote
1 answer
1k views

How to unify or integrate search bar in folium for multiple layers?

How to integrate multiple layers with one search bar using folium python? Data: import geopandas states = geopandas.read_file( "https://raw.githubusercontent.com/PublicaMundi/MappingAPI/...
Ceraunophile's user avatar
3 votes
1 answer
776 views

Get the distance and bearing of each pathline using Leaflet.PolylineMeasure plugin?

I have been playing with polylinemeasure:change and I see I can get the value of the total distance easily with currentLine.distance. But how can I get the value of each pathline distance and its ...
Peter La Anguila's user avatar
1 vote
1 answer
769 views

Seperate multiple tracks and segments in a single GPX file using leaflet-gpx plugin?

I'm using leaflet-gpx to plot a .gpx file containing multiple tracks but I can't get it to distinguish between each track of the file: This is the basic structure of the file: <gpx> <trk&...
XaC's user avatar
  • 407
3 votes
1 answer
939 views

Leaflet Control Search not finding location

I'm implementing the Control Search for a Leaflet.js webmap. The CSS and JS code has been added successfully and Control Search box appears in the map, but my search results in an error stating that &...
pac_co's user avatar
  • 547
1 vote
0 answers
199 views

Leaflet Vector Grid - cancel tile requests when not in viewport

I use Leaflet with the Leaflet.VectorGrid plugin to serve my own vector tiles (created with pg_tileserv). The tiles are automatically reloaded/updated when the user zooms in/out or is panning the map. ...
Robbert's user avatar
  • 49
1 vote
1 answer
365 views

How to get the geometry of Vector Tiles Protobuf integrated in Leaflet

I use the Vector Grid plugin to integrate Vector Tiles (Protobuf format) in my Leaflet application. How can I access the geometry of a selected feature? I include the Vector Tiles as follows: L....
Robbert's user avatar
  • 49
1 vote
1 answer
72 views

Making Leaflet-fullHash and Leaflet.EdgeScaleBar addons work together in Leaflet?

Leaflet.fullhash is useful for allowing to save the list of layers and the current location and zoom params in the URL like "mypage.com/#6/58.585/17.292/osm" : it's in https://github.com/...
Vincent Dc's user avatar
0 votes
1 answer
1k views

Error: nodebuffer is not supported by this platform

I'm trying to use Shpjs package for import Shape file on leaflet map bases on the shpjs doc : shpjs const [geoData, setGeoData] = useState(null); const onChangeFile = ({ target }) => { var ...
Mohammadreza Ataei's user avatar
1 vote
1 answer
503 views

Filter markers by date in Leaflet

I built a photo map with Leaflet which contains geotagged photos. I managed to fetch the timestamp and coordinates of the pictures with a php script and now I want to filter the images by it's ...
MrSalamikuchen's user avatar
1 vote
0 answers
165 views

Plot a huge number of points with Leaflet.Photo

I want to make a leaflet map with photo geotagged photos instead of marker symbols. The plugin Leaflet.Photo provides exactly what I need. In the future it is planned to represent up to 30.000 ...
MrSalamikuchen's user avatar
2 votes
2 answers
271 views

Changing size of leaflet.wms plugin popup in Leaflet?

I've created a webmap viewer with Leaflet and used the plugin leaflet.wms to call the WMS GetFeatureInfo service to query a map layer and return information about the underlying features. My code is ...
jpinilla's user avatar
  • 3,230
2 votes
1 answer
1k views

Checking whether a polygon drawn with Leaflet-Geoman plugin is valid?

We are using Leaflet.js to allow our users to draw polygons and save them to their GIS server. We do this by converting the geometry from Leaflet into WFS format and making an Insert Transaction via ...
fred's user avatar
  • 197
1 vote
1 answer
174 views

Sort items of Leaflet List Markers plugin control?

I'm reading shapefiles with the leaflet library. I print the list of markers on the left in a list via the Leaflet List Markers library. I should sort the list of map markers that are shown to me on ...
user1423513's user avatar
0 votes
0 answers
708 views

Leaflet JS: How to check if a Lat/Longitude is in proximity going away from the original point?

I am trying to generate a route where each point in the route has progressively a lower elevation than the last point. So a route would look like this: [A, B, C, D, E] So E, would be lower than D ...
Antonio Pavicevac-Ortiz's user avatar
2 votes
2 answers
7k views

Check if a point is inside a GeoJSON polygon in Leaflet

I am trying to determine if a point is inside a GeoJSON polygon or not, using the Leaflet.PointInPolygon plugin. See example code below: <script src="https://cdn.rawgit.com/hayeswise/Leaflet....
JohnGIS's user avatar
  • 515
0 votes
1 answer
277 views

Get current and average speed - Leaflet

The following code would allow for tracking and giving the speed of a user. I'd like to have this info, and even average speed, but I receive this error: "166:37 Uncaught TypeError: ...
Vincent Dc's user avatar
0 votes
1 answer
452 views

Leaflet: fetch GeoJSON data while using markercluster plugin

I am trying to make a Leaflet map with the markercluster plugin and to fetch data from its related json file. The goal is to display various properties of my points elsewhere on the page when clicking ...
erki's user avatar
  • 11
0 votes
0 answers
165 views

Leaflet leaflet.groupedlayercontrol plugin does not show layers

I´m using [leaflet-groupedlayercontrol][1] plugin but failing to see layers in map. I manage to add layers to map with normal var lc = L.control.layers(baseLayers).addTo(map); lc.addTo(map); lc....
Bruno's user avatar
  • 45
1 vote
1 answer
448 views

Change border color of individual overlay items in Leaflet-panel layers plugin?

I am using the Leaflet panel layers plug in and want to change the color of the border of each item in the overlay. I can change all of them at once in the css file but cant change them individually. ...
CLa's user avatar
  • 83
1 vote
2 answers
842 views

Editable polygon with different sized two part border (inner and outer, in meters) in Leaflet?

I'm a beginner in Leaflet JS and I have a polygon drawn on the map: var coords= [ [27.40839959582344,-82.40601726602196], [27.40859871554781,-82.40638191331237], [27.40834938302612,-82....
LAffair's user avatar
  • 255
1 vote
1 answer
637 views

Leaflet Turf JS - polygon with negative offset missing some parts

I'm new in Turf JS and I have a polygon with a negative offset like: const coords= [ [25.085416706126708,55.1561039686203], [25.085351117322578,55.15612542629241], [25.08549687017286,55....
LAffair's user avatar
  • 255
1 vote
1 answer
354 views

Leaflet.PolylineOffset Polyline drawing issue

I don't have much experience with Leaflet JS and I'm using Leaflet.PolylineOffset in order to draw a polyline around a polygon: L.polygon(coords, { fillColor: 'white', fillOpacity: 0.5, weight: 20, ...
LAffair's user avatar
  • 255
1 vote
1 answer
953 views

Create custom legend control using L.ExtraMarkers.icon icons in Leaflet?

Is there any way I can add Leaflet Extramarkers to my legend? From what I googled, it seems I'll have to add an image of markers... however I was hoping I could use the ones I created. var Icon = L....
Aneeqa's user avatar
  • 339
1 vote
2 answers
908 views

Leaflet.PolylineOffset Polyline with offset is drawn on the inside of a polygon

I'm new in Leaflet JS and I'm using Leaflet.PolylineOffset in order to draw a polyline around my polygon: L.polygon(coords, { fillColor: 'red', fillOpacity: 0.5, weight: 20, color: 'red', opacity: 0.5,...
LAffair's user avatar
  • 255
1 vote
1 answer
660 views

TypeError in showResult for leaflet-geosearch

I'm using leaflet-geosearch. When I click on an address from the search bar, I get the error: Uncaught (in promise) TypeError: Cannot convert undefined or null to object at Function.keys () at ...
viggyram's user avatar
0 votes
1 answer
411 views

Leaflet Ruler check if the ruler is in use

I don't have much experience with Leaflet and I'm using the ruler from here. I'm trying to find out if it's in use when the map zoom changes. var rulerOptions = { position: 'topright', ...
LAffair's user avatar
  • 255
0 votes
1 answer
125 views

Using Leaflet.motion plugin on geometry returned by WFS service?

I'm back with my Leaflet.motion service because I'd like to link it to an existing WFS service for easier and live updating. The Javascript plugin for WFS and Leaflet motion are: <script src=&...
Vincent Dc's user avatar
0 votes
2 answers
552 views

Using GeoJSON as input to leaflet.motion plugin in Leaflet

I'm interested by the script Leaflet motion. I tried to update the code to add a custom GeoJSON created from QGIS or any tool. But the current error is : leaflet.motion.min.js:9 Uncaught TypeError: ...
Vincent Dc's user avatar
0 votes
0 answers
376 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 ...
Thoms's user avatar
  • 1
1 vote
1 answer
3k 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: ...
LAffair's user avatar
  • 255
2 votes
1 answer
1k 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:...
LAffair's user avatar
  • 255
2 votes
0 answers
369 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”.
nOybek's user avatar
  • 121