# HG changeset patch # User Raimund Renkert # Date 1394110956 -3600 # Node ID fac461c67d24d2f877d2142f563446b636be2f11 # Parent a18c97f9d7520556a880caec7620f694a869c41b Try to load default zoom scales if no zoom scale defined for the current river. diff -r a18c97f9d752 -r fac461c67d24 artifacts/src/main/java/org/dive4elements/river/artifacts/model/ZoomScale.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ZoomScale.java Wed Mar 05 19:47:54 2014 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/ZoomScale.java Thu Mar 06 14:02:36 2014 +0100 @@ -38,7 +38,11 @@ double range = Math.abs(upper) - Math.abs(lower); TreeMap ranges = rivers.get(river); if (ranges == null) { - return 0.001; + TreeMap defaultRanges = rivers.get("default"); + if (defaultRanges == null) { + return 0.001; + } + ranges = defaultRanges; } Map.Entry next = ranges.higherEntry(range); Map.Entry prev = ranges.lowerEntry(range);