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 DrawPoint

From MapWindow GIS

Jump to: navigation, search

DrawPoint

Draws a point on the last drawing layer created by NewDrawing.
See also NewDrawing


VB.NET Usage

Sub DrawPoint(x As Double, y As Double, pixelSize As Integer, color As System.UInt32)

            Parameters

x

The x coordinate of the point to draw.
y The x coordinate of the point to draw.
pixelSize The size in pixels of the point to be drawn.
color The color of the point to be drawn. This is a UInt32 representation of an RGB color.

Sample Code

    Private Sub DrawPoint()
        Dim draw_hndl As Integer, size As Integer
        Dim x1 As Double, y1 As Double
        'Set point as x = 100, y = 100
        x1 = 100
        y1 = 100
        'Set pixel size for point
        size = 5
        'Create new drawing layer on map
        draw_hndl = Map1.NewDrawing(MapWinGIS.tkDrawReferenceList.dlScreenReferencedList)
        'Draw black point on map
        Map1.DrawPoint(x1, y1, size, System.Convert.ToUInt32(RGB(0, 0, 0)))
    End Sub
  

VB 6 Usage
Sub DrawPoint(x As Double, y As Double, pixelSize As Long, color As OLE_COLOR)
            Parameters

x

The x coordinate of the point to draw.
y The x coordinate of the point to draw.
pixelSize The size in pixels of the point to be drawn.
color The color of the point to be drawn.

Sample Code

    Private Sub DrawPoint()
        Dim draw_hndl As Long, size As Long
        Dim x1 As Double, y1 As Double
        'Set point as x = 100, y = 100
        x1 = 100
        y1 = 100
        'Set pixel size for point
        size = 5
        'Create new drawing layer on map
        draw_hndl = Map1.NewDrawing(MapWinGIS.tkDrawReferenceList.dlScreenReferencedList)
        'Draw black point on map
        Map1.DrawPoint x1, y1, size, RGB(0, 0, 0)
    End Sub

Retrieved from "http://www.mapwindow.org/wiki/index.php/MapWinGIS:AxMap_DrawPoint"
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: November 12 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