public class WMSLayerView extends AbstractTileLayerView
WMS图层视图,作为地图视图的子项添加到 MapView
中显示。 WMS图层视图用于显示 标准OGC服务 的 WMS 地图服务。
addToNetworkDownload, context, crs, curMapUrl, dpi, isGCSLayer, isLayerInited, layerBounds, layerCacheFileName, layerName, mapView, projection, resolutions, tileCount, totalTileCount, visible, visibleScales, zoomLevel
构造器和说明 |
---|
WMSLayerView(Context context)
构造函数。
|
WMSLayerView(Context context, AttributeSet attrs)
构造函数。
|
WMSLayerView(Context context, AttributeSet attrs, int defStyle)
构造函数。
|
WMSLayerView(Context context, java.lang.String url, java.lang.String version, java.lang.String layers)
构造函数。
|
WMSLayerView(Context context, java.lang.String url, java.lang.String version, java.lang.String layers, java.lang.String crs, BoundingBox boundingBox)
构造函数。
|
限定符和类型 | 方法和说明 |
---|---|
void |
initTileContext(Tile tile)
初始化tile瓦片,具体继承类实现该接口。
|
void |
setBgcolor(java.lang.String colorStr)
设置背景色,其为十六进制红绿蓝颜色值(默认为 0xFFFFFF)。
|
void |
setBounds(BoundingBox boundingBox)
设置wms地图服务的地理范围,其中必须left小于right,bottom小于top.
|
void |
setBounds(double left, double bottom, double right, double top)
设置wms地图服务的地理范围,其中必须left小于right,bottom小于top.
|
void |
setCRS(java.lang.String crs)
设置坐标参考系统。
|
void |
setFormat(java.lang.String format)
地图的输出格式。
|
void |
setStyles(java.lang.String styles)
设置请求图层的样式列表,图层样式之间以英文逗号分隔。
|
void |
setTransparent(boolean transparent)
设置地图的背景是否透明(默认为 false)。
|
asyncGetTilesFromCache, buildTile, clearCache, destroy, getBounds, getCRS, getMapView, getResolutionIndex, getResolutions, getScales, getTileCacher, getURL, getZoomLevel, initProjection, isGCSLayer, isInitialized, isVisible, onDraw, setCRS, setLayerCacheFileName, setOpaqueRate, setURL, setVisible, validateZoomLevel
public WMSLayerView(Context context)
构造函数。
context
- Activity的上下文。public WMSLayerView(Context context, AttributeSet attrs)
构造函数。
context
- Activity的上下文。attrs
- 属性信息。public WMSLayerView(Context context, AttributeSet attrs, int defStyle)
构造函数。
context
- Activity的上下文。attrs
- 属性信息。defStyle
- 风格标识。public WMSLayerView(Context context, java.lang.String url, java.lang.String version, java.lang.String layers)
构造函数。
context
- Activity的上下文。url
- wms地图服务的 urlversion
- wms的版本号,1.1.1和1.3.0layers
- 地图图层列表。地图图层之间以半角英文逗号进行分隔,如0.1,0.2,写0代表地图全部图层。 最左边的图层在最底,下一个图层放到前一个的上面,依次类推。图层名称是服务元数据中的
public WMSLayerView(Context context, java.lang.String url, java.lang.String version, java.lang.String layers, java.lang.String crs, BoundingBox boundingBox)
构造函数。
context
- Activity的上下文。url
- wms地图服务的 urlversion
- wms的版本号,1.1.1和1.3.0layers
- 地图图层列表。地图图层之间以半角英文逗号进行分隔,如0.1,0.2,写0代表地图全部图层。 最左边的图层在最底,下一个图层放到前一个的上面,依次类推。图层名称是服务元数据中的
crs
- 坐标参考系统字符串,如EPSG:4326;该参数值应该是 GetCapabilities 操作中服务器声明的 CRS。boundingBox
- wms地图服务的地理范围,其中必须leftpublic void setCRS(java.lang.String crs)
设置坐标参考系统。该参数值应该是 GetCapabilities 操作中服务器声明的 CRS。 如果请求包含了一个服务器不支持的 CRS,服务器将抛出一个服务异常(code = “InvalidCRS”)。
crs
- 坐标参考系统字符串,如EPSG:4326(默认),EPSG:3857等public void setBounds(double left, double bottom, double right, double top)
设置wms地图服务的地理范围,其中必须left小于right,bottom小于top.
left
- 地理范围左bottom
- 地理范围下right
- 地理范围右top
- 地理范围上public void setBounds(BoundingBox boundingBox)
设置wms地图服务的地理范围,其中必须left小于right,bottom小于top.
boundingBox
- 地理范围public void setFormat(java.lang.String format)
地图的输出格式。WMS 服务器的 capabilities 文档中声明的 GetMap 中的 Format 之一。 如image/png,image/bmp,image/jpeg,image/gif
format
- 输出格式,如image/pngpublic void setBgcolor(java.lang.String colorStr)
设置背景色,其为十六进制红绿蓝颜色值(默认为 0xFFFFFF)。
color
-public void setTransparent(boolean transparent)
设置地图的背景是否透明(默认为 false)。
transparent
- 是否透明public void setStyles(java.lang.String styles)
设置请求图层的样式列表,图层样式之间以英文逗号分隔。 STYLES 值与 LAYERS 参数值是一一对应的。图层名称是服务元数据中定义的