Class 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
    • 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:
        getUrl in class LocalMapService
        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 a ArcGISMapImageLayer
        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