Skip to main content

All Questions

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 ...
fairlyMinty's user avatar
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 ...
bees's user avatar
  • 1
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), ...
Brage Fridriksson's user avatar
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 ...
Brage Fridriksson's user avatar
1 vote
1 answer
1k views

How to disable drawing any polygon on Leaflet map

I am trying to disable drawing any polygon on map until user selects any radio option displayed in image below. So How can I cancel drawing or disable user to draw anything on map?
vinita jain's user avatar
0 votes
1 answer
3k views

Custom color of draw polygon on leaflet map

I am drawing polygon on leaflet map this.polygonDrawer = new L.Draw.Polygon(this.map); How can i customize color of this polygon? Like i want red color polygon should draw so where i can give ...
Hunzla Ali's user avatar
0 votes
1 answer
3k views

Remove polygon from leaflet map on button click

I have leaflet map which contain multiple polygons. I am adding polygon(s) to map like this L.polygon([lat,lng]).addTo(map) Also i can draw polygon on leaflet map. Now i want to remove specific ...
Hunzla Ali's user avatar
0 votes
1 answer
2k views

How to check leaflet map has any polygon?

I am using leaflet map, which can contain polygon(s). I want to check that map has any polygon and if it has then i want to find coordinates of that polygon?
Hunzla Ali's user avatar
1 vote
1 answer
2k views

Leaflet draw event "draw:deleted" not deleting layer

Please note that i am using @asymmetrik/ngx-leaflet-draw for Angular. I'm configuring a map where the user can draw either rectangles or polygons. I then save these to a layerGroup based on the ...
Koronag's user avatar
  • 157
3 votes
1 answer
4k views

Use Leaflet Draw plugin in Angular 7 TypeScript Component's Toolbar

I am trying to use the Leaflet.Illustrate in my Angular 7 project. I have tried to load it in the HTML, but, even if it does load, it's not apparent how to call the new L.Illustrate.Control({ ...
Matthew Dewell's user avatar
1 vote
1 answer
1k views

find which shape is edited or deleted in leaflet drawControl

i implemented leaflet and leafletDraw in my Angular6 app, it works fine and i can trigger the create event and add the polygon to my map, but when i try to delete or edit my polygon i can't find which ...
Lia's user avatar
  • 11.9k
2 votes
3 answers
8k views

How to create custom control in leaflet draw for Angular?

I am new to leaflet draw plugin and typescript, so I am looking for the way to extend leaflet draw in order to create a custom control that draw a circle. I saw an example written in JS, but don't ...
user3820544's user avatar
1 vote
1 answer
590 views

Equivalent of L.Class.include() with TypeScript

In JavaScript (with Leaflet), I could implement some custom functionnalities using L.Class.include() as written in the documentation : Including more functionality in an existing class with L....
Alex Beugnet's user avatar
  • 4,061
1 vote
1 answer
444 views

disable Ionic 2 touch events system for leaflet map (draw controller)

Can anyone please show me how to disable data-tap on ionic 2, in leaflet map div? On Ionic-v1, the trick was to input data-tap-disabled="true" in the div map container (ion-content). I installed ...
Ben Ayoub's user avatar
2 votes
2 answers
5k views

Import leaflet Draw into an angular 2 project

I am new to Angular2. Built with Cli. Although I was able to get Leaflet imported into this Angular2 project without any Angular2 directives. I would like to do the same with Leaflet Draw extension....
Fiddler's user avatar
  • 53

15 30 50 per page