Solved

Calculate route on Google Maps with vb

Posted on 2008-06-25
2
1,540 Views
Last Modified: 2012-06-27
I am developing a desktop application for a customer that wants to use a "from" address and a "to" address to calculate a route for a driver.  We have success displaying the "from" address or "to" address on www.maps.google.com but cannot determine how to send the string to google to calculate the route.  Your assistance is greatly appreciated.

The following is the current code:

    Private Sub cmdMap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMap.Click
        Process.Start("http://maps.google.com/maps?f=q&hl=en&geocode=&q=" & txtTo.Text & "+" & txtToCity.Text & "+" & txtToZip.Text)
    End Sub
0
Comment
Question by:NCSO
  • 2
2 Comments
 

Accepted Solution

by:
NCSO earned 0 total points
ID: 21871104
refund Please; here is the solution:

    Private Sub cmdMap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMap.Click
        Process.Start("http://maps.google.com/maps?f=q&hl=en&geocode=&q=" & txtTo.Text & "+" & txtToCity.Text & "+" & txtToZip.Text & " to " & txtFrom.Text & "+" & txtFromCity.Text & "+" & txtFromZip.Text)
    End Sub
0
 

Author Comment

by:NCSO
ID: 21871137
refund Please; here is the solution:

    Private Sub cmdMap_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMap.Click
        Process.Start("http://maps.google.com/maps?f=q&hl=en&geocode=&q=" & txtTo.Text & "+" & txtToCity.Text & "+" & txtToZip.Text & " to " & txtFrom.Text & "+" & txtFromCity.Text & "+" & txtFromZip.Text)
    End Sub
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question