none
Calculate Driving Distance in a SharePoint List RRS feed

  • Question

  • I would like to create a mileage SharePoint list for users to log daily trips that they make to various campuses. I would like for them to enter the starting campus and ending campus locations and SharePoint use either Google maps or Bing maps to calculate the driving distance and store the mileage in a record for the user. I would like for it to work similar the example at this link (starting at 1:45 min on the video).  Preferably I would like drop down boxes for the FROM and TO boxes with locations for them to select from.

    Forum is not letting me post a link but it is YouTube video 2kIO7x9xu4M

    Can anyone help with this?  Thanks!

    Tuesday, February 7, 2017 9:14 PM

All replies

  • Hi,

    This would help you out

    https://social.technet.microsoft.com/Forums/office/en-US/1ea3f1cc-822c-40c4-b972-c1a3e5e8a369/calculate-driving-distance-between-two-locations-and-configure-it-in-sharepoint-webpart?forum=sharepointdevelopmentlegacy


    Please remember to click Mark as Answer on the answer if it helps you

    • Proposed as answer by romeo donca Tuesday, February 7, 2017 9:36 PM
    Tuesday, February 7, 2017 9:21 PM
  • Hi surfiena,

    We can use Google Maps Distance Matrix API to calculate the distance between two locations.

    Here are some demos for your reference:

    Google Maps – calculate distance between two locations

    Distance Matrix Service

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, February 8, 2017 7:40 AM
  • Hi Jerry,

    I tried doing the example for the Google Maps - calculate distance between two locations and the CEWP on my SharePoint page shows the code and the calculated field just keeps spinning trying to calculate on the list.  Any suggestions?

    Thanks!

    Wednesday, February 8, 2017 3:26 PM
  • Hi surfiena,

    Please check the article below to embed Google maps in SharePoint page:

    How to Embed Google Maps to a SharePoint 2013 or Online Page

    Thanks

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, February 13, 2017 7:48 AM
  • Hi Jerry,

    That works for embedding a static Google map on my page that users can manually use to navigate but I would like for them to add a record to a mileage list that is below the map and based on what they select as the start and end destinations the map will calculate the driving distance for them automatically.

    Monday, February 13, 2017 2:28 PM