this.applicationLayer.addRenderable(this.layer); // add render layer to the application provided layer
else
this.wwd.getModel().getLayers().add(this.layer); // add render layer to the globe model
// Init control points rendering attributes
this.controlPointsAttributes = new AnnotationAttributes();
// Define an 8x8 square centered on the screen point
this.controlPointsAttributes.setFrameShape(AVKey.SHAPE_RECTANGLE);
this.controlPointsAttributes.setLeader(AVKey.SHAPE_NONE);
this.controlPointsAttributes.setAdjustWidthToText(AVKey.SIZE_FIXED);
this.controlPointsAttributes.setSize(new Dimension(8, 8));
this.controlPointsAttributes.setDrawOffset(new Point(0, -4));
this.controlPointsAttributes.setInsets(new Insets(0, 0, 0, 0));
this.controlPointsAttributes.setBorderWidth(0);
this.controlPointsAttributes.setCornerRadius(0);
this.controlPointsAttributes.setBackgroundColor(Color.BLUE); // Normal color
this.controlPointsAttributes.setTextColor(Color.GREEN); // Highlighted color
this.controlPointsAttributes.setHighlightScale(1.2);
this.controlPointsAttributes.setDistanceMaxScale(1); // No distance scaling
this.controlPointsAttributes.setDistanceMinScale(1);
this.controlPointsAttributes.setDistanceMinOpacity(1);
// Init control point with leader rendering attributes.
/*this.controlPointWithLeaderAttributes = new AnnotationAttributes();
this.controlPointWithLeaderAttributes.setDefaults(this.controlPointsAttributes);
this.controlPointWithLeaderAttributes.setFrameShape(AVKey.SHAPE_ELLIPSE);
this.controlPointWithLeaderAttributes.setSize(new Dimension(10, 10));
this.controlPointWithLeaderAttributes.setDrawOffset(new Point(0, -5));
this.controlPointWithLeaderAttributes.setBackgroundColor(Color.LIGHT_GRAY);
this.leaderAttributes = new BasicShapeAttributes();
this.leaderAttributes.setOutlineMaterial(Material.WHITE);
this.leaderAttributes.setOutlineOpacity(0.7);
this.leaderAttributes.setOutlineWidth(3);*/
// Annotation attributes
this.annotationAttributes = new AnnotationAttributes();
this.annotationAttributes.setFrameShape(AVKey.SHAPE_NONE);
this.annotationAttributes.setInsets(new Insets(0, 0, 0, 0));
this.annotationAttributes.setDrawOffset(new Point(0, 10));
this.annotationAttributes.setTextAlign(AVKey.CENTER);
this.annotationAttributes.setEffect(AVKey.TEXT_EFFECT_OUTLINE);