Esempio n. 1
0
 /**
  * Adds or substitutes a named polygonal surface shape.
  *
  * @param coords the points of the polygon outer boundary
  * @param id the shape identifier
  */
 public void addSurfPoly(List<LatLon> coords, String id) {
   SurfacePolygon shape = new SurfacePolygon(coords);
   shape.setAttributes(attr);
   shape.setHighlightAttributes(attrHigh);
   if (id != null) {
     shape.setValue(AVKey.HOVER_TEXT, id);
   }
   // set this layer as custom property of the shape
   shape.setValue(AVKey.LAYER, this);
   SurfaceShape old = shapesById.put(id, shape);
   if (old != null) {
     removeRenderable(old);
   }
   addRenderable(shape);
 }