MapWinGIS:AxMap ShapePointImageListID

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


Allows you specify an image from the image list so that one point shapefile can have multiple icons.

VB.NET Usage

Property set_ShapePointImageListID(LayerHandle As Integer, shape As Integer, param0 As Integer)



The layer handle of the layer containing the list to specify an image from.


The specific shape to be assigned a value in the layer.


The index of the image in the imagelist that you want to assign to the specified shape

Property get_ShapePointImageListID(LayerHandle As Integer, shape as Integer) As Integer


The layer handle of the layer for which the image list is defined.


The specific shape in the layer that you wish to determine the image index for


The index in the image list of user defined images.

Sample Code

     ' sf is a global shapefile variable
     ' layer is a global integer variable
      This function will plot different images on the map for the same shapefile by
      establishing an image list using AxMap1.set_UDPointImageListAdd and then
      setting the shapes to use the list using a point type called 
      MapWinGIS.tkPointType.ptImageList and then specifying which image to use with
     Private Sub cmdAddPoints_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAddPoints.Click
         Dim result As Boolean
         Dim shp, type, I As Integer
         Dim Images(3) As MapWinGIS.Image
         Dim PointShapeFile As String
         'Load a point shapefile into memory 
         PointShapefile = "C:\Documents and Settings\Ted\My Documents\Fundamentals\Week 3\Lab3\DataVisualization\LIGHTS.SHP"
         sf = New MapWinGIS.Shapefile
         result = sf.Open(PointShapeFile)
         If result = False Then
         End If
         layer = AxMap1.AddLayer(sf, True)
         ' Create an array of MapWinGIS Image objects to load the images from files
         For I = 0 To 3
             Images(I) = New MapWinGIS.Image
         Images(0).Open("C:\Dev\Unpublished\taudem\Tester\Graphics\North.bmp", MapWinGIS.ImageType.USE_FILE_EXTENSION)
         Images(1).Open("C:\Dev\Unpublished\taudem\Tester\Graphics\East.bmp", MapWinGIS.ImageType.USE_FILE_EXTENSION)
         Images(2).Open("C:\Dev\Unpublished\taudem\Tester\Graphics\South.bmp", MapWinGIS.ImageType.USE_FILE_EXTENSION)
         Images(3).Open("C:\Dev\Unpublished\taudem\Tester\Graphics\West.bmp", MapWinGIS.ImageType.USE_FILE_EXTENSION)
         For I = 0 To 3
             AxMap1.set_UDPointImageListAdd(layer, Images(I))
         ' Assign images from image list to points
         For shp = 0 To sf.NumShapes - 1
             AxMap1.set_ShapePointType(layer, shp, MapWinGIS.tkPointType.ptImageList)
             type = shp Mod 4 'simply assign each of the four images over and over again
             AxMap1.set_ShapePointImageListID(layer, shp, type)
         '  Later, if you needed to determine which images were in the list:
         For I = 0 To AxMap1.get_UDPointImageListCount(layer) - 1
             Images(I) = AxMap1.get_UDPointImageListItem(layer, I)
     End Sub

Entry added by Shade1974 on Sept. 24, 2006

Retrieved from ""

This page has been accessed 1,643 times. This page was last modified on 24 September 2006, at 18:11.