- All Implemented Interfaces:
LayerContent
,Loadable
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:
-
Property Summary
Properties inherited from class com.esri.arcgisruntime.layers.Layer
loadError, loadStatus
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears / Unselects a previously selected ENC feature, if any.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, loadErrorProperty, loadStatusProperty, removeDoneLoadingListener, removeLoadStatusChangedListener, removeVisibilityChangedListener, retryLoadAsync, setCanShowInLegend, setDescription, setId, setMaxScale, setMinScale, setName, setOpacity, setVisible
-
Constructor Details
-
EncLayer
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
Gets the ENC cell this layer was initialized with.- Returns:
- the ENC cell this layer was initialized with
- Since:
- 100.2.0
-
selectFeature
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
-