I\'m stuck trying to figure out a little bit of JS :( I have a google map
var myCenter=new google.maps.LatLng(53, -1.33);
function initialize()
{
var mapPro
In my case, I have multiple markers and I wanted to know which marker was clicked. I found following solution on google forum - https://groups.google.com/g/google-maps-js-api-v3/c/cAJrWZWdD-8?pli=1
By Chris Broadfoot (Google Employee)
You can reference the clicked marker with 'this':
google.maps.event.addListener(marker, 'click', markerListener);
function markerListener() { alert(this.getPosition()); // this.setIcon(... }