public class WMSGrabber extends java.lang.Object implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
protected ProjectionBounds |
b |
protected java.lang.String |
baseURL |
protected boolean |
canceled |
private ImageryInfo |
info |
static java.text.NumberFormat |
latLonFormat |
protected WMSLayer |
layer |
private boolean |
localOnly |
protected MapView |
mv |
private java.util.Map<java.lang.String,java.lang.String> |
props |
Constructor and Description |
---|
WMSGrabber(MapView mv,
WMSLayer layer,
boolean localOnly)
Constructs a new
WMSGrabber . |
Modifier and Type | Method and Description |
---|---|
protected void |
attempt(WMSRequest request) |
void |
cancel() |
private void |
fetch(WMSRequest request,
int attempt) |
protected java.net.URL |
getURL(double w,
double s,
double e,
double n,
int wi,
int ht) |
protected java.awt.image.BufferedImage |
grab(WMSRequest request,
java.net.URL url,
int attempt) |
(package private) int |
height() |
boolean |
loadFromCache(WMSRequest request) |
static int |
random(int min,
int max) |
protected java.lang.String |
readException(java.net.URLConnection conn) |
void |
run() |
(package private) int |
width() |
private final boolean localOnly
protected ProjectionBounds b
protected volatile boolean canceled
protected java.lang.String baseURL
private ImageryInfo info
private java.util.Map<java.lang.String,java.lang.String> props
public static final java.text.NumberFormat latLonFormat
public WMSGrabber(MapView mv, WMSLayer layer, boolean localOnly)
WMSGrabber
.mv
- Map viewlayer
- WMS layerint width()
int height()
public void run()
run
in interface java.lang.Runnable
protected void attempt(WMSRequest request)
public static int random(int min, int max)
public final void cancel()
private void fetch(WMSRequest request, int attempt) throws java.io.IOException, WMSException
java.io.IOException
WMSException
protected java.net.URL getURL(double w, double s, double e, double n, int wi, int ht) throws java.net.MalformedURLException
java.net.MalformedURLException
public boolean loadFromCache(WMSRequest request)
protected java.awt.image.BufferedImage grab(WMSRequest request, java.net.URL url, int attempt) throws WMSException, java.io.IOException, OsmTransferException
WMSException
java.io.IOException
OsmTransferException
protected java.lang.String readException(java.net.URLConnection conn) throws java.io.IOException
java.io.IOException