Changeset 13792 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2018-05-20T17:28:55+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r13757 r13792 18 18 import org.openstreetmap.josm.data.imagery.ImageryInfo; 19 19 import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryBounds; 20 import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryCategory; 20 21 import org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryType; 21 22 import org.openstreetmap.josm.data.imagery.Shape; … … 220 221 "permission-ref", 221 222 "country-code", 223 "category", 222 224 "icon", 223 225 "date", … … 425 427 break; 426 428 case "type": 427 boolean found = false; 428 for (ImageryType type : ImageryType.values()) { 429 if (Objects.equals(accumulator.toString(), type.getTypeString())) { 430 entry.setImageryType(type); 431 found = true; 432 break; 433 } 434 } 435 if (!found) { 429 ImageryType type = ImageryType.fromString(accumulator.toString()); 430 if(type != null) 431 entry.setImageryType(type); 432 else 436 433 skipEntry = true; 437 }438 434 break; 439 435 case "default": … … 524 520 case "minimum-tile-expire": 525 521 entry.setMinimumTileExpire(Integer.parseInt(accumulator.toString())); 522 break; 523 case "category": 524 String cat = accumulator.toString(); 525 ImageryCategory category = ImageryCategory.fromString(cat); 526 if(category != null) 527 entry.setImageryCategory(category); 528 entry.setImageryCategoryOriginalString(cat); 526 529 break; 527 530 default: // Do nothing
Note:
See TracChangeset
for help on using the changeset viewer.