4 Replies Latest reply on Mar 21, 2011 11:50 AM by Sunny1

    Need to add driving directions

    Sunny1

      Title

      Need to add driving directions

      Post

      Hello,

      I would like to add a button that will give me driving directions from Google Maps or Mapquest from my business location to the record that I am on.

      How do I do this?  I have used the Open URL function but I don't know how to have it set to the proper address. 

      Can someone give me specific instructions on how to do this?

      Thank you.

        • 1. Re: Need to add driving directions
          shudder

          I think I may have a solve for you...

          I did this using a WebViewer and input some specific code into it that GoogleMaps enjoys.

          Here's what to do:

          1. If you don't have them already, create standard address fields: Street; City; State; Zip; and Country;

          2. Go into layout mode and create a WebViewer;

          3. Click Custom Web Address, click Specify and put in this data:

          "http://maps.google.com/maps?f=d&source=s_d&daddr=1234+Elm+Street,+Anywhereville,+KY&hl=en"&"\&saddr=" & /*Address=*/ YourTable::Street & "," & /*City=*/ YourTable::City & "," & /*State=*/ YourTable::State & "," & /*Zip Code=*/ YourTable::Zip & "," & /*Country=*/ YourTable::Country

          4. Click OK;

          5. Enter Browse mode;

          6. Fill in the address fields above; and

          7. Wall-ah, you should see the address in the record mapped to your Anywhereville, KY address (of course, you should change the Anywhereville address in PURPLE to your business address...).

          Worked for me.

          - shudder

          P.S.  You might want to have the WebViewer on a different layout that you click over to as filling in the address fields can make some onscreen weirdness to look at as you fill in the fileds -- tabbing from field to field renders the map each time...

          • 2. Re: Need to add driving directions
            Sunny1

            I did this and it works with one issue.  I want it to have my business address as the beginning address and the record location as the TO address.  Right now, it is reversed.  Not sure how to reverse it.

            • 3. Re: Need to add driving directions
              shudder

              Look at the code that creates the map, above.  Note the addr= that appears two times?  The first occurrence is the destination address (daddr), and the second is the start address (saddr).  Just swap the code for the two, making sure to keep appropriate quotation marks in the code so the calc works correctly, like this:

              "http://maps.google.com/maps?f=d&source=s_d&daddr=" & /*Address=*/ YourTable::Street & "," & /*City=*/ YourTable::City & "," & /*State=*/ YourTable::State & "," & /*Zip Code=*/ YourTable::Zip & "," & /*Country=*/ YourTable::Country&"\&saddr=1234+Elm+Street,+Anywhereville,+KY&hl=en"

              Cappiche?

              hth

              - shudder

              • 4. Re: Need to add driving directions
                Sunny1

                Works.  Thank you!