Questions tagged [leaflet-draw]
A plugin for Leaflet that adds support for drawing and editing vectors and markers on Leaflet maps.
144 questions
1 vote
1 answer
99 views
Panning and zooming map while using Leaflet Draw
The default behaviour of Leaflet Draw is to expect a single click to create vertices for lines and polygons. I find this impractical, especially for mobile devices. For example when I try to draw a ...
1 vote
1 answer
294 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 ...
3 votes
2 answers
971 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 ...
1 vote
1 answer
266 views
Generate popup message which shows the coordinates on drawn and edited polygon in Leaflet?
I am using Leaflet map. I am trying to have a popup message which shows the coordinates on drawn polygon. However when I am trying to edit the drawn polygon using the edit layer the coordinates in the ...
1 vote
1 answer
1k views
Leaflet.draw change polygon filling programmatically
I'm using Leaflet.draw to draw and edit polygons. var drawControl = new L.Control.Draw({ edit: { featureGroup: drawnItems, edit: { selectedPathOptions: { ...
1 vote
2 answers
2k views
Layer's feature color (Leaflet map)
How can I assign a color for each feature without defining the attribute value? Problem: I have many features, I don't want to define the ID values manually when calling getColor() like this: function ...
4 votes
1 answer
2k views
Exporting GeoJSON with defined properties using Folium Draw plugin
I used a nice plugin for python folium: https://www.youtube.com/watch?v=rAicpbCUwco&ab_channel=SudoControl but the problem is, that my saved geojson file has no properties. I tried to inject JS ...
1 vote
0 answers
721 views
How to add custombutton on Draw toolbar leaflet?
I want to add custom button on Draw toolbar where I need to add my own functionality . I have wrote my code as : var drawControl = new L.Control.Draw({ draw: { marker: false, ...
1 vote
1 answer
515 views
Edit(Reshape) GeoJSON data coming from database added on leaflet map
I have multiple buildings data displaying on map as GeoJSON, but we have to change their shapes while they are on map and update latest shape GeoJSON in database. How can I make GeoJSON editable on ...
1 vote
2 answers
1k 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
1k views
Move and update a marker to a fixed coordinate
I used Leaflet and leaflet.draw-src.js with this code : http://bl.ocks.org/TetsuyaKimotsuki/0156c511e3217edf58beb206633308f8 After creating a marker, I want to move it to the coordinates indicated in ...
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: ...
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:...
2 votes
0 answers
471 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”.
2 votes
0 answers
4k views
Leaflet/Vue 3 Issue Uncaught TypeError: Cannot read properties of null / this._map is null
I am facing an error on Leaflet on Vue 3 whenever i try to zoom in or out when a popup is closed. The error on Mozilla: Uncaught TypeError: this._map is null Popup.js and the error on chrome ...