Changeset 12090 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2017-05-08T22:03:16+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r11847 r12090 47 47 if (b != null) 48 48 return b; 49 if (url.contains("#map")) { 49 if (url.contains("#map") || url.contains("/#")) { 50 50 // probably it's a URL following the new scheme? 51 51 return parseHashURLs(url); … … 95 95 */ 96 96 private static Bounds parseHashURLs(String url) { 97 int startIndex = url.indexOf( "#map=");97 int startIndex = url.indexOf('#'); 98 98 if (startIndex == -1) return null; 99 99 int endIndex = url.indexOf('&', startIndex); 100 100 if (endIndex == -1) endIndex = url.length(); 101 String coordPart = url.substring(startIndex+ 5, endIndex);101 String coordPart = url.substring(startIndex+(url.contains("#map=") ? "#map=".length() : "#".length()), endIndex); 102 102 String[] parts = coordPart.split("/"); 103 103 if (parts.length < 3) {
Note:
See TracChangeset
for help on using the changeset viewer.