HERE Android SDK Developer's Guide

GeoPosition

The class GeoPosition is a member of com.here.android.mpa.common .

Class Summary

public class GeoPosition

extends java.lang.Object

Represents position, speed, and heading information as provided by a positioning device.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in GeoPosition
Constructors

GeoPosition (GeoCoordinate coordinate)

Public constructor

Field Summary

Table 2. Fields in GeoPosition
Fields

public static final int SOURCE_CACHE

GeoPosition is retuned from server cache.

public static final int SOURCE_FUSION

GeoPosition is retuned as filtered from several sources.

public static final int SOURCE_HARDWARE

GeoPosition is retuned from hardware.

public static final int SOURCE_INDOOR

GeoPosition is retuned from indoor radio maps.

public static final int SOURCE_NONE

Source is unknown or not available.

public static final int SOURCE_OFFLINE

GeoPosition is retuned from radio maps.

public static final int SOURCE_ONLINE

GeoPosition is retuned from server.

public static final int TECHNOLOGY_BLE

GeoPosition is calculated using Bluetooth LE measurements.

public static final int TECHNOLOGY_CELL

GeoPosition is calculated using Cell measurements.

public static final int TECHNOLOGY_GNSS

GeoPosition is calculated by GNSS chip.

public static final int TECHNOLOGY_NONE

Technology is unknown or not available.

public static final int TECHNOLOGY_WIFI

GeoPosition is calculated using Wi-Fi measurements.

public static final int UNKNOWN

Definition of an unknown accuracy, course (heading/bearing) or speed

Method Summary

Table 3. Methods in GeoPosition
Methods

public boolean equals (Object other)

For documentation, see java.lang.Object

public float getAltitudeAccuracy ()

Gets the current altitude accuracy as measured by the enabled positioning device.

public String getBuildingId ()

Get building ID of this position estimate, if known.

public String getBuildingName ()

Get building name in human readable format, e.g.

public GeoCoordinate getCoordinate ()

Gets the current GeoCoordinate as measured by the enabled positioning device.

public Integer getFloorId ()

FloorId is identifying the floor level in the building.

public double getHeading ()

Gets the current course heading as measured by the enabled positioning device.

public float getLatitudeAccuracy ()

Gets the current latitude accuracy as measured by the enabled positioning device.

public float getLongitudeAccuracy ()

Gets the current longitude accuracy as measured by the enabled positioning device.

public int getPositionSource ()

Returns bitmask of sources for this GeoPosition update.

public int getPositionTechnology ()

Returns bitmask of technologies for this GeoPosition update.

public double getSpeed ()

Gets the current speed as measured by the enabled positioning device.

public Date getTimestamp ()

Gets the timestamp for the last position measured by the enabled positioning device.

public int hashCode ()

For documentation, see java.lang.Object

public boolean isValid ()

Determines whether the GeoPosition object is valid.

Class Details

Represents position, speed, and heading information as provided by a positioning device.

Constructor Details

GeoPosition (GeoCoordinate coordinate)

Public constructor

Parameters:

Field Details

public static final int SOURCE_CACHE

GeoPosition is retuned from server cache.

public static final int SOURCE_FUSION

GeoPosition is retuned as filtered from several sources.

public static final int SOURCE_HARDWARE

GeoPosition is retuned from hardware.

public static final int SOURCE_INDOOR

GeoPosition is retuned from indoor radio maps.

public static final int SOURCE_NONE

Source is unknown or not available.

public static final int SOURCE_OFFLINE

GeoPosition is retuned from radio maps.

public static final int SOURCE_ONLINE

GeoPosition is retuned from server.

public static final int TECHNOLOGY_BLE

GeoPosition is calculated using Bluetooth LE measurements.

public static final int TECHNOLOGY_CELL

GeoPosition is calculated using Cell measurements.

public static final int TECHNOLOGY_GNSS

GeoPosition is calculated by GNSS chip.

public static final int TECHNOLOGY_NONE

Technology is unknown or not available.

public static final int TECHNOLOGY_WIFI

GeoPosition is calculated using Wi-Fi measurements.

public static final int UNKNOWN

Definition of an unknown accuracy, course (heading/bearing) or speed

Method Details

public boolean equals (Object other)

For documentation, see java.lang.Object

Parameters:

  • other

public float getAltitudeAccuracy ()

Gets the current altitude accuracy as measured by the enabled positioning device.

Returns:

The current altitude accuracy or GeoPosition.UNKNOWN if unknown.

public String getBuildingId ()

Get building ID of this position estimate, if known.

Returns:

Building ID as String or null if building is not set.

public String getBuildingName ()

Get building name in human readable format, e.g. "London Heathrow Airport". There can be different buildings with the same name.

Returns:

Building name or null if building name is not set.

public GeoCoordinate getCoordinate ()

Gets the current GeoCoordinate as measured by the enabled positioning device.

Returns:

The current GeoCoordinate

public Integer getFloorId ()

FloorId is identifying the floor level in the building. Floor id 0 specifies the floor that is considered the Main Level of the building. In the case building has multiple levels that can be considered as Main Level, the lowest level which can be considered as Main Level, will be chosen. Floors below the chosen Main Level will have negative integers and floors above the chosen Main Level will have positive integers: The floor above the Main Level has floor id 1 and the floor below the Main Level has floor id -1.

Returns:

Floor ID or null if floor ID is not set.

public double getHeading ()

Gets the current course heading as measured by the enabled positioning device.

Returns:

The current course heading or GeoPosition.UNKNOWN if unknown.

public float getLatitudeAccuracy ()

Gets the current latitude accuracy as measured by the enabled positioning device.

Returns:

The current latitude accuracy or GeoPosition.UNKNOWN if unknown.

public float getLongitudeAccuracy ()

Gets the current longitude accuracy as measured by the enabled positioning device.

Returns:

The current longitude accuracy or GeoPosition.UNKNOWN if unknown.

public int getPositionSource ()

Returns bitmask of sources for this GeoPosition update.

See also:

{@code GeoPosition.SOURCE_ONLINE}

{@code GeoPosition.SOURCE_OFFLINE}

{@code GeoPosition.SOURCE_CACHE}

{@code GeoPosition.SOURCE_INDOOR}

{@code GeoPosition.SOURCE_HARDWARE}

{@code GeoPosition.SOURCE_FUSION}

public int getPositionTechnology ()

Returns bitmask of technologies for this GeoPosition update.

See also:

{@code GeoPosition.TECHNOLOGY_WIFI}

{@code GeoPosition.TECHNOLOGY_CELL}

{@code GeoPosition.TECHNOLOGY_BLE}

{@code GeoPosition.TECHNOLOGY_GNSS}

public double getSpeed ()

Gets the current speed as measured by the enabled positioning device.

Returns:

The current speed or GeoPosition.UNKNOWN if unknown.

public Date getTimestamp ()

Gets the timestamp for the last position measured by the enabled positioning device.

Returns:

The timestamp

public int hashCode ()

For documentation, see java.lang.Object

public boolean isValid ()

Determines whether the GeoPosition object is valid. A GeoPosition is valid if its associated GeoCoordinate is valid.

Returns:

True if the GeoPosition is valid, false otherwise