When a user click on a specific feature, I display a simple overlay (popup). But I need to display this popup on a closest features when a user search a random location.
So, I search to simulate the 'click' event on a specific coordinates to simulate map
click event and display my popup.
I could use
dispatchEvent('click'), but this method only trigger the map
click event without coordinates.
And without coordinates, it's impossible to set overlay position...
In my environement, i have an unlimited maps in the DOM page (Wordpress widget / PHP + JS). Sometimes, the Wordpress system call the popup of an other map. To create a simple code, my idea was to directly call the click event of the targeted map.
Others solutions exists but i need to now how to fire click event with specific coordinates ? Just out of curiosity.