View in MAUI WPF WinUI View on GitHub
import InlineCode from "@esri-dx/starship-doc-components/components/InlineCode.astro";

Display and configure electronic navigational charts per ENC specification.

Screenshot of Configure electronic navigational charts sample

Use case

The S-52 standard defines how Electronic Navigational Chart (ENC) content should be displayed to ensure that data is presented consistently across every charting system. S-52 defines several display options, including variations on symbology to ensure that charts are readable both at night and in direct sunlight.

How to use the sample

When opened, the sample displays an electronic navigational chart. Tap on the map to select Enc features and view the feature’s acronyms and descriptions shown in a callout. Tap “Display Settings” and use the options to adjust some of the Enc mariner display settings, such as the colors and symbology.

How it works

  1. To display Enc content:
    1. Create an
      using a path to the local Enc exchange set files and load it.
    2. Make an
      for each of the
      and then make an
      from each cell.
    3. Add the layers to the map using
      and create a
      to display the map.
  2. To select Enc features:
    1. Use
      on the map view to get the screen point from the tapped location.
    2. Identify nearby features to the tapped location with
      .
    3. From the resulting
      , get the
      from
      and the
      (s) from
      .
    4. Use
      to select the Enc feature(s).
  3. To set Enc display settings:
    1. Get the
      instance from
      .
    2. Use
      ,
      , and
      to access the settings instances and set their properties.
    3. Reset the display settings using
      on the settings instances.

Relevant API

  • EncCell
  • EncDataset
  • EncDisplaySettings
  • EncEnvironmentSettings
  • EncExchangeSet
  • EncLayer
  • EncMarinerSettings
  • EncTextGroupVisibilitySettings
  • EncViewingGroupSettings
  • IdentifyLayerResult

Offline data

This sample downloads the ENC Exchange Set without updates item from ArcGIS Online automatically.

The latest Hydrography Data can be downloaded from the Esri Developer downloads. The

file is contained there.

Additional information

Read more about displaying and deploying electronic navigational charts on Esri Developer.

Tags

ENC, hydrography, identify, IHO, layers, maritime, nautical chart, S-52, S-57, select, settings, symbology

Sample Code

ConfigureElectronicNavigationalCharts.xaml ConfigureElectronicNavigationalCharts.xaml ConfigureElectronicNavigationalCharts.xaml.cs
<UserControl x:Class="ArcGIS.WinUI.Samples.ConfigureElectronicNavigationalCharts.ConfigureElectronicNavigationalCharts"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
<UserControl.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="Margin" Value="5,15,0,0" />
</Style>
<Style TargetType="RadioButton">
<Setter Property="Margin" Value="5,5,0,0" />
</Style>
</UserControl.Resources>
<Grid>
<esriUI:MapView x:Name="MyMapView" GeoViewTapped="MyMapView_GeoViewTapped" />
<Border Style="{StaticResource BorderStyle}">
<StackPanel>
<TextBlock FontWeight="Bold"
Text="Tap on the map to select Enc features. Use the controls to adjust Enc mariner display settings."
TextWrapping="WrapWholeWords" />
<TextBlock Text="Color scheme" />
<StackPanel Orientation="Horizontal">
<RadioButton x:Name="DayRadioButton"
Content="Day"
GroupName="ColorScheme"
IsChecked="True" />
<RadioButton x:Name="DuskRadioButton"
Content="Dusk"
GroupName="ColorScheme" />
<RadioButton x:Name="NightRadioButton"
Content="Night"
GroupName="ColorScheme" />
</StackPanel>
<TextBlock Text="Area symbolization type" />
<StackPanel Orientation="Horizontal">
<RadioButton x:Name="PlainAreaRadioButton"
Content="Plain"
GroupName="Area"
IsChecked="True" />
<RadioButton x:Name="SymbolizedAreaRadioButton"
Content="Symbolized"
GroupName="Area" />
</StackPanel>
<TextBlock Text="Point symbolization type" />
<StackPanel Orientation="Horizontal">
<RadioButton x:Name="PaperPointRadioButton"
Content="Paper Chart"
GroupName="Point"
IsChecked="True" />
<RadioButton x:Name="SimplifiedRadioButton"
Content="Simplified"
GroupName="Point" />
</StackPanel>
</StackPanel>
</Border>
</Grid>
</UserControl>