Home > Mobile >  The Android Google address resolution foreign address is incomplete?
The Android Google address resolution foreign address is incomplete?

Time:10-08


Use the following url to request, return as a result, the API key is no problem,

https://maps.googleapis.com/maps/api/place/autocomplete/json? Lat latlng="+ + +", "LNG +" & amp; The radius=10000 & amp; Input=madrid& The components=country: ph& Types=(regions) & amp; Key=my key

Project "error_message" : "This API is not authorized to use This API.",
"Results" : [],
"Status" : "REQUEST_DENIED
"
To the geocoder:

List
Addresses=geocoder. GetFromLocation (
The location. GetLatitude (), the location getLongitude (), 1
);
For (Address Address: addresses) {
The Log. I (" TAG ", "address=" + address. The toString ());
}

If (addresses!=null) {
Addr=addresses. Get (0). GetAddressLine (0);
MAddress=addresses. Get (0);
Lat=location. GetLatitude () + "";
LNG=location. GetLongitude () + "";
The Log i. (TAG, "run: addr=" + addr + ", "+ mAddress. GetLatitude () +", "+ mAddress. GetLongitude ());
}
Results only resolve to the city of the Philippines (PH) _Manila_Manila, no specific sections or building name, address is normal in China include area county road construction, etc., in foreign is not normal,
Have a great god know how to solve?
  • Related