none
MapPolygon.Visible has no effect RRS feed

  • Question

  • Hi,

    I am drawing polygons on a Win 10 UWP map control and try to programmatically hide some of them by setting their Visible property to false, but there is no change to the map (all polygons are still visible).

    This is the code:

                foreach (MapPolygon mapPol in myMap.MapElements)
                {
    
                    mapPol.Visible = false;
    
                }

    Am I missing something ?
    What is the correct way to hide MapPolygon ?

    Ziv

    Tuesday, June 21, 2016 11:00 AM

Answers

  • Try setting each polygon's StrokeColor and FillColor to Windows.UI.Colors.Transparent :)

    Something like

    foreach(MapPolygon mapPol in myMap.Mapelements)
    { 
        mapPol.FillColor = Windows.UI.Colors.Transparent;
        mapPol.StrokeColor = Windows.UI.Colors.Transparent;
    }

    Friday, July 29, 2016 4:59 PM