On Jul 23, 4:00 am, Vincent Hallberg <[email protected]> wrote:
> google.maps.event.addListener(marker, "click", function(event) {
>         var p = new google.maps.LatLng(event.latLng.lat(),
> event.latLng.lng());

Why not:
var p = event.latLng;

>         map.panTo(p);

or even:
map.panTo(event.latLng)

(not tested)

  -- Larry


>         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.

Reply via email to