예제 #1
0
    protected void addPath(RenderableLayer layer, List<Position> positions, String displayName) {
      ShapeAttributes attrs = new BasicShapeAttributes();
      attrs.setOutlineWidth(5);

      Path path = new Path(positions);
      path.setPathType(AVKey.LINEAR);
      path.setAltitudeMode(WorldWind.RELATIVE_TO_GROUND);
      path.setAttributes(attrs);
      path.setValue(AVKey.DISPLAY_NAME, displayName);
      layer.addRenderable(path);

      // Show how to make the colors vary along the paths.
      path.setPositionColors(new ExamplePositionColors());
    }