Changeset 11575 in josm
- Timestamp:
- 2017-02-18T12:34:15+01:00 (8 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/maps.xsd
r9610 r11575 661 661 <!-- A base64-encoded image that is displayed as menu/toolbar icon --> 662 662 <xs:element name="icon" minOccurs="0" maxOccurs="1" type="xs:string" /> 663 <!-- Date in form YYYY-MM-DD;YYYY-MM-DD (each element after first year is optional --> 664 <xs:element name="date" minOccurs="0" maxOccurs="1" type="xs:string" /> 663 665 <xs:element name="mirror" minOccurs="0"> 664 666 <xs:complexType> … … 703 705 </xs:sequence> 704 706 <xs:attribute name="last-check" type="xs:date" use="optional" /> 707 <xs:attribute name="eli-best" type="xs:boolean" use="optional" /> 705 708 </xs:complexType> 706 709 </xs:element> -
trunk/scripts/SyncEditorImageryIndex.groovy
r11574 r11575 564 564 } 565 565 static String getQuality(Object e) { 566 //if (e instanceof ImageryInfo) return "".equals(e.getQuality()) ? null : e.getQuality() 567 if (e instanceof ImageryInfo) return null 568 return e.get("properties").get("best") ? "best" : null 566 if (e instanceof ImageryInfo) return e.isBestMarked() ? "eli-best" : null 567 return e.get("properties").get("best") ? "eli-best" : null 569 568 } 570 569 static String getIcon(Object e) { -
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r11572 r11575 194 194 */ 195 195 private String date; 196 /** 197 * marked as best in other editors 198 * @since 11575 199 */ 200 private boolean bestMarked = false; 196 201 /** mirrors of different type for this entry */ 197 202 private List<ImageryInfo> mirrors; 198 203 /** icon used in menu */ 199 204 private String icon; 205 /** is the geo reference correct - don't offer offset handling */ 200 206 private boolean isGeoreferenceValid; 207 /** does the EPSG:4326 to mercator woraround work as expected */ 201 208 private boolean isEpsg4326To3857Supported; 202 209 /** which layers should be activated by default on layer addition. **/ … … 237 244 @pref Map<String, String> metadataHeaders; 238 245 @pref boolean valid_georeference; 246 @pref boolean bestMarked; 239 247 @pref boolean supports_epsg_4326_to_3857_conversion; 240 248 // TODO: disabled until change of layers is implemented … … 262 270 attribution_url = i.attributionLinkURL; 263 271 date = i.date; 272 bestMarked = i.bestMarked; 264 273 logo_image = i.attributionImage; 265 274 logo_url = i.attributionImageURL; … … 418 427 attributionImageURL = e.logo_url; 419 428 date = e.date; 429 bestMarked = e.bestMarked; 420 430 termsOfUseText = e.terms_of_use_text; 421 431 termsOfUseURL = e.terms_of_use_url; … … 444 454 this.origName = i.origName; 445 455 this.langName = i.langName; 456 this.bestMarked = i.bestMarked; 446 457 this.defaultEntry = i.defaultEntry; 447 458 this.cookies = i.cookies; … … 494 505 Objects.equals(this.id, other.id) && 495 506 Objects.equals(this.url, other.url) && 507 Objects.equals(this.bestMarked, other.bestMarked) && 508 Objects.equals(this.isEpsg4326To3857Supported, other.isEpsg4326To3857Supported) && 509 Objects.equals(this.isGeoreferenceValid, other.isGeoreferenceValid) && 496 510 Objects.equals(this.cookies, other.cookies) && 497 511 Objects.equals(this.eulaAcceptanceRequired, other.eulaAcceptanceRequired) && … … 852 866 html = true; 853 867 } 868 if (bestMarked) { 869 res += "<br>" + tr("This imagery is marked as best in this region in other editors."); 870 } 854 871 String desc = getDescription(); 855 872 if (desc != null && !desc.isEmpty()) { … … 1154 1171 public void setGeoreferenceValid(boolean isGeoreferenceValid) { 1155 1172 this.isGeoreferenceValid = isGeoreferenceValid; 1173 } 1174 1175 /** 1176 * Returns the status of "best" marked status in other editors. 1177 * @return <code>true</code> if it is marked as best. 1178 * @since 11575 1179 */ 1180 public boolean isBestMarked() { 1181 return bestMarked; 1182 } 1183 1184 /** 1185 * Sets an indicator that in other editors it is marked as best imagery 1186 * @param bestMarked <code>true</code> if it is marked as best in other editors. 1187 * @since 11575 1188 */ 1189 public void setBestMarked(boolean bestMarked) { 1190 this.bestMarked = bestMarked; 1156 1191 } 1157 1192 -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r11570 r11575 154 154 noTileChecksums = new MultiMap<>(); 155 155 metadataHeaders = new HashMap<>(); 156 String best = atts.getValue("eli-best"); 157 if ("true".equals(best)) { 158 entry.setBestMarked(true); 159 } 156 160 } 157 161 break;
Note:
See TracChangeset
for help on using the changeset viewer.