Changeset 11790 in josm


Ignore:
Timestamp:
2017-03-29T20:31:33+02:00 (6 months ago)
Author:
bastiK
Message:

WMTS: fix case with multiple tilesets per projection and layer (regression from [11788]), see #7427, see #10623)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java

    r11788 r11790  
    2525import java.util.TreeSet;
    2626import java.util.concurrent.ConcurrentHashMap;
     27import java.util.function.Predicate;
    2728import java.util.regex.Matcher;
    2829import java.util.regex.Pattern;
     
    578579                proj.toCode());
    579580
     581        if (candidates.size() > 1 && defaultLayer != null) {
     582            candidates = candidates.stream()
     583                    .filter(t -> t.tileMatrixSet.identifier.equals(defaultLayer.getTileMatrixSet()))
     584                    .collect(Collectors.toList());
     585        }
    580586        if (candidates.size() == 1) {
    581587            Layer newLayer = candidates.iterator().next();
Note: See TracChangeset for help on using the changeset viewer.