0

I'm new with JavaScript. I'm searching a script that calculate travel distance from some GPS coordinates and generate a .xls excel table automatically. I've found the code that do the distance matrix frome there: https://developers.google.com/maps/documentation/javascript/distancematrix#distance_matrix It works great but how I can report results on a .xls file? It is possible?

Anto Jurković
  • 10,842
  • 2
  • 24
  • 41
  • You can send data with AJAX, then create and return .xls file with PHP. Or you can do it with JavaScript (http://stackoverflow.com/questions/14964035/how-to-export-javascript-array-info-to-csv-on-client-side). – Miljan Puzović Apr 20 '14 at 08:47
  • 1
    Yes it is possible. But does the Google Maps API ToS allow you to do that? – Derek 朕會功夫 Apr 20 '14 at 08:48

1 Answers1

0

It is technically possible, although you are legally not allowed to do this except if you have a special agreement with Google. The Usage limits and requirements section on the page you linked states:

Use of the Distance Matrix service must relate to the display of information on a Google Map; for example, to determine origin-destination pairs that fall within a specific driving time from one another, before requesting and displaying those destinations on a map. Use of the service in an application that doesn't display a Google map is prohibited.

The same is also stated in the Terms of Service under 10.1.1.g:

You must not use or display the Content without a corresponding Google map, unless you are explicitly permitted to do so in the Maps APIs Documentation, or through written permission from Google. In any event, you must not use or display the Content on or in conjunction with a non-Google map. [...]

mensi
  • 8,850
  • 1
  • 29
  • 42