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: