public class DrawingEllipse extends Shape implements AnchoredMapItem, ParentMapItem, Exportable, MapItem.OnGroupChangedListener, PointMapItem.OnPointChangedListener
Shape.OnBasicLineStyleChangedListener, Shape.OnFillColorChangedListener, Shape.OnPointsChangedListener, Shape.OnStrokeColorChangedListener, Shape.OnStrokeWeightChangedListener, Shape.OnStyleChangedListener
MapItem.OnAltitudeModeChangedListener, MapItem.OnClickableChangedListener, MapItem.OnGroupChangedListener, MapItem.OnHeightChangedListener, MapItem.OnMetadataChangedListener, MapItem.OnTypeChangedListener, MapItem.OnVisibleChangedListener, MapItem.OnZOrderChangedListener
Modifier and Type | Field and Description |
---|---|
protected GeoPointMetaData |
_center |
protected Marker |
_centerMarker |
protected MapGroup |
_childGroup |
protected MapView |
_mapView |
protected java.util.List<Ellipse> |
_rings |
static java.lang.String |
COT_TYPE |
static int |
DEFAULT_STYLE |
BASIC_LINE_STYLE_DASHED, BASIC_LINE_STYLE_DOTTED, BASIC_LINE_STYLE_OUTLINED, BASIC_LINE_STYLE_SOLID, STYLE_FILLED_MASK, STYLE_STROKE_MASK
CLICKABLE_DEFAULT, EDITABLE_DEFAULT, EMPTY_TYPE, HIT_RATIO_DEFAULT, MOVABLE_DEFAULT, VISIBLE_DEFAULT, ZORDER_DEFAULT, ZORDER_HITTEST_COMPARATOR, ZORDER_RENDER_COMPARATOR
metadata
Constructor and Description |
---|
DrawingEllipse(MapView mapView) |
DrawingEllipse(MapView mapView,
java.lang.String uid) |
DrawingEllipse(MapView mapView,
java.lang.String uid,
MapGroup childGroup)
Create a new drawing ellipse
|
Modifier and Type | Method and Description |
---|---|
PointMapItem |
getAnchorItem()
The center marker acts as the anchor for this ellipse
|
double |
getAngle()
Get angle/heading of this ellipse
|
double |
getArea()
Returns the Area of the shape in meters
|
GeoBounds |
getBounds(MutableGeoBounds bounds)
Bounds is equivalent to the bonds of the outermost ellipse
|
GeoPointMetaData |
getCenter()
Provides the center point for the Shape, or null if an error has occurred.
|
Marker |
getCenterMarker()
Get the center marker for this ellipse
|
GeoPoint |
getCenterPoint()
Get the center
GeoPoint for this ellipse |
MapGroup |
getChildMapGroup()
Get this item's child map group
|
java.util.List<Ellipse> |
getEllipses()
Get the list of ellipses part of this group
|
double |
getLength()
Get the length of the outer ellipse (parallel to the angle)
|
GeoPointMetaData[] |
getMetaDataPoints()
Get all points of the outermost ring
|
Ellipse |
getOutermostEllipse()
Get the outer-most ellipse which is used for reading and writing
|
double |
getPerimeterOrLength()
Returns the perimeter of a shape if closed otherwise will return the length of
of the open shape from start to end.
|
GeoPoint[] |
getPoints()
Get all points of the outermost ring
|
double |
getWidth()
Get the width of the outer ellipse (perpendicular to the angle)
|
boolean |
isCenterShapeMarker()
Helper method to check if the center marker is a generic shape marker
as opposed to a marker explicitly set by the user
|
boolean |
isSupported(java.lang.Class<?> target)
Check if this instance supports the specified target class type
|
protected void |
onClickableChanged()
Invokes when the clickable property changes
|
protected void |
onFillColorChanged()
Invoked when the fillColor property changes
|
protected void |
onGroupChanged(boolean added,
MapGroup group)
Keep the child map group with whichever group this ellipse is moved to
|
protected void |
onHeightChanged()
Invoked when the height property changes
|
void |
onItemAdded(MapItem item,
MapGroup group) |
void |
onItemRemoved(MapItem item,
MapGroup group) |
void |
onPointChanged(PointMapItem item) |
protected void |
onStrokeColorChanged()
Invoked when the strokeColor property changes
|
protected void |
onStrokeStyleChanged()
The line/stroke style for this shape has been changed
|
protected void |
onStrokeWeightChanged()
Invoked when the strokeWeight property changes
|
protected void |
onStyleChanged()
Invoked when the style property changes
|
protected void |
onVisibleChanged()
Invokes when the visible property changes
|
protected void |
onZOrderChanged()
Invokes when the zOrder property changes
|
void |
refresh()
Refresh child ellipses
|
void |
setAngle(double angle)
Set the angle/heading of this ellipse
|
void |
setCenterMarker(Marker marker)
Set the center marker
|
void |
setCenterPoint(GeoPointMetaData point)
Set the center point of this ellipse
This will move the anchor marker as well
|
void |
setDimensions(GeoPointMetaData center,
double width,
double length,
double angle)
Set the dimensions of the outer ellipse
|
void |
setEllipses(java.util.List<Ellipse> ellipses)
Directly set the ellipses for this group
Note: Only the minor axis, major axis, and angle are utilized here
Colors and styles must be set directly on parent ellipse
|
void |
setLength(double length)
Set the length of the outer ellipse (parallel to the angle)
|
void |
setTitle(java.lang.String title)
Set the title of the ellipse, including the name of its center marker
|
void |
setWidth(double width)
Set the width of the outer ellipse (perpendicular to the angle)
|
protected CotEvent |
toCot()
Generate a CoT event for this ellipse
|
void |
toggleMetaData(java.lang.String key,
boolean value) |
protected GPXExportWrapper |
toGpx() |
protected Folder |
toKml() |
protected KMZFolder |
toKmz() |
java.lang.Object |
toObjectOf(java.lang.Class<?> target,
ExportFilters filters)
Export to the specified target class type
|
protected OGRFeatureExportWrapper |
toOgrGeometry() |
addOnBasicLineStyleChangedListener, addOnFillColorChangedListener, addOnPointsChangedListener, addOnStrokeColorChangedListener, addOnStrokeWeightChangedListener, addOnStyleChangedListener, addStyleBits, drawCanvas, findTouchPoint, getBasicLineStyle, getClickPoint, getFillColor, getGeoPointMetaData, getIconColor, getStrokeColor, getStrokeStyle, getStrokeWeight, getStyle, getTitle, onBasicLineStyleChanged, onPointsChanged, preDrawCanvas, removeOnBasicLineStyleChangedListener, removeOnFillColorChangedListener, removeOnPointsChangedListener, removeOnStrokeColorChangedListener, removeOnStrokeWeightChangedListener, removeOnStyleChangedListener, removeStyleBits, setBasicLineStyle, setColor, setColor, setFillAlpha, setFillColor, setStrokeColor, setStrokeStyle, setStrokeWeight, setStyle, setTouchPoint, wrap180
addOnAltitudeModeChangedListener, addOnClickableChangedListener, addOnGroupChangedListener, addOnHeightChangedListener, addOnMetadataChangedListener, addOnMetadataChangedListener, addOnTypeChangedListener, addOnVisibleChangedListener, addOnZOrderChangedListener, computeDistance, copyMetaData, createSerialId, dispose, getAltitudeMode, getClickable, getEditable, getGroup, getHashtags, getHeight, getHitRadius, getIconDrawable, getMetaBoolean, getMetaString, getMovable, getRadialMenuPath, getRemarks, getRemarksKey, getSerialId, getTag, getType, getUID, getUniqueMapItemName, getURI, getVisible, getVisible, getZOrder, isTouchable, notifyMetadataChanged, onAdded, onAltitudeModeChanged, onMetadataChanged, onRemoved, onTypeChanged, onVisibilityConditions, persist, refresh, removeFromGroup, removeMetaData, removeOnAltitudeModeChangedListener, removeOnClickableChangedListener, removeOnGroupChangedListener, removeOnHeightChangedListener, removeOnMetadataChangedListener, removeOnMetadataChangedListener, removeOnTypeChangedListener, removeOnVisibleChangedListener, removeOnZOrderChangedListener, setAltitudeMode, setClickable, setClickPoint, setEditable, setHashtags, setHeight, setMetaBoolean, setMetaData, setMetaDouble, setMetaIntArray, setMetaInteger, setMetaLong, setMetaMap, setMetaParcelable, setMetaSerializable, setMetaString, setMetaStringArrayList, setMovable, setRadialMenu, setRemarks, setTag, setTouchable, setType, setVisible, setVisible, setZOrder, testOrthoHit, toString
get, getMetaData, getMetaDouble, getMetaIntArray, getMetaInteger, getMetaLong, getMetaMap, getMetaParcelable, getMetaSerializable, getMetaStringArrayList, hasMetaValue, setMetaDataImpl
public static final java.lang.String COT_TYPE
public static final int DEFAULT_STYLE
protected final MapView _mapView
protected final MapGroup _childGroup
protected final java.util.List<Ellipse> _rings
protected GeoPointMetaData _center
protected Marker _centerMarker
public DrawingEllipse(MapView mapView, java.lang.String uid, MapGroup childGroup)
mapView
- Map view instanceuid
- UIDchildGroup
- The child map grouppublic DrawingEllipse(MapView mapView, java.lang.String uid)
public DrawingEllipse(MapView mapView)
public void setEllipses(java.util.List<Ellipse> ellipses)
ellipses
- List of ellipsespublic java.util.List<Ellipse> getEllipses()
public Ellipse getOutermostEllipse()
public void refresh()
public void setCenterPoint(GeoPointMetaData point)
point
- Center pointpublic GeoPointMetaData getCenter()
Shape
public GeoPoint getCenterPoint()
GeoPoint
for this ellipsepublic void setCenterMarker(Marker marker)
marker
- Center markerpublic Marker getCenterMarker()
public boolean isCenterShapeMarker()
public double getAngle()
public void setAngle(double angle)
angle
- Angle in degreespublic double getWidth()
public void setWidth(double width)
width
- Width in meterspublic double getLength()
public void setLength(double length)
length
- Length in meterspublic void setDimensions(GeoPointMetaData center, double width, double length, double angle)
center
- Center pointwidth
- Width of the ellipse in meterslength
- Length of the ellipse in metersangle
- Angle/heading in degreespublic PointMapItem getAnchorItem()
getAnchorItem
in interface AnchoredMapItem
public GeoPointMetaData[] getMetaDataPoints()
getMetaDataPoints
in class Shape
public GeoPoint[] getPoints()
public GeoBounds getBounds(MutableGeoBounds bounds)
public void setTitle(java.lang.String title)
protected void onStyleChanged()
Shape
onStyleChanged
in class Shape
protected void onStrokeStyleChanged()
Shape
onStrokeStyleChanged
in class Shape
protected void onVisibleChanged()
MapItem
onVisibleChanged
in class MapItem
protected void onClickableChanged()
MapItem
onClickableChanged
in class MapItem
protected void onZOrderChanged()
MapItem
onZOrderChanged
in class MapItem
protected void onFillColorChanged()
Shape
onFillColorChanged
in class Shape
protected void onStrokeColorChanged()
Shape
onStrokeColorChanged
in class Shape
protected void onStrokeWeightChanged()
Shape
onStrokeWeightChanged
in class Shape
protected void onHeightChanged()
MapItem
onHeightChanged
in class MapItem
public MapGroup getChildMapGroup()
ParentMapItem
getChildMapGroup
in interface ParentMapItem
public double getArea()
Shape
public double getPerimeterOrLength()
Shape
getPerimeterOrLength
in class Shape
public void toggleMetaData(java.lang.String key, boolean value)
toggleMetaData
in class FilterMetaDataHolder
protected void onGroupChanged(boolean added, MapGroup group)
onGroupChanged
in class MapItem
added
- True if ellipse added to groupgroup
- Map group it was added topublic void onItemAdded(MapItem item, MapGroup group)
onItemAdded
in interface MapItem.OnGroupChangedListener
public void onItemRemoved(MapItem item, MapGroup group)
onItemRemoved
in interface MapItem.OnGroupChangedListener
public void onPointChanged(PointMapItem item)
onPointChanged
in interface PointMapItem.OnPointChangedListener
public boolean isSupported(java.lang.Class<?> target)
Exportable
isSupported
in interface Exportable
target
- the target classpublic java.lang.Object toObjectOf(java.lang.Class<?> target, ExportFilters filters)
Exportable
toObjectOf
in interface Exportable
target
- the target classfilters
- Allows ExportMarshal
instances to filter e.g. based
on geographic region or other criteriaprotected CotEvent toCot()
protected Folder toKml()
protected KMZFolder toKmz()
protected GPXExportWrapper toGpx()
protected OGRFeatureExportWrapper toOgrGeometry()