Changeset 32051 in osm for applications/viewer/jmapviewer


Ignore:
Timestamp:
2016-02-07T23:59:37+01:00 (9 years ago)
Author:
bastik
Message:

see #josm12437 - change preference type to MultiMap

Location:
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java

    r32025 r32051  
    1010import java.util.Map;
    1111import java.util.Map.Entry;
     12import java.util.Set;
    1213
    1314import org.openstreetmap.gui.jmapviewer.OsmMercator;
     
    2728    protected String baseUrl;
    2829    protected String id;
    29     private final Map<String, List<String>> noTileHeaders;
    30     private final Map<String, List<String>> noTileChecksums;
     30    private final Map<String, Set<String>> noTileHeaders;
     31    private final Map<String, Set<String>> noTileChecksums;
    3132    private final Map<String, String> metadataHeaders;
    3233    protected int tileSize;
     
    172173    public boolean isNoTileAtZoom(Map<String, List<String>> headers, int statusCode, byte[] content) {
    173174        if (noTileHeaders != null && headers != null) {
    174             for (Entry<String, List<String>> searchEntry: noTileHeaders.entrySet()) {
     175            for (Entry<String, Set<String>> searchEntry: noTileHeaders.entrySet()) {
    175176                List<String> headerVals = headers.get(searchEntry.getKey());
    176177                if (headerVals != null) {
     
    186187        }
    187188        if (noTileChecksums != null) {
    188             for (Entry<String, List<String>> searchEntry: noTileChecksums.entrySet()) {
     189            for (Entry<String, Set<String>> searchEntry: noTileChecksums.entrySet()) {
    189190                MessageDigest md = null;
    190191                try {
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java

    r32024 r32051  
    22package org.openstreetmap.gui.jmapviewer.tilesources;
    33
    4 import java.util.List;
    54import java.util.Map;
     5import java.util.Set;
    66
    77/**
     
    2121
    2222    /** headers meaning, that there is no tile at this zoom level */
    23     protected Map<String, List<String>> noTileHeaders;
     23    protected Map<String, Set<String>> noTileHeaders;
    2424
    2525    /** checksum of empty tiles */
    26     protected Map<String, List<String>> noTileChecksums;
     26    protected Map<String, Set<String>> noTileChecksums;
    2727
    2828    /** minimum zoom level supported by the tile source */
     
    100100     * @since 32022
    101101     */
    102     public Map<String, List<String>> getNoTileHeaders() {
     102    public Map<String, Set<String>> getNoTileHeaders() {
    103103        return noTileHeaders;
    104104    }
     
    109109     * @since 32022
    110110     */
    111     public Map<String, List<String>> getNoTileChecksums() {
     111    public Map<String, Set<String>> getNoTileChecksums() {
    112112        return noTileChecksums;
    113113    }
Note: See TracChangeset for help on using the changeset viewer.