2017-03-01 86 views
1

如果有人可以幫助我。 Android使用地理編碼器免費,目前我只使用谷歌地圖。我看到它說每天只有2500個請求。或者這隻適用於網頁,而與手機完全不同?反向地理編碼android定價

我使用下面的代碼來獲取經緯度的郵政編碼。

final Geocoder geocoder = new Geocoder(getActivity()); 
    try { 
     List<Address> addresses = geocoder.getFromLocation(mLocationClient.getLatitudeCoordinate(), mLocationClient.getLongitudeCordinate(),5); 
     for (Address address: addresses){ 
      if(address.getLocality()!=null && address.getPostalCode()!=null){ 
       Log.v("Zip code", " " + address.getPostalCode()); 
      } 
     } 
    } catch (IOException e) { 
     e.printStackTrace(); 
    } 

https://developers.google.com/maps/pricing-and-plans/#details

只是想確認一下。我對此感到非常困惑,一些澄清可以幫助:)謝謝

回答

6

地理編碼器的使用是完全免費的。

您編寫的鏈接與Google地圖和Google Places API相關,而不是地理編碼API。這是正確的鏈接:

https://developers.google.com/maps/documentation/geocoding/usage-limits

反正你不使用地址解析API使用此代碼,您只要使用Android的地理編碼器。

這是使用地理編碼API,如果你想文檔: https://developers.google.com/maps/documentation/geocoding/intro

地址解析API的作品比一般地理編碼器更好,但有使用限制和實現更大。

+1

好的,這是有道理的。感謝您爲我澄清這一點。我很感激。 – huey77

+0

請接受答案,謝謝 – MarcGV

+0

@MarcGV嗨,地理編碼服務仍然是免費的嗎?我很困惑,因爲您提供的鏈接(https://developers.google.com/maps/documentation/geocoding/usage-limits)顯示它有限制。我對嗎? –