Marker

Package: com.eegeo.mapapi.markers

A Marker is an icon placed at a point on the map’s surface. Markers may optionally have a text title displayed alongside the icon. The Marker is displayed so that it is always oriented to align with the device’s screen, regardless of how the user moves or rotates the map.
Markers avoid being displayed such that one marker visually overlaps another. Instead, for any set of markers, some may be temporarily hidden so that none are displayed intersecting another. The decision about which markers to hide when markers overlap is based on the drawOrder property of each marker.

To create a Marker and add it to the map, use EegeoMap.addMarker()

Marker has the following properties:

Position
The LatLng location of the marker on the map. The position can be changed at any point if you want to move the marker.

Elevation
The height above the map at which the marker is located, in meters. Elevation can be specified as either a height above terrain, or as an absolute altitude - see ElevationMode below.

ElevationMode
Specifies how the Elevation property is interpreted, as either:
A height above the terrain (ground), in meters.
An absolute altitude (height above mean sea level), in meters.

Title
Text to display alongside the marker icon.

IconKey
A string identifier specifying the name of an icon to display. An empty value will result in no icon being displayed.

DrawOrder
The draw order of the marker. Where markers would be drawn overlapping, marker with the lowest draw order is displayed, and the other overlapping markers temporarily hidden. If overlapping markers have equal draw order, then priority is based on screen position, with the marker that is lowest on screen being drawn. The default value is 0.

UserData
A String object associated with the marker. The API does not access this property - it is provided for developer convenience, to avoid storing an independent association. You could use this, for example, to store an ID from a data set.

IndoorMapId
Markers can be displayed on indoor maps. This property stores the string identifier of the indoor map on which the marker is to be displayed. For outdoor markers, this property is empty. The property cannot be changed after construction - a Marker must be created as either an outdoor marker (the default) or an indoor marker.

IndoorFloorId
For a marker displayed on an indoor map, the identifier of the floor on which the marker is to be displayed.

Public methods in this class must be called on the Android UI thread.

Methods

LatLng getPosition()

Returns the position of the marker.

Returns: A LatLng object representing the location of the marker on the map’s surface.

void setPosition(LatLng position)

Sets the location of this marker.

Type argument Description
LatLng position A LatLng coordinate.

double getElevation()

Returns the current elevation of the marker. The property is interpreted differently, depending on the ElevationMode property.

Returns: A height, in meters.

void setElevation(double elevation)

Sets the elevation of this marker

Type argument Description
double elevation A height in meters. Interpretation depends on the current MarkerOptions.MarkerElevationMode

ElevationMode getElevationMode()

Returns the mode specifying how the Elevation property is interpreted.

Returns: An enumerated value indicating whether Elevation is specified as a height above terrain, or an absolute altitude above sea level.

void setElevationMode(ElevationMode elevationMode)

Sets the elevation mode for this marker

Type argument Description
ElevationMode elevationMode The mode specifying how to interpret the Elevation property

String getTitle()

Gets the title of the marker

Returns: The marker’s title text.

void setTitle(String title)

Sets the title text to be displayed by this Marker

Type argument Description
String title The text to display. May be empty

String getIconKey()

Gets the key of the icon to display on the marker.

Returns: A string key for the associated icon.

void setIconKey(String iconKey)

Sets the string key associated with the icon to be displayed by this Marker

Type argument Description
String iconKey  

int getDrawOrder()

Gets the draw order of the marker.

Returns: The marker’s draw order.

void setDrawOrder(int drawOrder)

Sets the draw order for this marker. Draw order is used to determine which marker to display when markers would otherwise overlap on the screen. The marker with the lowest drawOrder value takes precedence.

Type argument Description
int drawOrder Markers have a default drawOrder of 0.

String getIndoorMapId()

Gets the identifier of an indoor map on which this marker should be displayed, if any.

Returns: For a marker on an indoor map, the string identifier of the indoor map; otherwise an empty string.

int getIndoorFloorId()

Gets the identifier of an indoor map floor on which this marker should be displayed, if any.

Returns: For a marker on an indoor map, the identifier of the floor; otherwise 0.

String getUserData()

Gets the user data associated with this marker.

Returns: The user data string.

String getStyleName()

Gets the style name used for this marker. Currently not

Returns: The style name used internally when binding a view for this marker

v0.0.1120
Overview Introduction
Picking PickResult
Widgets (Optional) BlueSphere
Tag Service (Optional) TagService OnTagsLoadCompletedListener
RouteView Widget (Optional) RouteView RouteViewOptions