MapWinGIS:AxMap UDPointImageListCount

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


Gets the number of images currently stored in the image list for custom points images.

VB.NET Usage

Property get_UDPointImageListCount(LayerHandle As Integer) As Integer


The layer handle of the layer for which the image list is defined.
ReturnValue The Count of images currently stored in the image index of custom point types for that layer. Remember to subtract 1 from this count when indexing the 0 based image list.

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,011 times. This page was last modified on 24 September 2006, at 17:56.