public class ZXYTilesMapProvider extends LocalTileProviderBase
对接OSM等互联网的瓦片交换包的服务提供者。
要求:
1,瓦片包或瓦片目录的组织结构:/{mapName/layerName}/{level}/{x}/{y}.png
2,瓦片的坐标系是Web Mercator
3,瓦片的原点是(-20037508.3427892, 20037508.3427892)
4,瓦片的像素大小:256*256
5,所有瓦片地理范围:(-20037508.3427892,-20037508.3427892,20037508.3427892, 20037508.3427892)
TiledMapProviderBase.AcceptOnePicDrawer, TiledMapProviderBase.DefaultTileImageDrawer, TiledMapProviderBase.TileDataConverter, TiledMapProviderBase.TileImageDrawer, TiledMapProviderBase.TileImageParameter
localTileResource
CACHE_DIR, defaultMapParameters, dpi, LINK_MARK, lock, logger, message, QUESTION_MARK, REGEX, REPLACEMENT, tilePixHeight, tilePixWidth
构造器和说明 |
---|
ZXYTilesMapProvider() |
限定符和类型 | 方法和说明 |
---|---|
protected boolean |
cacheEnabled() |
protected void |
checkSetting(MapProviderSetting setting)
检查地图服务提供者配置。
|
void |
dispose()
释放资源对象。
|
protected Point2D |
getOrigin(java.lang.String mapName)
返回指定地图对应瓦片的原点
|
OutputFormat[] |
getSupportImageFormat(java.lang.String mapName)
返回支持的图片格式。
|
double[] |
getSupportResolutions(java.lang.String mapName)
返回当前服务支持的分辨率 。 |
double[] |
getSupportScales() |
protected byte[] |
getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
获取瓦片的像素矩阵
|
protected java.util.Map<java.lang.String,MapParameter> |
initDefaultMapParameter()
初始化默认地图状态,返回值为一个映射,键为地图名,值为地图参数对象。
|
protected boolean |
initLODInfos()
初始化瓦片元信息。
|
protected java.util.List<java.lang.String> |
initSupportedMapNames()
初始化支持的地图列表。
|
protected Point2D |
setTileOrigin(Rectangle2D bounds) |
boolean |
support(java.lang.String mapName, MapCapability capability)
判断地图是否支持相应功能。
|
checkLicense, generateBigImage, tileCacheReadOnly
clearAllCache, clearCache, fillWatermark, findNearest, getAccurateResolution, getBottom, getBottom, getBufferedImage, getDefaultMapParameter, getDefaultMapParameters, getLeft, getLeftIndex, getMapImage, getMapParameter, getMapProviderSetting, getNames, getOverview, getProximalResolution, getProximalResolution, getResolutoinByScale, getResource, getResource, getRight, getTileDataConverter, getTileIndex, getTop, getTop, getTopIndex, getTopOrBottomTileIndex, getVectorStyle, getVectorStyle, init, isResolutionEquals, measureArea, measureDistance, outputImage, outputImage, outputImageToFile, outputImageToFile, point2DConvert, queryByBounds, queryByDistance, queryByGeometry, queryBySQL, rectifyMapParameter, setDefaultMapParameter, setDefaultMapParameters, setMapProviderSetting, setProviderContext, updateMap, viewEntire
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFieldsByLayerName, getTileImage
protected byte[] getTileImage(TiledMapProviderBase.TileImageParameter tileParam)
获取瓦片的像素矩阵
getTileImage
在类中 LocalTileProviderBase
tileParam
-protected java.util.List<java.lang.String> initSupportedMapNames()
TiledMapProviderBase
initSupportedMapNames
在类中 TiledMapProviderBase
protected boolean initLODInfos()
protected java.util.Map<java.lang.String,MapParameter> initDefaultMapParameter()
TiledMapProviderBase
初始化默认地图状态,返回值为一个映射,键为地图名,值为地图参数对象。
initDefaultMapParameter
在类中 TiledMapProviderBase
protected Point2D setTileOrigin(Rectangle2D bounds)
public double[] getSupportScales()
public double[] getSupportResolutions(java.lang.String mapName)
TiledMapProviderBase
返回当前服务支持的分辨率 。如果支持所有分辨率,则返回空。
getSupportResolutions
在类中 TiledMapProviderBase
mapName
- 地图名public OutputFormat[] getSupportImageFormat(java.lang.String mapName)
TiledMapProviderBase
返回支持的图片格式。
getSupportImageFormat
在类中 TiledMapProviderBase
mapName
- 地图名protected Point2D getOrigin(java.lang.String mapName)
返回指定地图对应瓦片的原点
getOrigin
在类中 TiledMapProviderBase
mapName
-protected boolean cacheEnabled()
cacheEnabled
在类中 TiledMapProviderBase
public boolean support(java.lang.String mapName, MapCapability capability)
MapProvider
support
在接口中 MapProvider
support
在类中 TiledMapProviderBase
mapName
- 地图名。capability
- 功能类型。protected void checkSetting(MapProviderSetting setting)
TiledMapProviderBase
checkSetting
在类中 TiledMapProviderBase
public void dispose()
TiledMapProviderBase
释放资源对象。
dispose
在接口中 Disposable
dispose
在类中 TiledMapProviderBase