Ignore:
Timestamp:
2012-02-22T19:17:45+01:00 (12 years ago)
Author:
stoecker
Message:

use EPSG codes instead of instanceof to verify projection (allows to use proj4j projections instead of internally supported projections)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java

    r4857 r5017  
    3131import org.openstreetmap.josm.data.imagery.GeorefImage.State;
    3232import org.openstreetmap.josm.data.imagery.ImageryInfo;
    33 import org.openstreetmap.josm.data.projection.Mercator;
    3433import org.openstreetmap.josm.gui.MapView;
    3534import org.openstreetmap.josm.gui.layer.WMSLayer;
     
    8685            int wi, int ht) throws MalformedURLException {
    8786        String myProj = Main.getProjection().toCode();
    88         if (!info.getServerProjections().contains(myProj) && (Main.getProjection() instanceof Mercator)) {
     87        if (!info.getServerProjections().contains(myProj) && "EPSG:3857".equals(Main.getProjection().toCode())) {
    8988            LatLon sw = Main.getProjection().eastNorth2latlon(new EastNorth(w, s));
    9089            LatLon ne = Main.getProjection().eastNorth2latlon(new EastNorth(e, n));
     
    9998        }
    10099
    101         // Bounding box coordinats have to be switched for WMS 1.3.0 EPSG:4326.
     100        // Bounding box coordinates have to be switched for WMS 1.3.0 EPSG:4326.
    102101        //
    103102        // Background:
Note: See TracChangeset for help on using the changeset viewer.