MapWinGIS:AxMap UDPointType

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

UDPointType

Gets or sets the image used when drawing points on the specified layer.


VB.NET Usage

Property set_UDPointType(LayerHandle As Integer, param0 As Object)

            Parameters

LayerHandle

The layer handle of the layer for which the point type is to be set.
param0 The image object to be used as the point image for the specified layer.

Property get_UDPointType(LayerHandle As Integer) As Object
            Parameters

LayerHandle

The layer handle of the layer for which the point type is required.
ReturnValue The image object which is used as the point image for the specified layer.

Sample Code

    Private Sub UDPointType()
        'This function assumes you have added a point shapefile to the map
        ' at position 0
        Dim hndl As Integer
        Dim image As New MapWinGIS.Image()
        'Get the layer handle for the layer at position 0
        hndl = Map1.get_LayerHandle(0)
        'Open the image to use for the user defined points
        image.Open("C:\PointImage.bmp")
        'Use transparency color
        image.UseTransparencyColor = True
        'Set the transparencey color to white
        image.TransparencyColor = System.Convert.ToUInt32(RGB(255, 255, 255))
        'Set the user defined point type to the image opened earlier
        Map1.set_UDPointType(hndl, image)
        'Set the point size of the layer to 1
        Map1.set_ShapeLayerPointSize(hndl, 1)
        'Set the point type for the layer to user defined
        Map1.set_ShapeLayerPointType(hndl, MapWinGIS.tkPointType.ptUserDefined)
    End Sub
  

VB 6 Usage

Property UDPointType(LayerHandle As Long) As Object
            Parameters

LayerHandle

The layer handle of the layer for which the point type is required.
ReturnValue The image object which is used as the point image for the specified layer.

Sample Code

    Private Sub UDPointType()
        'This function assumes you have added a point shapefile to the map
        ' at position 0
        Dim hndl As Long
        Dim image As New MapWinGIS.image
        'Get the layer handle for the layer at position 0
        hndl = Map1.LayerHandle(0)
        'Open the image to use for the user defined points
        image.Open ("C:\PointImage.bmp")
        'Use transparency color
        image.UseTransparencyColor = True
        'Set the transparencey color to white
        image.TransparencyColor = RGB(255, 255, 255)
        'Set the user defined point type to the image opened earlier
        Set Map1.UDPointType(hndl) = image
        'Set the point size of the layer to 1
        Map1.ShapeLayerPointSize(hndl) = 1
        'Set the point type for the layer to user defined
        Map1.ShapeLayerPointType(hndl) = ptUserDefined
    End Sub

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

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