Provides the devices current position. More...
Import Statement: | import ArcGIS.AppFramework.Positioning 1.0 |
Properties
- active : bool
- name : string
- nmeaSource : object
- position : Position
- preferredPositioningMethods : PositioningMethods
- sourceError : SourceError
- supportedPositioningMethods : PositioningMethods
- updateInterval : int
- valid : bool
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.
Name | Value |
---|---|
PositionSource.NonSatellitePositioningMethods | -256 |
PositionSource.AllPositioningMethods | -1 |
PositionSource.NoPositioningMethods | 0 |
PositionSource.SatellitePositioningMethods | 255 |
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.
Name | Value |
---|---|
PositionSource.AccessError | 0 |
PositionSource.ClosedError | 1 |
PositionSource.UnknownSourceError | 2 |
PositionSource.NoError | 3 |
PositionSource.SocketError | 100 |
Property Documentation
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.
Returns the unique internal name for the plugin currently providing position information.
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.
Holds the supported positioning methods of the current source. Informed by the PositioningMethods enum.
Returns the error which last occurred with the PositionSource. Informed by the SourceError enum.
Returns the supported positioning methods of the current source.
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
Signal emitted if the current position could not be retrieved within a certain amount of time.
Note: The corresponding handler is onUpdateTimeout
.
Signal emitted when the valid boolean property changes.
Note: The corresponding handler is onValidityChanged
.
Method Documentation
Requests updates from the location source. Uses updateInterval if set.
Requests a single update from the location source. If there is no source available, this method has no effect.