我有一个问题,如果我试图用geocoder.getFromLocationName("California",1)函数获取地址,它会找到地址,但如果我在我的设备(小米Mi5,奥利奥)上测试它,它会返回一个空列表= mSearchText.getText().toString(); Geocodergeocoder = ne
我必须从地址中找到latitude和longitude,但对于某些地址,我没有获得任何latitude和longitude。是否有可能从稍有错误的地址获得近似的latitude和longitude?为了更好地理解,请看我的代码,我之所以使用IOException,是因为geocoder.getFromLocationName(locationAddress, 1)返回null:
下面是我的代码:geocoder = new Geocoder(context, Local