Example #1
0
 /**
  * Adds or substitutes a named regular quadrilateral surface shape.
  *
  * @param lat center latitude in decimal degrees
  * @param lon center longitude in decimal degrees
  * @param w width in meters
  * @param h height in meters
  * @param id the shape identifier
  */
 public void addSurfQuad(double lat, double lon, double w, double h, String id) {
   SurfaceQuad shape = new SurfaceQuad(attr, LatLon.fromDegrees(lat, lon), w, h);
   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);
 }
 protected SurfaceQuad createShape() {
   SurfaceQuad quad = new SurfaceQuad();
   quad.setDelegateOwner(this);
   quad.setAttributes(this.getActiveShapeAttributes());
   return quad;
 }