Ignore:
Timestamp:
2009-11-21T00:18:50+01:00 (17 years ago)
Author:
pieren
Message:

Add subprojection handling

File:
1 edited

Legend:

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

    r18595 r18720  
    2929import org.openstreetmap.josm.data.coor.EastNorth;
    3030import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
    31 import org.openstreetmap.josm.data.projection.LambertCC9Zones;
    3231import org.openstreetmap.josm.gui.MapView;
    3332import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
     
    517516    public void setCommuneBBox(EastNorthBound entireCommune) {
    518517        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());
    521520    }
    522521
     
    532531    }
    533532
    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//    }
    559558
    560559    public EastNorth getRasterCenter() {
Note: See TracChangeset for help on using the changeset viewer.