I\'ve been trying to set up click event listeners on the google.maps.Map
object that\'s created by the ui-gmap-google-map
directive from the Angula
I ended up using vanilla JS and got everything to work with no headache. Angular Google Maps is a cool idea, but at least in my case, the issues outnumber the benefits.
After spending an hour or so on github and stackoverflow, I realised that the proposed solutions (like https://github.com/angular-ui/angular-google-maps/issues/308) were a hack of a hack, and since my task was just "display some markers on a map and center the map on them" I don't want to use a hack.
The gmaps documentation contains tons of examples (in vanilla JS) that can be used in an Angular app, copy + paste and you're done.
Again, this is my personal experience, might not be the same for you