Show / Hide Table of Contents

Struct Location

Location contains heading, latitude, longitude, accuracy and a timestamp.

Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace:Mapbox.Unity.Location
Assembly:cs.temp.dll.dll
Syntax
public struct Location

Fields

Accuracy

Horizontal Accuracy of the location.

Declaration
public float Accuracy
Field Value
Type Description
System.Single

DeviceOrientation

Orientation (where the device is looking).

Uses device compass

related

Declaration
public float DeviceOrientation
Field Value
Type Description
System.Single

HasGpsFix

Has the location been aquired via a GPS fix. 'Null' if not supported by the active location provider or GPS not enabled.

Declaration
public bool ? HasGpsFix
Field Value
Type Description
System.Nullable<System.Boolean>

IsLocationServiceEnabled

Has the location service been enabled by the user?

Declaration
public bool IsLocationServiceEnabled
Field Value
Type Description
System.Boolean

IsLocationServiceInitializing

Is the location service currently initializing?

Declaration
public bool IsLocationServiceInitializing
Field Value
Type Description
System.Boolean

IsLocationUpdated

Has the location changed since last update?

Declaration
public bool IsLocationUpdated
Field Value
Type Description
System.Boolean

IsUserHeadingUpdated

Has the heading changed since last update?

Declaration
public bool IsUserHeadingUpdated
Field Value
Type Description
System.Boolean

LatitudeLongitude

The location, as descibed by a Mapbox.Utils.Vector2d. Location.x represents Latitude. Location.y represents Longitude.

Declaration
public Vector2d LatitudeLongitude
Field Value
Type Description
Vector2d

Provider

Name of the location provider. GPS or network or 'Null' if not supported by the active location provider.

Declaration
public string Provider
Field Value
Type Description
System.String

ProviderClass

Name of the location provider script class in Unity

Declaration
public string ProviderClass
Field Value
Type Description
System.String

SatellitesInView

How many satellites were in view when the location was acquired. 'Null' if not supported by the active location provider or GPS not enabled.

Declaration
public int ? SatellitesInView
Field Value
Type Description
System.Nullable<System.Int32>

SatellitesUsed

How many satellites were used for the location. 'Null' if not supported by the active location provider or GPS not enabled.

Declaration
public int ? SatellitesUsed
Field Value
Type Description
System.Nullable<System.Int32>

SpeedMetersPerSecond

Speed in [meters/second]. 'Null' if not supported by the active location provider.

Declaration
public float ? SpeedMetersPerSecond
Field Value
Type Description
System.Nullable<System.Single>

Timestamp

UTC Timestamp (in seconds since 1970) when location was last updated.

Declaration
public double Timestamp
Field Value
Type Description
System.Double

TimestampDevice

UTC Timestamp (in seconds since 1970) of the device when OnLocationUpdated was fired.

Declaration
public double TimestampDevice
Field Value
Type Description
System.Double

UserHeading

Heading represents a angle of direction during movement, generally between 0-359.

Initially 0 this property gets populated after the device has moved far enough to determine a direction

If the device stops moving last heading is kept till a new one can be caluculated. Check

Also needs location services enabled via Input.location.Start()

related

Declaration
public float UserHeading
Field Value
Type Description
System.Single

Properties

SpeedKmPerHour

Speed in [km/h]. 'Null' if not supported by the active location provider.

Declaration
public float ? SpeedKmPerHour { get; }
Property Value
Type Description
System.Nullable<System.Single>
Back to top © 2017 Mapbox