public abstract class RemoteTileProviderBase extends TiledMapProviderBase
Modifier and Type | Class and Description |
---|---|
protected static interface |
RemoteTileProviderBase.GetDefaultImageWhenException |
TiledMapProviderBase.TileDataConverter, TiledMapProviderBase.TileImageDrawer, TiledMapProviderBase.TileImageParameter
Modifier and Type | Field and Description |
---|---|
protected static int |
SEND_REQUEST_COUNT
When the network is not good, the failures times for accessing url.
|
CACHE_DIR, LINK_MARK, lock, logger, message, QUESTION_MARK, REGEX, REPLACEMENT, tilePixHeight, tilePixWidth
Constructor and Description |
---|
RemoteTileProviderBase() |
RemoteTileProviderBase(MapProviderSetting setting) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Release the resource object.
|
protected java.util.concurrent.atomic.AtomicBoolean |
generateBigImage(TiledMapProviderBase.TileImageDrawer drawer, TiledMapProviderBase.TileImageParameter[] tileImageParameters) |
protected java.lang.String |
getContent(java.lang.String url, java.lang.String method, int number)
For the specified URL HTTP request, get the response content.
|
protected java.lang.String |
getContent(java.lang.String url, java.lang.String method, int number, java.io.InputStream entityStream) |
protected java.lang.String |
getContent(java.lang.String url, java.lang.String method, int number, java.io.InputStream entityStream, java.util.Map<java.lang.String,java.lang.String> headers)
For the specified URL HTTP request, get the response content.
|
protected byte[] |
getImageBySendURL(java.lang.String tileImageUrl)
Gets a picture based on url
|
protected byte[] |
getImageBySendURL(java.lang.String tileImageUrl, RemoteTileProviderBase.GetDefaultImageWhenException exceptionOpertor)
Gets a picture based on url
|
protected byte[] |
getTileImage(TiledMapProviderBase.TileImageParameter tileParam) |
protected abstract java.lang.String |
getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam) |
protected void |
init(MapProviderSetting setting)
Initialization function.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
sendRequestByHttpURLConnection(java.lang.String urlStr, java.lang.String method, java.io.InputStream requestStream, int number)
Send an HTTP request via
HttpURLConnection . |
protected java.util.Map<java.lang.String,java.lang.Object> |
sendRequestByHttpURLConnection(java.lang.String urlStr, java.lang.String method, java.io.InputStream requestStream, java.util.Map<java.lang.String,java.lang.String> headers, int number) |
MapImage |
viewEntire(java.lang.String layerName, MapParameter mapParameter, ImageOutputOption outputOption)
Displays a map in the Full Extent mode according to map layer name, map parameters and image output settings.
|
cacheEnabled, checkSetting, clearCache, fillWatermark, findNearest, getDefaultMapParameter, getDefaultMapParameters, getMapImage, getMapParameter, getMapProviderSetting, getNames, getOrigin, getOverview, getProximalResolution, getProximalResolution, getResolutoinByScale, getResource, getResource, getSupportImageFormat, getSupportResolutions, getTileDataConverter, getVectorStyle, initDefaultMapParameter, initSupportedMapNames, isResolutionEquals, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, support, updateMap
protected static final int SEND_REQUEST_COUNT
public RemoteTileProviderBase()
public RemoteTileProviderBase(MapProviderSetting setting)
protected void init(MapProviderSetting setting)
TiledMapProviderBase
Initialization function. This function does not carry on null judgment on parameter, but it may judge the correction of the contents.
init
in class TiledMapProviderBase
setting
- The configuration object of service provider.protected java.util.concurrent.atomic.AtomicBoolean generateBigImage(TiledMapProviderBase.TileImageDrawer drawer, TiledMapProviderBase.TileImageParameter[] tileImageParameters)
generateBigImage
in class TiledMapProviderBase
public MapImage viewEntire(java.lang.String layerName, MapParameter mapParameter, ImageOutputOption outputOption)
MapProvider
Displays a map in the Full Extent mode according to map layer name, map parameters and image output settings.
The full geographic map extent to display is the minimum circumscribed rectangle of the specified layer.
viewEntire
in interface MapProvider
viewEntire
in class TiledMapProviderBase
layerName
- Layer name, used to determine the full map extent.mapParameter
- Map parameters.outputOption
- Image output settings.protected byte[] getImageBySendURL(java.lang.String tileImageUrl, RemoteTileProviderBase.GetDefaultImageWhenException exceptionOpertor)
tileImageUrl
-exceptionOpertor
- When there is an exception to the operationprotected java.lang.String getContent(java.lang.String url, java.lang.String method, int number, java.io.InputStream entityStream)
protected java.lang.String getContent(java.lang.String url, java.lang.String method, int number, java.io.InputStream entityStream, java.util.Map<java.lang.String,java.lang.String> headers)
For the specified URL HTTP request, get the response content.
url
- The specified URL .method
- An HTTP method that executes a URI, such as "GET".number
- The number of requests.entityStream
- The request body for POST request.protected java.lang.String getContent(java.lang.String url, java.lang.String method, int number)
For the specified URL HTTP request, get the response content.
url
- The specified URL .method
- An HTTP method that executes a URI, such as "GET".number
- The number of requestsprotected java.util.Map<java.lang.String,java.lang.Object> sendRequestByHttpURLConnection(java.lang.String urlStr, java.lang.String method, java.io.InputStream requestStream, java.util.Map<java.lang.String,java.lang.String> headers, int number)
protected java.util.Map<java.lang.String,java.lang.Object> sendRequestByHttpURLConnection(java.lang.String urlStr, java.lang.String method, java.io.InputStream requestStream, int number)
Send an HTTP request via HttpURLConnection
.
urlStr
- Request URI.method
- HTTP methods such as "GET".requestStream
- Request stream.protected byte[] getImageBySendURL(java.lang.String tileImageUrl)
tileImageUrl
-protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
public void dispose()
TiledMapProviderBase
Release the resource object.
dispose
in interface Disposable
dispose
in class TiledMapProviderBase
protected abstract java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)