Community of MapPoint and Bing Maps Users and Developers
This is a discussion on Trace route within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, I would like to know if there is a way to trace a line on a map with Mappoint ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Trace route I would like to know if there is a way to trace a line on a map with Mappoint 2004 between two or more points with VB6. I need to do so because if I trace a route with the "objMap.ActiveRoute" knowing only some points that are not so close to each other, the calculated route is often wrong. So I would prefere to show the points and trace some straight lines between them. I hope I have been clear... Thank you! Giacomo from Italy
__________________ Bisogna sognare, insistere, ripetere, finchè il sogno si trasformi in realtà |
| |||
|
Hi, The match of football between Italy and Ghana was exitant yesterday. Concerning your post, you have this example in Mappoint Help File: Code: Sub AddLineToMap()
Dim objApp As New MapPoint.Application
Dim objMap As MapPoint.Map
Dim objLoc1 As MapPoint.Location
Dim objLoc2 As MapPoint.Location
'Configure l'application
Set objMap = objApp.ActiveMap
objApp.Visible = True
objApp.UserControl = True
'Obtient deux lieux et les agrandit
Set objLoc1 = objMap.FindResults("Seattle, WA").Item(1)
Set objLoc2 = objMap.FindResults("Redmond, WA").Item(1)
Set objMap.Location = objLoc1
'Ajoute un trait reliant les deux lieux
objMap.Shapes.AddLine objLoc1, objLoc2
End Sub
|
| |||
| and to delete all the shapes?
Ciao! Thank you very much!!! You're right, I just had to look at the help... sorry! Now another question (I'm sure it's very simple for you...): how can I delete every shape from the map (I need something like a 'objmap.deleteAllShapes')? For example, to delete all my pushpins I use this: Dim objDataSet As MapPointctl.DataSet For Each objDataSet In objMap.DataSets If objDataSet.name = "Simboli" Then objDataSet.Delete Exit For End If Next But it does'nt work with shapes! Thank you and.... FORZA ITALIA!! Bye, Giacomo
__________________ Bisogna sognare, insistere, ripetere, finchè il sogno si trasformi in realtà |
| |||
|
Hi, Code: Shapes shapes = MP.ActiveMap.Shapes;
foreach (Shape s in shapes)
s.Delete();
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz www.comfortsoftware.be MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| route, trace |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Restrictions Webbased GPRS Track & Trace | Anonymous | MapPoint Desktop Discussion | 3 | 05-24-2004 09:27 AM |
| How do I calculate a route distance without displaying route | spideybud | MapPoint Desktop Discussion | 4 | 09-09-2003 10:14 AM |
| trace my positiom | bchara | MapPoint Desktop Discussion | 1 | 08-06-2002 07:40 AM |