public synchronized Position goTo( Double lon, Double lat, Double elev, Double azimuth, boolean animate ) {
        View view = getWwd().getView();
        view.stopAnimations();
        view.stopMovement();

        Position eyePosition;
        if (lon == null || lat == null) {
            Position currentEyePosition = wwd.getView().getCurrentEyePosition();
            if (currentEyePosition != null) {
                lat = currentEyePosition.latitude.degrees;
                lon = currentEyePosition.longitude.degrees;
            } else {
                return null;
            }
        }

        if (elev == null) {
            // use the current
            elev = wwd.getView().getCurrentEyePosition().getAltitude();
        }
        if (Double.isNaN(elev)) {
            if (!Double.isNaN(lastElevation)) {
                elev = lastElevation;
            } else {
                elev = NwwUtilities.DEFAULT_ELEV;
            }
        }
        eyePosition = NwwUtilities.toPosition(lat, lon, elev);
        if (animate) {
            view.goTo(eyePosition, elev);
        } else {
            view.setEyePosition(eyePosition);
        }
        if (azimuth != null) {
            Angle heading = Angle.fromDegrees(azimuth);
            view.setHeading(heading);
        }
        lastElevation = elev;
        return eyePosition;
    }
public synchronized Position goTo ( Double lon , Double lat , Double elev , Double azimuth , boolean animate ) { View view = getWwd ( ) . getView ( ) ; view . stopAnimations ( ) ; view . stopMovement ( ) ; Position eyePosition ; if ( lon == null || lat == null ) { Position currentEyePosition = wwd . getView ( ) . getCurrentEyePosition ( ) ; if ( currentEyePosition != null ) { lat = currentEyePosition . latitude . degrees ; lon = currentEyePosition . longitude . degrees ; } else { return null ; } } if ( elev == null ) { elev = wwd . getView ( ) . getCurrentEyePosition ( ) . getAltitude ( ) ; } if ( Double . isNaN ( elev ) ) { if ( ! Double . isNaN ( lastElevation ) ) { elev = lastElevation ; } else { elev = NwwUtilities . DEFAULT_ELEV ; } } eyePosition = NwwUtilities . toPosition ( lat , lon , elev ) ; if ( animate ) { view . goTo ( eyePosition , elev ) ; } else { view . setEyePosition ( eyePosition ) ; } if ( azimuth != null ) { Angle heading = Angle . fromDegrees ( azimuth ) ; view . setHeading ( heading ) ; } lastElevation = elev ; return eyePosition ; }
Move to a given location.

@param lon
the longitude.
@param lat
the latitude.
@param elev
the eye elevation.
@param azimuth
if supplied, the map is rotated to follow that angle.
@param animate
if <code>true</code>, it animates to the position.