Changeset 22286 in osm for applications/editors/josm/plugins/wmsplugin
- Timestamp:
- 2010-07-12T16:53:14+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/wmsplugin/src/wmsplugin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java
r19626 r22286 25 25 public boolean downloadingStarted; 26 26 public boolean failed = false; 27 public boolean infotext = false; 27 28 28 29 public GeorefImage(boolean downloadingStarted) { -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java
r19240 r22286 89 89 image.image = img; 90 90 image.flushedResizedCachedInstance(); 91 image. failed= true;91 image.infotext = true; 92 92 image.downloadingStarted = false; 93 93 g.setFont(font); … … 114 114 } 115 115 116 abstract public boolean loadFromCache( );116 abstract public boolean loadFromCache(boolean real); 117 117 } -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java
r20891 r22286 155 155 156 156 @Override 157 public boolean loadFromCache( ){157 public boolean loadFromCache(boolean real){ 158 158 URL url = null; 159 159 try{ … … 166 166 } 167 167 BufferedImage cached = cache.getImg(url.toString()); 168 if( !layer.hasAutoDownload() || cached != null){168 if((!real && !layer.hasAutoDownload()) || cached != null){ 169 169 image.min = b.min; 170 170 image.max = b.max; -
applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
r21796 r22286 198 198 } 199 199 } else { 200 downloadAndPaintVisible(g, mv );200 downloadAndPaintVisible(g, mv, false); 201 201 } 202 202 } … … 236 236 } 237 237 238 protected void downloadAndPaintVisible(Graphics g, final MapView mv){ 238 protected void downloadAndPaintVisible(Graphics g, final MapView mv, 239 boolean real){ 239 240 if (usesInvalidUrl) 240 241 return; … … 249 250 for(int y = bminy; y<bmaxy; ++y){ 250 251 GeorefImage img = images[modulo(x,dax)][modulo(y,day)]; 251 if( !img.paint(g, mv, dx, dy) && !img.downloadingStarted){252 if((!img.paint(g, mv, dx, dy) || img.infotext) && !img.downloadingStarted){ 252 253 img.downloadingStarted = true; 253 254 img.image = null; 254 255 img.flushedResizedCachedInstance(); 255 256 Grabber gr = WMSPlugin.getGrabber(XYtoBounds(x,y), img, mv, this); 256 if(!gr.loadFromCache( )){257 if(!gr.loadFromCache(real)){ 257 258 gr.setPriority(1); 258 259 executor.submit(gr); … … 320 321 ); 321 322 } else { 322 downloadAndPaintVisible(mv.getGraphics(), mv );323 downloadAndPaintVisible(mv.getGraphics(), mv, true); 323 324 } 324 325 }
Note:
See TracChangeset
for help on using the changeset viewer.