Changeset 18838 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java
- Timestamp:
- 2009-11-28T17:05:44+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/DownloadWMSVectorImage.java
r18544 r18838 8 8 import org.openstreetmap.josm.Main; 9 9 import org.openstreetmap.josm.data.Bounds; 10 import org.openstreetmap.josm.data.projection.LambertCC9Zones;11 10 import org.openstreetmap.josm.gui.MapView; 12 11 import org.openstreetmap.josm.gui.PleaseWaitRunnable; … … 32 31 try { 33 32 if (grabber.getWmsInterface().retrieveInterface(wmsLayer)) { 33 boolean useFactor = true; 34 34 if (wmsLayer.images.isEmpty()) { 35 35 // first time we grab an image for this layer 36 36 if (CacheControl.cacheEnabled) { 37 37 if (wmsLayer.getCacheControl().loadCacheIfExist()) { 38 Main.map.mapView.repaint(); 38 Main.map.mapView.zoomTo(wmsLayer.getCommuneBBox().toBounds()); 39 //Main.map.mapView.repaint(); 39 40 return; 40 41 } … … 46 47 // set vectorized commune bounding box by opening the standard web window 47 48 grabber.getWmsInterface().retrieveCommuneBBox(wmsLayer); 48 // if it is the first layer, use the communeBBox as grab bbox 49 if (Main. proj instanceof LambertCC9Zones && Main.map.mapView.getAllLayers().size() == 1 ) {49 // if it is the first layer, use the communeBBox as grab bbox (and not divided) 50 if (Main.map.mapView.getAllLayers().size() == 1 ) { 50 51 bounds = wmsLayer.getCommuneBBox().toBounds(); 51 52 Main.map.mapView.zoomTo(bounds); 53 useFactor = false; 52 54 } 53 55 } 54 56 } 55 57 // grab new images from wms server into active layer 56 wmsLayer.grab(grabber, bounds); 58 wmsLayer.grab(grabber, bounds, useFactor); 57 59 } 58 60 } catch (DuplicateLayerException e) {
Note:
See TracChangeset
for help on using the changeset viewer.
