LayerListWidget 是一个图层列表组件,用来展示和管理当前场景中的图层。
Name | Type | Description |
---|---|---|
options.viewer |
Viewer | optional 查看器实例。 |
options.aliasJsonUrl |
Array.<String> | optional 图层别名json文件路径,默认值为null。 |
Example:
// 创建一个图层列表组件,并添加到场景左上角
const layerListwidget = new SuperMap3D.LayerListWidget({
viewer: viewer,
aliasJsonUrl: './layerListAlias.json',
})
viewer.reactiveWidgetUI.add(layerListwidget, "top-left");
// layerListAlias.json格式
{
"Ground_Daolu@CBD": "道路",
......
}