setCenter offset: map centering south east of coordinates

111 views
Skip to first unread message

Wade

unread,
Jan 8, 2011, 5:18:41 PM1/8/11
to Google Maps JavaScript API v3
Not sure what the issue is but I'm trying to allow for a doubleclick
on a marker to center and zoom in on that marker:

http:///www.proskicoach.com/_maps

on dblclick event the map zooms appropriately but it centers somewhat
south east of the marker latlng

Thanks for your help

Wade

unread,
Jan 8, 2011, 3:39:59 PM1/8/11
to Google Maps JavaScript API v3
Not sure what is going on here but:

http://www.proskicoach.com/_maps/

Double click on an icon and you will be centered south and east of
the location of the marker.

Any help much appreciated.

Rossko

unread,
Jan 9, 2011, 8:45:41 AM1/9/11
to Google Maps JavaScript API v3
> http://www.proskicoach.com/_maps/
>
>  Double click on an icon and you will be centered south and east of
> the location of the marker.

I don't get to see any markers because your code breaks on the
'console' statements in my browser.

I would have a good look at what the value of 'point' would be in your
marker dblclick handler, at the time that the handler runs.

An alternative approach is to derive the target lat/lng from the
marker itself.

Wade

unread,
Jan 9, 2011, 10:51:15 AM1/9/11
to Google Maps JavaScript API v3
If you have firebug installed the console should log for you... and
that is the interesting part, the console logging shows that the point
is correct at the time of zoom. So now im confused.

Wade

unread,
Jan 9, 2011, 11:01:57 AM1/9/11
to Google Maps JavaScript API v3
Fixed now. Like you said, value of point was not correct at the time
the handler ran.

Rossko

unread,
Jan 9, 2011, 4:20:47 PM1/9/11
to Google Maps JavaScript API v3
> If you have firebug installed the console should log for you...

I know, the heads-up was that you had written your page so that it
will break in many peoples browsers, which cuts down on the number of
people who are able to help you with the real problem.
Reply all
Reply to author
Forward
0 new messages