Changeset 18720 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
- Timestamp:
- 2009-11-21T00:18:50+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
r18595 r18720 29 29 import org.openstreetmap.josm.data.coor.EastNorth; 30 30 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 31 import org.openstreetmap.josm.data.projection.LambertCC9Zones;32 31 import org.openstreetmap.josm.gui.MapView; 33 32 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; … … 517 516 public void setCommuneBBox(EastNorthBound entireCommune) { 518 517 this.communeBBox = entireCommune; 519 if (Main.proj instanceof LambertCC9Zones) 520 setLambertCC9Zone(communeBBox.min.north()); 518 // if (Main.proj instanceof LambertCC9Zones) 519 // setLambertCC9Zone(communeBBox.min.north()); 521 520 } 522 521 … … 532 531 } 533 532 534 public void setLambertCC9Zone(double north) { 535 int lambertZone = LambertCC9Zones.north2ZoneNumber(north); 536 this.lambertZone = lambertZone; 537 if (LambertCC9Zones .layoutZone != lambertZone) {538 String currentZone = MenuActionLambertZone.lambert9zones[LambertCC9Zones .layoutZone+1];539 String destZone = MenuActionLambertZone.lambert9zones[lambertZone+1]; 540 if (Main.map.mapView.getAllLayers().size() == 1) { 541 /* Enable this code below when JOSM will have a proper support of dynamic projection change 542 * 543 System.out.println("close all layers and change current Lambert zone from "+LambertCC9Zones.layoutZone+" to "+lambertZone); 544 Bounds b = null; 545 if (Main.map != null && Main.map.mapView != null) 546 b = Main.map.mapView.getRealBounds(); 547 LambertCC9Zones.layoutZone = lambertZone; 548 Main.map.mapView.zoomTo(b); 549 */ 550 } else { 551 JOptionPane.showMessageDialog(Main.parent, tr("Current layer is in Lambert CC9 Zone \"{0}\"\n"+ 552 "where the commune is in Lambert CC9 Zone \"{1}\".\n"+ 553 "Upload your changes, close all layers and change\n"+ 554 "manually the Lambert zone from the Cadastre menu" 555 , currentZone, destZone)); 556 } 557 } 558 } 533 // public void setLambertCC9Zone(double north) { 534 // int lambertZone = LambertCC9Zones.north2ZoneNumber(north); 535 // this.lambertZone = lambertZone; 536 // if (((LambertCC9Zones)Main.proj).getLayoutZone() != lambertZone) { 537 // String currentZone = MenuActionLambertZone.lambert9zones[((LambertCC9Zones)Main.proj).getLayoutZone()+1]; 538 // String destZone = MenuActionLambertZone.lambert9zones[lambertZone+1]; 539 // if (Main.map.mapView.getAllLayers().size() == 1) { 540 // /* Enable this code below when JOSM will have a proper support of dynamic projection change 541 // * 542 // System.out.println("close all layers and change current Lambert zone from "+LambertCC9Zones.layoutZone+" to "+lambertZone); 543 // Bounds b = null; 544 // if (Main.map != null && Main.map.mapView != null) 545 // b = Main.map.mapView.getRealBounds(); 546 // LambertCC9Zones.layoutZone = lambertZone; 547 // Main.map.mapView.zoomTo(b); 548 // */ 549 // } else { 550 // JOptionPane.showMessageDialog(Main.parent, tr("Current layer is in Lambert CC9 Zone \"{0}\"\n"+ 551 // "where the commune is in Lambert CC9 Zone \"{1}\".\n"+ 552 // "Upload your changes, close all layers and change\n"+ 553 // "manually the Lambert zone from the Cadastre menu" 554 // , currentZone, destZone)); 555 // } 556 // } 557 // } 559 558 560 559 public EastNorth getRasterCenter() {
Note:
See TracChangeset
for help on using the changeset viewer.
