All Questions
Tagged with leaflet.draw angular
27
questions
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
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
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: {...
0
votes
1
answer
229
views
How can I show the polygon coordinates by popup in Angular?
here is the function of drawing polygon in leaflet map.
onDrawCreated(e: any) {
const { layerType, layer } = e;
if (layerType === "polygon") {
const ...
0
votes
0
answers
471
views
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 ...
1
vote
1
answer
1k
views
Leaflet plugins in Angular project
I have an angular project (Angular 13) where I use leaflet. In the package.json file, I have:
"leaflet": "^1.7.1",
"leaflet-draw": "^1.0.4",
"leaflet.heat&...
0
votes
1
answer
400
views
leaflet to geoJSON with angular, download not triggered
I need to implement a button that download the polygon (or whatever shape) into a geojson file but the download isn't triggered. (trying with 2 different functions but both not working) i actually don'...
5
votes
1
answer
5k
views
ngx-leaflet-draw: Importing module which does not have a ɵmod property
Importing LeafletDrawModule which does not have a ɵmod property
I am seeing this error during my unit testing(jest).
The code works fine when I run the ng application. Leaflet draw function works ...
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
1
answer
520
views
Trigger angular material dialog when leaflet's map.on('draw:drawstop', function (e) { }); gets called
I need to trigger angular material dialog when leaflet draw's draw:drawstop event occurs. How do I make the leaflet events occur inside angular's zone or how do I observe leaflets changes (outside ...
1
vote
2
answers
8k
views
how to add styles for custom leaflet popup
I am trying to add styling of marker popup but styles are not reflecting on popup.
Also not able to add priming button.
import { Map, marker} from "leaflet";
const popupOptions = { className: "...
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 ...