protected void showCenterPoint(Position cPos) { // Display the center point in red. PointPlacemarkAttributes selectedLocationAttributes; selectedLocationAttributes = new PointPlacemarkAttributes(); selectedLocationAttributes.setLineMaterial(Material.RED); selectedLocationAttributes.setScale(8d); selectedLocationAttributes.setUsePointAsDefaultImage(true); PointPlacemark pm = new PointPlacemark(cPos); pm.setAltitudeMode(WorldWind.RELATIVE_TO_GROUND); pm.setAttributes(selectedLocationAttributes); pm.setValue(AVKey.DISPLAY_NAME, cPos.toString()); pm.setLineEnabled(true); this.gridLayer.addRenderable(pm); }
protected void showGrid(List<Position> grid, Position cPos) { this.gridLayer.removeAllRenderables(); // Display the grid points in yellow. PointPlacemarkAttributes gridPointAttributes; gridPointAttributes = new PointPlacemarkAttributes(); gridPointAttributes.setLineMaterial(Material.YELLOW); gridPointAttributes.setScale(6d); gridPointAttributes.setUsePointAsDefaultImage(true); for (Position p : grid) { PointPlacemark pm = new PointPlacemark(p); pm.setAltitudeMode(WorldWind.RELATIVE_TO_GROUND); pm.setAttributes(gridPointAttributes); pm.setLineEnabled(true); pm.setValue(AVKey.DISPLAY_NAME, p.toString()); this.gridLayer.addRenderable(pm); } showCenterPoint(cPos); }