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

## Radius

This is a discussion on Radius within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have 800 push pins that I need to draw radii around. Is there a way to do it in ...

1. Junior Member White Belt
Join Date
Jan 2004
Posts
8

## Radius

I have 800 push pins that I need to draw radii around. Is there a way to do it in one swoop? I tried importing an excel file with two columns: zip code and radius. When importing, I tried to use the radius value as the metropolitan area, but that did not produce the results I needed. Basically I need to map out locations and then highlight each location with a 60 mile radius so I can visually determine coverages in regions. Any help would be appreciated. Thanks.

2. Member Yellow Belt
Join Date
Feb 2003
Posts
48
Call something like this after you have imported your data:

Code:
```Sub DrawSplats&#40;rds As MapPoint.DataSet, rdblRadius As Double&#41;

Dim rs      As MapPoint.Recordset
Dim shp     As MapPoint.Shape

If rds.RecordCount > 0 Then
Set rs = rds.QueryAllRecords
rs.MoveFirst
Do
Set shp = rds.Parent.Parent.Shapes.AddShape&#40;geoShapeRadius, rs.Pushpin.Location, rdblRadius*2, rdblRadius*2&#41;

With shp
.Fill.ForeColor = vbRed
.Line.ForeColor = .Fill.ForeColor
.SizeVisible = False
.Fill.Visible = True
.ZOrder geoSendBehindRoads
End With
rs.MoveNext
Loop While Not rs.EOF
Set rs = Nothing
End If
End Sub```
HTH

M.

3. Junior Member White Belt
Join Date
Jan 2004
Posts
8
Thank you very very much!

4. Junior Member White Belt
Join Date
Jan 2004
Posts
8
Unfortunately I could not find how to call the function. Where do I go to do this? Thanks.

5. Junior Member White Belt
Join Date
Jan 2004
Posts
8
hey I have all the code figured out except what to use as the first parameter in the function call.

I have map point open, the pushpins to encircle loaded onto the map, and have the code compiled
into a com add-in, which is added to map point via the [tools]==>[com add-in].

how do I reference the "MapPoint.DataSet" of the currently loaded map?

some code...

Call DrawSplats( <<<< first parameter >>>>>, 5)

my best guess for <<<< first parameter >>>>> is...

MapPoint.Application.ActiveMap.DataSets.AddPushpin Set("hello")

via

Dim objApp As New MapPoint.Application
objApp.ActiveMap.DataSets.AddPushpinSet("hello")

...

any suggestions?

6. Junior Member White Belt
Join Date
Oct 2003
Posts
8
Can anyone point me i the direction of where to use this code?? do i need MP2004??

I have been trying to do this for ages.... i am soon going to have to draw 119 radiuses on a map - PLEASE HELP!!

TIA

Dan

7. Member Yellow Belt
Join Date
Feb 2003
Posts
48
After you have imported the data, in the legend there will probably be a representation of the dataset along with its name.
So, call the code using something like>

DrawSplats MapPoint.Application.ActiveMap.DataSets("<the dataset name as shown in the legend>"), 5

The default name is "My Pushpins" but your dataset may be called something completely different.

M.

8. Junior Member White Belt
Join Date
Oct 2003
Posts
8
please can you help me by telling me how to use this code?? is it VB?? or what is it??

9. Member Yellow Belt
Join Date
Feb 2003
Posts
48
OK guys.

I have thrown together a COM Add-in which you can download from this site by clicking on this link http://www.mp2kmag.com/downloads/DrawSplats.zip

Zip file includes the code as well, so feel free to tweak. No guarantee implied or given!!

Good luck.

M.

10. Junior Member White Belt
Join Date
Oct 2003
Posts
8
You are an absolute star....... thank you ever so much - i hope it didnt take you too long.

Page 1 of 2 12 Last

#### Thread Information

##### Users Browsing this Thread

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

#### Posting Permissions

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