DefaultLocationDataSource Class

  • DefaultLocationDataSource
  • class Esri::ArcGISRuntime::DefaultLocationDataSource

    A default location data source object. More...

    Header: #include <DefaultLocationDataSource.h>
    Since: Esri::ArcGISRuntime 100.8
    Inherits: Esri::ArcGISRuntime::AbstractLocationDataSource

    Public Functions

    DefaultLocationDataSource(QObject *parent = nullptr)
    virtual ~DefaultLocationDataSource() override
    QCompass *compass() const
    QGeoPositionInfoSource *positionInfoSource() const
    void setCompass(QCompass *compass)
    void setPositionInfoSource(QGeoPositionInfoSource *positionInfoSource)

    Protected Slots

    virtual void onStart() override
    virtual void onStop() override

    Detailed Description

    This type provide a default implementation of the AbstractLocationDataSource interface. It is used by default by the LocationDisplay.

    The DefaultLocationDataSource is designed to work with the Qt types:

    Not all devices can determine their own location. Your app can check for location availability using supportedPositioningMethods property on the DefaultLocationDataSource::positionInfoSource property. This property is set to QGeoPositionInfoSource::NoPositioningMethods (0x0) when there is no position source.

    Member Function Documentation

    [explicit] DefaultLocationDataSource::DefaultLocationDataSource(QObject *parent = nullptr)

    Create a location data source object with an optional parent.

    [override virtual] DefaultLocationDataSource::~DefaultLocationDataSource()

    Destructor.

    QCompass *DefaultLocationDataSource::compass() const

    Returns the QCompass used by this data source.

    See also setCompass().

    [override virtual protected slot] void DefaultLocationDataSource::onStart()

    Reimplements: AbstractLocationDataSource::onStart().

    Reacts to start requests by starting the positionInfoSource and compass.

    Note: You should not call this method directly - use start instead.

    [override virtual protected slot] void DefaultLocationDataSource::onStop()

    Reimplements: AbstractLocationDataSource::onStop().

    Reacts to stop requests by stopping the positionInfoSource and compass.

    Note: You should not call this method directly - use stop instead.

    QGeoPositionInfoSource *DefaultLocationDataSource::positionInfoSource() const

    Returns the QGeoPositionInfoSource used by this data source.

    The default positionInfoSource will be created with this DefaultLocationDataSource as its parent:

    QGeoPositionInfoSource::createDefaultSource(QObject* parent)

    See also setPositionInfoSource().

    void DefaultLocationDataSource::setCompass(QCompass *compass)

    Sets the QCompass used by this data source to compass.

    See also compass().

    void DefaultLocationDataSource::setPositionInfoSource(QGeoPositionInfoSource *positionInfoSource)

    Sets the QGeoPositionInfoSource used by this data source to positionInfoSource.

    See also positionInfoSource().

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