- Timestamp:
- 2011-06-29T17:16:03+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/WMSLayer.java
r4183 r4184 927 927 res += p; 928 928 } 929 return tr("Supported projections are: { 1}", res);929 return tr("Supported projections are: {0}", res); 930 930 } 931 931 } -
trunk/src/org/openstreetmap/josm/io/imagery/WMSGrabber.java
r4183 r4184 78 78 try 79 79 { 80 Matcher m = Pattern.compile(".* srs=([a-z0-9:]+).*").matcher(baseURL.toUpperCase());80 Matcher m = Pattern.compile(".*SRS=([a-z0-9:]+).*", Pattern.CASE_INSENSITIVE).matcher(baseURL.toUpperCase()); 81 81 if(m.matches()) 82 82 { … … 112 112 113 113 if (urlWithPatterns) { 114 str = str.replaceAll("\\{proj \\}", myProj)114 str = str.replaceAll("\\{proj(\\([^})]+\\))?\\}", myProj) 115 115 .replaceAll("\\{bbox\\}", bbox) 116 116 .replaceAll("\\{w\\}", latLonFormat.format(w)) … … 138 138 try 139 139 { 140 Matcher m = Pattern.compile(".* srs=([a-z0-9:]+).*").matcher(baseURL.toUpperCase());140 Matcher m = Pattern.compile(".*\\{PROJ\\(([^)}]+)\\)\\}.*").matcher(baseURL.toUpperCase()); 141 141 if(m.matches()) 142 142 { 143 serverProjections.add(m.group(1)); 144 if(m.group(1).equals("EPSG:4326")) 143 boolean hasepsg = false; 144 for(String p : m.group(1).split(",")) 145 { 146 serverProjections.add(p); 147 if(p.equals("EPSG:4326")) 148 hasepsg = true; 149 } 150 if(hasepsg && !serverProjections.contains(new Mercator().toCode())) 145 151 serverProjections.add(new Mercator().toCode()); 146 152 } 147 /* TODO: here should be an "else" code checking server capabilities */ 153 else 154 { 155 m = Pattern.compile(".*SRS=([a-z0-9:]+).*", Pattern.CASE_INSENSITIVE).matcher(baseURL.toUpperCase()); 156 if(m.matches()) 157 { 158 serverProjections.add(m.group(1)); 159 if(m.group(1).equals("EPSG:4326")) 160 serverProjections.add(new Mercator().toCode()); 161 } 162 /* TODO: here should be an "else" code checking server capabilities */ 163 } 148 164 } 149 165 catch(Exception e)
Note:
See TracChangeset
for help on using the changeset viewer.