public class Marker extends PointMapItem implements Exportable, Capturable
Marker has the following properties:
Notable UserControlComponent (touch) behavior:
Notable GLMapComponent (graphics) behavior:
Modifier and Type | Class and Description |
---|---|
static interface |
Marker.AugmentedKeyholeInfo
The specific purpose is to allow for an existing marker within the system
that has been created as part of the CotMapAdapter (unfortunately CotMapAdapter
cannot create anything better than a Marker) to be able to express itself as a
more robust Kml or Kmz structure.
|
static class |
Marker.LabelPriority |
static interface |
Marker.OnIconChangedListener |
static interface |
Marker.OnLabelPriorityChanged |
static interface |
Marker.OnLabelPriorityChangedListener |
static interface |
Marker.OnLabelTextSizeChangedListener |
static interface |
Marker.OnMarkerHitBoundsChangedListener
Deprecated.
No longer used for hit-testing
|
static interface |
Marker.OnStateChangedListener |
static interface |
Marker.OnStyleChangedListener |
static interface |
Marker.OnSummaryChangedListener |
static interface |
Marker.OnTitleChangedListener |
static interface |
Marker.OnTrackChangedListener |
PointMapItem.OnPointChangedListener
MapItem.OnAltitudeModeChangedListener, MapItem.OnClickableChangedListener, MapItem.OnGroupChangedListener, MapItem.OnHeightChangedListener, MapItem.OnMetadataChangedListener, MapItem.OnTypeChangedListener, MapItem.OnVisibleChangedListener, MapItem.OnZOrderChangedListener
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_MAX_LABEL_RENDER_RESOLUTION
Maximum label render resolution for a polyline that is inside the render window.
|
static double |
DEFAULT_MIN_LABEL_RENDER_RESOLUTION
Minimum label render resolution for a polyline that is inside the render window.
|
static int |
ICON_GONE |
static int |
ICON_INVISIBLE |
static int |
ICON_VISIBLE |
static int |
STATE_CANCELED_MASK
The marker should appear and behave as canceled
|
static int |
STATE_DEFAULT |
static int |
STATE_DISABLED_MASK
The marker should appear and behave as disabled
|
static int |
STATE_FOCUSED_MASK
The marker should appear and behave as focused
|
static int |
STATE_PRESSED_MASK
The marker should appear and behave as pressed
|
static int |
STATE_SELECTED_MASK
The marker should appear and behave as selected
|
static int |
STYLE_ALERT_MASK |
static int |
STYLE_MARQUEE_TITLE_MASK
Shorten long titles by marquee the text
|
static int |
STYLE_ROTATE_HEADING_MASK
Indicates the icon should be rotated according to the track heading.
|
static int |
STYLE_ROTATE_HEADING_NOARROW_MASK
If Rotating arrows are not desired and full rotation is desired, set the following flag.
|
static int |
STYLE_SMOOTH_MOVEMENT_MASK
The marker will smoothly interpolate between point changes
|
static int |
STYLE_SMOOTH_ROTATION_MASK
The marker will smoothly interpolate between rotation changes
|
static int |
TEXT_STATE_ALWAYS_SHOW |
static int |
TEXT_STATE_DEFAULT |
static int |
TEXT_STATE_NEVER_SHOW |
POINT_DEFAULT
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 |
---|
Marker(GeoPointMetaData point,
java.lang.String uid)
Initializer for a marker from an existing GeoPoint with additional metadata.
|
Marker(GeoPoint point,
java.lang.String uid)
Create a Marker at a given point and altitude
|
Marker(long serialId,
GeoPoint point,
java.lang.String uid) |
Marker(long serialId,
MetaDataHolder metadata,
java.lang.String uid) |
Marker(long serialId,
java.lang.String uid) |
Marker(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
void |
addOnIconChangedListener(Marker.OnIconChangedListener listener)
Add a icon property listener
|
void |
addOnLabelPriorityChangedListener(Marker.OnLabelPriorityChangedListener listener)
Add a summary changed listener
|
void |
addOnLabelSizeChangedListener(Marker.OnLabelTextSizeChangedListener listener) |
void |
addOnMarkerHitBoundsChangedListener(Marker.OnMarkerHitBoundsChangedListener listener)
Deprecated.
No longer used for hit-testing
|
void |
addOnStateChangedListener(Marker.OnStateChangedListener listener)
Add a state property listener
|
void |
addOnStyleChangedListener(Marker.OnStyleChangedListener l) |
void |
addOnSummaryChangedListener(Marker.OnSummaryChangedListener listener)
Add a summary changed listener
|
void |
addOnTitleChangedListener(Marker.OnTitleChangedListener listener)
Add a title property listener
|
void |
addOnTrackChangedListener(Marker.OnTrackChangedListener listener) |
static void |
addToGroup(java.lang.String[] path,
Marker m) |
void |
drawCanvas(CapturePP cap,
android.os.Bundle data)
Draw the item to the canvas
|
static int |
getAffiliationColor(Marker t)
Given a marker, this will search throug all of the know locations to find out the markers affiliation
For example, red = hostile, blue = friendly, gold team = yello.
|
static int |
getAffiliationColor(java.lang.String type)
Uses the type to determine the affiliation color: red = hostile, blue = friendly for example.
|
int |
getColor() |
java.lang.String[] |
getGroupPath() |
Icon |
getIcon()
Get the icon property
|
int |
getIconColor()
Get the color of the icon
|
int |
getIconVisibility()
Get the icon visibility state
See
setIconVisibility(int) for more info |
protected java.lang.String |
getKMLDescription(java.io.File[] attachments) |
static java.lang.String |
getKMLDescription(PointMapItem marker,
java.lang.String title,
java.io.File[] attachments)
Display image thumbnails
|
Marker.LabelPriority |
getLabelPriority() |
int |
getLabelTextSize()
gets the text size to use for the rendering label/labels
return default MapView font size if not modified
|
android.graphics.Typeface |
getLabelTypeface()
Returns the current label typeface(font)
|
android.graphics.Rect |
getMarkerHitBounds()
Deprecated.
No longer used for hit-testing
|
android.graphics.Rect |
getMarkerHitBounds(android.graphics.Rect out)
Deprecated.
No longer used for hit-testing
|
protected java.lang.String |
getRemarksKey()
Get the metadata key for where remarks are stored
99.9% of the time this is just "remarks".
|
int |
getState()
Get the state property
|
int |
getStyle() |
java.lang.String |
getSummary()
Get the summary property
|
boolean |
getSummaryFlag() |
int |
getTextColor()
The current color of the marker text.
|
int |
getTextRenderFlag() |
java.lang.String |
getTitle()
Get the title property
|
double |
getTrackHeading()
Provides the track heading
|
double |
getTrackSpeed()
Provides the track speed
|
boolean |
isSupported(java.lang.Class<?> target)
Check if this instance supports the specified target class type
|
protected void |
onIconChanged()
Invoked when icon property changes
|
protected void |
onLabelPriorityChanged() |
protected void |
onLabelTextSizeChanged() |
protected void |
onMarkerHitBoundsChanged()
Deprecated.
No longer used for hit-testing
|
protected void |
onStateChanged()
Invoked when state property changes
|
protected void |
onStyleChanged() |
protected void |
onSummaryChanged()
Invoked when the summary property changes
|
protected void |
onTitleChanged()
Invoked when title property changes
|
protected void |
onTrackChanged() |
android.os.Bundle |
preDrawCanvas(CapturePP cap)
Save forwarded points to meta data holder
These will be used later in drawCanvas
|
void |
removeOnIconChangedListener(Marker.OnIconChangedListener listener)
Remove a icon property listener
|
void |
removeOnLabelPriorityChangedListener(Marker.OnLabelPriorityChangedListener listener)
Remove a summary changed listener
|
void |
removeOnLabelSizeChangedListner(Marker.OnLabelTextSizeChangedListener listener) |
void |
removeOnMarkerHitBoundsChangedListener(Marker.OnMarkerHitBoundsChangedListener listener)
Deprecated.
No longer used for hit-testing
|
void |
removeOnStateChangedListener(Marker.OnStateChangedListener listener)
Remove a state property listener
|
void |
removeOnStyleChangedListener(Marker.OnStyleChangedListener l) |
void |
removeOnSummaryChangedListener(Marker.OnSummaryChangedListener listener)
Remove a summary changed listener
|
void |
removeOnTitleChangedListener(Marker.OnTitleChangedListener listener)
Remove a title property listener
|
void |
removeOnTrackChangedListener(Marker.OnTrackChangedListener listener) |
void |
setAlwaysShowText(boolean state) |
void |
setAugmentedKeyholeInfo(Marker.AugmentedKeyholeInfo aki) |
void |
setColor(int color)
Set the color of the marker
|
void |
setIcon(Icon icon)
Set the icon property
|
void |
setIconVisibility(int visibility)
Set the visibility state of the marker icon shown on the map
States include:
ICON_VISIBLE - Icon is visible
ICON_INVISIBLE - Icon is invisible but takes up space
ICON_GONE - Icon is invisible and does not take up space |
void |
setLabelPriority(Marker.LabelPriority priority)
Set the label priority on a case by case basis given a label priority.
|
void |
setLabelTextSize(int size)
sets the text size to use for the rendering label
convenience method for setting label size meta
|
void |
setLabelTextSize(int size,
android.graphics.Typeface typeface)
sets the text size to use for the rendering label as well as the Typeface(font)
this is a convenience method for setting size and font for a rendering label
|
void |
setLabelTypeface(android.graphics.Typeface _labelTypeface)
Sets the label typeface graphic(font)
|
void |
setMarkerHitBounds(int left,
int top,
int right,
int bottom)
Deprecated.
No longer used for hit-testing
|
void |
setMarkerHitBounds(android.graphics.Rect hitBounds)
Deprecated.
No longer used for hit-testing
|
void |
setMaxLabelRenderResolution(double d)
Convienence method for setting the maximum label render resolution.
|
void |
setMinLabelRenderResolution(double d)
Convienence method for setting the minimum label render resolution.
|
void |
setShowLabel(boolean showLabel)
Set whether the marker label is displayed on the map
|
void |
setState(int state)
Set the state property based on the STATE values defined in the IMarker interface.
|
void |
setStyle(int style)
Sets the style of the Marker as defined by the STYLE values in the IMarker interface.
|
void |
setSummary(java.lang.String summary)
Set the summary property
|
void |
setSummaryFlag(boolean b) |
void |
setTextColor(int textColor)
Set the color of the text being rendered when the Marker text is visible.
|
void |
setTextRenderFlag(int flag)
Set the text rendering underneath the marker.
|
void |
setTitle(java.lang.String title)
Set the title property
|
void |
setTrack(double heading,
double speed)
Sets the heading and speed for this Marker.
|
static GPXExportWrapper |
toGPX(PointMapItem item) |
protected Folder |
toKml() |
protected KMZFolder |
toKmz() |
static MissionPackageExportWrapper |
toMissionPackage(MapItem item) |
java.lang.Object |
toObjectOf(java.lang.Class<?> target,
ExportFilters filters)
Export to the specified target class type
|
static OGRFeatureExportWrapper |
toOgrGeomtry(PointMapItem item) |
protected void |
updateTextBounds()
Deprecated.
Implementation moved to
AbstractGLMapItem2#hitTest(com.atakmap.map.MapRenderer3, HitTestQueryParameters) |
addOnPointChangedListener, dispose, getCrumbTrail, getGeoPointMetaData, getPersistentCircleCrumbTrail, getPoint, getVolumeHeight, getVolumeRadius, onPointChanged, removeOnPointChangedListener, setCrumbTrail, setPersistentCircleCrumbTrail, setPoint, setPoint, setVolume
addOnAltitudeModeChangedListener, addOnClickableChangedListener, addOnGroupChangedListener, addOnHeightChangedListener, addOnMetadataChangedListener, addOnMetadataChangedListener, addOnTypeChangedListener, addOnVisibleChangedListener, addOnZOrderChangedListener, computeDistance, copyMetaData, createSerialId, getAltitudeMode, getClickable, getClickPoint, getEditable, getGroup, getHashtags, getHeight, getHitRadius, getIconDrawable, getMetaBoolean, getMetaString, getMovable, getRadialMenuPath, getRemarks, getSerialId, getTag, getType, getUID, getUniqueMapItemName, getURI, getVisible, getVisible, getZOrder, isTouchable, notifyMetadataChanged, onAdded, onAltitudeModeChanged, onClickableChanged, onGroupChanged, onHeightChanged, onMetadataChanged, onRemoved, onTypeChanged, onVisibilityConditions, onVisibleChanged, onZOrderChanged, 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, toggleMetaData
public static final int ICON_VISIBLE
public static final int ICON_INVISIBLE
public static final int ICON_GONE
public static final int TEXT_STATE_DEFAULT
public static final int TEXT_STATE_ALWAYS_SHOW
public static final int TEXT_STATE_NEVER_SHOW
public static final double DEFAULT_MIN_LABEL_RENDER_RESOLUTION
public static final double DEFAULT_MAX_LABEL_RENDER_RESOLUTION
public static final int STATE_SELECTED_MASK
public static final int STATE_FOCUSED_MASK
public static final int STATE_PRESSED_MASK
public static final int STATE_CANCELED_MASK
public static final int STATE_DISABLED_MASK
public static final int STYLE_ROTATE_HEADING_MASK
public static final int STYLE_ROTATE_HEADING_NOARROW_MASK
public static final int STYLE_SMOOTH_ROTATION_MASK
public static final int STYLE_SMOOTH_MOVEMENT_MASK
public static final int STYLE_MARQUEE_TITLE_MASK
public static final int STYLE_ALERT_MASK
public static final int STATE_DEFAULT
public Marker(java.lang.String uid)
public Marker(long serialId, java.lang.String uid)
public Marker(long serialId, MetaDataHolder metadata, java.lang.String uid)
public Marker(GeoPoint point, java.lang.String uid)
point
- the map point of the Markerpublic Marker(GeoPointMetaData point, java.lang.String uid)
point
- the GeoMetaData point to construct the Marker with the appropriate metadata.uid
- the uid to provide the Marker.public Marker(long serialId, GeoPoint point, java.lang.String uid)
public void setIcon(Icon icon)
icon
- the iconpublic Icon getIcon()
public void setTitle(java.lang.String title)
public java.lang.String getTitle()
getTitle
in interface URIContent
getTitle
in class MapItem
public void setSummary(java.lang.String summary)
summary
- - The stringpublic void setLabelPriority(Marker.LabelPriority priority)
priority
- the label priority, null if a default priority calculation is expected.public Marker.LabelPriority getLabelPriority()
protected java.lang.String getRemarksKey()
MapItem
getRemarksKey
in class MapItem
public void setLabelTextSize(int size)
size
- the int value size to use on the labels for this marker
If not set the default MapView format size is usedpublic int getLabelTextSize()
public void setLabelTextSize(int size, android.graphics.Typeface typeface)
size
- the int value size to use on the labels for this markertypeface
- the font typeface.java for the rendering labelpublic void setLabelTypeface(android.graphics.Typeface _labelTypeface)
_labelTypeface
- the graphic typeface class to use as the fontpublic android.graphics.Typeface getLabelTypeface()
public java.lang.String getSummary()
public void setSummaryFlag(boolean b)
public boolean getSummaryFlag()
@Deprecated protected void updateTextBounds()
AbstractGLMapItem2#hitTest(com.atakmap.map.MapRenderer3, HitTestQueryParameters)
public int getState()
public void setState(int state)
state
- any of the STATE_*_MAKS flags or'd togetherpublic void setStyle(int style)
style
- a STYLE flag from the IMarker interface.public void setTextRenderFlag(int flag)
public int getTextRenderFlag()
public void setAlwaysShowText(boolean state)
public void setMinLabelRenderResolution(double d)
d
- the double value set in resolution meters per pixel.public void setMaxLabelRenderResolution(double d)
d
- the double value set in resolution meters per pixel.public void setShowLabel(boolean showLabel)
showLabel
- True to show the label, false to hide itpublic void setIconVisibility(int visibility)
ICON_VISIBLE
- Icon is visible
ICON_INVISIBLE
- Icon is invisible but takes up space
ICON_GONE
- Icon is invisible and does not take up spacevisibility
- Visibility statepublic int getIconVisibility()
setIconVisibility(int)
for more infopublic int getStyle()
public void addOnStyleChangedListener(Marker.OnStyleChangedListener l)
public void removeOnStyleChangedListener(Marker.OnStyleChangedListener l)
public void addOnIconChangedListener(Marker.OnIconChangedListener listener)
listener
- the listenerpublic void removeOnIconChangedListener(Marker.OnIconChangedListener listener)
listener
- the listenerpublic void addOnTitleChangedListener(Marker.OnTitleChangedListener listener)
listener
- the listenerpublic void addOnLabelSizeChangedListener(Marker.OnLabelTextSizeChangedListener listener)
public void removeOnLabelSizeChangedListner(Marker.OnLabelTextSizeChangedListener listener)
public void removeOnTitleChangedListener(Marker.OnTitleChangedListener listener)
listener
- the listenerpublic void addOnSummaryChangedListener(Marker.OnSummaryChangedListener listener)
listener
- the listenerpublic void removeOnSummaryChangedListener(Marker.OnSummaryChangedListener listener)
listener
- the listenerpublic void addOnLabelPriorityChangedListener(Marker.OnLabelPriorityChangedListener listener)
listener
- the listenerpublic void removeOnLabelPriorityChangedListener(Marker.OnLabelPriorityChangedListener listener)
listener
- the listenerpublic void addOnStateChangedListener(Marker.OnStateChangedListener listener)
listener
- the listenerpublic void removeOnStateChangedListener(Marker.OnStateChangedListener listener)
listener
- the listener@Deprecated public void addOnMarkerHitBoundsChangedListener(Marker.OnMarkerHitBoundsChangedListener listener)
listener
- the listener@Deprecated public void removeOnMarkerHitBoundsChangedListener(Marker.OnMarkerHitBoundsChangedListener listener)
listener
- the listenerpublic void addOnTrackChangedListener(Marker.OnTrackChangedListener listener)
public void removeOnTrackChangedListener(Marker.OnTrackChangedListener listener)
@Deprecated public void setMarkerHitBounds(int left, int top, int right, int bottom)
left
- offset left of MapIcon anchortop
- offset above MapIcon anchorright
- offset right of MapIcon anchorbottom
- offset below MapIcon anchor@Deprecated public void setMarkerHitBounds(android.graphics.Rect hitBounds)
hitBounds
- offset values from MapIcon anchor@Deprecated public android.graphics.Rect getMarkerHitBounds()
@Deprecated public android.graphics.Rect getMarkerHitBounds(android.graphics.Rect out)
out
- the Rect to use (may be null)public int getTextColor()
public void setTextColor(int textColor)
textColor
- the color in #ARGB format.public void setTrack(double heading, double speed)
heading
- the track heading in degrees True [-360..360]speed
- the track speed in meters per secondpublic double getTrackHeading()
public double getTrackSpeed()
@Deprecated protected void onMarkerHitBoundsChanged()
protected void onIconChanged()
protected void onTitleChanged()
protected void onLabelTextSizeChanged()
protected void onLabelPriorityChanged()
protected void onSummaryChanged()
protected void onStateChanged()
protected void onTrackChanged()
protected void onStyleChanged()
public static int getAffiliationColor(Marker t)
public static int getAffiliationColor(java.lang.String type)
public java.lang.Object toObjectOf(java.lang.Class<?> target, ExportFilters filters) throws FormatNotSupportedException
Exportable
toObjectOf
in interface Exportable
target
- the target classfilters
- Allows ExportMarshal
instances to filter e.g. based
on geographic region or other criteriaFormatNotSupportedException
- if there is an issue creating the object.public boolean isSupported(java.lang.Class<?> target)
Exportable
isSupported
in interface Exportable
target
- the target classpublic void setAugmentedKeyholeInfo(Marker.AugmentedKeyholeInfo aki)
protected Folder toKml()
protected KMZFolder toKmz()
public static java.lang.String getKMLDescription(PointMapItem marker, java.lang.String title, java.io.File[] attachments)
marker
- attachments
- protected java.lang.String getKMLDescription(java.io.File[] attachments)
public static MissionPackageExportWrapper toMissionPackage(MapItem item)
public static OGRFeatureExportWrapper toOgrGeomtry(PointMapItem item)
public static GPXExportWrapper toGPX(PointMapItem item)
public static void addToGroup(java.lang.String[] path, Marker m)
public java.lang.String[] getGroupPath()
public void setColor(int color)
color
- Marker colorpublic int getColor()
public int getIconColor()
URIContent
getIconColor
in interface URIContent
getIconColor
in class MapItem
public android.os.Bundle preDrawCanvas(CapturePP cap)
Capturable
preDrawCanvas
in interface Capturable
cap
- Capture instance (use forward() to convert)public void drawCanvas(CapturePP cap, android.os.Bundle data)
Capturable
drawCanvas
in interface Capturable
cap
- Canvas to draw to (use getCanvas())data
- Point data saved in preDrawCanvas