Hi folks,
I've got the same issue with .NET SDK 10.2.4. I'm able to create HydrographicS57Layer with the default color scheme. But I can't figure out how to apply HydrographicS52DisplayProperties. Neither the HydrographicS57Layer nor the MapView or Map have appropriate Properties to set. Any help would be highly appreciated.
Eugen
private HydrographicS57Layer CreateENCLayer(string pathToENC)
{
HydrographicS57Layer hydroLayer = new HydrographicS57Layer()
{
Path = pathToENC
};
HydrographicS52DisplayProperties displayProperties = HydrographicS52DisplayProperties.Default;
displayProperties.ColorScheme = S52ColorScheme.DayWhiteBack;
return hydroLayer;
}
Eugen, have you checked the DisplayProperties sample on ArcGIS Runtime for .NET Samples?
Edit:
You should be able just to set values to HydrographicS52DisplayProperties.Default instance and those should be reflected to the map. If you see issues with this, could you provide a repro application so I could have a look?
In future, please use ArcGIS Runtime SDK for .NET place for .NET specific questions.
Hi Antti,
I've checked the sample you mentioned. I didn't know that I need to set the DataContext of the MapView to HydrographicS52DisplayProperties. Now it works fine.
Thanks a lot!
For those who are interested:
HydrographicS52DisplayProperties displayProperties = HydrographicS52DisplayProperties.Default;
displayProperties.ColorScheme = S52ColorScheme.DayBright;
displayProperties.DisplayDepthUnits = S52DisplayDepthUnits.Meters;
<!--MainMapView ist the XAML-Name of my MapView (<esri:MapView x:Name="MainMapView") -->
MainMapView.DataContext = displayProperties;
You shouldn't need to add it to DataContext. In sample it is used because it is manipulated through DataBinding.
Alright, got it.
I'm also displaying bENC with soundings. I was wondering if I can filter these soundings, because I don't need them. I already tried to change Text- und ViewGroupProperties to see if anything happens. But my ENCs and bENCs still look the same.
I'm not expert on hydrographic terminology but you should be able to define if soundings are shown using
HydrographicS52DisplayProperties.Default.ViewGroupProperties.Soundings = false;
I already tried that one, but unfortunately it didn't work. Any other ideas?
You could load your data to S57DisplayPropertiesSample and see what settings does the trick.