You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
autocomplete.setOnPlaceSelectedListener(
new OnPlaceSelectedListener() { @OverRide
public void onPlaceSelected(final Place place) {
// do something awesome with the selected place
}
}
);
The text was updated successfully, but these errors were encountered:
@AmrutGhatage once you have the Place object, you'll need to request the place details. Once you have the place details you should be able to access the lat/lon from the data model:
autocomplete.getDetailsFor(place, new DetailsCallback() {
@Override
public void onSuccess(PlaceDetails details) {
double lat = details.geometry.location.lat;
double lon = details.geometry.location.lon;
}
@Override
public void onFailure(Throwable failure) {
}
public void onComplete() {
}
});
autocomplete.setOnPlaceSelectedListener(
new OnPlaceSelectedListener() {
@OverRide
public void onPlaceSelected(final Place place) {
// do something awesome with the selected place
The text was updated successfully, but these errors were encountered: