瀏覽代碼

google: walking directions

Bernadette Elena Hammerle 3 年之前
父節點
當前提交
baae75aa40
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/maps/Google.js

+ 1 - 1
src/maps/Google.js

@@ -56,7 +56,7 @@ export default class Google extends React.Component{
       console.log("requesting the directions..")
       var start = this.state.path[this.state.path.length-1];
       var proxyurl = "https://cors-anywhere.herokuapp.com/";
-      var baseUrl = "https://maps.googleapis.com/maps/api/directions/json?origin="
+      var baseUrl = "https://maps.googleapis.com/maps/api/directions/json?mode=walking&origin="
       var url = baseUrl + start[0] + "," + start[1] + "&destination=" + end[0] + "," + end[1] + "&key=" + apiKey;
       var reqOptions = {
         method:'GET',