Create billboard to show current vessel statuses
WWJ has the "ScreenAnnotation" object. This appears to be a text billboard.
In our use this could show the current vehicle course/speed when we're moving forward/back in time.
I imagine the billboard visibility would be controlled by a toggle in our control panel. The natural place to control the billboard visibility would be to represent it as an additional top-level layer, but I'd quite like it embedded inside the Track object.
So we'll have a 'Show billboard' checkbox in the control panel, changing this will loop through the tracks and set the individual billboard visibilities.
Comments (11)
-
reporter -
reporter - edited description
-
reporter -
assigned issue to
-
assigned issue to
-
reporter Happy that current billboard is working.
I suspect the UI approach used in SAR may be less distracting. Screenshot attached.
-
Billboards are now only text, though I'm guessing there still needs to be some tweaks.
- Should the text be closer to the points?
- When zoomed in far enough, the text sometimes goes behind the points and dropbars.
- The black text is sometimes hard to see, especially when the ocean floor is behind the text.
- Should there be some kind of line between the current point and the text?
-
Can you evaluate this issue and discern what the next steps are, if any?
-
reporter Feedback:
- we don't need lat/long
- could you put the text in the platform color, and make the text bold (that seems effective in the earlier attached SAR screenshot)
- Could you make the billboard closer to the position?
- I've just had a look in the code to see what/how the elevation of the billboard is set. I can't see it. Would you mind putting in a comment to explain it?
cheers, Ian
-
1. done 2. done 3/4 .... The line
billboard.setPosition(new Position(newPos, newElev));
sets the position and elevation.... but newElev should be the depth. I'm not exactly sure whats going on here. I'll let you know when I figure it out.
-
I'm not sure of this, but I believe the elevation is based on the bottom of the (currently invisible) box for the annotation. The boxes size is either set manually, or (default) based upon the size of the annotations text.
-
reporter Ok. I can't say I understand the relationship between the elevation value and the height of the billboard, but..
Could you adjust the elevation so that the billboard is closer to the current position? I guess I'd like it to be about 1/2 the vertical distance of the current separation.
cheers, Ian
-
I have figure out how to reduce the distance between the billboard and the point, but now that is it close, it gets obscured by the surface layer when you get in closer. I think this problem should be put off until a solution is found for the surface layer transparency issue.
- Log in to comment
There's a useful example of this type of billboard in the Search and Rescue app, based on NWW.
You can run the app via an JNLP at http://worldwind.arc.nasa.gov/java/apps/SARApp/
It looks like the source for SAR is in the examples folder.
The class used to display the billboard is in TrackSegmentInfo