public class VehicleShape extends EditablePolyline implements VehicleMapItem
Modifier and Type | Class and Description |
---|---|
static interface |
VehicleShape.AzimuthChangedListener |
static interface |
VehicleShape.PositionChangedListener |
EditablePolyline.ActionProviderInterface, EditablePolyline.ExchangePointAction, EditablePolyline.InsertPointAction, EditablePolyline.MovePointAction, EditablePolyline.OnEditableChangedListener, EditablePolyline.RemoveMarkerAction, EditablePolyline.RemovePointAction
Polyline.OnAltitudeModeChangedListener, Polyline.OnHeightStyleChangedListener, Polyline.OnLabelsChangedListener, Polyline.OnLabelTextSizeChanged
Shape.OnBasicLineStyleChangedListener, Shape.OnFillColorChangedListener, Shape.OnPointsChangedListener, Shape.OnStrokeColorChangedListener, Shape.OnStrokeWeightChangedListener, Shape.OnStyleChangedListener
MapItem.OnClickableChangedListener, MapItem.OnGroupChangedListener, MapItem.OnHeightChangedListener, MapItem.OnMetadataChangedListener, MapItem.OnTypeChangedListener, MapItem.OnVisibleChangedListener, MapItem.OnZOrderChangedListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COT_TYPE |
static int |
DEFAULT_FILL |
static int |
DEFAULT_STROKE |
_actionProvider, _shapeMarker, context, controlPoints, indexToMarker, indexToMarker2, mapView, markerToIndex
_points, DEFAULT_MAX_LABEL_RENDER_RESOLUTION, DEFAULT_MAX_LINE_RENDER_RESOLUTION, DEFAULT_MIN_LABEL_RENDER_RESOLUTION, DEFAULT_MIN_LINE_RENDER_RESOLUTION, HEIGHT_EXTRUDE_CENTER_ALT, HEIGHT_EXTRUDE_DEFAULT, HEIGHT_EXTRUDE_MAX_ALT, HEIGHT_EXTRUDE_MIN_ALT, HEIGHT_EXTRUDE_PER_POINT, HEIGHT_STYLE_NONE, HEIGHT_STYLE_OUTLINE, HEIGHT_STYLE_OUTLINE_SIMPLE, HEIGHT_STYLE_POLYGON, HEIGHT_STYLE_TOP_ONLY, minimumBoundingBox, PARTITION_SIZE, STYLE_CLOSED_MASK, STYLE_OUTLINE_HALO_MASK, STYLE_OUTLINE_STROKE_MASK
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 |
---|
VehicleShape(MapView mapView,
java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
void |
addAzimuthChangedListener(VehicleShape.AzimuthChangedListener acl) |
void |
addPositionChangedListener(VehicleShape.PositionChangedListener acl) |
double |
getAzimuth(NorthReference ref)
Get the vehicle's current azimuth
XXX - Maybe someday we can bump to Java 8 so we can use default method
impls here instead of copy-pasting degree conversion code ad nauseam...
|
int |
getFillColor(boolean actual) |
double |
getLength()
Get the length (nose to rear) of the vehicle
|
protected java.lang.String |
getMarkerMenu() |
protected java.lang.String |
getShapeMenu()
Provides a shape menu to be used when the shape is touched.
|
int |
getStrokeColor(boolean actual)
Get the stored stroke color (rather than what the renderer uses)
|
Undoable |
getUndoable() |
java.lang.String |
getVehicleModel() |
double |
getWidth()
Get the width (wingspan) of the vehicle
|
static boolean |
isVehicle(MapItem item) |
void |
moveClosedSet(GeoPointMetaData oldPoint,
GeoPointMetaData newPoint)
Move a closed EditablePolyline from the previous center point to a new point
|
protected void |
onAzimuthChanged() |
protected void |
onPositionChanged(GeoPointMetaData oldPos,
GeoPointMetaData newPos) |
void |
removeAzimuthChangedListener(VehicleShape.AzimuthChangedListener acl) |
void |
removePositionChangedListener(VehicleShape.PositionChangedListener acl) |
void |
save() |
void |
setAzimuth(double deg,
NorthReference ref)
Set the azimuth/heading of this vehicle model
|
void |
setColor(int color) |
void |
setFillColor(int color)
Set the fillColor property value
|
boolean |
setPoint(int index,
GeoPointMetaData gp) |
void |
setShowLabel(boolean showLabel)
Toggle the vehicle marker label
|
void |
setTitle(java.lang.String title)
Set the title of this map item (display name)
|
void |
setup(java.lang.String model,
java.lang.String title,
GeoPointMetaData loc,
double trueDeg,
boolean fromUser) |
void |
setVehicleModel(java.lang.String model) |
protected CotEvent |
toCot()
Produce a CoT message that represents the Route
|
void |
updateOffscreenInterest() |
addListeners, addMarker, addMarker, addMarkers, addOnEditableChangedListener, addPoint, addPoint, addPointNoSync, clear, clearPoints, clearPointsImpl, clearWithoutNotify, createKmlGeometry, createOuterPlacemark, delete, determineIfFilled, drawCanvas, getActionProvider, getAnchorItem, getAvgAltitude, getCenter, getColor, getCornerMenu, getEditable, getFilled, getIndexOfMarker, getIndexOfPoint, getLineMenu, getLineStyle, getMarker, getMarker, getMaxAltitude, getMinAltitude, getNumPoints, getPoint, getPointMapItem, getPointMapItemArray, getPointMapItems, getShapeMarker, getTitle, getUIDKey, hasMarker, hideLabels, isBulkOperation, isClosed, isSupported, kmlDataList, kmlFolderName, onItemAdded, onItemRemoved, onPointsChanged, onVisibleChanged, onZOrderChanged, preDrawCanvas, removeListeners, removeMarker, removeMarker, removeMarker, removeMarker, removeMarkerNoSync, removeOnEditableChangedListener, removePoint, resetAlpha, reverse, setAbsoluteKMLElev, setAlpha, setBulkOperation, setClickable, setClosed, setEditable, setFilled, setLineStyle, setLocked, setMarker, setMarkerNoSync, setPoint, setPoints, setShapeMarker, setStrokeColor, setStrokeWeight, setUndoable, setZOrder, shouldDisplayVertices, testLinesHit, testLinesHit, testPointsHit, toGpx, toKml, toKmz, toObjectOf
addHeightStyle, addOnHeightStyleChangedListener, addOnLabelsChangedListener, addOnLabelTextSizeChangedListener, getBounds, getHeightExtrudeMode, getHeightStyle, getLabels, getLabelTextSize, getLabelTypeface, getLineLabel, getMetaDataPoints, getPerimeterOrLength, getPoints, getPoints, getPoints, getRelativeBounds, getTotalDistance, onHeightStyleChanged, onLabelsChanged, onLabelTextSizeChanged, onMetadataChanged, removeHeightStyle, removeOnHeightStyleChangedListener, removeOnLabelsChangedListener, removeOnLabelTextSizeChangedListner, setHeightExtrudeMode, setHeightStyle, setLabels, setLabelTextSize, setLabelTextSize, setLabelTextTypeface, setLineLabel, setMaxLabelRenderResolution, setMaxRenderResolution, setMinLabelRenderResolution, setMinRenderResolution, setPoints, setPoints, setPoints, setPoints
addOnBasicLineStyleChangedListener, addOnFillColorChangedListener, addOnPointsChangedListener, addOnStrokeColorChangedListener, addOnStrokeWeightChangedListener, addOnStyleChangedListener, addStyleBits, findTouchPoint, getArea, getBasicLineStyle, getClickPoint, getFillColor, getGeoPointMetaData, getIconColor, getStrokeColor, getStrokeStyle, getStrokeWeight, getStyle, onBasicLineStyleChanged, onFillColorChanged, onStrokeColorChanged, onStrokeStyleChanged, onStrokeWeightChanged, onStyleChanged, removeOnBasicLineStyleChangedListener, removeOnFillColorChangedListener, removeOnPointsChangedListener, removeOnStrokeColorChangedListener, removeOnStrokeWeightChangedListener, removeOnStyleChangedListener, removeStyleBits, setBasicLineStyle, setColor, setFillAlpha, setStrokeStyle, setStyle, setTouchPoint, wrap180
addOnAltitudeModeChangedListener, addOnClickableChangedListener, addOnGroupChangedListener, addOnHeightChangedListener, addOnMetadataChangedListener, addOnMetadataChangedListener, addOnTypeChangedListener, addOnVisibleChangedListener, addOnZOrderChangedListener, computeDistance, copyMetaData, createSerialId, dispose, getAltitudeMode, getClickable, getGroup, getHashtags, getHeight, getHitRadius, getIconDrawable, getMetaBoolean, getMetaString, getMovable, getRadialMenuPath, getRemarks, getRemarksKey, getSerialId, getTag, getType, getUID, getUniqueMapItemName, getURI, getVisible, getVisible, getZOrder, isTouchable, notifyMetadataChanged, onAdded, onAltitudeModeChanged, onClickableChanged, onGroupChanged, onHeightChanged, onRemoved, onTypeChanged, onVisibilityConditions, onZOrderChanged, persist, refresh, removeFromGroup, removeMetaData, removeOnAltitudeModeChangedListener, removeOnClickableChangedListener, removeOnGroupChangedListener, removeOnHeightChangedListener, removeOnMetadataChangedListener, removeOnMetadataChangedListener, removeOnTypeChangedListener, removeOnVisibleChangedListener, removeOnZOrderChangedListener, setAltitudeMode, setClickPoint, setHashtags, setHeight, setMetaBoolean, setMetaData, setMetaDouble, setMetaIntArray, setMetaInteger, setMetaLong, setMetaMap, setMetaParcelable, setMetaSerializable, setMetaString, setMetaStringArrayList, setMovable, setRadialMenu, setRemarks, setTag, setTouchable, setType, setVisible, setVisible, testOrthoHit, toString
get, getMetaData, getMetaDouble, getMetaIntArray, getMetaInteger, getMetaLong, getMetaMap, getMetaParcelable, getMetaSerializable, getMetaStringArrayList, hasMetaValue, setMetaDataImpl, toggleMetaData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCenter, getHeight
getAnchorItem
public static final int DEFAULT_STROKE
public static final int DEFAULT_FILL
public static final java.lang.String COT_TYPE
public VehicleShape(MapView mapView, java.lang.String uid)
public void setup(java.lang.String model, java.lang.String title, GeoPointMetaData loc, double trueDeg, boolean fromUser)
public double getWidth()
VehicleMapItem
getWidth
in interface VehicleMapItem
public double getLength()
VehicleMapItem
getLength
in interface VehicleMapItem
public void setAzimuth(double deg, NorthReference ref)
VehicleMapItem
setAzimuth
in interface VehicleMapItem
deg
- Degreesref
- Reference the degrees are inpublic double getAzimuth(NorthReference ref)
VehicleMapItem
getAzimuth
in interface VehicleMapItem
ref
- Desired north referencepublic void setVehicleModel(java.lang.String model)
public boolean setPoint(int index, GeoPointMetaData gp)
setPoint
in class EditablePolyline
public void moveClosedSet(GeoPointMetaData oldPoint, GeoPointMetaData newPoint)
EditablePolyline
moveClosedSet
in class EditablePolyline
oldPoint
- the old point to act as the center pointnewPoint
- the new point to act as the center point, important to shift the entire polygon by a specific amount.public Undoable getUndoable()
getUndoable
in class EditablePolyline
public java.lang.String getVehicleModel()
public void updateOffscreenInterest()
public void setColor(int color)
setColor
in class EditablePolyline
public void setFillColor(int color)
Shape
setFillColor
in class EditablePolyline
color
- An argb packed Color
public int getStrokeColor(boolean actual)
actual
- True for actual stroke colorpublic int getFillColor(boolean actual)
public void setTitle(java.lang.String title)
MapItem
setTitle
in class EditablePolyline
title
- Item titleprotected java.lang.String getShapeMenu()
EditablePolyline
getShapeMenu
in class EditablePolyline
protected java.lang.String getMarkerMenu()
public void save()
public void setShowLabel(boolean showLabel)
showLabel
- True to show the labelpublic static boolean isVehicle(MapItem item)
protected CotEvent toCot()
EditablePolyline
toCot
in class EditablePolyline
public void addAzimuthChangedListener(VehicleShape.AzimuthChangedListener acl)
public void removeAzimuthChangedListener(VehicleShape.AzimuthChangedListener acl)
protected void onAzimuthChanged()
public void addPositionChangedListener(VehicleShape.PositionChangedListener acl)
public void removePositionChangedListener(VehicleShape.PositionChangedListener acl)
protected void onPositionChanged(GeoPointMetaData oldPos, GeoPointMetaData newPos)