Solved

Calculate route on Google Maps with vb

Posted on 2008-06-25
2
1,531 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now