MapWindow Home
Search MapWindow.org


  • Home
    • Download
    • Why MW
    • FAQ
    • Contact
  • Products
    • MapWindow
    • ActiveX
    • Plug-ins
  • Software Dev
    • Sample Code
    • Scripts
    • Source
    • Bugs
    • Support
    • Languages
  • Site Tools
    • Forums
    • Tutorials
    • Mailing Lists
    • Team
    • Site Stats
    • Links
  • Get Stuff
    • Buy a CD
    • Buy a T-Shirt
    • MW Book
    • ActiveX Book
    • Donate
    • Buy Support
  • Documentation
    • MWGIS App. User Guide
    • GISTools User Guide
    • MW Plug-ins Dev. Guide
    • MWGIS ActiveX Dev. Guide
    • MWGeoProc Dev. Guide

MapWinGIS:AxMap DrawingKey

From MapWindow GIS

Jump to: navigation, search

DrawingKey

The drawing key may be used by the programmer to store any data desired in string format for any drawing layer specified by the drawing handle.


VB.NET Usage

Property set_DrawingKey(DrawHandle As Integer, param0 As String)

            Parameters

DrawHandle

The drawing handle for the drawing layer for which the drawing key is to be set.
param0 The drawing key string for the specified drawing layer.

Property get_DrawingKey(DrawHandle As Integer) As String
            Parameters

DrawHandle

The drawing handle for the drawing layer for which the drawing key is required.
ReturnValue The drawing key string for the specified drawing layer.

Sample Code

    Private Sub DrawingKey()
        Dim draw_hndl As Integer
        Dim draw_key As String
        'Create new drawing layer on map
        draw_hndl = Map1.NewDrawing(MapWinGIS.tkDrawReferenceList.dlScreenReferencedList)
        'Draw filled red circle at x = 100, y = 100, with radius 50
        Map1.DrawCircle(100, 100, 50, System.Convert.ToUInt32(RGB(255, 0, 0)), True)
        'Set the drawing key for the drawing layer
        Map1.set_DrawingKey(draw_hndl, "Red Circle")
        'Get the drawing key for the drawing layer
        draw_key = Map1.get_DrawingKey(draw_hndl)
    End Sub
  

VB 6 Usage
Property DrawingKey(DrawHandle As Long) As String
            Parameters

DrawHandle

The drawing handle for the drawing layer for which the drawing key is required.
ReturnValue The drawing key string for the specified drawing layer.

Sample Code

    Private Sub DrawingKey()
        Dim draw_hndl As Long
        Dim draw_key As String
        'Create new drawing layer on map
        draw_hndl = Map1.NewDrawing(dlScreenReferencedList)
        'Draw filled red circle at x = 100, y = 100, with radius 50
        Map1.DrawCircle 100, 100, 50, RGB(255, 0, 0), True
        'Set the drawing key for the drawing layer
        Map1.DrawingKey(draw_hndl) = "Red Circle"
        'Get the drawing key for the drawing layer
        draw_key = Map1.DrawingKey(draw_hndl)
    End Sub

Retrieved from "http://www.mapwindow.org/wiki/index.php/MapWinGIS:AxMap_DrawingKey"
Views
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in / create account
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link

Geospatial Software Lab

Copyright © 2008 - MapWindow Open Source Team
( last updated: December 03 2008.)
Home | Donate | Download | MapWindow GIS Desktop | MapWinGIS.ocx | Plug-ins | Contact | Lists | Bugs | Sample Code | Documentation
Code Repository | Open Source License | Discussion Forum | Wiki | Join the Team | Site Statistics | Links