Google Groups Home
Help | Sign in
Message from discussion ANNOUNCEMENT: Some modifications to Google Maps API
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Pasha Sadri  
View profile
 More options Aug 12 2005, 1:59 am
From: Pasha Sadri <pa...@google.com>
Date: Thu, 11 Aug 2005 22:59:22 -0700
Local: Fri, Aug 12 2005 1:59 am
Subject: Re: ANNOUNCEMENT: Some modifications to Google Maps API
Sure,

Prior to this version, calling map.addOverlay(overlay) was slow for
large numbers of overlays.  As some of you discovered, the reason was
the repeated internal calls to reOrderOverlays method.  Several people
found a work-around by creating the 'addOverlays' method which added
an array of overlay markers and called reOrderOverlays just once.

the reOrderOverlays method was responsible for determining the
stacking order of overlay markers based on their latitude so that the
marker icons and their shadows would appear on the correct zIndex.

In the new version of the API, there is no longer a need for calling
reOrderOverlays since the stacking order of each overlay is computed
directly based on its latitude.  This change should remove the need
for 'addOverlays' method because the regular addOverlay is be about as
fast.

The other change is the way different overlay elements (marker icons,
marker shadows, etc...) are placed on the map.  Prior to this version,
all elements were appended to the map.div html element.  Different
conceptual layers (eg: shadows vs. icons) was achieved by allocating
different zIndex ranges to each layer (eg: 5000 -> 10000 for the
shadows).  In the new version of the API, each conceptual layer has a
dedicated div element (eg: map.markerPane).

If you are constructing a custom overlay (beyond customizing a GIcon),
you should try to use these dedicated Panes.  Also, the
overlay.setZIndex() method has been modifed to accept a single zindex
value which should be applied to all elements that make up an overlay.

We are still in the process of finalizing an API for developing
Overlays and Controls.  We will post more complete documentation once
it is ready.

I hope this helps.

Pasha


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google