PositionSource QML Type

Provides the devices current position. More...

Import Statement: import ArcGIS.AppFramework.Positioning 1.0

Properties

Signals

Methods

Detailed Description

The PositionSource component provides information about device's current position.

The following code sample shows usage of PositionSource.

PositionSource {
    id: positionSource

    active: true

    nmeaSource: NmeaSource { source: currentDevice }

    position.onCoordinateChanged: {
        console.log(position.coordinate);
    }
}

Enumerations

PositioningMethod enumeration

This enum describes the possible positioning methods supported by the external device being used.

NameValue
PositionSource.NonSatellitePositioningMethods-256
PositionSource.AllPositioningMethods-1
PositionSource.NoPositioningMethods0
PositionSource.SatellitePositioningMethods255

PositioningMethods flags

This flag is an OR combination of the individual PostionMethod enum values.

SourceError enumeration

This enum describes the error that last occurred with the PositionSource method. Informs the sourceError property.

NameValue
PositionSource.AccessError0
PositionSource.ClosedError1
PositionSource.UnknownSourceError2
PositionSource.NoError3
PositionSource.SocketError100

Property Documentation

active : bool

Returns true if the position source is active. Setting this property to false is equivalent to calling the stop method, while setting it to true is equivalent to calling the start method.


name : string

Returns the unique internal name for the plugin currently providing position information.


nmeaSource : object

Holds the source for NMEA (National Marine Electronics Association) position-specification data. This can be stored either as the URL of the file, or the NMEA object itself.


[read-only] position : Position

Holds the last known positional data.


preferredPositioningMethods : PositioningMethods

Holds the supported positioning methods of the current source. Informed by the PositioningMethods enum.


[read-only] sourceError : SourceError

Returns the error which last occurred with the PositionSource. Informed by the SourceError enum.


[read-only] supportedPositioningMethods : PositioningMethods

Returns the supported positioning methods of the current source.


updateInterval : int

Returns the desired interval between updates, in milliseconds.


[read-only] valid : bool

Returns true if the PositionSource object has acquired a valid backend plugin to provide data. If false, other methods applied to PositionSource will have no effect.


Signal Documentation

updateTimeout()

Signal emitted if the current position could not be retrieved within a certain amount of time.

Note: The corresponding handler is onUpdateTimeout.


validityChanged()

Signal emitted when the valid boolean property changes.

Note: The corresponding handler is onValidityChanged.


Method Documentation

start()

Requests updates from the location source. Uses updateInterval if set.


stop()

Stops updates from the location source.


update()

Requests a single update from the location source. If there is no source available, this method has no effect.


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