2012-10-10 59 views
0

我得到谷歌地圖爲JSON:谷歌的回報谷歌地圖API的JSON中如何設置語言?

http://maps.googleapis.com/maps/api/directions/json?origin=34.431741,135.392299&destination=34.631741,135.992299&sensor=false 

結果:

"legs" : [ 
      { 
       "distance" : { 
        "text" : "79,8 km", 
        "value" : 79756 
       }, 
       "duration" : { 
        "text" : "1 giờ 20 phút", 
        "value" : 4818 
       }, 
       "end_address" : "Meihan National Hwy, Nara 632-0102, Nhật Bản", 
       "end_location" : { 
        "lat" : 34.630910, 
        "lng" : 135.992630 
       }, 
       "start_address" : "Nhật Bản ŌsakaKishiwadaNagaregicho, 396−3", 
       "start_location" : { 
        "lat" : 34.431530, 
        "lng" : 135.392670 
       }, 
.... 
... 

我怎樣才能在日語JSON數據?

回答

5

只需添加語言參數..

..&language=ja 

你的樣品呼叫here,文檔here