Skobbler Map:反向geocodder为SKSearchResult

时间:2016-08-01 12:28:41

标签: android reverse-geocoding skmaps skobbler-maps

在SKSearchResult对象下,参数street,house number,neighborhood,zip code,state code,region,citySector,state和poi在结果中始终包含NULL。有解决方案吗感谢..

if(mapView!=null) {
        SKSearchResult result = SKReverseGeocoderManager.getInstance().reverseGeocodePosition(mapView.getMapCenter());
        if (result != null) {
            String address = "";
            Log.d("Test", " result " + result.getAddress());
            address+=result.getName()+"\n";

            //address+=result.getAddress();

            if(result.getAddress().getStreet()  != null)
                address+=" "+result.getAddress().getStreet();//here return null
            if(result.getAddress().getHouseNumber()  != null)
                address+=" "+result.getAddress().getHouseNumber();//here return null
            btnAddress.setText(address);
        }
    }

0 个答案:

没有答案