Examples of GlobeAnnotation


Examples of gov.nasa.worldwind.render.GlobeAnnotation

     * @param font  a string describing the font to be used.
     * @param color the color to be used as an hexadecimal coded string.
     */
    public void addLabel(String text, double lat, double lon, String font, String color)
    {
        GlobeAnnotation ga = new GlobeAnnotation(text, Position.fromDegrees(lat, lon, 0),
            Font.decode(font), Color.decode(color));
        ga.getAttributes().setBackgroundColor(Color.BLACK);
        ga.getAttributes().setDrawOffset(new Point(0, 0));
        ga.getAttributes().setFrameShape(AVKey.SHAPE_NONE);
        ga.getAttributes().setEffect(AVKey.TEXT_EFFECT_OUTLINE);
        ga.getAttributes().setTextAlign(AVKey.CENTER);
        this.labelsLayer.addRenderable(ga);
    }
View Full Code Here

Examples of gov.nasa.worldwind.render.GlobeAnnotation

        if (this.currentPos == null) {
            icon = new SurfaceIcon(getClass().getResource("/assets/icons/adsb/aircraft.png"), currentPos);
            planeModel = new PlaneModel(100.0, 50.0, Color.YELLOW);
            planeModel.setPosition(currentPos);
            planeModel.setHeading(Angle.fromDegrees(track));
            label = new GlobeAnnotation(callSign, currentPos);

            Thread t = new Thread(new Runnable() {

                public void run() {
                    DecimalFormat df = new DecimalFormat("#.##");
View Full Code Here

Examples of gov.nasa.worldwind.render.GlobeAnnotation

        Position pos = getPosition();
        String txt = generateLabelText();
        if (visibleTarget == null) {
            visibleTarget = new SurfaceIcon(getIconURL(), LatLon.fromDegrees(pos.getLatitude(), pos.getLongitude()));
            TargetLayer.getInstance().addRenderable(visibleTarget);
            label = new GlobeAnnotation(txt, new gov.nasa.worldwind.geom.Position(LatLon.fromDegrees(pos.getLatitude(), pos.getLongitude()), 0.1));
            TargetTextLayer.getInstance().addAnnotation(label);
        } else {
            visibleTarget.setImageSource(getIconURL());
            visibleTarget.setLocation(LatLon.fromDegrees(pos.getLatitude(), pos.getLongitude()));
            label.setText(txt);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.