Changeset 13733 in josm for trunk/src/org/openstreetmap/josm/data/imagery/AbstractWMSTileSource.java
- Timestamp:
- 2018-05-12T14:18:57+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/imagery/AbstractWMSTileSource.java
r12669 r13733 3 3 4 4 import java.awt.Point; 5 import java.text.DecimalFormat; 6 import java.text.DecimalFormatSymbols; 7 import java.text.NumberFormat; 8 import java.util.Locale; 5 9 6 10 import org.openstreetmap.gui.jmapviewer.Projected; … … 24 28 public abstract class AbstractWMSTileSource extends TMSTileSource { 25 29 30 static final NumberFormat LATLON_FORMAT = new DecimalFormat("###0.0000000", new DecimalFormatSymbols(Locale.US)); 31 26 32 private EastNorth anchorPosition; 27 33 private int[] tileXMin; … … 209 215 return this.tileProjection.toCode(); 210 216 } 217 218 protected String getBbox(int zoom, int tilex, int tiley, boolean switchLatLon) { 219 EastNorth nw = getTileEastNorth(tilex, tiley, zoom); 220 EastNorth se = getTileEastNorth(tilex + 1, tiley + 1, zoom); 221 222 double w = nw.getX(); 223 double n = nw.getY(); 224 225 double s = se.getY(); 226 double e = se.getX(); 227 228 return ( 229 switchLatLon ? 230 String.format("%s,%s,%s,%s", 231 LATLON_FORMAT.format(s), LATLON_FORMAT.format(w), LATLON_FORMAT.format(n), LATLON_FORMAT.format(e)) 232 : 233 String.format("%s,%s,%s,%s", 234 LATLON_FORMAT.format(w), LATLON_FORMAT.format(s), LATLON_FORMAT.format(e), LATLON_FORMAT.format(n)) 235 236 ); 237 } 211 238 }
Note:
See TracChangeset
for help on using the changeset viewer.