Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on Radius within the MapPoint 2006/2009 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 ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Radius |
| |||
|
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
M. |
| |||
|
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? |
| |||
|
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. |
| |||
|
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. |
![]() |
| Tags |
| radius |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Radius of a Circle | Gianmaria | MapPoint 2006/2009 Discussion | 1 | 07-14-2006 01:32 PM |
| radius to altitude | sharkbait | MapPoint 2006/2009 Discussion | 1 | 06-23-2004 10:22 AM |
| New to GIS. Radius? | tallcotton64 | MapPoint 2006/2009 Discussion | 4 | 02-12-2004 10:05 AM |
| Radius around all pushpins | Terry | MapPoint 2006/2009 Discussion | 0 | 05-20-2003 12:54 AM |
| Multi-radius | Anonymous | MapPoint 2006/2009 Discussion | 1 | 02-26-2003 09:07 AM |
Ibiza Holiday
Visit the party capital of Europe with an Ibiza holiday! Check out the deals online on UlookUbook...