0
GoogleプレイスのオートコンプリートAPIを使って作業していたのは、しかしエラーが発生しても、エラーコールバックにはerror code : 0
とステータスがSuccess
のエラーメッセージが表示されます。私はgoogle place autocomplete Fragment
を使用しています。GoogleプレイスAPIエラーですが、成功を返します
プリントアウトエラー:I/DESTINATION: An error occurred: SUCCESS
private void setDestinationAutocompleteCallbacks() {
DestinationautocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
@Override
public void onPlaceSelected(Place place) {
LatLng destinationLatLng = place.getLatLng();
OriginAndDestinationLocations[1] = destinationLatLng;
mMap.addMarker(new MarkerOptions()
.position(destinationLatLng)
.title(getString(R.string.destinationLocation))
.snippet(place.getAddress().toString()))
.showInfoWindow();
if (OriginAndDestinationLocations[0] != null) {
adjustZoom();
} else {
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(destinationLatLng, Zoom), 2000, null);
}
}
@Override
public void onError(Status status) {
Log.i(DESTINATIONTAG, "An error occurred: " + status.getStatusMessage());
}
});
}