MarkerOptions
Package: com.eegeo.mapapi.markers
Defines creation parameters for a Marker.
For more information, see the Marker documentation.
Constructors
MarkerOptions()
Instantiate a new set of marker options
Methods
MarkerOptions position(LatLng position)
Sets the position for the marker.
Returns: The MarkerOptions object on which the method was called, with the new position set.
Type | argument | Description |
---|---|---|
LatLng | position | The new position for the marker. |
MarkerOptions elevation(double elevation)
Sets the elevation for the marker. If this method is not called, MarkerOptions will be initialised to create a Marker with an elevation of 0.
Returns: The MarkerOptions object on which the method was called, with the new elevation set.
Type | argument | Description |
---|---|---|
double | elevation | The elevation, in meters. |
MarkerOptions elevationMode(ElevationMode elevationMode)
Sets the ElevationMode for the marker. If this method is not called, MarkerOptions will be initialised to create a Marker with ElevationMode.HeightAboveGround.
Returns: The MarkerOptions object on which the method was called, with the new elevation mode set.
Type | argument | Description |
---|---|---|
ElevationMode | elevationMode | The ElevationMode used to interpret the elevation of the marker. |
MarkerOptions elevationMode(MarkerOptions.MarkerElevationMode markerElevationMode)
[Deprecated - use elevationMode(ElevationMode elevationMode).]
Sets the ElevationMode for the marker. If this method is not called, MarkerOptions will be initialised to create a Marker with ElevationMode.HeightAboveGround.
Returns: The MarkerOptions object on which the method was called, with the new elevation mode set.
Type | argument | Description |
---|---|---|
MarkerOptions.MarkerElevationMode | markerElevationMode | The MarkerOptions.MarkerElevationMode used to interpret the elevation of the marker. |
MarkerOptions labelText(String title)
Sets the title for the marker. If this method is not called, MarkerOptions will be initialised to create a Marker with no title.
Returns: The MarkerOptions object on which the method was called, with the new title set.
Type | argument | Description |
---|---|---|
String | title | The title for the marker. |
MarkerOptions styleName(String styleName)
Set the style name for the marker. If this method is not called, MarkerOptions will be initialised to create a Marker with a default style.
Returns: The MarkerOptions object on which the method was called, with the new style name set.
Type | argument | Description |
---|---|---|
String | styleName | The style for the marker. |
MarkerOptions userData(String userData)
Sets the user data for the marker. If this method is not called, MarkerOptions will be initialised to create a Marker with an empty string as user data.
Returns: The MarkerOptions object on which the method was called, with the new user data set.
Type | argument | Description |
---|---|---|
String | userData | The user data for the marker. |
MarkerOptions iconKey(String iconKey)
Sets the icon key for the marker. If this method is not called, MarkerOptions will be initialised to create a Marker with a default icon.
Returns: The MarkerOptions object on which the method was called, with the new icon key set.
Type | argument | Description |
---|---|---|
String | iconKey | The icon key for the marker. |
MarkerOptions indoor(String indoorMapId, int indoorFloorId)
Sets the indoor map properties for the marker. If this method is not called, MarkerOptions is initialised to create a marker for display on an outdoor map.
Returns: The MarkerOptions object on which the method was called, with the new indoor map properties set.
Type | argument | Description |
---|---|---|
String | indoorMapId | The identifier of the indoor map on which the marker should be displayed. |
int | indoorFloorId | The identifier of the indoor map floor on which the marker should be displayed. In the WRLD Indoor Map Format, this corresponds to the ‘z_order’ field of the Level object. |
MarkerOptions drawOrder(int drawOrder)
Sets the draw order for the marker. If this method is not called, MarkerOptions is initialised to create a marker with a drawOrder of 0.
Returns: The MarkerOptions object on which the method was called, with the draw order set
Type | argument | Description |
---|---|---|
int | drawOrder | The draw order for the marker. Higher values are drawn after lower values. |
LatLng getPosition()
Returns the position set for this MarkerOptions object.
Returns: A LatLng object specifying the marker’s location
double getElevation()
Returns the elevation set for this MarkerOptions object.
Returns: A height, in meters.
ElevationMode getElevationMode()
Returns the elevation mode set for this MarkerOptions object.
Returns: The ElevationMode, indicating how elevation is interpreted.
String getTitle()
Returns the title set for this MarkerOptions object.
Returns: A string containing the title text.
int getDrawOrder()
Returns the draw order set for this MarkerOptions object
Returns: the draw order
String getStyleName()
Returns the style name set for this MarkerOptions object.
Returns: A string containing the style name.
String getUserData()
Returns the user data set for this MarkerOptions object.
Returns: A string containing the user data.
String getIconKey()
Returns the icon key set for this MarkerOptions object.
Returns: A string containing the icon key.
String getIndoorMapId()
Returns the indoor map identifier for this MarkerOptions object.
Returns: A string containing the indoor map identifier
int getIndoorFloorId()
Returns the indoor map floor identifier for this MarkerOptions object.
Returns: The indoor map floor id.
ElevationMode fromMarkerElevationMode(MarkerOptions.MarkerElevationMode markerElevationMode)
Provided for migration from deprecated type MarkerElevationMode to ElevationMode only
Returns: markerElevationMode as an equivalent ElevationMode
MarkerOptions.MarkerElevationMode toMarkerElevationMode(ElevationMode elevationMode)
Provided for migration from deprecated type MarkerElevationMode to ElevationMode only
Returns: elevationMode as an equivalent MarkerElevationMode
enum MarkerOptions.MarkerElevationMode
Enum value | Description |
---|---|
HeightAboveSeaLevel | Indicates that a Marker’s elevation property is interpreted as an absolute altitude above mean sea level, in meters. |
HeightAboveGround | Indicates that a Marker’s elevation property is interpreted as a height relative to the map’s terrain at the marker’s LatLng position, in meters |