Ignore:
Timestamp:
2009-11-28T17:05:44+01:00 (16 years ago)
Author:
pieren
Message:

Fix minor issues if Grab is called without layer (possible since projection rework)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java

    r18720 r18838  
    100100
    101101    public void grab(CadastreGrabber grabber, Bounds b) throws IOException {
    102         if (isRaster) {
    103             b = new Bounds(Main.proj.eastNorth2latlon(rasterMin), Main.proj.eastNorth2latlon(rasterMax));
    104             divideBbox(b, Integer.parseInt(Main.pref.get("cadastrewms.rasterDivider",
    105                     CadastrePreferenceSetting.DEFAULT_RASTER_DIVIDER)));
     102        grab(grabber, b, true);
     103    }
     104   
     105    public void grab(CadastreGrabber grabber, Bounds b, boolean useFactor) throws IOException {
     106        if (useFactor) {
     107            if (isRaster) {
     108                b = new Bounds(Main.proj.eastNorth2latlon(rasterMin), Main.proj.eastNorth2latlon(rasterMax));
     109                divideBbox(b, Integer.parseInt(Main.pref.get("cadastrewms.rasterDivider",
     110                        CadastrePreferenceSetting.DEFAULT_RASTER_DIVIDER)));
     111            } else
     112                divideBbox(b, Integer.parseInt(Main.pref.get("cadastrewms.scale", Scale.X1.toString())));
    106113        } else
    107             divideBbox(b, Integer.parseInt(Main.pref.get("cadastrewms.scale", Scale.X1.toString())));
     114            divideBbox(b, 1);
    108115
    109116        for (EastNorthBound n : dividedBbox) {
     
    440447            }
    441448        }
     449        System.out.println("Cache loaded for location "+location+" with "+images.size()+" images");
    442450        return true;
    443451    }
Note: See TracChangeset for help on using the changeset viewer.