Changeset 10705 in osm for applications/editors/josm
- Timestamp:
- 2008-09-15T13:40:40+02:00 (16 years ago)
- Location:
- applications/editors/josm/plugins/wmsplugin/src/wmsplugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java
r10382 r10705 66 66 out.writeObject(max); 67 67 out.writeObject(min); 68 ImageIO.write(image, "png", ImageIO.createImageOutputStream(out)); 68 if(image == null) 69 out.writeObject(null); 70 else 71 ImageIO.write(image, "png", ImageIO.createImageOutputStream(out)); 69 72 } 70 73 } -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
r10704 r10705 61 61 62 62 protected String baseURL; 63 protected final int serializeFormatVersion = 3;63 protected final int serializeFormatVersion = 4; 64 64 65 65 private ExecutorService executor; … … 143 143 if( !startstop.isSelected() || (pixelPerDegree / (mv.getWidth() / (b.max.lon() - b.min.lon())) > minZoom) ){ //don't download when it's too outzoomed 144 144 for(int x = 0; x<dax; ++x) 145 for(int y = 0; y<day; ++y){ 146 images[modulo(x,dax)][modulo(y,day)].paint(g, mv); 147 } 145 for(int y = 0; y<day; ++y) 146 images[modulo(x,dax)][modulo(y,day)].paint(g, mv); 148 147 } else { 149 148 for(int x = bminx; x<bmaxx; ++x) … … 164 163 for(int x = 0; x<dax; ++x) 165 164 for(int y = 0; y<day; ++y) 166 if(images[x][y] !=null){165 if(images[x][y].image!=null){ 167 166 v.visit(images[x][y].min); 168 167 v.visit(images[x][y].max); … … 192 191 for(int x = 0; x<dax; ++x) 193 192 for(int y = 0; y<day; ++y) 194 if(images[x][y] !=null && images[x][y].image!=null && images[x][y].min!=null && images[x][y].max!=null){195 if (images[x][y].contains(eastNorth)) {193 if(images[x][y].image!=null && images[x][y].min!=null && images[x][y].max!=null) 194 if(images[x][y].contains(eastNorth)) 196 195 return images[x][y]; 197 }198 }199 196 return null; 200 197 } … … 227 224 oos.writeInt(ImageSize); 228 225 oos.writeDouble(pixelPerDegree); 226 oos.writeObject(name); 229 227 oos.writeObject(baseURL); 230 228 oos.writeObject(images); … … 257 255 return; 258 256 } 257 startstop.setSelected(false); 259 258 dax = ois.readInt(); 260 259 day = ois.readInt(); 261 260 ImageSize = ois.readInt(); 262 261 pixelPerDegree = ois.readDouble(); 262 name = (String) ois.readObject(); 263 263 baseURL = (String) ois.readObject(); 264 264 images = (GeorefImage[][])ois.readObject(); 265 266 265 ois.close(); 267 266 fis.close(); 268 startstop.setSelected(false);267 mv.repaint(); 269 268 } 270 269 catch (Exception ex) {
Note:
See TracChangeset
for help on using the changeset viewer.