0

I am working with web map application Lizmap which unfortunately is working with OpenLayers 2.

I want to trigger map click programically on specific position:

let event = new Event("click"); event.xy = {x: 400, y: 400}; // sample values map.events.triggerEvent("click", event); // map - OpenLayers map object 

Everything works ok until I move map. After map move this doesn't work. I cannot trigger map click that way anymore and I have no idea why. I tried to debug OpenLayers to find out what's going on but I'm really stuck at this point.

I found this problem, but its not completed:

How to trigger a map click event?

1 Answer 1

-1

Try to look for a different event triggering method here.

2
  • 2
    Link-only answers are often deleted, because links fail over time. Please Edit your answer to contain the meat of the linked content. Commented May 16, 2022 at 12:39
  • I tried different methods, but didn't find anything helpful. Commented May 16, 2022 at 12:42

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.