Select to view content in your preferred language

Sketch Graphic Layers Visibility

682
0
11-04-2011 11:34 AM
JamesStanforth
Deactivated User
I have a sketch graphic layer that I use in a mobile project to draw a line between two points. Users want the ability to press a button and toggle the visibility of this line. Seems simple enough but my code is not working:

            Dim sketchLayer As Sketch.SketchGraphicLayer = mobMap.MapGraphicLayers("ATCFLayer")

            If sketchLayer.Visible = True Then
                sketchLayer.Visible = False
            Else
                sketchLayer.Visible = True
            End If

            mobMap.Refresh()


If I step through the code the visibility property of the graphic layer gets changed but it never actually toggles on/off in the map. It continues to stay visible even with the property set and the map refreshing.

Any tips or descriptions of similar experiences would be greatly appreciated.

-James
0 Kudos
0 Replies