Ignore:
Timestamp:
2009-10-18T18:11:09+02:00 (17 years ago)
Author:
pieren
Message:

Use the new cadastre projection LambertCC9Zones

File:
1 edited

Legend:

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

    r17089 r18207  
    77import org.openstreetmap.josm.Main;
    88import org.openstreetmap.josm.data.Bounds;
     9import org.openstreetmap.josm.data.projection.LambertCC9Zones;
    910import org.openstreetmap.josm.gui.MapView;
    1011import org.openstreetmap.josm.gui.PleaseWaitRunnable;
     
    3839                        }
    3940                    }
    40                     if (wmsLayer.isRaster())
     41                    if (wmsLayer.isRaster()) {
    4142                        // set raster image commune bounding box based on current view (before adjustment)
    4243                        wmsLayer.setRasterBounds(bounds);
    43                     else
     44                    } else {
    4445                        // set vectorized commune bounding box by opening the standard web window
    4546                        wmsLayer.setCommuneBBox( grabber.getWmsInterface().retrieveCommuneBBox());
     47                        // if it is the first layer, use the communeBBox as grab bbox
     48                        if (Main.proj instanceof LambertCC9Zones && Main.map.mapView.getAllLayers().size() == 1 ) {
     49                            bounds = wmsLayer.getCommuneBBox().toBounds();
     50                            Main.map.mapView.zoomTo(bounds);
     51                        }
     52                    }
    4653                }
    4754                // grab new images from wms server into active layer
Note: See TracChangeset for help on using the changeset viewer.