java.lang.Object
com.esri.arcgisruntime.localserver.LocalService
com.esri.arcgisruntime.localserver.LocalMapService
com.esri.arcgisruntime.localserver.LocalFeatureService
Class representing a local feature service. A local feature service requires a map package file (.mpk) which has been
authored in ArcGIS Desktop.
- Since:
- 100.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.esri.arcgisruntime.localserver.LocalService
LocalService.StatusChangedEvent, LocalService.StatusChangedListener -
Field Summary
Fields inherited from class com.esri.arcgisruntime.localserver.LocalService
mEndpoints -
Constructor Summary
ConstructorsConstructorDescriptionLocalFeatureService(String packagePath) Creates a local feature service from a package (.mpk) file. -
Method Summary
Modifier and TypeMethodDescriptionGets the parameters needed to start the local service.getUrl()Returns the URL of this feature service.Returns the URL of this feature service's map service.doubleReturns the default z value.booleanReturns if Z default is enabled.voidsetZDefaultEnabled(boolean enable) Enables the use of Z default.voidsetZDefaultValue(double value) Sets the default z value.Methods inherited from class com.esri.arcgisruntime.localserver.LocalMapService
getDynamicWorkspaces, getMaxRecords, setDynamicWorkspaces, setMaxRecordsMethods inherited from class com.esri.arcgisruntime.localserver.LocalService
addStatusChangedListener, getError, getName, getPackagePath, getStatus, removeStatusChangedListener, startAsync, stopAsync
-
Constructor Details
-
LocalFeatureService
Creates a local feature service from a package (.mpk) file.- Throws:
IllegalArgumentException- if the package path is null or empty- Since:
- 100.0.0
-
-
Method Details
-
getUrl
Returns the URL of this feature service. The URL is needed to access the feature service as shown below.// create a service feature table from the URL and the layer id ServiceFeatureTable sft = new ServiceFeatureTable(localFS.getUrl() + "/0"); // create a feature layer from the table. The feature layer can be added to a map or scene FeatureLayer featureLayer = new FeatureLayer(sft);- Overrides:
getUrlin classLocalMapService- Returns:
- the URL
- Since:
- 100.0.0
-
getUrlMapService
Returns the URL of this feature service's map service. The URL can be used to access the service as aArcGISMapImageLayer- Returns:
- the URL
- Since:
- 100.0.0
-
setZDefaultEnabled
public void setZDefaultEnabled(boolean enable) Enables the use of Z default.- Parameters:
enable- true to enable- Throws:
IllegalStateException- if service is not in the STOPPED state- Since:
- 100.0.0
-
isZDefaultEnabled
public boolean isZDefaultEnabled()Returns if Z default is enabled.- Returns:
- true if enabled
- Throws:
IllegalStateException- if service is not in the STOPPED state- Since:
- 100.0.0
-
setZDefaultValue
public void setZDefaultValue(double value) Sets the default z value.- Parameters:
value- the value to set- Since:
- 100.0.0
-
getZDefaultValue
public double getZDefaultValue()Returns the default z value. Default value is zero.- Returns:
- the default z value
- Since:
- 100.0.0
-
getParameters
Description copied from class:LocalServiceGets the parameters needed to start the local service.- Overrides:
getParametersin classLocalMapService- Returns:
- returns a map containing the parameters
- Throws:
UnsupportedEncodingException
-