Changeset 6119 in josm for trunk/src/org
- Timestamp:
- 2013-08-08T19:49:02+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/OsmUrlToBounds.java
r6118 r6119 85 85 private static Bounds parseHashURLs(String url) { 86 86 int startIndex = url.indexOf("="); 87 if (startIndex == -1) return null; 87 88 int endIndex = url.indexOf("&"); 88 String coordPart = url.substring(startIndex+1, endIndex); 89 System.out.println(coordPart); 90 91 String[] parts = coordPart.split("/"); 92 Bounds b = positionToBounds(Double.parseDouble(parts[1]), 93 Double.parseDouble(parts[2]), 94 Integer.parseInt(parts[0])); 95 return b; 89 if (endIndex == -1) endIndex = url.length(); 90 try 91 { 92 String coordPart = url.substring(startIndex+1, endIndex); 93 String[] parts = coordPart.split("/"); 94 Bounds b = positionToBounds(Double.parseDouble(parts[1]), 95 Double.parseDouble(parts[2]), 96 Integer.parseInt(parts[0])); 97 return b; 98 } 99 catch(Exception ex) 100 { 101 return null; 102 } 96 103 } 97 104
Note:
See TracChangeset
for help on using the changeset viewer.