Class EncLayer

java.lang.Object
com.esri.arcgisruntime.layers.Layer
com.esri.arcgisruntime.layers.EncLayer
All Implemented Interfaces:
LayerContent, Loadable

public final class EncLayer extends Layer
A layer that displays ENC data.

Electronic navigational charts (ENC) are georeferenced vector datasets for the visualization and analysis of hydrographic and maritime information. This API supports ENC that conform to the International Hydrographic Organization (IHO) S-57 standard.

Functional characteristics

ENC layer supports identify and selection, but does not support query or time.

Performance characteristics

ENC layers differ from other layer types in that ENC content is cached in an internal collection of SENC files. When an ENC layer is displayed, only the content in the SENC files is referenced. SENC files are produced when an ENC cell is read for the first time and updated as update sets are applied. You can set the path to the SENC storage directory with EncEnvironmentSettings.setSencDataPath(String). SENC files are in a binary format that is not intended to be shared between platforms or versions of this API.

All ENC layers will render based on EncEnvironmentSettings.DisplaySettings.

Example for working with a ENC Layer

 
 EncCell encCell = new EncCell("file-path-of-ENC-cell");
 
 EncLayer encLayer = new EncLayer(encCell);
 
 encLayer.addDoneLoadingListener(new Runnable() {
   public void run() {
     if (encLayer.getLoadStatus() == LoadStatus.LOADED) {
       // ENC layer has loaded
     }
   }
 });
 
 map.getOperationalLayers().add(encLayer);
 
 mapView.setMap(map);
 
The layer is loaded when displayed in a MapView; if using the layer without a MapView, call the Layer.loadAsync() method. Use the layer done loading event to determine when the layer is ready, and check the load status before using the layer.
Since:
100.2.0
See Also:
  • Constructor Details

    • EncLayer

      public EncLayer(EncCell encCell)
      Creates an EncLayer based on an EncCell.
      Parameters:
      encCell - an ENC cell
      Throws:
      IllegalArgumentException - if encCell is null
      Since:
      100.2.0
  • Method Details

    • getCell

      public EncCell getCell()
      Gets the ENC cell this layer was initialized with.
      Returns:
      the ENC cell this layer was initialized with
      Since:
      100.2.0
    • selectFeature

      public void selectFeature(EncFeature encFeature)
      Selects an ENC feature.

      Only a single ENC feature can be selected at a time. Selecting a feature using this method will unselect any previously selected feature.

      An ENC feature can be rendered as multiple objects. Each object that makes up this feature will be selected.

      Parameters:
      encFeature - ENC feature to select
      Throws:
      IllegalArgumentException - if encFeature is null
      Since:
      100.2.0
    • clearSelection

      public void clearSelection()
      Clears / Unselects a previously selected ENC feature, if any.
      Since:
      100.2.0