public List<ElevationService> getElevationServices() {
return elevationServices;
}
public ElevationService getElevationService() {
ElevationService firstElevationService = getElevationServices().size() > 0 ? getElevationServices().get(0) : null;
if (firstElevationService == null)
return null;
String lookupServiceName = preferences.get(ELEVATION_SERVICE, firstElevationService.getName());
for (ElevationService service : getElevationServices()) {
if (lookupServiceName.endsWith(service.getName()))
return service;
}
if (!loggedFailedWarning) {
log.warning(format("Failed to find elevation service %s; using first %s", lookupServiceName, firstElevationService.getName()));
loggedFailedWarning = true;
}
return firstElevationService;
}