2016-06-14 3 views
1

GoogleのDriving Directions APIを使用して運転ルートをプロットするために、ggmapの「ルート」機能を使用しています。 1日のAPI上限2,500を超える必要があるかもしれません。その基準を超えるためには、$ 0.50/1000ヒットの料金を払い、Google Developers APIトークンに登録する必要があります。しかし、ggmapライブラリやルート関数では、トークンとキー情報を入力できるパラメータが表示されないため、しきい値を超えることができません。私は何が欠けていますか?Google Directions APIトークンでRパッケージggmapを使用する

指定できるところ私はGoogle MapsのAPIにアクセスするためのパッケージ googlewayを書いた

答えて

0

トークンキー

例えば

library(googlway) 

key <- "your_api_key" 
google_directions(origin = "MCG, Melbourne", 
        destination = "Flinders Street Station, Melbourne", 
        key = key, 
        simplify = F) ## use simplify = T to return a data.frame 

[1] "{"                                                                                     
[2] " \"geocoded_waypoints\" : ["                                                                              
[3] "  {"                                                                                   
[4] "   \"geocoder_status\" : \"OK\","                                                                           
[5] "   \"partial_match\" : true,"                                                                            
[6] "   \"place_id\" : \"ChIJIdtrbupC1moRMPT0CXZWBB0\","                                                                       
[7] "   \"types\" : ["                                                                               
[8] "   \"establishment\","                                                                             
[9] "   \"point_of_interest\","                                                                            
[10] "   \"train_station\","                                                                             
[11] "   \"transit_station\""                                                                             
[12] "   ]"                                                                                  
[13] "  },"                                                                                   
[14] "  {"                                                                                   
[15] "   \"geocoder_status\" : \"OK\","                                                                           
[16] "   \"place_id\" : \"ChIJSSKDr7ZC1moRTsSnSV5BnuM\","                                                                       
[17] "   \"types\" : ["                                                                               
[18] "   \"establishment\","                                                                             
[19] "   \"point_of_interest\","                                                                            
[20] "   \"train_station\","                                                                             
[21] "   \"transit_station\""                                                                             
[22] "   ]"                                                                                  
[23] "  }"                                                                                   
[24] " ],"                                                                                    
[25] " \"routes\" : [" 
... etc 
関連する問題