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. ArcGIS Runtime 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 ArcGIS Runtime.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 aMapView
; if using the layer without aMapView
, call theLayer.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:
EncEnvironmentSettings
,Layer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearSelection()
Clears / Unselects a previously selected ENC feature, if any.EncCell
getCell()
Gets the ENC cell this layer was initialized with.void
selectFeature(EncFeature encFeature)
Selects an ENC feature.-
Methods inherited from class com.esri.arcgisruntime.layers.Layer
addDoneLoadingListener, addLoadStatusChangedListener, addVisibilityChangedListener, cancelLoad, canChangeVisibility, canShowInLegend, fetchLegendInfosAsync, getAttribution, getDescription, getFullExtent, getId, getItem, getLoadError, getLoadStatus, getMaxScale, getMinScale, getName, getOpacity, getSpatialReference, getSubLayerContents, isIdentifyEnabled, isVisible, isVisibleAtScale, loadAsync, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible
-
-
-
-
Constructor Detail
-
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 Detail
-
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
-
-