MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




Trace route

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint Desktop Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-13-2006
Junior Member
Yellow Belt
 
Join Date: May 2006
Posts: 13
Send a message via ICQ to giaarcix Send a message via MSN to giaarcix
Trace route

Hello,
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à
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 06-13-2006
Member
Green Belt
 
Join Date: Mar 2005
Posts: 97
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
Ciao
__________________
Mohamed
www.AtlasCouscous.com
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 06-15-2006
Junior Member
Yellow Belt
 
Join Date: May 2006
Posts: 13
Send a message via ICQ to giaarcix Send a message via MSN to giaarcix
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à
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 06-15-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Location: Belgium
Posts: 2,318
Hi,

Code:
Shapes shapes = MP.ActiveMap.Shapes;
foreach (Shape s in shapes)
    s.Delete();
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
route, trace


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
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


All times are GMT -5. The time now is 10:35 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
MP2K Magazine
Visitor Map



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