World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 08-06-2012, 04:36 PM   #1
incubus
Member
 
Join Date: Nov 2011
Posts: 31
incubus is on a distinguished road
Default GlobeAnnotation doesn't stay on top

Hi,

I am putting UserFacingIcons onto the map. I set their always on top attribute to true and it works fine. I then added a GlobeAnnotation beside each icon with some details about the icon and it also set their on top attribute to true. What I am seeing is the text falling behind the terrain when I change the tilt of the view.

Why is it that the setAlwaysOnTop call on the GlobeAnnotation appears to have no effect?

Regards,

John.
incubus is offline   Reply With Quote
Old 08-07-2012, 10:01 PM   #2
dcollins
WWJ Dev. Team
 
Join Date: May 2007
Posts: 449
dcollins is on a distinguished road
Default

John, Would you please post a screenshot of this behavior? That would go a long way towards helping us diagnose this issue.

Thanks,
Dave
dcollins is offline   Reply With Quote
Old 08-08-2012, 09:40 AM   #3
incubus
Member
 
Join Date: Nov 2011
Posts: 31
incubus is on a distinguished road
Default

Hi Dave, thanks for the reply.

I've attached two screenshots. The first one shows the camera directly above the annotation and it is visible. The second has the earth with a slight tilt and as you can see it starts to become obscured by the terrain. Eventually, as I tilt the earth more the annotation completely disappears behind the terrain.

Regards,

John.
Attached Images
File Type: png flat earth.png (611.8 KB, 38 views)
File Type: png Slight Tilt.png (619.6 KB, 45 views)
incubus is offline   Reply With Quote
Old 08-08-2012, 08:59 PM   #4
dcollins
WWJ Dev. Team
 
Join Date: May 2007
Posts: 449
dcollins is on a distinguished road
Default

John,

That's exactly what I needed to see. Thank you very much. The behavior you're seeing is a difference between how WWIcon and Annotation interpret their alwaysOnTop property. Here are two bullet points outlining the difference:
  • WWIcon interprets alwaysOnTop as indicating that the object is sorted in front of other objects, and should not be depth tested against other objects in the scene.
  • Annotation interprets alwaysOnTop as indicating that the object is sorted in front of other objects, but should be depth tested against other objects in the scene.

This difference causes Annotation to appear in front of other OrderedRenderables, but incorrectly appears behind the terrain as though alwaysOnTop was never set. This is likely a bug. I'll create an issue in the World Wind bug base mentioned on http://goworldwind.org.

In the meantime, I'd recommend that you investigate whether it's possible to use PointPlacemark to replace your usage of Annotation. PointPlacemark was designed as a replacement for WWIcon and in some cases can also be used to replace Annotation.

Thanks,
Dave
dcollins is offline   Reply With Quote
Old 08-09-2012, 01:22 PM   #5
incubus
Member
 
Join Date: Nov 2011
Posts: 31
incubus is on a distinguished road
Default

Hi Dave,

thanks for looking into this. For my purpose just now the PointPlacemark can be used as an alternative.

What would happen if the globe annotation was to correctly use the always on top attribute and was to overlap another component with the same attribute set. Would they 'fight' for the top spot?

Regards,

John.
incubus is offline   Reply With Quote
Old 08-09-2012, 05:03 PM   #6
dcollins
WWJ Dev. Team
 
Join Date: May 2007
Posts: 449
dcollins is on a distinguished road
Default

John, Here are two bullet points outlining how Annotation would behave if it correctly interpreted the alwaysOnTop attribute:
  • Annotations with alwaysOnTop set to true would appear on top of terrain, surface imagery, and surface objects.
  • Annotations overlapping another object with alwaysOnTop set to true would appear in the order defined by the layer list. The object last in the layer list would be drawn on top.

Does that help clarify?

Thanks,
Dave
dcollins is offline   Reply With Quote
Old 08-10-2012, 09:02 AM   #7
incubus
Member
 
Join Date: Nov 2011
Posts: 31
incubus is on a distinguished road
Default

Dave, this answers my question perfectly.

Thank you for your assistance.

John.
incubus is offline   Reply With Quote
Reply

Tags
globeannotation drawing


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Placing panels on top of world wind globe, JLayeredPane and Transparency jonathanknez Development Help 6 03-05-2012 09:23 PM
Need to hide GlobeAnnotation when something else clicked jonathanknez Development Help 4 01-31-2012 01:25 AM
Rendering top WMS layers jas511 Development Help 17 01-19-2012 02:23 AM
Rolling Thunder takes top honors at JavaOne adanecito Applications 1 09-16-2010 09:15 PM
Putting a static image overlay on top of WorldWindowGLCanvas Logan Williams Development Help 4 03-23-2010 06:24 PM


All times are GMT +1. The time now is 08:45 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.