View Single Post

  #3 (permalink)  
Old 02-05-2006
I.T. I.T. is offline
Junior Member
White Belt
 
Join Date: Mar 2005
Posts: 9
The following draws a series of circles around given locations. The locations have been included just for demo purposes.

Code:
    Dim oMap As MapPoint.Map
    Dim locpin(1 To 5) As MapPoint.Location
    Dim iRad, c As Integer
    Set oMap = GetObject(, "MapPoint.Application.EU.11").ActiveMap
    oMap.Application.Units = geoKm

    Set locpin(1) = oMap.FindResults("Buckingham Palace, London, UK")(1)
    Set locpin(2) = oMap.FindResults("Northolt, London, UK")(1)
    Set locpin(3) = oMap.FindResults("Greenwitch, London, UK")(1)
    Set locpin(4) = oMap.FindResults("Crystal Palace, London, UK")(1)
    Set locpin(5) = oMap.FindResults("Wimbledon Common, London, UK")(1)

    oMap.FindResults("London, UK")(1).GoTo

    iRad = 3    ' sets the radius of the circle to 3km
    For c = 1 To 5
        oMap.Shapes.AddShape(geoShapeRadius, locpin(c), iRad * 2, iRad * 2).Name = "Loc No." & CStr(c)
    Next c
This draws circles around each location. This could be extended to account for each location in your dataset and by adjusting the "iRad" value you could easily make the size of each circle represent a value associated with the location.

Hope this helps

I.T.
Reply With Quote