On Jan 17, 9:00 am, Maio <[email protected]> wrote:
> Hi,
>
> I just have a couple of queries regarding centering after zooming. I have
> used Team Maps in the past (Map Channels) and liked some of the extra
> functionality:
> 1, When you click a map marker and the infoWindow appears, if you click to
> the maximum zoom level, the map marker location becomes the center of the
> map, can this be done in API v3?

Yes.  How depends on what you mean by "if you click to the maximum
zoom level"

I think what you want is to center the map on a KmlMouseEvent
http://code.google.com/apis/maps/documentation/javascript/reference.html#KmlMouseEvent

then clicking on the zoom control would keep the marker centered.

> 2, The map I have created toggles between KML layers, e.g. hotels, bars,
> shops etc, so when the new KML is loaded, if only map marker exists, the map
> recenters and zooms to the location, again is this possible please?

KmlLayer does what KmlLayer does (which I believe is zoom to show the
bounds, unless you tell it not to), what it does for a single marker,
I don't know.  If you know that there is only one marker in the kml,
you could set the viewport appropriately.

  -- Larry

>
> Link <http://www.maiocv.com/test/MapV3API.html>
>
> Thanks for any help,
>
> Mark.

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