Questions tagged [leaflet-draw]

42 questions
1
vote
1 answer

why have i conflict direction right to left in CSS with leaflet?

I used the leaflet draw and now I have a problem editing, the map and editing doesn't work with Google Chrome.I realized that this is a problem with CSS(direction right to left). How can I fix it now?
nasrin.mkh
  • 91
  • 1
  • 2
  • 8
1
vote
0 answers

How to make WFS layer editable on leaflet map and editing will reflect on geoserver?

code to call WFS layer from geoserver and add on leaflet map. I want to make it editable and change will reflect on WFS layer present on geoserver. I have spend more than 4 hours trying to figure out how I can do this. I use Leaflet and Leaflet Draw…
1
vote
1 answer

Geojson structure different when drawing Leaflet layer vs loading Leaflet layer

My web application has users drawing shapes with Leaflet.Draw control as well as loading shapes from geojson files. However, it seems like both methods generate different geojson objects. When I load the shape from geojson. { "options":{ …
disguisedtoast
  • 149
  • 1
  • 4
  • 15
1
vote
1 answer

Leaflet draw polygon on load map

I have this polygon coordinates let polygon = [ [ 51.40545845031738, 35.706447104954194 ], [ 51.390438079833984, 35.70568044469603 ], [ 51.38288497924805, 35.69689817401091 …
Mahdi Bashirpour
  • 17,147
  • 12
  • 117
  • 144
1
vote
1 answer

How to create custom draw button for ngx-leaflet with ngx-leaflet-draw

I want to create a custom button, which enables the Polyline drawer on click. it's similar to How to click a button and start a new polygon without using the Leaflet.draw UI, but I want to do that with angular (7), ngx-leaflet and ngx-leaflet-draw.…
MojioMS
  • 1,583
  • 4
  • 17
  • 42
0
votes
1 answer

How to edit only selected feature from geojson using leaflet geoman

I have a GeoJson having 40,000 features as MultiPolygon.Can anyone guide me that how can i select individual polygon from it and edit that selected one. Right now when I click edit in Leaflet-Geoman toolbar it selects all 40,000 features and make…
0
votes
2 answers

Leaflet Draw how to trigger button events from outside the map

I've got a leaflet draw instance where I need buttons outside the map to start / cancel draw actions. I have successfully triggered draw start with map.Draw.Polyline(map, myDrawControlInstance.options.polyline).enable(); but the only action I could…
bfeist
  • 78
  • 1
  • 8
0
votes
0 answers

Leaflet Js ,Draw Polygon?

I'm trying to code javascript for the first time, I want to add a few buttons and have the user draw Polygon,line, can you help please
0
votes
0 answers

Edit and Delete doesn't work for Angular Leaflet

I am trying to edit and delete the shapes that I draw on the leaflet map. However, when I active the edit or draw, nothing happens and I am unable to edit the shape. I am currently importing leaflet and leaflet-draw into my application: import * as…
fairlyMinty
  • 413
  • 8
  • 22
0
votes
1 answer

Leaflet Draw how to hide click cancel tooltip

I'm using Leaflet Draw to edit a map, but whenever I go into edit mode, I get a rather large tooltip attached to the mouse pointer (see screenshot), which obscures quite a bit of the map and prevents me from seeing my own marker tooltips when I…
AlphaBeta
  • 1,023
  • 1
  • 9
  • 18
0
votes
1 answer

Leaflet Draw - Remove marker without save confirm

I have a map with draw controls to create, edit and remove markers. All works fine, but I would like to remove the marker just with one click... without save confirm. I haven't found any posts explaining how I can do this ... or my search is…
Francesco G.
  • 679
  • 3
  • 13
  • 32
0
votes
0 answers

leaflet-draw in VUE3 throws error as wrong leaflet version

I am creating a page in VUE3 where I am including leaflet and leaflet-draw libraries. I am using leaflet version "^1.7.1" and leaflet-draw version "^1.0.4" which are latest as of now. The map is getting created without any issue. Although I am using…
Muneer
  • 7,384
  • 7
  • 38
  • 62
0
votes
0 answers

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), I save it to firestore, delete all, and create…
0
votes
2 answers

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 under which I display my map and I draw my rectangle…
A-d-r-i
  • 31
  • 2
  • 11
0
votes
1 answer

React-Leaflet : Adding L.TileLayer breaks map

My goal is to add leaflet-draw to my Map. To do this, I've been using L to add control and drawnItem layers to the map upon component mount. The problem seems to be with the TileLayer. If I add it in the rendered div, it only fills 80% of the map…
BurgMan
  • 57
  • 1
  • 7