Changeset 10735 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java
r10577 r10735 685 685 defaultMinZoom = 0; 686 686 for (ImageryType type : ImageryType.values()) { 687 Matcher m = Pattern.compile(type.getTypeString()+"(?:\\[(?:(\\d+) ,)?(\\d+)\\])?:(.*)").matcher(url);687 Matcher m = Pattern.compile(type.getTypeString()+"(?:\\[(?:(\\d+)[,-])?(\\d+)\\])?:(.*)").matcher(url); 688 688 if (m.matches()) { 689 689 this.url = m.group(3); -
trunk/test/unit/org/openstreetmap/josm/data/imagery/ImageryInfoTest.java
r10378 r10735 43 43 44 44 /** 45 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13264">Bug #13264</a>. 46 */ 47 @Test 48 public void testConstruct13264() { 49 final ImageryInfo info = new ImageryInfo("test imagery", "tms[16-23]:http://localhost"); 50 assertEquals(ImageryInfo.ImageryType.TMS, info.getImageryType()); 51 assertEquals(16, info.getMinZoom()); 52 assertEquals(23, info.getMaxZoom()); 53 assertEquals("http://localhost", info.getUrl()); 54 } 55 56 /** 45 57 * Tests the {@linkplain Preferences#serializeStruct(Object, Class) serialization} of {@link ImageryInfo.ImageryPreferenceEntry} 46 58 */
Note:
See TracChangeset
for help on using the changeset viewer.