Questions tagged [leaflet-plugins]
A set of plugins for Leaflet
92
questions
0
votes
1
answer
34
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 ...
0
votes
1
answer
26
views
Bootstrap control modals plugin changing icons in Leaflet?
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 ...
2
votes
1
answer
81
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 ...
1
vote
1
answer
53
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/...
0
votes
0
answers
97
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/...
3
votes
1
answer
124
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 ...
1
vote
1
answer
119
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&...
2
votes
1
answer
178
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 &...
1
vote
0
answers
43
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.
...
1
vote
1
answer
117
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....
1
vote
1
answer
33
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/...
0
votes
1
answer
330
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 }) => {
...
1
vote
1
answer
161
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 ...
1
vote
0
answers
113
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 ...
1
vote
2
answers
84
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 ...
0
votes
0
answers
153
views
Leaflet Enable Snapping L.Draw Polygon
how i can enable Snapping on L.Draw Control Polygon in latest versions of Leaflet 1.8, without using geoman
I am using L.Draw.Polygon to enable drawing on the map, here is code for that
...
1
vote
1
answer
560
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 ...
1
vote
1
answer
64
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 ...
0
votes
0
answers
354
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 ...
1
vote
1
answer
2k
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....
0
votes
1
answer
137
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: ...
0
votes
1
answer
189
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 ...
0
votes
0
answers
78
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....
1
vote
1
answer
180
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.
...
1
vote
2
answers
434
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....
1
vote
1
answer
265
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....
1
vote
1
answer
77
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, ...
1
vote
1
answer
378
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....
1
vote
2
answers
408
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,...
0
votes
0
answers
37
views
How to get pixel values upon clicking on a webmap published using qgis2web?
So I want to publish a web map using the qgis2web plugin on QGIS. My web map has 2 raster layers with the same footprint, one on top of the other. Now, I want that upon clicking any pixel on the top ...
1
vote
1
answer
290
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 ...
0
votes
1
answer
140
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',
...
0
votes
1
answer
89
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=&...
0
votes
2
answers
363
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: ...
0
votes
0
answers
217
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 ...
1
vote
1
answer
1k
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:
...
2
votes
1
answer
530
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:...
2
votes
0
answers
176
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”.
1
vote
1
answer
207
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"
...
1
vote
0
answers
1k
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 ...
1
vote
1
answer
202
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],
...
0
votes
2
answers
725
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 ...
1
vote
0
answers
419
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 ...
1
vote
1
answer
580
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 ...
0
votes
2
answers
171
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 ...
2
votes
1
answer
2k
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 ...
1
vote
1
answer
1k
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 ...
1
vote
1
answer
216
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 ...
0
votes
1
answer
246
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 ...
0
votes
1
answer
412
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]...