Community of VE/MapPoint Users and Developers
This is a discussion on Using Virtual Earth/Maps Live + Mappoint within the MapPoint Web Service and Virtual Earth forums, part of the Map Forums category; I use Mappoint a lot for getting journey distances, and I automate it using VBA running from Excel. However for ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Using Virtual Earth/Maps Live + Mappoint I have been trying to get the VBA code to call Virtual Earth, generate locations and a route and collect back the journey distance and time (though journey times look pretty crude). I don't need to see the map, I just want the return values. I can generate a HTML file that does the calling but I cannot find how to get the return values, and ideally I would do it as a URL. I think this must be something others have done... Any thoughts, advice or links? Anything welcomed. John |
| |||
| Re: Using Virtual Earth/Maps Live + Mappoint
Eric - I could sure due with a method at least. Maybe I can give a bit more on where I have got to (I realise this may be too much information). A VBA procedure puts up a form asking for the waypoints and creates the following HTML/Javascript file (modified from Microsoft example): (attached, simply change to .html from .txt) When that is done the file is then launched and shows a map and then generates the route in this case StPetersburg to Warsaw. Again I have lifted code from another web example... Code: Private Const SEE_MASK_NOCLOSEPROCESS = &H40
Private Declare Function ShellExecuteEX Lib "shell32.dll" _
Alias "ShellExecuteEx" (SEI As SHELLEXECUTEINFO) As Long
Declare Function GetSaveFileName Lib "comdlg32.dll" _
Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long
' VBShellExecute launches the file specified by the FPath parameter
Public Sub VBShellExecute(FPath As String)
Dim SEI As SHELLEXECUTEINFO
Dim ans As String
With SEI
.cbSize = Len(SEI)
.fMask = SEE_MASK_NOCLOSEPROCESS
.hwnd = 0
.lpVerb = "open"
.lpFile = FPath
.lpParameters = vbNullChar
.lpDirectory = vbNullChar
.nShow = 0
.hInstApp = 0
.lpIDList = 0
End With
Call ShellExecuteEX(SEI)
End Sub
What I really want to achieve from here is 1) I want to be able to make the map and the IE call invisible 2) I cannot see how I can get the journey distance & time returned back to the VBA procedure. 3) I think there must be a more elegant way of doing the whole thing, with a relatively simple URL Any thoughts welcomed. |
| |||
| Re: Using Virtual Earth/Maps Live + Mappoint
John, I f you usinf Excel vba, see my post #2045, for the code for a function theat returns "trip duration". You can invoke this in excel and point to a cell (or) cells that contain addresses. I also have similar function for "driving distance". Hope this helps, Trebormac |
![]() |
| ||||
| Posted By | For | Type | Date | |
| Technorati: Discussion about “Using Virtual Earth/Maps Live + Mappoint” | This thread | Refback | 02-07-2008 02:38 PM | |
| MapPoint News - MP2K Magazine | This thread | Refback | 01-19-2008 06:00 PM | |
| Virtual Earth December Updates - MapPoint News - MP2K Magazine | This thread | Refback | 01-17-2008 09:36 AM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 01-17-2008 06:07 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Virtual Earth Powered Live Search Maps Expanding | VE For Government | Virtual Earth Blogs | 0 | 12-13-2007 12:40 PM |
| Virtual Earth Update: New Live Search Maps Update | VE For Government | Virtual Earth Blogs | 0 | 10-17-2007 09:41 AM |
| Paris, France is live in Virtual Earth! | EMEA Virtual Earth Blog | Virtual Earth Blogs | 0 | 09-27-2007 11:07 AM |
| Ortho-photos de Paris live dans Virtual Earth !!! | EMEA Virtual Earth Blog | Virtual Earth Blogs | 0 | 09-27-2007 11:07 AM |
| Live Meeting: Virtual Earth Madness | Eric Frost | MapPoint Web Service and Virtual Earth | 0 | 02-24-2006 07:09 AM |
Manchester Airport Flight Arrivals
For details about Manchester Airport flight arrivals visit Holiday Hypermarket. We make it easy to find the airport information you need.
Flights to Turkey
Find cheap flights to Turkey on Travel Counsellors. A personal Travel Counsellor can help you plan flights and find accommodation in Turkey.
Cheap Holidays to Turkey
If you’re looking for cheap holidays to Turkey then dealchecker.co.uk is the place for you! Our search helps you see real prices from the UK’s top holiday companies all in one go.
Barbados Holidays
Barbados holidays can be a wonderful break from the rat race or an exciting, action packed adventure. Plan the perfect holiday in Barbados.
Holidays
For bargain holidays to destinations including Mexico, South Africa, India and more, visit ULookUBook online today. Check out our free travel guides to help you make an informed decision for your holidays.
Bargain family holidays
We can help you find family holidays at bargain prices when you check out the options at Travel.co.uk
Holidays to Goa
Golden beaches, coconut trees. Visit On The Beach for holidays to Goa, and experience India!