當前位置:編程學習大全網 - 電腦編程 - 百度地圖怎麽獲取城市的編碼cityCode

百度地圖怎麽獲取城市的編碼cityCode

在onLocationChanged方法裏獲得自己當前的坐標然後方法裏寫mSearch.reverseGeocode(newGeoPoint((int)(location.getLatitude()*1e6),(int)(location.getLongitude()*1e6)));然後再通過代碼實行這個方法功能publicclassMySearchListenerimplementsMKSearchListener{publicvoidonGetAddrResult(MKAddrInforesult,interror){MKGeocoderAddressComponentkk=result.addressComponents;Stringcity=kk.city;}}

  • 上一篇:什麽叫程序操作?遙控操作和程序操作的設備應滿足哪些條件
  • 下一篇:請問哪裏有microstation v8視頻教程
  • copyright 2024編程學習大全網