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 String 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 Location.SourceProperties.Keys:

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

  • "satelliteCount" (an integer value). The number of satellites used to fix the Location. Use Location.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 Location.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 Location.SourceProperties.Keys.FLOOR_LEVEL_ID to reference this key.

Keys are case-sensitive.

Return

a Location

Since

200.1.0

Parameters

position

a Point object representing the geographical position of the new Location

horizontalAccuracy

the horizontal accuracy in meters

verticalAccuracy

the vertical accuracy in meters

speed

the current speed of the locations movement in meters per second

course

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

lastKnown

Indicates whether this is an outdated position retrieved and cached earlier (last known position) and therefore not guaranteed to represent the current location. True if the location represents a last known position; false if the position information is current. Setting this to true will render with the LocationDisplay.acquiringSymbol, typically a grayed out location symbol.

timestamp

a timestamp when location was received

additionalSourceProperties

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

See also