public void onPointSelect(PointSelectEvent event) { LatLng latlng = event.getLatLng(); contractEditor.getStart().setLatitude(new BigDecimal(latlng.getLat())); contractEditor.getStart().setLongitude(new BigDecimal(latlng.getLng())); addMessage( new FacesMessage( FacesMessage.SEVERITY_INFO, "Point Selected", "Lat:" + latlng.getLat() + ", Lng:" + latlng.getLng())); }
/** * Find the available destinations for the clicked location. If no locations are found, the a * collection of available destinations is set to an empty list. * * @param event The event which encapsulates the clicked location. */ public void onPointSelect(PointSelectEvent event) { LatLng latLng = event.getLatLng(); String countryCode = locationService.latLongToCountryCode(latLng.getLat(), latLng.getLng()); selectedRegion = locationService.countryCodeToContinent(countryCode); availableDestinations = airportRepository.getAirportsInContinent(selectedRegion); }