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
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

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. #1
    uspickle is offline 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. #2
    Mossoft is offline Member Yellow Belt
    Join Date
    Feb 2003
    Posts
    48
    Call something like this after you have imported your data:

    Code:
    Sub DrawSplats(rds As MapPoint.DataSet, rdblRadius As Double)
    
       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(geoShapeRadius, rs.Pushpin.Location, rdblRadius*2, rdblRadius*2)
             
             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. #3
    uspickle is offline Junior Member White Belt
    Join Date
    Jan 2004
    Posts
    8
    Thank you very very much!

  4. #4
    uspickle is offline 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. #5
    uspickle is offline 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. #6
    plank is offline 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. #7
    Mossoft is offline 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. #8
    plank is offline 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. #9
    Mossoft is offline 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. #10
    plank is offline 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 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Radius of a Circle
    By Gianmaria in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-14-2006, 02:32 PM
  2. radius to altitude
    By sharkbait in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-23-2004, 11:22 AM
  3. New to GIS. Radius?
    By tallcotton64 in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 02-12-2004, 11:05 AM
  4. Radius around all pushpins
    By Terry in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-20-2003, 01:54 AM
  5. Multi-radius
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-26-2003, 10:07 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