@Override public void goToLocation(final GetLocationForStringResponse response, final String location) { if (response.isLocationFound()) { fireGeocoderEvent(new SelectLocationEvent(mapPresenter, response)); } else { List<GetLocationForStringAlternative> alternatives = response.getAlternatives(); if (null != alternatives && alternatives.size() > 0) { fireGeocoderEvent(new SelectAlternativeEvent(mapPresenter, alternatives)); } else { fireGeocoderEvent(new LocationNotFoundEvent(location)); } } }
public void goToLocation(final CommandResponse commandResponse, final String location) { if (commandResponse instanceof GetLocationForStringResponse) { GetLocationForStringResponse response = (GetLocationForStringResponse) commandResponse; if (response.isLocationFound()) { removeAltWindow(); handlerManager.fireEvent(new SelectLocationEvent(map, response)); } else { List<GetLocationForStringAlternative> alternatives = response.getAlternatives(); if (null != alternatives && alternatives.size() > 0) { handlerManager.fireEvent(new SelectAlternativeEvent(map, alternatives)); } else { SC.say(messages.locationNotFound(location)); } } } }