what i want to achieve is to set a listener on the click event of the map so that when the map loads to allow the user to click on it and set a marker on his preferred location. If I add the listener in the map component -click-custom javascript.
Then the user would have to click once in the map for the listener to be activated before he can place a marker.
I have tried to place the code to other event like pageshow or page load but I get an error that the map object is not defined, hence my question
rgrsd