Ignore:
Timestamp:
2014-09-21T23:00:38+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #7976 - Get downloaded gpx areas, on the same model as osm data

File:
1 edited

Legend:

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

    r7518 r7575  
    2121
    2222import org.openstreetmap.josm.Main;
     23import org.openstreetmap.josm.data.Bounds;
    2324import org.openstreetmap.josm.data.coor.LatLon;
    2425import org.openstreetmap.josm.data.gpx.Extensions;
     
    3839 * Read a gpx file.
    3940 *
    40  * Bounds are not read, as we caluclate them. @see GpxData.recalculateBounds()
     41 * Bounds are read, even if we calculate them, see {@link GpxData#recalculateBounds}.<br>
    4142 * Both GPX version 1.0 and 1.1 are supported.
    4243 *
     
    7374        private boolean nokiaSportsTrackerBug = false;
    7475
    75         @Override public void startDocument() {
     76        @Override
     77        public void startDocument() {
    7678            accumulator = new StringBuffer();
    7779            states = new Stack<>();
     
    162164                    currentState = State.link;
    163165                    currentLink = new GpxLink(atts.getValue("href"));
     166                    break;
     167                case "bounds":
     168                    data.put(META_BOUNDS, new Bounds(
     169                                parseCoord(atts.getValue("minlat")),
     170                                parseCoord(atts.getValue("minlon")),
     171                                parseCoord(atts.getValue("maxlat")),
     172                                parseCoord(atts.getValue("maxlon"))));
    164173                }
    165174                break;
     
    312321                        break;
    313322                    }
     323                case "bounds":
     324                    // do nothing, has been parsed on startElement
     325                    break;
    314326                default:
    315                     //TODO: parse bounds, extensions
     327                    //TODO: parse extensions
    316328                }
    317329                break;
Note: See TracChangeset for help on using the changeset viewer.