Positioner

Package: com.eegeo.mapapi.positioner

A Positioner represents a single point on the map. The primary purpose of a positioner is to expose a point on the map as a 2D coordinate in screen space. This could be used for example to position a View.

To create a Positioner and add it to the map, use EegeoMap.addPositioner()

Positioner has the following properties:

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

Elevation
The height above the map at which the positioner 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.

IndoorMapId
Positioners can be displayed on indoor maps. This property stores the string identifier of the indoor map on which the positioner is to be located. For outdoor positioners, this property is empty.

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

PositionerChangedListener
Each time the screen space coordinate of the positioner changes the PositionerChangedListener will be called.

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

Methods

LatLng getPosition()

Returns the position of the positioner.

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

void setPosition(LatLng position)

Sets the location of this positioner.

Type argument Description
LatLng position A LatLng coordinate.

double getElevation()

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

Returns: A height, in meters.

void setElevation(double elevation)

Sets the elevation of this positioner

Type argument Description
double elevation A height in meters. Interpretation depends on the current PositionerOptions.PositionerElevationMode

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 positioner

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

String getIndoorMapId()

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

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

void setIndoorMapId(String indoorMapId)

Sets the indoor map ID.

Type argument Description
String indoorMapId The map ID.

int getIndoorMapFloorId()

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

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

void setIndoorMapFloorId(int indoorMapFloorId)

Sets the indoor floor ID.

Type argument Description
int indoorMapFloorId The floor ID.

Point getScreenPointOrNull()

Returns the screen point. Use isScreenPointProjectionDefined() to check that this point is valid and not over the horizon.

Returns: The screen point or null if the point is not valid.

LatLngAlt getTransformedPointOrNull()

Returns the geographical coordinate that is used to derive the screen-projected point that is accessed with getScreenPointOrNull. The coordinate may change depending on the animated state of the map - for example, when displaying in collapsed mode.

Returns: The transformed world coordinate.

boolean isBehindGlobeHorizon()

Returns true if the screen projection of this Positioner would appear beyond the horizon for the current viewpoint. For example, when viewing the map zommed out so that the entire globe is visible, calling this method on a Positioner instance located on the opposite side of the Earth to the camera location will return true.

Returns: True if the positioner is beyond the horizon.

boolean isScreenPointProjectionDefined()

Returns true if the screen point is valid for drawing. This returns true if the screen point is valid and is on this side of the horizon. The screen point may be outwith the screen area.

Returns: True if the screen point is valid for drawing.

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