google.maps.event.addListener(marker, "click", function(event) {
var p = new google.maps.LatLng(event.latLng.lat(),
event.latLng.lng());
map.panTo(p);
var c = map.getZoom();
map.setZoom(c + 1);
});
If you populating a map from database you'll probably have more then 1
marker passing through a looping 'if' statement. If you try using
getPosition() you will end up returning the position of the last
marker you added to your map in all likely hood.
Either way I hope this can help someone else, gl everyone.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.