com.amap.api.services.geocoder.GeocodeResult Java Examples

The following examples show how to use com.amap.api.services.geocoder.GeocodeResult. 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: GeocoderActivity.java    From TraceByAmap with MIT License 6 votes vote down vote up
/**
 * 地理编码查询回调
 */
@Override
public void onGeocodeSearched(GeocodeResult result, int rCode) {
	dismissDialog();
	if (rCode == AMapException.CODE_AMAP_SUCCESS) {
		if (result != null && result.getGeocodeAddressList() != null
				&& result.getGeocodeAddressList().size() > 0) {
			GeocodeAddress address = result.getGeocodeAddressList().get(0);

			if(address != null) {
				aMap.animateCamera(CameraUpdateFactory.newLatLngZoom(
						AMapUtil.convertToLatLng(address.getLatLonPoint()), 15));
				geoMarker.setPosition(AMapUtil.convertToLatLng(address
						.getLatLonPoint()));
				addressName = "经纬度值:" + address.getLatLonPoint() + "\n位置描述:"
						+ address.getFormatAddress();
				ToastUtil.show(GeocoderActivity.this, addressName);
			}
		} else {
			ToastUtil.show(GeocoderActivity.this, R.string.no_result);
		}
	} else {
		ToastUtil.showerror(this, rCode);
	}
}
 
Example #2
Source File: FlutterAMapConvertRegister.java    From flutter_amap_plugin with MIT License 5 votes vote down vote up
@Override
public void onGeocodeSearched(GeocodeResult geocodeResult, int i) {
    if (i == 1000 && geocodeResult.getGeocodeAddressList().size() > 0) {
        LatLonPoint latLonPoint = geocodeResult.getGeocodeAddressList().get(0).getLatLonPoint();
        Map<String, Object> map = new HashMap<>();
        map.put("lat", latLonPoint.getLatitude());
        map.put("lon", latLonPoint.getLongitude());
        FlutterAmapPlugin.convertChannel.invokeMethod("onGeoToCoordinate", map);

    } else {
        FlutterAmapPlugin.locChannel.invokeMethod("onConvertError",
                "地址转坐标错误:{" + i + " - 未发现有效地址}");
    }

}
 
Example #3
Source File: AutoScheduleAssistFragment.java    From BetterWay with Apache License 2.0 5 votes vote down vote up
@Override
public void onGeocodeSearched(GeocodeResult geocodeResult, int i) {
    LogUtil.e(TAG, "onGeocodeSearched");
    GeocodeAddress geocodeAddress = geocodeResult.getGeocodeAddressList().get(0);
    LatLng latLng = new LatLng(geocodeAddress.getLatLonPoint().getLatitude(),
            geocodeAddress.getLatLonPoint().getLongitude());
    aMap.moveCamera(CameraUpdateFactory.changeLatLng(latLng));
}
 
Example #4
Source File: ReGeocoderActivity.java    From TraceByAmap with MIT License 4 votes vote down vote up
/**
 * 地理编码查询回调
 */
@Override
public void onGeocodeSearched(GeocodeResult result, int rCode) {
}
 
Example #5
Source File: AmapActivity.java    From sealtalk-android with MIT License 4 votes vote down vote up
@Override
public void onGeocodeSearched(GeocodeResult geocodeResult, int rCode) {
}
 
Example #6
Source File: WritePresenter.java    From Fishing with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void onGeocodeSearched(GeocodeResult geocodeResult, int i) {
}
 
Example #7
Source File: MapActivity.java    From xposed-rimet with Apache License 2.0 2 votes vote down vote up
@Override
public void onGeocodeSearched(GeocodeResult geocodeResult, int code) {

}
 
Example #8
Source File: AMAPLocationActivity.java    From sealtalk-android with MIT License 2 votes vote down vote up
@Override
public void onGeocodeSearched(GeocodeResult geocodeResult, int i) {

}
 
Example #9
Source File: PlaceLocationSelectActivity.java    From Fishing with GNU General Public License v3.0 2 votes vote down vote up
@Override
public void onGeocodeSearched(GeocodeResult geocodeResult, int i) {

}
 
Example #10
Source File: RegeocodeTask.java    From Android_UsingCar_Example with Apache License 2.0 2 votes vote down vote up
@Override
public void onGeocodeSearched(GeocodeResult arg0, int arg1) {

}