Java Code Examples for com.amap.api.services.geocoder.GeocodeSearch#getFromLocationAsyn()
The following examples show how to use
com.amap.api.services.geocoder.GeocodeSearch#getFromLocationAsyn() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AutoScheduleAssistFragment.java From BetterWay with Apache License 2.0 | 5 votes |
@Override public void onMyLocationChange(Location location) { LogUtil.e(TAG, "onMyLocationChange"); GeocodeSearch geocoderSearch = new GeocodeSearch(getContext()); geocoderSearch.setOnGeocodeSearchListener(this); LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude()); aMap.moveCamera(CameraUpdateFactory.changeLatLng(latLng)); LatLonPoint latLonPoint = new LatLonPoint(location.getLatitude(), location.getLongitude()); RegeocodeQuery query = new RegeocodeQuery(latLonPoint, 10000, GeocodeSearch.AMAP); geocoderSearch.getFromLocationAsyn(query); }
Example 2
Source File: WritePresenter.java From Fishing with GNU General Public License v3.0 | 5 votes |
@Override protected void onCreate(WriteActivity view, Bundle savedState) { super.onCreate(view, savedState); provider = new ImageProvider(getView()); mGeocoderSearch = new GeocodeSearch(getView()); mGeocoderSearch.setOnGeocodeSearchListener(this); location = LocationModel.getInstance().getCurLocation(); if (location != null) { mGeocoderSearch.getFromLocationAsyn(new RegeocodeQuery(new LatLonPoint(location.getLatitude(), location.getLongitude()), 50, GeocodeSearch.AMAP)); } }