Changeset 9658 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2016-01-27T22:27:54+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r9619 r9658 145 145 } 146 146 } 147 148 147 149 148 /** original name of the imagery entry in case of translation call, for multiple languages English when possible */ … … 186 185 /** country code of the imagery (for country specific imagery) */ 187 186 private String countryCode = ""; 187 /** mirrors of different type for this entry */ 188 private List<ImageryInfo> mirrors = null; 188 189 /** icon used in menu */ 189 190 private String icon; … … 1029 1030 } 1030 1031 1032 /** 1033 * Adds a mirror entry. Mirror entries are completed with the data from the master entry 1034 * and only describe another method to access identical data. 1035 * 1036 * @param entry the mirror to be added 1037 * @since 9658 1038 */ 1039 public void addMirror(ImageryInfo entry) { 1040 if (mirrors == null) { 1041 mirrors = new ArrayList<>(); 1042 } 1043 mirrors.add(entry); 1044 } 1045 1046 /** 1047 * Returns the mirror entries. Entries are completed with master entry data. 1048 * 1049 * @return the list of mirrors 1050 * @since 9658 1051 */ 1052 public List<ImageryInfo> getMirrors() { 1053 List<ImageryInfo> l = new ArrayList<>(); 1054 if (mirrors != null) { 1055 for (ImageryInfo i : mirrors) { 1056 ImageryInfo n = new ImageryInfo(this); 1057 if (i.defaultMaxZoom != 0) { 1058 n.defaultMaxZoom = i.defaultMaxZoom; 1059 } 1060 if (i.defaultMinZoom != 0) { 1061 n.defaultMinZoom = i.defaultMinZoom; 1062 } 1063 if (i.serverProjections != null) { 1064 n.serverProjections = i.serverProjections; 1065 } 1066 n.url = i.url; 1067 n.imageryType = i.imageryType; 1068 if (i.getTileSize() != 0) { 1069 n.setTileSize(i.getTileSize()); 1070 } 1071 l.add(n); 1072 } 1073 } 1074 return l; 1075 } 1031 1076 }
Note:
See TracChangeset
for help on using the changeset viewer.