Summary
Methods:
setStyle |
设置样式,重新设置需要等数据加载完成后调用 |
Constructor
new FGBPolygonLayer(options, onloaded)
构造函数
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 初始化参数,一个JSON对象。
|
||||||||||||||||||||||||||||||
onloaded |
function | undefined | 因为读取流是异步的过程,这里增加读取完成后回调 |
Example
let options = {
url:"https://localhost/hmappublish/service/rs/v1/vectorfeature/flatgeobuf/ordinary_area"
style:{
color: [255, 0, 0, 1],
outlineColor: [0, 1, 0, 1],
outlineWidth: 1,
opacity: 1
}
};
let fgbLayer = new hmap.layer.FGBPolygonLayer(options);
map.addLayer(fgbLayer);
Members
-
clampToGround
-
设置贴地状态
- Overrides:
Methods
-
setStyle(style)
-
设置样式,重新设置需要等数据加载完成后调用
Parameters:
Name Type Description style
Object 具体格式参考图层初始化style参数。