thnx, I was looking for: map.panTo(marker.getLatLng())

cheers

On Mon, Nov 16, 2009 at 5:29 PM, Andrew Leach <[email protected]
> wrote:

> On Nov 16, 4:16 pm, jeanluca <[email protected]> wrote:
> >
> > I was wondering how to center a marker when you double click it ?
>
> Use a listener for a "dblclick" event.
>
> http://code.google.com/apis/maps/documentation/reference.html#GMarker.dblclick
> [Mike has an example of adding a "click" listener to a marker, which
> is similar: http://econym.org.uk/gmap/basic1.htm]
>
> Did you mean
> - move the map so the marker is in the centre,
>
> map.panTo(marker.getLatLng())
>
> - or move the marker to the location currently at the centre of the
> map?
>
> marker.setLatLng(map.getCenter());
>
> Andrew
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google Maps API" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-api?hl=.


Reply via email to