CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    1

    Google Maps / Postcode integration

    Hi there
    For my A-Level Computing project I require the use of distancing two postcodes from one another, in my Estate Agency program. The only method I could think of was a way in which you entered the location and then the program would use google maps to get directions from the entered postcode to the one stored in a record. It would then list the times taken for the travel and sort them accordingly. Does anyone have any other idea in which I could do this, or code for such a method.
    Also another feature I would like is for the user to input the postcode and the address to automatically pop up. Any ideas?
    Thanks in advance
    DGee123

  2. #2
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,900

    Re: Google Maps / Postcode integration

    Well, while I cant help you with exactly what you are asking for, I can show you how to "talk" to Google Maps (in a most simple fashion). What you want to do may require an SDK to get a little deeper into Google Maps.


    Showing a Google Map from an Address

    eg,

    HomeAddress.Text = something like

    125 Main Road
    Your Suburb
    Your Country
    Zip 1234568979

    NOTE: I am talking to Google Maps AU (Australia)

    Code:
    Private Sub cmdMap1_Click()
        Dim SearchTerm As String
        Dim URL As String
        SearchTerm = Replace(HomeAddress.Text, vbCrLf, " ")
        URL = ("http://maps.google.com.au/maps?q=" & SearchTerm)    'URLEncode(SearchTerm))
        ShellExecute Me.hwnd, "Open", URL, vbNullString, "C:\", 1
    End Sub

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured