0

i have this situation:

enter image description here

I want that clicking on the circle (buffer) around the marker will trigger a click on the marker.

This is where im creating the circle around the marker:

L.geoJSON(buffer).addTo(this.map).on("click", (e)=> marker.fire("click")

But unfortunately it doesnt work. The click on the circle is triggered but not triggering the click on the marker.

Any suggestions?

Edit: This is the code:

this.drawnItems = L.featureGroup().addTo(this.map)
let currentLayer = this.drawnItems[index];

let bufMapObject = L.geoJSON(buffer).addTo(this.map).on("click", (e) => {
                console.log(currentLayer)
                currentLayer.fire("click")
            });

The output of console.log(currentLayer) is: enter image description here

Benny67b
  • 509
  • 1
  • 6
  • 18

0 Answers0