Ignore:
Timestamp:
2008-10-22T16:38:56+02:00 (16 years ago)
Author:
stoecker
Message:

some fixes

Location:
applications/editors/josm/plugins/wmsplugin/src/wmsplugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java

    r10684 r11400  
    6363        protected URL getURL(double w, double s,double e,double n,
    6464                        int wi, int ht) throws MalformedURLException {
    65                 String str = baseURL + "&bbox="
     65                String str = baseURL;
     66                if(!str.endsWith("?"))
     67                        str += "&";
     68                str += "bbox="
    6669                        + latLonFormat.format(w) + ","
    6770                        + latLonFormat.format(s) + ","
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/YAHOOGrabber.java

    r11398 r11400  
    66import java.awt.Image;
    77import java.net.URL;
     8import java.io.IOException;
     9import java.text.MessageFormat;
    810import java.util.ArrayList;
    9 import java.io.IOException;
    10 
    1111import java.util.StringTokenizer;
    1212
     
    3232        protected BufferedImage grab(URL url) throws IOException {
    3333                ArrayList<String> cmdParams = new ArrayList<String>();
    34                
    35                 StringTokenizer st = new StringTokenizer(tr(browserCmd, url.toString()));
    36                 while( st.hasMoreTokens() )
     34                String urlstring = url.toExternalForm();
     35                // work around a problem in URL removing 2 slashes
     36                if(!urlstring.startsWith("file:///"))
     37                        urlstring = urlstring.replaceFirst("file:", "file://");
     38                StringTokenizer st = new StringTokenizer(MessageFormat.format(browserCmd, urlstring));
     39                while( st.hasMoreTokens() )
    3740                        cmdParams.add(st.nextToken());
    3841
Note: See TracChangeset for help on using the changeset viewer.