Skip To Content ArcGIS for Developers Sign In Dashboard

LocalFeatureService Class

(Esri::ArcGISRuntime::LocalFeatureService)

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

Header: #include <LocalFeatureService>
Inherits: LocalMapService

Public Functions

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

Reimplemented Public Functions

virtual QUrl url() const

Additional Inherited Members

Detailed Description

A feature service that runs on the local server.

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

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

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.

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

[virtual] QUrl LocalFeatureService::url() const

Reimplemented from LocalService::url().

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?