Changeset 10635 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/GeoUrlToBounds.java
r10630 r10635 15 15 public final class GeoUrlToBounds { 16 16 17 public static final Pattern PATTERN = Pattern.compile("geo:(?<lat>[ 0-9.]+),(?<lon>[0-9.]+)(\\?z=(?<zoom>[0-9]+))?");17 public static final Pattern PATTERN = Pattern.compile("geo:(?<lat>[+-]?[0-9.]+),(?<lon>[+-]?[0-9.]+)(\\?z=(?<zoom>[0-9]+))?"); 18 18 19 19 private GeoUrlToBounds() { -
trunk/test/unit/org/openstreetmap/josm/tools/GeoUrlToBoundsTest.java
r10630 r10635 33 33 is(OsmUrlToBounds.positionToBounds(12.34, 56.78, 18)) 34 34 ); 35 assertThat( 36 GeoUrlToBounds.parse("geo:-37.786971,-122.399677"), 37 is(OsmUrlToBounds.positionToBounds(-37.786971, -122.399677, 18)) 38 ); 35 39 } 36 40
Note:
See TracChangeset
for help on using the changeset viewer.