MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Using Virtual Earth/Maps Live + Mappoint

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


Go Back   MapPoint Forums > Map Forums > MapPoint Web Service and Virtual Earth

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  4 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 01-17-2008
Junior Member
Yellow Belt
 
Join Date: Oct 2007
Posts: 22
Using Virtual Earth/Maps Live + Mappoint

I use Mappoint a lot for getting journey distances, and I automate it using VBA running from Excel. However for some locations - particularly China, Russia, and the Balkans - Mappoint doesn't have route info, but Virtual Earth/Maps Live does (much better than Google in fact).

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
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 01-17-2008
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,305
Blog Entries: 1
Re: Using Virtual Earth/Maps Live + Mappoint

I have not done this, but I think it would make a good article. Perhaps we could collaborate on something?

Eruc
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
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 01-17-2008
Junior Member
Yellow Belt
 
Join Date: Oct 2007
Posts: 22
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
So far so good
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.
Attached Files
File Type: txt CreateRouteHTML.txt (2.0 KB, 3 views)
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 03-02-2008
Junior Member
White Belt
 
Join Date: Jan 2008
Posts: 8
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
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


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/using-virtual-earth-maps-live-mappoint-7010.html

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

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 On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 12:02 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

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!


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