ImageOverlay
概述
在地图的特定范围加载显示一张图片,实现ILayer接口
用法示例
var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',
imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
FMap.imageOverlay(imageUrl, imageBounds).addTo(map);
创建(Creation)
创建 |
描述 |
FMap.ImageOverlay( <String> imageUrl, <LatLngBounds> bounds, <ImageOverlay options> options? ) |
设置图片url、展示的地理范围和可选的option对象实例化一个tileLayer,wms对象 |
选项(Options)
选项 |
类型 |
默认值 |
描述 |
opacity |
Number |
1 |
图片的不透明度 |
attribution |
String |
'' |
图片层的属性文本 |
方法(Methods)
方法 |
参数 |
返回值 |
描述 |
addTo() |
<Map> map |
this |
添加overlay到地图中 |
setOpacity() |
<Number> opacity |
this |
设置overlay的不透明度 |
setUrl() |
<String> imageUrl |
this |
改变image的url地址 |
bringToFront() |
无 |
this |
移动图层到所有overlay的顶部 |
bringToBack() |
无 |
this |
移动图层到所有overlay的底部 |