AbstractLocationDataSource QML Type

A location data source object. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.8
Inherits:

Object

Inherited By:

CustomLocationDataSource, DefaultLocationDataSource, IndoorsLocationDataSource, NmeaLocationDataSource, RouteTrackerLocationDataSource, and SimulatedLocationDataSource

Properties

Signals

Methods

Detailed Description

This type provides an interface for updating a location - for example, used by the LocationDisplay.

AbstractLocationDataSource is a class that can be customized to provide your own data source. To do this, you would create a CustomLocationDataSource and implement the start and stop callbacks in JavaScript.

The DefaultLocationDataSource provides a default implementation designed to work with the QML types:

Property Documentation

location : Location

Current location of this data source (read-only).

This property was introduced in Esri.ArcGISRuntime 100.10.


locationDataSourceError : Error

An error that describes a problem encountered while starting or running the AbstractLocationDataSource (read-only). This property is used to notify the user about errors that occur in AbstractLocationDataSource. Such errors are critical for AbstractLocationDataSource and will cause it stop. If AbstractLocationDataSource cannot be started, or it stopped after a successful start, this property will store information related to what caused AbstractLocationDataSource to stop.

This property was introduced in Esri.ArcGISRuntime 100.14.


locationDataSourceStatus : Enums.LocationDataSourceStatus

AbstractLocationDataSource locationDataSourceStatus (read-only).

This property was introduced in Esri.ArcGISRuntime 100.14.


Signal Documentation

headingChanged(double heading)

Signal emitted when the heading of the data source changes.

  • heading. The new heading

When this signal emits, you can access the new heading via the heading argument as follows.

onHeadingChanged: {
    console.log("The new heading is: ", heading);
}

Note: The corresponding handler is onHeadingChanged.


locationChanged()

Signal emitted when location of the data source changes.

Note: The corresponding handler is onLocationChanged.


locationDataSourceErrorChanged()

Signal emitted when locationDataSourceError of the data source changes.

This will also emit when any non-terminal errors have been cleared, resulting in a null locationDataSourceError in those cases.

Note: The corresponding handler is onLocationDataSourceErrorChanged.

This signal was introduced in Esri.ArcGISRuntime 100.14.


locationDataSourceStatusChanged()

Signal emitted when the locationDataSourceStatus of the data source changes.

Note: The corresponding handler is onLocationDataSourceStatusChanged.

This signal was introduced in Esri.ArcGISRuntime 100.14.


statusChanged()

Set the status changed callback function for the location data source.

Note: The corresponding handler is onStatusChanged.

This signal was introduced in Esri.ArcGISRuntime 100.6.


Method Documentation

void onStartCompleted(String error)

Indicates that the start operation of the AbstractLocationDataSource has been completed.

If you are implementing a CustomLocationDataSource, this method must be called at the end of the CustomLocationDataSource::startCallback.

  • error - If the data source could not be started, this string supplies an error message.

void onStopCompleted()

Indicates that the stop operation of the AbstractLocationDataSource has been completed.

If you are implementing a CustomLocationDataSource, this method must be called at the end of the CustomLocationDataSource::stopCallback.


void start()

Starts the location data source.


void stop()

Stops the location data source.


void updateHeading(double heading)

Updates the heading.

  • heading - a heading in degrees, clockwise from North.

void updateLocation(Location location)

Update the location position.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.