Closed OakBehringer closed 7 years ago
From what I can tell, the marker is returned here as the 1st argument, and the event is not returned.
You should be able to access the marker like this:
click: (marker) => { console.log(marker.id); }
You're absolutely right. I must have been smoking crack. Sorry!
I am not sure you should be closing the issue. Either the documentation should be updated to indicate that the event is not accessible, or the component should be updated to return the event, as indicated in the documentation.
I've tried to see where the event is defined but I'm still very new to Ember, so I got completely lost. If someone could point me in the right direction, I would gladly investigate further. Does it use Google Maps' click event, or is it defined somewhere in the component?
It's okay to close this. It's a bug with a bower dependency used by this addon called gmaps-for-apps.
Published fix, be sure to update gmaps-for-apps:
bower cache clean
rm -rf bower_components/gmaps-for-apps
bower install
In your documentation, it states that the click handler (for markers), receives the event and marker objects as arguments. Marker (second argument) is undefined.
Having the marker obj passed in would make it much easier to manipulate the marker on click (for example, changing the icon size to indicate it is highlighted).