Here, red overlay should be in the background, white overlay should be
in foreground, and yellow overlay should be in the middle of them. So,
red, yellow, white from bottom to top should be the order.
Key 1 of num-pad is to show/hide overlays.
Press key 1 on num-pad, and sometimes the red overlay gets on top of
the other two. This should not happen. Also, MORE importantly, there's
no definite way to "guess" or "put" screen-overlays on top of one
another. There's no way, after including 10s of overlays, I can
definitely say that the red overlay will "always" appear at the
bottom. The orderings are randomly determined that it may look fine,
but after including many more overlays, it'll mess up everything...
Hope you understand my problem.
Thanks for the help.
K.
Roman N
unread,
Jul 18, 2008, 12:29:47 PM7/18/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to KML Developer Support - Google Earth Browser Plugin
K,
The API provides two methods, getDrawOrder() and setDrawOrder(), on
screen overlay objects. These methods are directly analogous to the
<drawOrder> KML element, which is described at
http://code.google.com/apis/kml/documentation/kmlreference.html#draworder.
<drawOrder> is similar in concept to z-index in CSS.
Some example usage:
// higher draw order overlay
var overlay1 = ge.createScreenOverlay('');
overlay1.setDrawOrder(20);
ge.getFeatures().appendChild(overlay1);
// lower draw order overlay
var overlay2 = ge.createScreenOverlay('');
overlay2.setDrawOrder(10);
ge.getFeatures().appendChild(overlay2);
overlay1 will be rendered above overlay2 regardless of the order in
which they were added to the Earth DOM (object model).
- Roman
On Jul 17, 11:47 am, kdd wrote:
> Hi,
> So I finally have an example for you guys.
>