Skip to content

AddData

支持通过url等方式将数据添加到地图视图中。

<mapgis-add-data></mapgis-add-data>

<mapgis-add-data-url></mapgis-add-data-url>

基本用法

在线底图

API

以下 API 为 AddData、AddDataUrl 共享的 API。

属性

参数说明类型默认值版本
serviceRootUrl服务根地址,形如:http(s)://<server>:<port>/igs/rest/servicesstring
serviceRootToken服务根令牌string
serviceType服务类型,来自于@mapgis/webclient-common中LayerType的常量值string
showMode服务类型显示模式,可取值2D、3D、all2D|3D|allall
supportThirdPartyServices是否支持第三方服务,第三方服务无法从服务器选择,只能输入booleantrue
dropdownWidth服务选择下拉框宽度,单位像素number

事件

事件名称说明回调参数版本
add数据添加完毕{layerOptions, layer}

AddData 属性

参数说明类型默认值版本
defaultActiveKey默认激活的标签页keystringurl
beforeUrlTabsurl标签之前的tab列表slot
afterUrlTabsurl标签之后的tab列表slot

LayerOptions

javascript
{
  title
  type
  url
  tokenKey
  tokenValue
  tokenAttachType
}