Search in sources :

Example 1 with RegeocodeQuery

use of com.amap.api.services.geocoder.RegeocodeQuery in project KL2 by jweihao.

the class GaoDeActivity method getAddressInfoByLatLong.

/**
 * 通过经纬度获取当前地址详细信息,逆地址编码
 *
 * @param latitude
 * @param longitude
 */
private void getAddressInfoByLatLong(double latitude, double longitude) {
    GeocodeSearch geocodeSearch = new GeocodeSearch(this);
    /*
        point - 要进行逆地理编码的地理坐标点。
        radius - 查找范围。默认值为1000,取值范围1-3000,单位米。
        latLonType - 输入参数坐标类型。包含GPS坐标和高德坐标。 可以参考RegeocodeQuery.setLatLonType(String)
        */
    RegeocodeQuery query = new RegeocodeQuery(new LatLonPoint(latitude, longitude), 3000, GeocodeSearch.AMAP);
    geocodeSearch.getFromLocationAsyn(query);
    geocodeSearch.setOnGeocodeSearchListener(mOnGeocodeSearchListener);
}
Also used : GeocodeSearch(com.amap.api.services.geocoder.GeocodeSearch) RegeocodeQuery(com.amap.api.services.geocoder.RegeocodeQuery) LatLonPoint(com.amap.api.services.core.LatLonPoint)

Example 2 with RegeocodeQuery

use of com.amap.api.services.geocoder.RegeocodeQuery in project SmartMesh_Android by SmartMeshFoundation.

the class LoadDataService method getAddress.

/**
 * In response to reverse geocoding
 */
private void getAddress(final LatLonPoint latLonPoint) {
    RegeocodeQuery query = new RegeocodeQuery(latLonPoint, 200, // The first parameter indicates a Latlng, scope of the second parameter indicates how many meters, said the third parameter is the fire department coordinate system or GPS native
    GeocodeSearch.AMAP);
    // Set the synchronous reverse geocoding request
    geocoderSearch.getFromLocationAsyn(query);
}
Also used : RegeocodeQuery(com.amap.api.services.geocoder.RegeocodeQuery)

Example 3 with RegeocodeQuery

use of com.amap.api.services.geocoder.RegeocodeQuery in project summer-android by cn-cerc.

the class ClockInActivity method getAddress.

/**
 * 响应逆地理编码
 */
public void getAddress(final LatLonPoint latLonPoint) {
    showDialog("正在获取地址..");
    RegeocodeQuery query = new RegeocodeQuery(latLonPoint, 200, // 第一个参数表示一个Latlng,第二参数表示范围多少米,第三个参数表示是火系坐标系还是GPS原生坐标系
    GeocodeSearch.AMAP);
    // 设置异步逆地理编码请求
    geocoderSearch.getFromLocationAsyn(query);
}
Also used : RegeocodeQuery(com.amap.api.services.geocoder.RegeocodeQuery)

Aggregations

RegeocodeQuery (com.amap.api.services.geocoder.RegeocodeQuery)3 LatLonPoint (com.amap.api.services.core.LatLonPoint)1 GeocodeSearch (com.amap.api.services.geocoder.GeocodeSearch)1