Changeset 9613 in josm for trunk/src/org
- Timestamp:
- 2016-01-24T15:14:26+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r9610 r9613 219 219 @pref String icon; 220 220 @pref String description; 221 @pref Map<String, String> noTileHeaders;222 @pref Map<String, String> noTileChecksums;221 @pref Map<String, List<String>> noTileHeaders; 222 @pref Map<String, List<String>> noTileChecksums; 223 223 @pref int tileSize = OsmMercator.DEFAUL_TILE_SIZE; 224 224 @pref Map<String, String> metadataHeaders; … … 976 976 * 977 977 * @param noTileHeaders Map of <header name, header value> which will be treated as "no tile at this zoom level" 978 * @since 8344979 */ 980 public void setNoTileHeaders(Map<String, String> noTileHeaders) {978 * @since 9611 979 */ 980 public void setNoTileHeaders(Map<String, List<String>> noTileHeaders) { 981 981 this.noTileHeaders = noTileHeaders; 982 982 } 983 983 984 984 @Override 985 public Map<String, String> getNoTileHeaders() {985 public Map<String, List<String>> getNoTileHeaders() { 986 986 return noTileHeaders; 987 987 } … … 992 992 * 993 993 * @param noTileChecksums Map of <checksum type, checksum value> which will be treated as "no tile at this zoom level" 994 * @since 961 0995 */ 996 public void setNoTileChecksums(Map<String, String> noTileChecksums) {994 * @since 9611 995 */ 996 public void setNoTileChecksums(Map<String, List<String>> noTileChecksums) { 997 997 this.noTileChecksums = noTileChecksums; 998 998 } 999 999 1000 1000 @Override 1001 public Map<String, String> getNoTileChecksums() {1001 public Map<String, List<String>> getNoTileChecksums() { 1002 1002 return noTileChecksums; 1003 1003 } -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r9610 r9613 94 94 private String lang; 95 95 private List<String> projections; 96 private Map<String, String> noTileHeaders;97 private Map<String, String> noTileChecksums;96 private Map<String, List<String> > noTileHeaders; 97 private Map<String, List<String> > noTileChecksums; 98 98 private Map<String, String> metadataHeaders; 99 99 … … 172 172 newState = State.PROJECTIONS; 173 173 } else if ("no-tile-header".equals(qName)) { 174 noTileHeaders.put(atts.getValue("name"), atts.getValue("value")); 174 String name = atts.getValue("name"); 175 List<String> l; 176 if (noTileHeaders.containsKey(name)) { 177 l = noTileHeaders.get(name); 178 } else { 179 l = new ArrayList<String>(); 180 noTileHeaders.put(atts.getValue("name"), l); 181 } 182 l.add(atts.getValue("value")); 175 183 newState = State.NO_TILE; 176 184 } else if ("no-tile-checksum".equals(qName)) { 177 noTileChecksums.put(atts.getValue("type"), atts.getValue("value")); 185 String type = atts.getValue("type"); 186 List<String> l; 187 if (noTileChecksums.containsKey(type)) { 188 l = noTileChecksums.get(type); 189 } else { 190 l = new ArrayList<String>(); 191 noTileChecksums.put(type, l); 192 } 193 l.add(atts.getValue("value")); 178 194 newState = State.NO_TILESUM; 179 195 } else if ("metadata-header".equals(qName)) {
Note:
See TracChangeset
for help on using the changeset viewer.