Ignore:
Timestamp:
2008-02-04T15:10:54+01:00 (17 years ago)
Author:
gabriel
Message:

wmsplugin: Don't use scientific notation for coordinates in the URL.

File:
1 edited

Legend:

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

    r5319 r6774  
    1717import java.net.MalformedURLException;
    1818import java.net.URL;
     19import java.text.DecimalFormat;
     20import java.text.NumberFormat;
    1921
    2022import javax.imageio.ImageIO;
     
    119121        }
    120122
     123        public static NumberFormat latLonFormat = new DecimalFormat("###0.0000000");
     124
    121125        protected URL doGetURL(double w,double s,double e,double n, int wi,
    122126                                        int ht) throws MalformedURLException
    123127        {
    124                 String str = constURL + "&bbox=" + w +"," + s + ","+
    125                                 e+","+n + "&width=" + wi + "&height=" + ht;
     128                String str = constURL + "&bbox="
     129                        + latLonFormat.format(w) + ","
     130                        + latLonFormat.format(s) + ","
     131                        + latLonFormat.format(e) + ","
     132                        + latLonFormat.format(n)
     133                        + "&width=" + wi + "&height=" + ht;
    126134                return new URL(str.replace(" ", "%20"));
    127135        }
Note: See TracChangeset for help on using the changeset viewer.