Solved

Calculate route on Google Maps with vb

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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 …

772 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

10 Experts available now in Live!

Get 1:1 Help Now