MapWinGIS:AxMap LayerVisible

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy

LayerVisible

Gets or sets the visibility of the specified layer.


VB.NET Usage

Property set_LayerVisible(LayerHandle As Integer, param0 As Boolean)

            Parameters

LayerHandle

The handle of the layer for which the visibility is being set.
param0 A boolean value representing whether the layer is to be visible or not.

Property get_LayerVisible(LayerHandle As Integer) As Boolean
            Parameters

LayerHandle

The handle of the layer for which the visibility is being checked.
ReturnValue A boolean value representing whether the layer is to be visible or not.

Sample Code

    Private Sub LayerVisible()
        Dim hndl As Integer
        'Get the layer handle for the layer at position 0
        hndl = Map1.get_LayerHandle(0)
        'Check if the specified layer is visible or not
        If Map1.get_LayerVisible(hndl) Then
            'Set specified layer to be hidden in the map
            Map1.set_LayerVisible(hndl, False)
        Else
            'Set specified layer to be visible in the map
            Map1.set_LayerVisible(hndl, True)
        End If
    End Sub
  

VB 6 Usage
Property LayerVisible(LayerHandle As Long) As Boolean
            Parameters

LayerHandle

The handle of the layer for which the visibility is required.
ReturnValue A boolean value representing whether the layer is to be visible or not.

Sample Code

    Private Sub LayerVisible()
        Dim hndl As Long
        'Get the layer handle for the layer at position 0
        hndl = Map1.LayerHandle(0)
        'Check if the specified layer is visible or not
        If Map1.LayerVisible(hndl) Then
            'Set specified layer to be hidden in the map
            Map1.LayerVisible(hndl) = False
        Else
            'Set specified layer to be visible in the map
            Map1.LayerVisible(hndl) = True
        End If
    End Sub

Retrieved from "http://mapwindow.org/wiki/index.php/MapWinGIS:AxMap_LayerVisible"

This page has been accessed 1,691 times. This page was last modified on 9 November 2005, at 18:47.