How can I edit layers added programmatically? When doing the below, the edit icon in the drawing control is saying no layer to edit.
For example I added a layer like this:
const p = L.polygon([
[25.204382008439115, 55.25947952322895],
[25.19708183190524, 55.25741958605069],
[25.19670904490536, 55.26617431693013],
[25.202611367966746, 55.264732361101785]
])
.bindPopup("
You are here
")
.addTo(map);
or by this:
ts file
layers = [
L.polygon([
[25.204382008439115, 55.25947952322895],
[25.19708183190524, 55.25741958605069],
[25.19670904490536, 55.26617431693013],
[25.202611367966746, 55.264732361101785]
]).bindPopup("
How can I edit layers added programmatically? When doing the below, the edit icon in the drawing control is saying no layer to edit.
For example I added a layer like this: const p = L.polygon([ [25.204382008439115, 55.25947952322895], [25.19708183190524, 55.25741958605069], [25.19670904490536, 55.26617431693013], [25.202611367966746, 55.264732361101785] ]) .bindPopup("
You are here
") .addTo(map);or by this: ts file layers = [ L.polygon([ [25.204382008439115, 55.25947952322895], [25.19708183190524, 55.25741958605069], [25.19670904490536, 55.26617431693013], [25.202611367966746, 55.264732361101785] ]).bindPopup("
You are here
") ];html file [leafletLayers]="layers"
Best,