To add an event, head to Google Maps on Android, tap on Contribute >Events > Add a public event. You can add an event name, tag the location, and add the time and date of the event as well. There's an option to add an image, write more event details, and add description as well.
getPosition() returns an object, so to specifically get latitude/longitude, you'll have to call lat() and lng() respectively from that.
I've found out the solution! Thanks to Firebug ;)
//"markers" is an array that I declared which contains all the marker of the map
//"i" is the index of the marker in the array that I want to trigger the OnClick event
//V2 version is:
GEvent.trigger(markers[i], 'click');
//V3 version is:
google.maps.event.trigger(markers[i], 'click');
For future Googlers, If you get an error similar below after you trigger click for a polygon
"Uncaught TypeError: Cannot read property 'vertex' of undefined"
then try the code below
google.maps.event.trigger(polygon, "click", {});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With