public class MultiPolyline extends DrawingShape implements Exportable
DrawingShape.KmlDrawingShapeImportFactory
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
_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 |
---|
MultiPolyline(MapView mapView,
MapGroup mapGroup,
java.util.List<DrawingShape> lines,
java.lang.String uid)
Alternate constructor for constructing from COT event when we already have lines
|
MultiPolyline(MapView mapView,
MapGroup mapGroup,
java.lang.String uid)
Constructor that sets up all the menus, types, and metadata for the object
|
Modifier and Type | Method and Description |
---|---|
void |
add(DrawingShape ds)
Deprecated.
|
void |
addLine(DrawingShape ds)
Function that adds a drawing shape to the list
|
void |
drawCanvas(CapturePP cap,
android.os.Bundle data)
Draw the item to the canvas
|
java.util.List<DrawingShape> |
get_lines()
Deprecated.
Use
getLines() |
protected java.lang.String |
getCotType() |
int |
getIconColor()
Get the color this shape should use for its icon
Usually this is the stroke color or the "iconColor" meta int
|
java.util.List<DrawingShape> |
getLines()
Simple getter to return all of the lines associated with this multi-polyline
|
MapGroup |
getMapGroup()
Deprecated.
|
protected java.lang.String |
getMarkerPointType() |
protected java.lang.String |
getShapeMenu()
Provides a shape menu to be used when the shape is touched.
|
int |
getStrokeColor()
Get the strokeColor property value
|
MapView |
getView()
Deprecated.
|
boolean |
isEmpty()
Check if this multi-polyline has no sub-lines attached to it
|
boolean |
isSupported(java.lang.Class<?> target)
Function to check if we are able to convert a multipolyline to a certain format
|
void |
move(GeoPointMetaData oldPoint,
GeoPointMetaData newPoint) |
protected void |
onStrokeStyleChanged()
The line/stroke style for this shape has been changed
|
void |
onVisibleChanged()
Invokes when the visible property changes
|
android.os.Bundle |
preDrawCanvas(CapturePP capture)
Save forwarded points to meta data holder
These will be used later in drawCanvas
|
void |
removeItem(DrawingShape ds)
Deprecated.
|
void |
removeItem(android.graphics.Point p)
Deprecated.
Call
removeLine(DrawingShape) on line instead |
void |
removeLine(DrawingShape ds)
A function to remove a drawing shape from the multi-polyline object
|
void |
setAltitudeMode(AltitudeMode altitudeMode)
Set the altitude mode for this item
See
AltitudeMode for possible values |
void |
setColor(int color,
android.graphics.Point p)
Deprecated.
Call
EditablePolyline.setColor(int) on line instead |
void |
setHeight(double height)
Set the height of this item
|
void |
setLines(java.util.List<DrawingShape> lines)
Set the lines used by this multi-polyline
|
void |
setMovable(boolean movable) |
void |
setPoints()
Sets the points of the multi-polyline, don't think we really need this but keeping
in for now.
|
void |
setStrokeWeight(double strokeWeight)
Set the stroke weight of this shape's lines
Minimum = 1.0, maximum = 6.0
|
void |
setTitle(java.lang.String title)
Set the title of this map item (display name)
|
CotEvent |
toCot()
Produce a CoT message that represents the MultiPolyline
|
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)
Function that will convert a multipolyline to an instance of a specific format
kml,kmz,cot,etc
|
java.lang.String |
UID()
Deprecated.
Use
MapItem.getUID() |
getArea, getChildMapGroup, getCornerMenu, getLineMenu, onItemAdded, onItemRemoved, onPointsChanged, setClosed, setCornerMenu, setFillColor, setLineMenu, setLineStyle, setMarkerPointType, setShapeMenu
addListeners, addMarker, addMarker, addMarkers, addOnEditableChangedListener, addPoint, addPoint, addPointNoSync, clear, clearPoints, clearPointsImpl, clearWithoutNotify, createKmlGeometry, createOuterPlacemark, delete, determineIfFilled, getActionProvider, getAnchorItem, getAvgAltitude, getCenter, getColor, getEditable, getFilled, getIndexOfMarker, getIndexOfPoint, getLineStyle, getMarker, getMarker, getMaxAltitude, getMinAltitude, getNumPoints, getPoint, getPointMapItem, getPointMapItemArray, getPointMapItems, getShapeMarker, getTitle, getUIDKey, getUndoable, hasMarker, hideLabels, isBulkOperation, isClosed, kmlDataList, kmlFolderName, moveClosedSet, onZOrderChanged, removeListeners, removeMarker, removeMarker, removeMarker, removeMarker, removeMarkerNoSync, removeOnEditableChangedListener, removePoint, resetAlpha, reverse, setAbsoluteKMLElev, setAlpha, setBulkOperation, setClickable, setColor, setEditable, setFilled, setLocked, setMarker, setMarkerNoSync, setPoint, setPoint, setPoints, setShapeMarker, setStrokeColor, setUndoable, setZOrder, shouldDisplayVertices, testLinesHit, testLinesHit, testPointsHit
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, getBasicLineStyle, getClickPoint, getFillColor, getGeoPointMetaData, getStrokeStyle, getStrokeWeight, getStyle, onBasicLineStyleChanged, onFillColorChanged, onStrokeColorChanged, 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, setClickPoint, setHashtags, setMetaBoolean, setMetaData, setMetaDouble, setMetaIntArray, setMetaInteger, setMetaLong, setMetaMap, setMetaParcelable, setMetaSerializable, setMetaString, setMetaStringArrayList, setRadialMenu, setRemarks, setTag, setTouchable, setType, setVisible, setVisible, testOrthoHit, toString
get, getMetaData, getMetaDouble, getMetaIntArray, getMetaInteger, getMetaLong, getMetaMap, getMetaParcelable, getMetaSerializable, getMetaStringArrayList, hasMetaValue, setMetaDataImpl
public MultiPolyline(MapView mapView, MapGroup mapGroup, java.lang.String uid)
mapView
- Map view instancemapGroup
- The map group this polyline will be added touid
- Unique identifierpublic MultiPolyline(MapView mapView, MapGroup mapGroup, java.util.List<DrawingShape> lines, java.lang.String uid)
mapView
- The view to construct the multi polyline with.mapGroup
- The group to place the polyline inlines
- The lines that make up the polylineuid
- The unique identifier for the new multi polylineprotected java.lang.String getMarkerPointType()
getMarkerPointType
in class DrawingShape
protected java.lang.String getShapeMenu()
EditablePolyline
getShapeMenu
in class DrawingShape
protected java.lang.String getCotType()
getCotType
in class DrawingShape
public void setLines(java.util.List<DrawingShape> lines)
lines
- List of lines to setpublic java.util.List<DrawingShape> getLines()
public void setPoints()
public void move(GeoPointMetaData oldPoint, GeoPointMetaData newPoint)
public int getStrokeColor()
Shape
getStrokeColor
in class Shape
Color
public int getIconColor()
Shape
getIconColor
in interface URIContent
getIconColor
in class Shape
public boolean isEmpty()
public void removeLine(DrawingShape ds)
ds
- - The drawing shape to removepublic void addLine(DrawingShape ds)
ds
- - Drawing shape to addpublic void setTitle(java.lang.String title)
MapItem
setTitle
in class DrawingShape
title
- Item titlepublic void toggleMetaData(java.lang.String key, boolean value)
toggleMetaData
in class DrawingShape
protected void onStrokeStyleChanged()
Shape
onStrokeStyleChanged
in class Shape
public void setStrokeWeight(double strokeWeight)
Shape
setStrokeWeight
in class EditablePolyline
strokeWeight
- a stroke line widthpublic void setMovable(boolean movable)
setMovable
in class DrawingShape
public void setAltitudeMode(AltitudeMode altitudeMode)
MapItem
AltitudeMode
for possible valuessetAltitudeMode
in class MapItem
altitudeMode
- Altitude modepublic void setHeight(double height)
MapItem
setHeight
in class DrawingShape
height
- the height in meters or Double.NaN if unknown.public void onVisibleChanged()
MapItem
onVisibleChanged
in class EditablePolyline
public CotEvent toCot()
toCot
in class DrawingShape
public boolean isSupported(java.lang.Class<?> target)
isSupported
in interface Exportable
isSupported
in class EditablePolyline
target
- the target formatpublic java.lang.Object toObjectOf(java.lang.Class<?> target, ExportFilters filters)
toObjectOf
in interface Exportable
toObjectOf
in class EditablePolyline
target
- The type to convert the multipolyline tofilters
- Allows ExportMarshal
instances to filter e.g. based
on geographic region or other criteriaprotected Folder toKml()
toKml
in class EditablePolyline
protected KMZFolder toKmz()
toKmz
in class EditablePolyline
protected GPXExportWrapper toGpx()
toGpx
in class EditablePolyline
public android.os.Bundle preDrawCanvas(CapturePP capture)
Capturable
preDrawCanvas
in interface Capturable
preDrawCanvas
in class EditablePolyline
capture
- Capture instance (use forward() to convert)public void drawCanvas(CapturePP cap, android.os.Bundle data)
Capturable
drawCanvas
in interface Capturable
drawCanvas
in class EditablePolyline
cap
- Canvas to draw to (use getCanvas())data
- Point data saved in preDrawCanvas@Deprecated public void add(DrawingShape ds)
addLine(DrawingShape)
@Deprecated public void removeItem(DrawingShape ds)
removeLine(DrawingShape)
@Deprecated public java.lang.String UID()
MapItem.getUID()
@Deprecated public MapView getView()
MapView.getMapView()
@Deprecated public MapGroup getMapGroup()
MapItem.getGroup()
@Deprecated public java.util.List<DrawingShape> get_lines()
getLines()
@Deprecated public void setColor(int color, android.graphics.Point p)
EditablePolyline.setColor(int)
on line instead@Deprecated public void removeItem(android.graphics.Point p)
removeLine(DrawingShape)
on line instead