Hi Antti,
that was a very good hint, thanks a lot!
I'm able to load my data into the example. When I check and uncheck the soundings checkbox the soundings appear and disappear from the map. However, when I try to disable soundings programmatically at start up, they just don't disappear. This is how I disable soundings:
public S57DisplayPropertiesSample()
{
InitializeComponent();
// Create default instance of display properties and set that to DataContext for binding
DataContext = HydrographicS52DisplayProperties.Default;
HydrographicS52DisplayProperties.Default.ViewGroupProperties.Soundings = false;
ZoomToHydrographicLayers();
}
Is this a matter of timing or something else?
Hi Antti,
I could sort this problem out myself. It was really a matter of timing. I had to change the display properties after all Layers were loaded:
public S57DisplayPropertiesSample()
{
InitializeComponent();
// Create default instance of display properties and set that to DataContext for binding
DataContext = HydrographicS52DisplayProperties.Default;
ZoomToHydrographicLayers();
}
// Zoom to combined extent of the group layer that contains all hydrographic layers
private async void ZoomToHydrographicLayers()
{
try
{
// wait until all layers are loaded
await MyMapView.LayersLoadedAsync();
HydrographicS52DisplayProperties.Default.ViewGroupProperties.Soundings = false;
...
Thanks for your help again!