Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Map Point VBA - Plotting circles

This is a discussion on Map Point VBA - Plotting circles within the MapPoint Desktop Discussion forums, part of the Map Forums category; I need to add a number of radii as an additional layer over existing (point) data. I know how to ...

  1. #1
    Phil Holt is offline Junior Member White Belt
    Join Date
    Jan 2006
    Posts
    2

    Map Point VBA - Plotting circles

    I need to add a number of radii as an additional layer over existing (point) data.

    I know how to draw a radius and fix the diameter manually, but I want to be able to run a macro which does this for a number of centroids. I will have the co-ordinates of the centroids each time.

    I am guessing that if I plot these centroids as points (using linked data); there might be a way of plotting a circle over each point? Ideally this would be as a transparent layer (below my other data, but above all other data including streets).

    Any help much appreciated
    I never knew it could do that

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    You are correct. Take a look at the object model. There are Draw object methods which you can use to take a lat/lon and generate a circle.
    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mission Impossible? Intersection of Multiple Circles
    By The Lone Turtle in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 03-05-2006, 01:59 PM
  2. How to change the size of the sized circles
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 11-10-2004, 04:54 AM
  3. Circles
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 12-09-2003, 12:35 AM
  4. Hello - I'm plotting point locations over MapPoin....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-11-2001, 11:18 AM
  5. When using the shaded circles to plot a sum of net....
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 09-05-2001, 07:08 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96