HydrographicS52DisplayProperties being reset

2374
1
12-11-2014 02:20 PM
ChrisSmith10
New Contributor II

I would like to programmatically set the HydrographicS52DisplayProperties to custom values and let the user change those values through a dialog. The problem that I am running into is that loading the first S-57 layer overwrites my changes.

This seems like a bug to me.

var HydroS52DisplayProperties = HydrographicS52DisplayProperties.Default;
HydroS52DisplayProperties.TextGroupProperties.BerthNumber = false;
HydroS52DisplayProperties.TextGroupProperties.GeographicNames = false;

// load a hydro layer into the map
var layer = new HydrographicS57Layer();
layer.DisplayName = "Sacrificial Layer";
EsriMap.Layers.Add(layer);

// after the layer is loaded the HydrographicS52DisplayProperties
// will be reset to the defaults. BerthNumber and GeographicNames 
// from above will be true

I'm using Runtime .NET SDK version 10.2.4.748

Tags (1)
0 Kudos
1 Reply
AnttiKajanus1
Regular Contributor II

At the moment settings get reset but you can change values after you wait layers loaded.

// wait until all layers are loaded

await MyMapView.LayersLoadedAsync();

HydrographicS52DisplayProperties.Default.ViewGroupProperties.Soundings = false; // changes

0 Kudos