LocalFeatureService Class

  • LocalFeatureService
  • class Esri::ArcGISRuntime::LocalFeatureService

    A feature service that runs on the local server. More...

    Header: #include <LocalFeatureService.h>
    Inherits: Esri::ArcGISRuntime::LocalMapService

    Public Functions

    LocalFeatureService(const QString &packagePath, QObject *parent = nullptr)
    virtual ~LocalFeatureService() override
    bool isZDefaultEnabled() const
    QUrl mapServiceUrl() const
    void setZDefaultEnabled(bool zDefaultEnabled)
    void setZDefaultValue(double zDefaultValue)
    double zDefaultValue() const

    Reimplemented Public Functions

    virtual QUrl url() const override

    Detailed Description

    Note: Local server is only available on Windows and Linux.

    A local feature service requires a map package file (.mpkx) which has been authored in ArcGIS Pro.

    Relevant samples:

    • Local Server feature layer: Start a local feature service and display its features in a map.
    • Local server services: Demonstrates how to start and stop the Local Server and start and stop a local map, feature, and geoprocessing service running on the Local Server.

    Member Function Documentation

    [explicit] LocalFeatureService::LocalFeatureService(const QString &packagePath, QObject *parent = nullptr)

    Constructor that takes a path to the map package file (packagePath) and an optional parent.

    [override virtual] LocalFeatureService::~LocalFeatureService()

    Destructor.

    bool LocalFeatureService::isZDefaultEnabled() const

    Returns whether the use of Z default is enabled.

    QUrl LocalFeatureService::mapServiceUrl() const

    Gets the URL of this feature service's map service.

    This URL can be used to access the service as an ArcGISMapImageLayer.

    void LocalFeatureService::setZDefaultEnabled(bool zDefaultEnabled)

    Sets whether the use of Z default enabled to zDefaultEnabled.

    When editing features with z-values, you can provide a default z-value that will be applied to any features inserted or updated through the feature service that do not include z-values in geometries. If a z-value is provided, the default z-value will be ignored. However, if a z-value is not included, this default z-value will be applied.

    This method may only be called when the service is not started.

    See also isZDefaultEnabled().

    void LocalFeatureService::setZDefaultValue(double zDefaultValue)

    Sets the default Z value to zDefaultValue.

    This method may only be called when the service is not started.

    See also zDefaultValue().

    [override virtual] QUrl LocalFeatureService::url() const

    Reimplements: LocalService::url() const.

    Gets the URL of this feature service.

    This is the URL needed to access the feature service as a ServiceFeatureTable.

    You can use this URL in the constructor for a ServiceFeatureTable by appending the desired layer index as a string. For example, to access the first layer in the servive, append "/0" to this URL.

    double LocalFeatureService::zDefaultValue() const

    Gets the current default Z value.

    This value is 0 by default.

    See also setZDefaultValue().

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

    You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

    Your ArcGIS portal

    Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

    Your ArcGIS Location Platform dashboard

    Manage billing, monitor service usage, and access additional resources.

    Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

    Close