[Google Maps API v2] Re: How to get the current Lat and Lng of a Marker by click
depends on how you set up your marker, but probably something like
this:
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(marker.getLatLng().toString());
});
if you are creating the listener within the function that holds the
location of the marker (let's say in a variable called "point"), it
could be simpler:
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(point.toString());
});
--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home