Community of VE/MapPoint Users and Developers
This is a discussion on Is a location inside a Route? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; This is my problem: I have got an object Route, let's say from Milan to Rome. I have to control ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Is a location inside a Route? Is there a simple way to do this? If this is not possible I have another question: is there a way to build a text file of coordinates that specifie a route? Thank you, Giacomo from Italy
__________________ Bisogna sognare, insistere, ripetere, finchè il sogno si trasformi in realtà |
| |||
| Response to myself.. in case someone else is interested!
This is the very simple way that solved my problem: I build a route in another function, and then I check if a location with coordinates (lat,lon) is inside that route with this code: Dim min As Integer Dim objMap As MapPointctl.Map Dim objLoc As MapPointctl.Location Me.MappointControl1.NewMap geoMapEurope Set objMap = MappointControl1.ActiveMap Set objLoc = objMap.GetLocation(lat, lon) Set objroute = objMap.ActiveRoute min = 1000 For Each Direction In objroute.Directions If Direction.DistanceTo(objLoc) < min Then min = Direction.DistanceTo(objLoc) end if Next MsgBox "Distance: " + Str(min) + " km"
__________________ Bisogna sognare, insistere, ripetere, finchè il sogno si trasformi in realtà |
| |||
|
Hi, Thank you for sharing. This is a very good idea. Only when there are very long autoroutes in the calculated route it can be a problem.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| inside, location, route |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to calculate distance between location and route ? | tontaegu | MapPoint 2006/2009 Discussion | 1 | 10-19-2005 02:14 PM |
| Route Direction Location Instruction | disweij | MapPoint 2006/2009 Discussion | 3 | 10-17-2005 02:45 PM |
| Map Route with other location | Anonymous | MapPoint Web Service and Virtual Earth | 1 | 03-29-2005 09:18 AM |
| Map Route with other location | Anonymous | MapPoint 2006/2009 Discussion | 0 | 02-14-2005 09:19 PM |
| Getting multiple location on a route between 2 waypoint. | johnny | MapPoint 2006/2009 Discussion | 2 | 01-20-2003 06:22 AM |