public abstract class RemoteTileProviderBase extends TiledMapProviderBase
限定符和类型 | 类和说明 |
---|---|
protected static interface |
RemoteTileProviderBase.GetDefaultImageWhenException |
TiledMapProviderBase.AcceptOnePicDrawer, TiledMapProviderBase.DefaultTileImageDrawer, TiledMapProviderBase.TileDataConverter, TiledMapProviderBase.TileImageDrawer, TiledMapProviderBase.TileImageParameter
限定符和类型 | 字段和说明 |
---|---|
protected static LocLogger |
logger |
protected static ResourceManager |
message |
protected static int |
SEND_REQUEST_COUNT
网络不好时,请求URL失败的重试次数。
|
CACHE_DIR, defaultMapParameters, dpi, LINK_MARK, lock, QUESTION_MARK, REGEX, REPLACEMENT, tilePixHeight, tilePixWidth
构造器和说明 |
---|
RemoteTileProviderBase() |
RemoteTileProviderBase(MapProviderSetting setting) |
限定符和类型 | 方法和说明 |
---|---|
void |
checkLicense() |
void |
dispose()
释放资源对象。
|
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)
对指定 URLHTTP 请求, 获取响应内容。
|
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)
对指定 URLHTTP 请求, 获取响应内容。
|
java.lang.String |
getFinalConnectionURL(java.lang.String tileImageUrl) |
protected byte[] |
getImageBySendURL(java.lang.String tileImageUrl)
根据url获得图片
|
protected byte[] |
getImageBySendURL(java.lang.String tileImageUrl, RemoteTileProviderBase.GetDefaultImageWhenException exceptionOpertor)
根据url获得图片
|
protected byte[] |
getTileImage(TiledMapProviderBase.TileImageParameter tileParam) |
protected abstract java.lang.String |
getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam) |
protected void |
init(MapProviderSetting setting)
初始化函数,该函数不对参数进行null判断,但是尽可能对其中的内容进行正确性判断
|
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)
通过
HttpURLConnection 发送HTTP请求。 |
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) |
protected boolean |
tileCacheReadOnly() |
MapImage |
viewEntire(java.lang.String layerName, MapParameter mapParameter, ImageOutputOption outputOption)
根据地图图层名、地图参数以及图片输出设置进行全幅显示。
|
cacheEnabled, checkSetting, clearAllCache, clearCache, fillWatermark, findNearest, getAccurateResolution, getBottom, getBottom, getBufferedImage, getDefaultMapParameter, getDefaultMapParameters, getLeft, getLeftIndex, getMapImage, getMapParameter, getMapProviderSetting, getNames, getOrigin, getOverview, getProximalResolution, getProximalResolution, getResolutoinByScale, getResource, getResource, getRight, getSupportImageFormat, getSupportResolutions, getTileDataConverter, getTileIndex, getTop, getTop, getTopIndex, getTopOrBottomTileIndex, getVectorStyle, getVectorStyle, initDefaultMapParameter, initSupportedMapNames, isResolutionEquals, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, point2DConvert, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, support, updateMap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFieldsByLayerName, getTileImage
protected static ResourceManager message
protected static final LocLogger logger
protected static final int SEND_REQUEST_COUNT
public RemoteTileProviderBase()
public RemoteTileProviderBase(MapProviderSetting setting)
protected void init(MapProviderSetting setting)
TiledMapProviderBase
初始化函数,该函数不对参数进行null判断,但是尽可能对其中的内容进行正确性判断
init
在类中 TiledMapProviderBase
setting
- 服务提供者配置对象public final void checkLicense()
checkLicense
在类中 TiledMapProviderBase
protected boolean tileCacheReadOnly()
tileCacheReadOnly
在类中 TiledMapProviderBase
protected java.util.concurrent.atomic.AtomicBoolean generateBigImage(TiledMapProviderBase.TileImageDrawer drawer, TiledMapProviderBase.TileImageParameter[] tileImageParameters)
generateBigImage
在类中 TiledMapProviderBase
public MapImage viewEntire(java.lang.String layerName, MapParameter mapParameter, ImageOutputOption outputOption)
MapProvider
根据地图图层名、地图参数以及图片输出设置进行全幅显示。
参数中指定的图层名称是指以该图层内容的最小外接矩形作为全幅显示的地理范围。
viewEntire
在接口中 MapProvider
viewEntire
在类中 TiledMapProviderBase
layerName
- 地图图层名,即以该图层的最小外接矩形作为全幅显示的地理范围。mapParameter
- 地图参数。outputOption
- 图片输出设置。protected byte[] getImageBySendURL(java.lang.String tileImageUrl, RemoteTileProviderBase.GetDefaultImageWhenException exceptionOpertor)
tileImageUrl
-exceptionOpertor
- 当存在异常执行的操作public java.lang.String getFinalConnectionURL(java.lang.String tileImageUrl)
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)
对指定 URLHTTP 请求, 获取响应内容。
url
- 指定的URI。method
- 对 URI 执行的 HTTP 方法,如“GET”。number
- 请求次数。entityStream
- POST请求时的请求体。protected java.lang.String getContent(java.lang.String url, java.lang.String method, int number)
对指定 URLHTTP 请求, 获取响应内容。
url
- 指定的URI。method
- 对 URI 执行的 HTTP 方法,如“GET”。number
- 请求次数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)
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)
通过 HttpURLConnection
发送HTTP请求。
urlStr
- 请求 URI。method
- HTTP 方法,如“GET”。requestStream
- 请求体流。protected byte[] getImageBySendURL(java.lang.String tileImageUrl)
tileImageUrl
-protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
public void dispose()
TiledMapProviderBase
释放资源对象。
dispose
在接口中 Disposable
dispose
在类中 TiledMapProviderBase
protected abstract java.lang.String getTileImageUrl(TiledMapProviderBase.TileImageParameter tileParam)