MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Map Point VBA - Plotting circles

This is a discussion on Map Point VBA - Plotting circles within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-23-2006
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 01-24-2006
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,381
Blog Entries: 1
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
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 02-05-2006
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
circles, map, plotting, point, vba


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Mission Impossible? Intersection of Multiple Circles The Lone Turtle MapPoint 2006/2009 Discussion 4 03-05-2006 12:59 PM
How to change the size of the sized circles Anonymous MapPoint 2006/2009 Discussion 0 11-10-2004 03:54 AM
Circles Anonymous MapPoint 2006/2009 Discussion 3 12-08-2003 11:35 PM
Hello - I'm plotting point locations over MapPoin.... Anonymous MapPoint 2006/2009 Discussion 1 10-11-2001 10:18 AM
When using the shaded circles to plot a sum of net.... Anonymous MapPoint 2006/2009 Discussion 1 09-05-2001 06:08 AM


All times are GMT -5. The time now is 02:04 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Flights to Sardinia
Sardinia has exquisite seafood as well as fantastic weather, superb seas and stunning scenery. Holiday Hypermarket can help you to book cheap flights to Sardinia with ease.

Late Deal Holidays
Whatever your travel needs, city breaks, late deal holidays, luxury holidays or family holidays - your personal Travel Counsellor can help

Holiday Italy
A Holiday in Italy can mean many different things to many different people. This diverse country has an abundance of art, wine, food and stunning beaches. Book online today.

Bahamas Holidays
Bahamas Holidays offer pure blue skies, soft white beaches and the holiday of a lifetime. Visit us for a great deal to the Bahamas.

Cheap Balearics Holidays
Cheap Balearics holidays are available if you know when to book and who to book with. The Balearics have many fascinating places to visit all year round. The partying never stops.

Travel
Before making a choice regarding travel, check out the amazing variety of options on Travel.co.uk.

Holidays to Gran Canaria
The Canary Islands await! Book holidays to Gran Canaria online at On The Beach!


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