Questions tagged [leaflet.draw]
Vector drawing and editing plugin for Leaflet
leaflet.draw
343
questions
1
vote
0
answers
2k
views
Get all polygon or layer details after polygon draw in leaflet draw
I am trying to get the layer details of the map which are already overlay on the map. When leaflet draw is created I want to get the layer details (Not the polygon coordinates created by leaflet draw ...
0
votes
0
answers
362
views
How can I draw a polyline with leaflet-draw to only get the shown dashed line and then disable the plugin?
I am trying to use the Leaflet-draw plugin to draw a simple polyline. Right now I can enable the plugin where I need it when I start to draw the polyline and it works by adding the vertex to the start ...
1
vote
1
answer
1k
views
Limit maker points in Polyline (to be a Line) using leaflet-geoman
I want to enable the user to draw a Line (which is a Polyline with only 2 points).
I enable drawing and the listen for vertexadded. When the _rings marker count equals 2, I disable drawing.
This feels ...
1
vote
1
answer
128
views
How to create a button in shinyR which event is the same as the polygon drawing toolbar in leaflet map
I want to create a button in shinyR which event is the same as the polygon drawing toolbar in leaflet map. I'm trying to figure out how to manually trigger events from R to Leaflet polygons. Basically,...
0
votes
0
answers
136
views
Layers in Leaflet.Draw is different every time
What I want:
To click delete, choose drawn layers, and delete them from the UI and firestore when clicking save
How I have it now:
Every time i am creating a new leaflet.Draw layer (ex. a rectangle), ...
0
votes
1
answer
469
views
How to reference the deleted layers in Leaflet.draw?
I am trying to delete a Leaflet.draw layer from my database in firestore. I can easily delete it from the database side, but i struggle with connecting the document name with the layer name.
More ...
0
votes
2
answers
2k
views
Leaflet JS - Draw rectangle and filter circle markers in the rectangle and update HTML table with only those markers
I have a leaflet map which has circleMarkers plotted by longitude and latitude using the markers array coming from an AJAX REQUEST. This all works fine. I am trying to work on drawing a rectangle ...
1
vote
1
answer
2k
views
Cannot read property 'error' of undefined in map.addControl in leaflet.js
First I write a code to create a toolbar with leaflet.draw
var drawPluginOptions = {
position: 'topright',
draw: {
polyline: false,
circle: false, // Turns off this drawing ...
0
votes
2
answers
3k
views
Get the coordinates of a rectangle on Leaflet
I will want to get the coordinates of each corner of a rectangle that the user will draw on a map (leaflet).
The goal is to extract the max/min latitude and the max/min longitude.
Here is the code ...
0
votes
1
answer
804
views
Leaflet convert meters to pixels
I am creating an app using leaflet
I have the leaflet map up and running and have a Geoserver service that return points that are shown on the map.
I have one additional field that is distance between ...
0
votes
1
answer
2k
views
How to change the map center position to top place using Leaflet open street map in angular
In my angular application I have created the leaflet map and over the leaflet map I have created two more panels data in overlapping manner And I have created the circle of 5 km radius on the map. But ...
0
votes
0
answers
276
views
popup.openOn(map) only works in firefox, not in chrome or edge
tl;dr
popup.openOn(map) only works in firefox, not in chrome or edge. Popups on markers work flawlessly.
Lengthy version:
I'm kind of abusing leaflet.draw to let users insert an image overlay. I do ...
0
votes
1
answer
1k
views
Using leaflet.FreeDraw with leaflet.path.drag
I am wondering if it's possible to use Leaflet.FreeDraw with leaflet.path.drag to be able to drag the polygon created by FreeDraw plugin.
jsfiddle
I tried to enable dragging plugin like this, but it ...
-1
votes
1
answer
655
views
Leaflet.draw emit event to stop drawing
Using leaflet-draw, when i draw with a polyne i need to end the drawing when the second point of the rect is fixed. Listening on 'drawvertex' event two times, in the
mymap.on(L.Draw.Event.DRAWVERTEX, ...
0
votes
2
answers
1k
views
The markers drawn on leaflet.draw are not deleted after removing layer
I created a simple app to add points using leaflet draw. If the user cancel de dialog the drawn layer is removed. However, when the next marker is drawn, the previous cancelled ones appear again. Here ...