Changeset 4017 in osm for applications/editors/josm
- Timestamp:
- 2007-08-08T21:07:16+02:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ywms/src/org/openstreetmap/josm/plugins/ywms/ImageLoader.java
r3574 r4017 4 4 import java.awt.image.*; 5 5 import java.io.*; 6 import java.net.MalformedURLException; 7 import java.net.URL; 6 import java.net.*; 8 7 import java.util.ArrayList; 9 8 import java.util.List; … … 52 51 53 52 /** THe yahoo URL request */ 54 private UR LyahooUrl;53 private URI yahooUrl; 55 54 /** Original bounding box */ 56 55 double[] orig_bbox = null; … … 81 80 System.out.println("YWMS::Requested WMS URL: " + wmsUrl); 82 81 try { 83 UR L request = new URL("file:///page" + wmsUrl);82 URI request = new URI("file:///page" + wmsUrl); 84 83 String query = request.getQuery().toLowerCase(); 85 yahooUrl = new File(Util.getPluginDir(), "ymap.html").toURI().toURL(); 86 yahooUrl = new URL( yahooUrl.toExternalForm() + "?" + query); 84 yahooUrl = new URI( "file", null, Util.getPluginDir() + "ymap.html", query, null); 87 85 88 86 // Parse query to find original bounding box and dimensions … … 106 104 load(); 107 105 } 108 catch ( MalformedURLException e) {106 catch (URISyntaxException e) { 109 107 throw new ImageLoaderException(e); 110 108 } … … 154 152 firefoxFiles.add(file); 155 153 156 URL browserUrl;157 try{158 browserUrl = new URL(url);159 if( browserUrl.sameFile(yahooUrl))154 try 155 { 156 URI browserUri = new URI(url); 157 if( yahooUrl.getPath().equals(browserUri.getPath())) 160 158 { 161 159 String status = st.nextToken(); … … 166 164 break; 167 165 } 168 } 169 catch (MalformedURLException mue) 170 { 166 } catch (URISyntaxException e) { 171 167 // Probably a mozilla "chrome://" URL. Do nothing 172 168 }
Note:
See TracChangeset
for help on using the changeset viewer.