Closed hoangdangcodecomplete closed 2 years ago
You can change the color of a shape with layer.setStyle({color: 'red'});
. Here the setStyle() Doku.
If you want to change it while clicking on the global edit button you can listen on the pm:globaleditmodetoggled
event:
map.on('pm:globaleditmodetoggled', (e)=>{
console.log(e);
});
If you want to listen on a click on the shape you can do following:
layer.on('click', (e)=>{
console.log(e);
});
Thank you so much for your answer, my friend @Falke-Design ! Currently, I am working with react leaflet and have some very important issues that I want to solve for my project. If you have some free time can I ask you a few questions? I really need your help. Thank you again for everything
You can write me a e-mail and I will try to help you. design.falke@gmail.com