Im looking for a way to get a dynamicly changing read out of the lat
long of the center point of the plug in screen and display this data
on screen. A bit like the readout on the status bar but I need to
position the information in a diffrent location to simulate a HUD.
(
www.geospectrum.co.uk/ge/globe.html) is what I have so far. If you
switch on the HUD display you will see what I am getting at. I need
the lat long display to be positioned where it says 'Platform'.
I am not a developer but an happy to fiddle with code and make it work
the way I want if I can get some indication of the right approach.
Any ideas?
Also, how should I go about turning the 'Display HUD' button into a
toggle switch? here is the code:
----snip---
function showHUD() {
var screenOverlay = ge.createScreenOverlay('');
screenOverlay.setIcon(ge.createIcon(''));
screenOverlay.getIcon().
setHref("
http://www.geospectrum.co.uk/ge/hudoverlay.png");
// Set the point inside the overlay that is used as the
positioning
// anchor point.
screenOverlay.getOverlayXY().setXUnits(ge.UNITS_FRACTION);
screenOverlay.getOverlayXY().setYUnits(ge.UNITS_FRACTION);
screenOverlay.getOverlayXY().setX(.5);
screenOverlay.getOverlayXY().setY(.5);
// Set screen position to center of screen
screenOverlay.getOverlayXY().setXUnits(ge.UNITS_FRACTION);
screenOverlay.getOverlayXY().setYUnits(ge.UNITS_FRACTION);
screenOverlay.getOverlayXY().setX(.5);
screenOverlay.getOverlayXY().setY(.5);
// Set object's size in pixels.
screenOverlay.getSize().setXUnits(ge.UNITS_PIXELS);
screenOverlay.getSize().setYUnits(ge.UNITS_PIXELS);
screenOverlay.getSize().setX(750);
screenOverlay.getSize().setY(450);
ge.getFeatures().appendChild(screenOverlay);
}
---snip---
Thanks for any suggestions