code: public void deleteShape(Paintable paintable, Object group, MapContext context) {
  		GfxGeometry gfxGeometry = (GfxGeometry) paintable;
  		Geometry geom = gfxGeometry.getGeometry();
  		if (geom instanceof Point || geom instanceof MultiPoint) {
  			context.getVectorContext().deleteElement(group, gfxGeometry.getId() + ".def");
  		}
  		if (geom instanceof MultiPolygon || geom instanceof MultiLineString || geom instanceof MultiPoint) {
  			GraphicsContext gc = context.getVectorContext();
  			String gfxId = gfxGeometry.getId();
  			for (int i = 0; i < geom.getNumGeometries(); i++) {
  				gc.deleteElement(group, gfxId + "." + i);
  			}
  		} else {
  			context.getVectorContext().deleteElement(group, gfxGeometry.getId());
  		}
  	}
docs: Delete a {@link Paintable} object from the given {@link MapContext}. It
  the object does not exist, nothing will be done.
  
  @param paintable
  The object to be painted.
  @param group
  The group where the object resides in (optional).
  @param context
  The context to paint on.