Class LocalFeatureService
- java.lang.Object
-
- com.esri.arcgisruntime.localserver.LocalService
-
- com.esri.arcgisruntime.localserver.LocalMapService
-
- com.esri.arcgisruntime.localserver.LocalFeatureService
-
public final class LocalFeatureService extends LocalMapService
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
Constructors Constructor Description LocalFeatureService(String packagePath)Creates a local feature service from a package (.mpk) file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,String>getParameters()Gets the parameters needed to start the local service.StringgetUrl()Returns the URL of this feature service.StringgetUrlMapService()Returns the URL of this feature service's map service.doublegetZDefaultValue()Returns the default z value.booleanisZDefaultEnabled()Returns 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, setMaxRecords
-
Methods inherited from class com.esri.arcgisruntime.localserver.LocalService
addStatusChangedListener, getError, getName, getPackagePath, getStatus, removeStatusChangedListener, startAsync, stopAsync
-
-
-
-
Constructor Detail
-
LocalFeatureService
public LocalFeatureService(String packagePath)
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 Detail
-
getUrl
public String 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
public String 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
protected Map<String,String> getParameters() throws UnsupportedEncodingException
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
-
-