Questions tagged [leaflet.draw]
Vector drawing and editing plugin for Leaflet
leaflet.draw
301
questions
0
votes
0
answers
23
views
How can i pass in coords to draw the correct shape on an IMAGE?
can I pass actual x / y cords to Leaflet.js to draw a shape? - I have tried using actual cords and the shape is nothing like I expect - also SetView cords can I pass them here too ?
Code:
var map = L....
0
votes
1
answer
60
views
Trouble loading markers inside a polygon using Leaflet.js, FreeDraw, and Laravel
I use Leaflet.js, FreeDraw, and Laravel to create a real estate system. The functionality I am trying to set up is that when the user draws a polygon on the map, it should trigger an API call and only ...
1
vote
0
answers
75
views
Changing Colours of Leaflet Map
I wonder if and how it is possible to change the color of the map (individual countries, backgrounds and lines) in Leaflet?
I have simply created the basic code of a leaflet map as specified in the ...
0
votes
0
answers
20
views
leaflet (angular) dosn't show overlay-pane
I have the next map with leaflet:
private initializeMap(): void {
let ubicacion = this.obtenerUbicacionActual();
const center: LatLng = latLng(ubicacion[0], ubicacion[1]); // where i am
...
1
vote
0
answers
72
views
Leaflet draw polygon is rendering/drawn wrongly shifting bit away from selected position in Angular 17 with ssr enabled
We are using angular 17 and we have used leaflet and leaflet draw JavaScript plugin to plot the map and want to draw polygons, rectangle over it and get the boundary co-ordinates of the same. But when ...
0
votes
0
answers
136
views
how to enable leaflet edit & delete buttons in leaflet-draw-toolbar by default in vue2
I am using leaflet map library. I am facing issue with leaflet-draw-toolbar in which I have edit & delete buttons but these buttons are disabled by default. please provide me solution by which I ...
0
votes
0
answers
44
views
how to add new polygon layers to already drawn ones
how to add new polygons to an existing layer, so as not to completely redraw, but only add new ones?
the current code completely redraws the entire layer, but it is necessary for new zones to be added ...
0
votes
0
answers
135
views
Create a wider selection area to select the lines on react-leaflet map
Having difficulty in selecting the lines on react-leaflet map, so I have followed the below solutions,
https://gis.stackexchange.com/questions/466747/create-wider-selection-area-to-select-lines-on-...
0
votes
0
answers
164
views
Enable edit polygon on click in leaflet maps
I'm using below function to get geography data from backend as json and then draw polygon using leaflet:
function drawAreas() {
$.ajax({
type: "POST",
url: "...
0
votes
1
answer
104
views
Leaflet: Error while trying to get a GeoJSON from multipolygon Layer
The issue is this one:
I successfully could implmement a MultiPolygon Layer in Leaflet, but I'm getting an error while trying to convert it to a GeoJSON object.
My code is this one:
let ...
0
votes
1
answer
114
views
Calling cancel button while drawing in Leaflet-Draw
I am Creating Map with some areas drawn as polygons. Each area have property AreaNumber. AreaNumber is given in input under map.
Problem is: How to cancel drawing if AreaNumber is not written in input?...
1
vote
1
answer
353
views
Leaflet Draw: Attempting to erase a drawn shape, by clicking outside of it after drawing it
I'm developing a Laravel app with Leaflet, and trying to implement some funcionalities with the Leaflet Draw plugin.
What I'm trying to do is this: Drawing a polygon, rectangle or circle with Leaflet ...
0
votes
1
answer
324
views
Prevent draggable circle using Leaflet circle and leaflet-draw library
I have a circle that I add to the map when you click on a specific point (centroid of that circle will be where the point is) and you can edit the circle, meaning you can resize it using the gripper ...
2
votes
1
answer
177
views
Leaflet.Path.Transform - is there a way to add edge markers in the middle of each border?
I want to add circles in the middle of each border (only visually).
Is there a way to do it?
There are handlerOptions but I couldn't find something like that there.
0
votes
0
answers
100
views
Leaflet Draw - Selecting 1 Draw Option then another causes Drawing to drag map instead of shape
When attempting to draw, if you first select Draw Circle then select Draw Rectangle then go to click on the map, instead of beginning the drawing and dragging the shape out, the shape gets an initial ...