ArcGIS Developers

LocalFeatureService Class

class Esri::ArcGISRuntime::LocalFeatureService

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

Header: #include <LocalFeatureService>
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.

Member Function Documentation

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()


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().

Feedback on this topic?