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].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=.


Reply via email to