+ double startElevation = 0;
+ double endElevation = 0;
+ if (MapsElevationServerPreferences.useElevationServer()) {
+ // ok! we use new elevation API to resolve possible elevations for the starting points
+ try {
+ startElevation = SingletonTiffTileInterface.lookup(startLat, startLon).doubleValue();
+ endElevation = SingletonTiffTileInterface.lookup(endLat, endLon).doubleValue();
+ } catch (Exception e) {
+ LOGGER.error("Could not get elevation from tiff interface", e);
+ }
+ }
+ final double se = startElevation;
+ final double ee = endElevation;