Skip to main content

Questions tagged [leaflet.draw]

Vector drawing and editing plugin for Leaflet

0 votes
1 answer
159 views

Check if my coordinate points are inside a polygon drawn by a user

I want to check if my coordinate points are inside a polygon that is drawn by a user in leaflet. For that, I have one file with my points: shp_geo_sirene > shp_geo_sirene Simple feature collection ...
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 ...
2 votes
0 answers
231 views

Leaflet draw does not show the area of the Polygon

I've seen that in some examples using leaflet draw, after drawing the third point, a popup shows the area of the drawn item on the map. I'm unable to replicate this function even setting the polygon: {...
7 votes
3 answers
4k views

Leaflet Draw on rectangle draw it throws error

I'm using leaflet + leaflet-draw + @ngx-leaflet + @ngx-leaflet-draw in an Angular application. I've tried everything, versions change, importing the modules .forRoot() and not, adding the js files ...
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
1 answer
1k views

Leaflet routing machine usage limits

I want to find out if there are any usage limits for the leaflet routing machine library. In particular what's the maximum number of waypoints that can be supplied as part of routing requests and are ...
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
2 answers
2k views

Change vertex style in leaflet draw

Leaflet draw edges are too big and ugly, I've looked on a way to change its style and I came up with the following code: draw: { polyline: { shapeOptions: this.onSelectionStyle ...
7 votes
2 answers
17k views

Add existing leaflet polygons to an existing leaflet layer

I have a bunch of polygons which are stored in a database. I would like to add them to the map in such a way that they can be edited using the leaflet-draw toolbar. Although, now the polygons get ...
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: "...

15 30 50 per page
1
2 3 4 5
23