public SelectLocationEvent(MapWidget mapWidget, GetLocationForStringAlternative alternative) { super(); this.mapWidget = mapWidget; canonicalLocation = alternative.getCanonicalLocation(); center = alternative.getCenter(); bbox = alternative.getBbox(); geocoderName = alternative.getGeocoderName(); userData = alternative.getUserData(); }
break; GetLocationForStringAlternative one = new GetLocationForStringAlternative(); matchedLocation = splitGeocoderStringService.combine(matchedStrings); one.setCanonicalLocation(matchedLocation); one.setGeocoderName(alt.getGeocoderName()); one.setUserData(alt.getUserData()); one.setBbox(bbox); one.setCenter( new Coordinate(bbox.getX() + bbox.getWidth() / 2, bbox.getY() + bbox.getHeight() / 2));
private ListGridRecord[] toRecords(List<GetLocationForStringAlternative> alternatives) { ListGridRecord[] records = new ListGridRecord[alternatives.size()]; for (int i = 0; i < records.length; i++) { GetLocationForStringAlternative alt = alternatives.get(i); ListGridRecord record = new ListGridRecord(); record.setAttribute(LOCATION_FIELD, alt.getCanonicalLocation()); record.setAttribute(LOCATION_OBJECT, alt); records[i] = record; } return records; }
@Override public void setAlternatives(List<GetLocationForStringAlternative> alternatives) { alternativesPanel.clear(); for (GetLocationForStringAlternative alternative : alternatives) { final String altText = alternative.getCanonicalLocation(); Label altLabel = new Label(altText); altLabel.setStyleName(resource.css().geocoderGadgetAltLabel()); altLabel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { alternativesPresenter.findLocation(altText); } }); alternativesPanel.add(altLabel); } }
public SelectLocationEvent(MapPresenter mapPresenter, GetLocationForStringAlternative alternative) { super(); this.mapPresenter = mapPresenter; canonicalLocation = alternative.getCanonicalLocation(); center = alternative.getCenter(); bbox = alternative.getBbox(); geocoderName = alternative.getGeocoderName(); userData = alternative.getUserData(); }