I'm drawing polygons in the UWP MapControl in Win 10. I saw you can change the appearance of map elements by generating a custom style sheet then assigning styles to elements. I found the Map Style Sheet Editor and created a new style sheet with extension styles:
{
"version": "1.*",
"settings": {
},
"elements": {
},
"extensions": {
"sxMapView": {
"polyRemoveArea": {
"fillColor": "#80FF0000",
"strokeColor": "#FFFF0000",
"strokeWidthScale": 5,
"visible": true
},
"polyProcessArea": {
"strokeColor": "#FF00FFFF",
"strokeWidthScale": 5,
"visible": true
},
"ptRemoveArea": {
"visible": true
},
"ptProcessArea": {
"visible": true
}
}
}
}
If I follow this example and assign "sxMapView.polyRemoveArea" in 2D map view everything works fine.
However if I switch to 3D map view with:
myMapControl.Style = MapStyle.Aerial3D;
The style seems to get ignored and a default of blue is used (I tested this by not applying a style to the polygon and it was filled with blue).
Also if you try and set the map to 3D before assigning the custom style sheet the custom style sheet reverts the map back to 2D view even though there's no styles describing that.
myMapControl.Style = MapStyle.Aerial3D; // <- Set map to 3D
string styleSheetJson = "{...json style sheet from above ...}"
...
myMapControl.StyleSheet = MapStyleSheet.ParseFromJson(styleSheetJson); // <- Map reverts to 2D
How do I define extension styles for map elements in the maps control style sheet and use the Aerial3D view?