MapWinGIS:AxMap MapState

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

MapState

Gets or sets the MapState string which stores all information needed to restore a view. This includes layer information and coloring schemes.


VB.NET Usage

Property MapState() As String

            Parameters

ReturnValue

The MapState string which allows a view to be restored.

Sample Code

    Private Sub MapState()
        Dim mapState As String
        'Get the current MapState and save it
        mapState = Map1.MapState
        'Remove all layers from the map
        Map1.RemoveAllLayers()
        'Redraw the view of the map to show the layers have been removed
        Map1.Redraw()
        'Display message box to allow user to see the change to the map view
        MsgBox("Map cleared")
        'Set the MapState to the saved MapState before all layers were removed
        Map1.MapState = mapState
        'Redraw the view of the map to show the map has been restored
        Map1.Redraw()
        'Display message box to indicate the map has been restored to user
        MsgBox("Map restored")
    End Sub
  

VB 6 Usage
Property MapState() As String
            Parameters

ReturnValue

The MapState string which allows a view to be restored.

Sample Code

    Private Sub MapState()
        Dim MapState As String
        'Get the current MapState and save it
        MapState = Map1.MapState
        'Remove all layers from the map
        Map1.RemoveAllLayers
        'Redraw the view of the map to show the layers have been removed
        Map1.Redraw
        'Display message box to allow user to see the change to the map view
        MsgBox ("Map cleared")
        'Set the MapState to the saved MapState before all layers were removed
        Map1.MapState = MapState
        'Redraw the view of the map to show the map has been restored
        Map1.Redraw
        'Display message box to indicate the map has been restored to user
        MsgBox ("Map restored")
    End Sub

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

This page has been accessed 2,211 times. This page was last modified on 9 November 2005, at 19:05.