Changeset 11124 in josm


Ignore:
Timestamp:
2016-10-12T20:22:53+02:00 (10 months ago)
Author:
simon04
Message:

see #13749 - Enhance supported URLs for downloading GPS data

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java

    r11073 r11124  
    4242    private static final String PATTERN_TRACE_ID = "https?://.*(osm|openstreetmap).org/trace/\\p{Digit}+/data";
    4343    private static final String PATTERN_USER_TRACE_ID = "https?://.*(osm|openstreetmap).org/user/[^/]+/traces/(\\p{Digit}+)";
    44     private static final String PATTERN_EDIT_TRACE_ID = "https?://.*(osm|openstreetmap).org/edit/?\\?gpx=(\\p{Digit}+)";
     44    private static final String PATTERN_EDIT_TRACE_ID = "https?://.*(osm|openstreetmap).org/edit/?\\?gpx=(\\p{Digit}+)(#.*)?";
    4545
    4646    private static final String PATTERN_TRACKPOINTS_BBOX = "https?://.*/api/0.6/trackpoints\\?bbox=.*,.*,.*,.*";
  • trunk/test/unit/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTaskTest.java

    r11073 r11124  
    4444        assertTrue(task.acceptsUrl("https://www.openstreetmap.org/user/simon04/traces/750057"));
    4545        assertTrue(task.acceptsUrl("https://www.openstreetmap.org/edit?gpx=750057"));
     46        assertTrue(task.acceptsUrl("http://www.openstreetmap.org/edit?gpx=2277313#map=14/-20.7321/-40.5328"));
    4647        assertTrue(task.acceptsUrl(REMOTE_FILE));
    4748    }
Note: See TracChangeset for help on using the changeset viewer.