create

fun create(position: Point, horizontalAccuracy: Double, verticalAccuracy: Double, speed: Double, course: Double, lastKnown: Boolean = false, timestamp: Instant = Instant.now(), additionalSourceProperties: Map<String, Any> = emptyMap()): Location

Creates a location object with timestamp and additional source properties. A Location can be created from a variety of sources and using different technologies. By supplying Location.additionalSourceProperties you can allow users of this Location to find out how the data was captured.

Information should be provided as a set of key-value pairs, where the key describes the type of data held in the Any value. Values must be basic data types such as string, floating point, integer, boolean or date. You can use any string for the key - but this API recognizes a number of well known keys which should be used if available. See SourceProperties.Keys:

  • "floor" (an integer value). The floor number of the Location when in a building. Use SourceProperties.Keys.FLOOR to reference this key.

  • "satelliteCount" (an integer value). The number of satellites used to fix the Location. Use SourceProperties.Keys.SATELLITE_COUNT to reference this key.

  • "transmitterCount" (an integer value). The number of transmitters used to create an indoor positioning system (IPS) position. Use SourceProperties.Keys.TRANSMITTER_COUNT to reference this key.

  • "positionSource" (a string value). This key can be used to indicate the position source: GNSS, AppleIPS, BLE, WIFI, CELL, IP. GNSS indicates global navigation satellite system and AppleIPS is Apple’s indoor positioning technology. It is possible to have multiple position sources. In that case positionSource is a list with comma-separated values.

  • "floorLevelId" (a string value). Unique ID of the feature stored in the levels ArcGISFeatureTable in accordance with the ArcGIS Indoors Information Model. Use SourceProperties.Keys.FLOOR_LEVEL_ID to reference this key.

Keys are case-sensitive.

Return

a Location

Since

200.1.0

Parameters

position

A point geometry object.

horizontalAccuracy

The horizontal accuracy in meters. Positive values or NaN are supported.

verticalAccuracy

The vertical accuracy in meters. Positive values or NaN are supported.

speed

The location's velocity in meters per second.

course

The location's course in degrees (clockwise), 0 being true North.

lastKnown

Indicates whether this is an outdated device position retrieved and cached earlier and therefore not guaranteed to represent the current location. Setting this to true will render with the LocationDisplay.acquiringSymbol, typically a grayed out location symbol.

additionalSourceProperties

a set of key-value pairs providing additional meta-data and properties about the source of this Location

timestamp

A timestamp when location was received.

See also