How to capture the click event on the tomtom api map?

Hi…
I’ve a probleme and need your help
how to capture the click event on the tomtom api map…?
how to retrieve the longitude and lagitude of my marker by clicking on the map?
Thanks in advance

You could to see this example:

I have same problem, but I am trying to do it with angular and typescript

Thanks guy for your help

Any solution on this? I need help desperately on same topic. marker.on(“click”,onClick()) is not working as it in leaflet.

Hi, without investigating further I see an error on the line you shared → marker.on(“click”,onClick())

onClick() executes that function, you need to pass only the function reference (in your case onClick) in the callback.

1 Like