Changeset 4492 in josm for trunk/src/org/openstreetmap/josm/data/imagery
- Timestamp:
- 2011-10-07T18:52:05+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r4464 r4492 76 76 private List<String> serverProjections; 77 77 private String attributionText; 78 private String attributionLinkURL; 78 79 private String attributionImage; 79 private String attributionLinkURL; 80 private String attributionImageURL; 81 private String termsOfUseText; 80 82 private String termsOfUseURL; 81 83 private String countryCode = ""; … … 91 93 @pref String attribution_url; 92 94 @pref String logo_image; 95 @pref String logo_url; 96 @pref String terms_of_use_text; 93 97 @pref String terms_of_use_url; 94 98 @pref String country_code = ""; … … 112 116 attribution_url = i.attributionLinkURL; 113 117 logo_image = i.attributionImage; 118 logo_url = i.attributionImageURL; 119 terms_of_use_text = i.termsOfUseText; 114 120 terms_of_use_url = i.termsOfUseURL; 115 121 country_code = i.countryCode; … … 204 210 } 205 211 attributionText = e.attribution_text; 212 attributionLinkURL = e.attribution_url; 206 213 attributionImage = e.logo_image; 207 attributionLinkURL = e.attribution_url; 214 attributionImageURL = e.logo_url; 215 termsOfUseText = e.terms_of_use_text; 208 216 termsOfUseURL = e.terms_of_use_url; 209 217 countryCode = e.country_code; … … 267 275 this.eulaAcceptanceRequired = null; 268 276 this.bounds = i.bounds; 277 this.attributionText = i.attributionText; 278 this.attributionLinkURL = i.attributionLinkURL; 269 279 this.attributionImage = i.attributionImage; 270 this.attribution LinkURL = i.attributionLinkURL;271 this. attributionText = i.attributionText;280 this.attributionImageURL = i.attributionImageURL; 281 this.termsOfUseText = i.termsOfUseText; 272 282 this.termsOfUseURL = i.termsOfUseURL; 273 283 this.serverProjections = i.serverProjections; … … 327 337 } 328 338 339 public void setAttributionImageURL(String text) { 340 attributionImageURL = text; 341 } 342 329 343 public String getAttributionLinkURL() { 330 344 return attributionLinkURL; … … 333 347 public void setAttributionLinkURL(String text) { 334 348 attributionLinkURL = text; 349 } 350 351 public void setTermsOfUseText(String text) { 352 termsOfUseText = text; 335 353 } 336 354 … … 514 532 { 515 533 this.attributionImage = i.attributionImage; 534 this.attributionImageURL = i.attributionImageURL; 535 this.attributionText = i.attributionText; 516 536 this.attributionLinkURL = i.attributionLinkURL; 517 this. attributionText = i.attributionText;537 this.termsOfUseText = i.termsOfUseText; 518 538 this.termsOfUseURL = i.termsOfUseURL; 519 539 } 520 540 521 public void setAttribution(TMSTileSource s) 522 { 523 if(attributionLinkURL != null) { 524 if(attributionLinkURL.equals("osm")) 541 /** 542 * Applies the attribution from this object to a TMSTileSource. 543 */ 544 public void setAttribution(TMSTileSource s) { 545 if (attributionText != null) { 546 if (attributionText.equals("osm")) { 547 s.setAttributionText(new Mapnik().getAttributionText(0, null, null)); 548 } else { 549 s.setAttributionText(attributionText); 550 } 551 } 552 if (attributionLinkURL != null) { 553 if (attributionLinkURL.equals("osm")) { 525 554 s.setAttributionLinkURL(new Mapnik().getAttributionLinkURL()); 526 else555 } else { 527 556 s.setAttributionLinkURL(attributionLinkURL); 528 } 529 if(attributionText != null) { 530 if(attributionText.equals("osm")) 531 s.setAttributionText(new Mapnik().getAttributionText(0, null, null)); 532 else 533 s.setAttributionText(attributionText); 534 } 535 if(attributionImage != null) { 557 } 558 } 559 if (attributionImage != null) { 536 560 ImageIcon i = ImageProvider.getIfAvailable(null, attributionImage); 537 if(i != null) 561 if (i != null) { 538 562 s.setAttributionImage(i.getImage()); 539 } 540 if(termsOfUseURL != null) { 541 if(termsOfUseURL.equals("osm")) 563 } 564 } 565 if (attributionImageURL != null) { 566 s.setAttributionImageURL(attributionImageURL); 567 } 568 if (termsOfUseText != null) { 569 s.setTermsOfUseText(termsOfUseText); 570 } 571 if (termsOfUseURL != null) { 572 if (termsOfUseURL.equals("osm")) { 542 573 s.setTermsOfUseURL(new Mapnik().getTermsOfUseURL()); 543 else574 } else { 544 575 s.setTermsOfUseURL(termsOfUseURL); 576 } 545 577 } 546 578 }
Note:
See TracChangeset
for help on using the changeset viewer.