Changeset 4439 in josm for trunk/src


Ignore:
Timestamp:
2011-09-17T23:29:49+02:00 (13 years ago)
Author:
bastiK
Message:

change imagery projection tag to something neutral (wms 1.1.1 has <srs> and wms 1.3.0 has <crs>, but both is supported in principle)

File:
1 edited

Legend:

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

    r4432 r4439  
    4040        ENTRY,              // inside an entry
    4141        ENTRY_ATTRIBUTE,    // note we are inside an entry attribute to collect the character data
    42         SUPPORTED_PROJECTIONS,
    43         SRS,
     42        PROJECTIONS,
     43        CODE,
    4444        BOUNDS,
    4545        SHAPE,
     
    8484        ImageryBounds bounds;
    8585        Shape shape;
    86         List<String> supported_srs;
     86        List<String> projections;
    8787
    8888        @Override public void startDocument() {
     
    9494            entry = null;
    9595            bounds = null;
    96             supported_srs = null;
     96            projections = null;
    9797        }
    9898
     
    143143                        }
    144144                        newState = State.BOUNDS;
    145                     } else if (qName.equals("supported-projections")) {
    146                         supported_srs = new ArrayList<String>();
    147                         newState = State.SUPPORTED_PROJECTIONS;
     145                    } else if (qName.equals("projections")) {
     146                        projections = new ArrayList<String>();
     147                        newState = State.PROJECTIONS;
    148148                    }
    149149                    break;
     
    163163                    }
    164164                    break;
    165                 case SUPPORTED_PROJECTIONS:
    166                     if (qName.equals("srs")) {
    167                         newState = State.SRS;
     165                case PROJECTIONS:
     166                    if (qName.equals("code")) {
     167                        newState = State.CODE;
    168168                    }
    169169                    break;
     
    271271                    shape = null;
    272272                    break;
    273                 case SRS:
    274                     supported_srs.add(accumulator.toString());
    275                     break;
    276                 case SUPPORTED_PROJECTIONS:
    277                     entry.setServerProjections(supported_srs);
    278                     supported_srs = null;
     273                case CODE:
     274                    projections.add(accumulator.toString());
     275                    break;
     276                case PROJECTIONS:
     277                    entry.setServerProjections(projections);
     278                    projections = null;
    279279                    break;
    280280            }
Note: See TracChangeset for help on using the changeset viewer.