v-openlayers 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,36 +1,43 @@
1
- [toc]
1
+ [TOC]
2
+
3
+ ## v-openlayers
4
+
5
+ [最新文档](https://note.youdao.com/ynoteshare/index.html?id=0e2ae0a280cc6b82d257eb073d043b74\&type=note&_time=1694753902887)
6
+
7
+ [mapConfig.js](https://note.youdao.com/s/NDDcBw2i)
2
8
 
3
- ## v-openlayers
4
- [最新文档](https://note.youdao.com/ynoteshare/index.html?id=0e2ae0a280cc6b82d257eb073d043b74&type=note&_time=1694753902887)
5
9
  ## 版本
6
- ```
7
- v2.0.0
8
- ```
10
+
11
+ v2.0.0
9
12
 
10
13
  ## 简介
14
+
11
15
  基于vue3+openlayers封装的组件库
16
+
12
17
  ## 作者
13
- ```
14
- kangjinrui<1092014304@qq.com>
15
- ```
18
+
19
+ kangjinrui<1092014304@qq.com>
20
+
16
21
  ## 开始使用
22
+
17
23
  ### 安装
18
- ```
19
- npm install v-openlayers --save
20
- ```
24
+
25
+ npm install v-openlayers --save
26
+
21
27
  ### 按需引入组件
22
- ```
23
- import { OlMap } from 'v-openlayers'
24
- ```
28
+
29
+ import { OlMap } from 'v-openlayers'
30
+
25
31
  ### 按需引入库
26
- ```
27
- import { OlHandler } from 'v-openlayers'
28
- ```
32
+
33
+ import { OlHandler } from 'v-openlayers'
34
+
29
35
  ### 全局引入组件
30
- ```
31
- import VMap from 'v-openlayers'
32
- vue.use(VMap)
33
- ```
36
+
37
+ import VMap from 'v-openlayers'
38
+ vue.use(VMap)
39
+
40
+ ## ***注意:以下所有地图相关组件均需在OlMap容器内使用***
34
41
 
35
42
  ## 1.地图组件
36
43
 
@@ -38,249 +45,479 @@ vue.use(VMap)
38
45
 
39
46
  #### Example
40
47
 
48
+ <OlMap
49
+ class="app-content"
50
+ show-basemapbar
51
+ show-toolbar
52
+ @ready="handleMapReady"
53
+ ></OlMap>
54
+
55
+ #### Attributes
56
+
57
+ | Param | Type | Description | Default | Required |
58
+ | ------------- | -------------------- | ----------- | ------------------------------------------- | -------- |
59
+ | mapConfig | <code>object</code> | 地图初始配置 | <code>{}</code> | 否 |
60
+ | showStatusbar | <code>Boolean</code> | 是否显示状态栏 | <code>true</code> | 否 |
61
+ | identify | <code>boolean</code> | 是否开启i查询 | <code>false</code> | 否 |
62
+ | identifyConfig | <code>object</code> | i查询相关配置,详见identifyConfig| <code>{}</code> | 否 |
63
+ | controls | <code>object</code> | 可选ol自带地图工具 | <code>{showBasemap: true,zoom: true}</code> | 否 |
64
+
65
+
66
+ * mapConfig
67
+
68
+ [mapConfig.js](https://note.youdao.com/s/NDDcBw2i)
69
+
70
+
71
+ * identifyConfig
72
+
73
+ ```
74
+ {
75
+ height: 200, //高度
76
+ header: [ //自定义头
77
+ {
78
+ label: '属性',
79
+ value: 'label',
80
+ },
81
+ {
82
+ label: '值',
83
+ value: 'value',
84
+ },
85
+ ],
86
+ showHeader: false, //是否显示头
87
+ theme: 'light',
88
+ }
41
89
  ```
42
- <OlMap
43
- class="app-content"
44
- show-basemapbar
45
- show-toolbar
46
- @on-ready="handleMapReady"
47
- @on-mouseclick="handleMouseClick"
48
- @on-toolchange="handleToolChange"
49
- ></OlMap>
90
+ * controls
91
+
50
92
  ```
93
+ {
94
+ zoom: true, // 缩放组件
95
+ scaleLine: true, // 比例尺
96
+ }
97
+ ```
98
+
51
99
 
100
+ #### Event
101
+
102
+ | Name | Description | Param |
103
+ | :------------ | :---------: | --------: |
104
+ | ready | 地图初始化完成回调 | olHandler |
105
+ | mouse-move | 鼠标移动 | 鼠标位置信息 |
106
+ | mouse-click | 鼠标点击 | 鼠标位置信息 |
107
+ | mouse-dbclick | 鼠标双击 | 鼠标位置信息 |
108
+ | mouse-moveend | 鼠标移动结束 | 鼠标位置信息 |
109
+ | draw-end | 绘制结束 | 绘制结果 |
110
+
111
+ ## 2.图层组件
112
+
113
+ ### 2.1 OlPopup
114
+
115
+ #### Example
116
+
117
+ <OlPopup title="属性" :position="position">
118
+ <!-- 支持自定义内容 -->
119
+ </OlPopup>
52
120
 
53
121
  #### Attributes
54
- | Param | Type | Description | Default |
55
- | --- | --- | --- | -- |
56
- | mapConfig | <code>object</code> | 地图初始配置 | <code>{}</code>
57
- | showStatusbar | <code>Boolean</code> | 是否显示状态栏 |<code>true</code>
58
- | identify | <code>boolean</code> | 是否开启i查询 | <code>false</code>
59
- | controls | <code>object</code> | 可选ol自带地图工具 | <code>{showBasemap: true,zoom: true}</code>
122
+
123
+ | Param | Type | Description | Default | Required |
124
+ | ----------- | -------------------- | --------------------------- | ------------------------- | -------- |
125
+ | position | <code>Array</code> | 位置 | 格式<code>\[lon,lat]</code> | 是 |
126
+ | theme | <code>String</code> | 主题可选<code>light/dark</code> | <code>light</code> | |
127
+ | title | <code>String</code> | 标题 | <code>''</code> | |
128
+
60
129
 
61
130
  #### Event
62
131
 
63
- | Name | Description | Param |
64
- | :------------- | :----------: | ------------: |
65
- | ready | 地图初始化完成回调 | olHandler |
66
- | mouse-move | 鼠标移动 | 鼠标位置信息 |
67
- | mouse-click | 鼠标点击 | 鼠标位置信息 |
68
- | mouse-dbclick | 鼠标双击 | 鼠标位置信息 |
69
- | mouse-moveend | 鼠标移动结束 | 鼠标位置信息 |
70
- | draw-end | 绘制结束 | 绘制结果 |
71
-
72
-
73
- ### 1.2 OlOverlay
132
+ | Name | Description | Param |
133
+ | :--- | :---------: | ----: |
134
+ | on-close | 关闭事件 | |
135
+
136
+ #### Slots
137
+
138
+ | Name | Description |
139
+ | :------ | :---------: |
140
+ | default | 自定义默认内容 |
141
+
142
+ ### 2.2 OlOverlay
143
+
74
144
  #### Example
75
- ```
76
- <OlOverlay :title="'title'" :position="position">
77
- <!-- 插入内容 -->
78
- </OlOverlay>
79
- ```
145
+
146
+ <OlOverlay :title="'title'" :position="position">
147
+ <!-- 插入自定义内容 -->
148
+ </OlOverlay>
80
149
 
81
150
  #### Attributes
82
- | Param | Type | Description | Default |
83
- | --- | --- | --- | -- |
84
- | theme | <code>String</code> | 主题</code>可选light|dark</code> | <code>dark<code>
85
- | showTitle | <code>Boolean</code> | 是否显示标题 | <code>false</code>
86
- | title | <code>String</code> | 标题 | <code>''</code>
87
- | position | <code>Array/undefined</code> | 位置 | <code>undefined</code>
88
151
 
152
+ | Param | Type | Description | Default | Required |
153
+ | --------- | ---------------------------- | ---------------------------- | ---------------------- | -------- |
154
+ | position | <code>Array/undefined</code> | 位置,\[经度,纬度] | <code>undefined</code> | 是 |
155
+ | theme | <code>String</code> | 主题可选</code>light/dark</code> | <code>dark<code> | |
156
+ | showTitle | <code>Boolean</code> | 是否显示标题 | <code>false</code> | |
157
+ | title | <code>String</code> | 标题 | <code>''</code> | |
89
158
 
90
159
  #### Event
91
160
 
92
- | Name | Description | Param |
93
- | :------------- | :----------: | ------------: |
94
- | on-close | 关闭事件 | |
161
+ | Name | Description | Param |
162
+ | :------- | :---------: | ----: |
163
+ | on-close | 关闭事件 | |
164
+
165
+ #### Slots
95
166
 
167
+ | Name | Description |
168
+ | :------ | :---------: |
169
+ | default | 自定义默认内容 |
170
+
171
+ ### 2.3 OlVector
96
172
 
97
- ### 1.3 OlVector
98
173
  #### Example
99
- ```
100
- <OlVector
101
- :features="features"
102
- :visible="visible"
103
- :opacity="opacity"
104
- :z-index="1000"
105
- :style="style"
106
- :modifiable="modifiable"
107
- :cluster-options="clusterOptions"
108
- @select-change="handleSelectChange"
109
- ></OlVector>
110
- ```
174
+
175
+ <OlVector
176
+ :features="features"
177
+ :layer-style="style"
178
+ ></OlVector>
111
179
 
112
180
  #### Attributes
113
- | Param | Type | Description | Default |
114
- | --- | --- | --- | -- |
115
- | features | <code>Array/Object</code> | 空间数据,支持<code>Array和geojson</code> | <code>[]</code>
116
- | geomField | <code>String</code> | features=Array时空间字段名称 | <code>wktstr</code>
117
- | visible | <code>Boolean</code> | 是否可见 | <code>true</code>
118
- | opacity | <code>Number</code> | 透明度(0-1) | 1
119
- | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code>
120
- | style | <code>Object</code> | 全局样式 | <code>{circle: {},icon:{},stroke: {},fill: {},text: {}}</code>
121
- | selectable | <code>boolean</code> | 可选中的 | <code>false</code>
122
- | modifiable | <code>boolean</code> | 可编辑的 | <code>false</code>
123
- | clusterOptions | <code>Object/null</code> | 聚合相关选项 | <code>null</code>
124
-
125
- - 参考格式
126
- - style <code>{circle:{color,radius},icon:{},text:{src,scale},fill: {color},stroke: {color,width}}</code>
127
- - clusterOptions <code>{showLabel:true,distance:20,minDistance:0}</code>
181
+
182
+ | Param | Type | Description | Default | Required |
183
+ | -------------- | ------------------------- | --------------------------------- | ---------------------- | -------- |
184
+ | features | <code>Array/Object</code> | 空间数据,支持<code>Array和geojson</code> | <code>\[]</code> | 是 |
185
+ | geomField | <code>String</code> | features是Array结构时空间字段名称 | <code>wktstr</code> | |
186
+ | visible | <code>Boolean</code> | 是否可见 | <code>true</code> | |
187
+ | opacity | <code>Number</code> | 不透明度(0-1) | 1 | |
188
+ | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code> | |
189
+ | layer-style | <code>Object</code> | 全局样式,详见style | | |
190
+ | selectable | <code>boolean</code> | 可选中的 | <code>false</code> | |
191
+ | modifiable | <code>boolean</code> | 可编辑的 | <code>false</code> | |
192
+ | clusterOptions | <code>Object/null</code> | 聚合相关选项,详见clusterOptions | <code>null</code> | |
193
+
194
+ * style
195
+
196
+
197
+
198
+ {
199
+ circle: {
200
+ color, //颜色
201
+ radius //半径
202
+ },
203
+ icon: {
204
+ src:String, //地址
205
+ scale:Number, //比例
206
+ color, //颜色
207
+ },
208
+ text: {
209
+ color:String,
210
+ fontSize:"14px", //字体大小
211
+ backgroundColor:String, //背景颜色
212
+ offsetX:Number,
213
+ offsetY:Number
214
+ filed:String, //显示字段
215
+ textFormatter:Function //格式化显示文本
216
+ },
217
+ fill: {
218
+ color:String
219
+ },
220
+ stroke: {
221
+ color:String,
222
+ width:Number
223
+ }
224
+ }
225
+
226
+ * clusterOptions
227
+
228
+
229
+
230
+ {
231
+ showLabel: true,
232
+ distance: 20,
233
+ minDistance: 0
234
+ }
235
+
128
236
  #### Event
129
237
 
130
- | Name | Description | Param |
131
- | :------------- | :----------: | ------------: |
132
- | select-change | 可选状态下选中改变触发 | |
238
+ | Name | Description | Param |
239
+ | :------------ | :---------: | ----: |
240
+ | select-change | 可选状态下选中改变触发 | |
241
+
242
+ ### 2.4 OlTile
133
243
 
134
- ### 1.4 OlTile
135
244
  #### Example
136
- ```
137
- <OlTile
138
- map-provider="mapProvider"
139
- :url="url"
140
- :request-params="requestParams"
141
- :visible="visible"
142
- :opacity="opacity"
143
- :min-zoom="minZoom"
144
- :max-zoom="maxZoom"
145
- ></OlTile>
146
- ```
245
+
246
+ <OlTile
247
+ map-provider="tdt"
248
+ :url="url"
249
+ :request-params="requestParams"
250
+ ></OlTile>
147
251
 
148
252
  #### Attributes
149
- | Param | Type | Description | Default |
150
- | --- | --- | --- | -- |
151
- | mapProvider | <code>String</code> | 服务提供者 | 可选<code>tdt/supermap/wmts/xyz/arcgistile</code>默认空
152
- | url | <code>String</code> | 服务地址 | 格式<code>https://mapserver/wmts</code>
153
- | requestParams | <code>Object</code> | 请求参数 | 格式<code>{layer,tilematrixset,Format,...}</code>
154
- | visible | <code>Boolean</code> | 是否可见 | <code>true</code>
155
- | opacity | <code>Number</code> | 透明度(0-1) | 1
156
- | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code>
157
- | minZoom | <code>Number/undefined</code> | 最小显示层级 | <code>undefined</code>
158
- | maxZoom | <code>Number/undefined</code> | 最大显示层级 | <code>undefined</code>
253
+
254
+ | Param | Type | Description | Default | Required |
255
+ | ------------- | ----------------------------- | ----------- | --------------------------------------------------------------- | :------: |
256
+ | mapProvider | <code>String</code> | 服务提供者 | 可选<code>tdt/supermap/wmts/arcgistile</code>默认空 | |
257
+ | url | <code>String</code> | 服务地址 | 格式<code><https://mapserver/wmts></code> | 是 |
258
+ | requestParams | <code>Object</code> | 请求参数 | 格式<code>{layer,tilematrixset,matrixSetPrefix,Format,...}</code> | |
259
+ | visible | <code>Boolean</code> | 是否可见 | <code>true</code> | |
260
+ | opacity | <code>Number</code> | 不透明度(0-1) | 1 | |
261
+ | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code> | |
262
+ | minZoom | <code>Number/undefined</code> | 最小显示层级 | <code>undefined</code> | |
263
+ | maxZoom | <code>Number/undefined</code> | 最大显示层级 | <code>undefined</code> | |
264
+
265
+ ##### requestParams
266
+
267
+ | Name | Description | Required |
268
+ | :-------------- | :--------------------------------------------------: | -------: |
269
+ | layer | 图层名 | 是 |
270
+ | tilematrixset | 切片矩阵集 | 是 |
271
+ | matrixSetPrefix | matrixSet前缀 (一般情况geoserver会用到,常用EPSG:4326或EPSG:3857) | 否 |
159
272
 
160
273
  #### Event
161
274
 
162
- | Name | Description | Param |
163
- | :------------- | :----------: | ------------: |
164
- | ready | 加载完成 | layer |
275
+ | Name | Description | Param |
276
+ | :---- | :---------: | ----: |
277
+ | ready | 加载完成 | layer |
165
278
 
279
+ ### 2.5 OlWms
166
280
 
167
- ### 1.5 OlWms
168
281
  #### Example
169
- ```
170
- <OlWms
171
- :url="url"
172
- :visible="visible"
173
- :opacity="opacity"
174
- />
175
- ```
282
+
283
+ <OlWms
284
+ :url="url"
285
+ :request-params="requestParams"
286
+ />
176
287
 
177
288
  #### Attributes
178
- | Param | Type | Description | Default |
179
- | --- | --- | --- | -- |
180
- | mapProvider | <code>String</code> | 服务提供者 | 可选<code>image/imageTile</code>,默认<code>imageTile</code>
181
- | url | <code>String</code> | 服务地址 | 格式<code>https://mapserver/wms</code>
182
- | requestParams | <code>Object</code> | 请求参数 | 格式<code>{layers,...}</code>
183
- | visible | <code>Boolean</code> | 是否可见 | <code>true</code>
184
- | opacity | <code>Number</code> | 透明度(0-1) | 1
185
- | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code>
289
+
290
+ | Param | Type | Description | Default | Required |
291
+ | ------------- | -------------------- | ----------- | ------------------------------------------------------- | :------: |
292
+ | mapProvider | <code>String</code> | 服务提供者 | 可选<code>image/imageTile</code>,默认<code>imageTile</code> | |
293
+ | url | <code>String</code> | 服务地址 | 格式<code><https://mapserver/wms></code> | 是 |
294
+ | requestParams | <code>Object</code> | 请求参数 | 格式<code>{layers,...}</code> | 是 |
295
+ | visible | <code>Boolean</code> | 是否可见 | <code>true</code> | |
296
+ | opacity | <code>Number</code> | 不透明度(0-1) | 1 | |
297
+ | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code> | |
298
+
299
+ ##### requestParams
300
+
301
+ | Name | Description | Required |
302
+ | :----- | :------------: | :------: |
303
+ | layers | 图层名,多个可用英文逗号隔开 | 是 |
186
304
 
187
305
  #### Event
188
306
 
189
- | Name | Description | Param |
190
- | :------------- | :----------: | ------------: |
191
- | ready | 加载完成 | layer |
307
+ | Name | Description | Param |
308
+ | :---- | :---------: | ----: |
309
+ | ready | 加载完成 | layer |
310
+
311
+ ### 2.6 OlArcgis
192
312
 
193
- ### 1.6 OlArcgis
194
313
  #### Example
195
- ```
196
- <OlArcgis
197
- :url="url"
198
- :visible="visible"
199
- :opacity="opacity"
200
- />
201
- ```
314
+
315
+ <OlArcgis
316
+ :url="url"
317
+ />
202
318
 
203
319
  #### Attributes
204
- | Param | Type | Description | Default |
205
- | --- | --- | --- | -- |
206
- | mapProvider | <code>String</code> | 服务提供者 | 可选<code>image/imageTile</code>,默认<code>imageTile</code>
207
- | url | <code>String</code> | 服务地址 | 格式<code>https://sampleserver/MapServer</code>
208
- | visible | <code>Boolean</code> | 是否可见 | <code>true</code>
209
- | opacity | <code>Number</code> | 透明度(0-1) | 1
210
- | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code>
320
+
321
+ | Param | Type | Description | Default | Required |
322
+ | ----------- | -------------------- | ----------- | ------------------------------------------------------- | :------: |
323
+ | mapProvider | <code>String</code> | 服务提供者 | 可选<code>imagetile/tile</code>,默认<code>imageTile</code> | 否 |
324
+ | url | <code>String</code> | 服务地址 | 格式<code><https://sampleserver/MapServer></code> | 是 |
325
+ | visible | <code>Boolean</code> | 是否可见 | <code>true</code> | |
326
+ | opacity | <code>Number</code> | 不透明度(0-1) | 1 | |
327
+ | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code> | |
211
328
 
212
329
  #### Event
213
330
 
214
- | Name | Description | Param |
215
- | :------------- | :----------: | ------------: |
216
- | ready | 加载完成 | layer |
331
+ | Name | Description | Param |
332
+ | :---- | :---------: | ----: |
333
+ | ready | 加载完成 | layer |
334
+
335
+ ### 2.7 OlTdt
217
336
 
218
- ### 1.7 OlPopup
219
337
  #### Example
220
- ```
221
- <OlPopup
222
- :position="position"
223
- :properties="properties"
224
- :table-height="tableHeight"
225
- :table-header="tableHeader"
226
- />
227
- ```
338
+
339
+ <OlTdt
340
+ map-style="img"
341
+ ></OlTdt>
228
342
 
229
343
  #### Attributes
230
- | Param | Type | Description | Default |
231
- | --- | --- | --- | -- |
232
- | theme | <code>String</code> | 主题<code>可选light/dark</code> | <code>light</code>
233
- | title | <code>String</code> | 标题 | <code>''</code>
234
- | position | <code>Array</code> | 位置 | 格式<code>[lon,lat]</code>
235
- | properties | <code>Array</code> | 属性列表</code> | 格式<code>[{label,value},...]</code>
236
- | showHeight | <code>Boolean</code> | 是否显示表头 | <code>false</code>
237
- | tableHeight | <code>Number</code> | 表格高度 | 300
238
- | tableHeader | <code>Array</code> | 自定义表头 | 默认<code> [{label: '属性',value: 'label',},{label: '值',value: 'value',width: 150}]</code>
344
+
345
+ | Param | Type | Description | Default | Required |
346
+ | -------- | -------------------- | ----------- | ------------------------------------------------------------------------------ | :------: |
347
+ | mapStyle | <code>String</code> | 地图类型 | 可选<code>img/vec/ter/img\_label/vec\_label/ter\_label</code>,默认<code>img</code> | |
348
+ | visible | <code>Boolean</code> | 是否可见 | <code>true</code> | |
349
+ | opacity | <code>Number</code> | 不透明度(0-1) | 1 | |
350
+ | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code> | |
351
+ | token | <code>String</code> | 访问秘钥 | <code>''</code> | |
239
352
 
240
353
  #### Event
241
354
 
242
- | Name | Description | Param |
243
- | :------------- | :----------: | ------------: |
244
- | | | |
355
+ | Name | Description | Param |
356
+ | :---- | :---------: | ----: |
357
+ | ready | 加载完成 | layer |
358
+
359
+ ### 2.8 OlSupermap
245
360
 
246
- ### 1.x
247
361
  #### Example
248
- ```
249
- ```
362
+
363
+ <OlSupermap
364
+ :url="url"
365
+ :request-params="requestParams"
366
+ >
367
+ </OlSupermap>
250
368
 
251
369
  #### Attributes
252
- | Param | Type | Description | Default |
253
- | --- | --- | --- | -- |
254
- | mapProvider | <code>String</code> | 服务提供者 |
370
+
371
+ | Param | Type | Description | Default | Required |
372
+ | ------------- | -------------------- | ----------- | --------------------------------------- | :------: |
373
+ | url | <code>String</code> | 服务地址 | 格式<code><https://mapserver/wmts></code> | 是 |
374
+ | requestParams | <code>Object</code> | 请求参数 | 格式,详见requestParams | 是 |
375
+ | visible | <code>Boolean</code> | 是否可见 | <code>true</code> | |
376
+ | opacity | <code>Number</code> | 不透明度(0-1) | 1 | |
377
+ | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code> | |
378
+
379
+ ##### requestParams
380
+
381
+ | Name | Description | Required |
382
+ | :------------ | :---------: | :------: |
383
+ | layer | 图层名 | 是 |
384
+ | tilematrixset | 切片矩阵集 | 是 |
385
+ | Format | 格式 | 否 |
386
+ | origin | 起点 | 否 |
387
+ | resolutions | 分辨率 | 否 |
255
388
 
256
389
  #### Event
257
390
 
258
- | Name | Description | Param |
259
- | :------------- | :----------: | ------------: |
260
- | | | |
391
+ | Name | Description | Param |
392
+ | :---- | :---------: | ----: |
393
+ | ready | 加载完成 | layer |
261
394
 
262
- ## 2.其他组件
263
- ### 2.1 VTable
395
+ ### 2.9 OlVectortile
264
396
 
265
397
  #### Example
266
- ```
267
- ```
398
+
399
+ <OlVectortile
400
+ :url="url"
401
+ :layer-style="style"
402
+ :request-params="requestParams"
403
+ >
404
+ </OlVectortile>
268
405
 
269
406
  #### Attributes
270
- | Param | Type | Description | Default |
271
- | --- | --- | --- | -- |
272
- | mapProvider | <code>String</code> | 服务提供者 |
407
+
408
+ | Param | Type | Description | Default | Required |
409
+ | ------------- | -------------------- | ----------- | --------------------------------------- | :------: |
410
+ | url | <code>String</code> | 服务地址 | 格式<code><https://mapserver/wmts></code> | 是 |
411
+ | layerStyle | <code>Object/|Function</code> | 图层样式 | <code></code> | 是 |
412
+ | requestParams | <code>Object</code> | 请求参数 | 格式,详见requestParams | 是 |
413
+ | visible | <code>Boolean</code> | 是否可见 | <code>true</code> | |
414
+ | opacity | <code>Number</code> | 不透明度(0-1) | 1 | |
415
+ | zIndex | <code>Number</code> | 图层层级 | <code>undefined</code> | |
416
+
417
+ ##### requestParams
418
+
419
+ | Name | Description | Required |
420
+ | :------------ | :---------: | :------: |
421
+ | layer | 图层名 | 是 |
422
+
273
423
 
274
424
  #### Event
275
425
 
276
- | Name | Description | Param |
277
- | :------------- | :----------: | ------------: |
278
- | | | |
426
+ | Name | Description | Param |
427
+ | :---- | :---------: | ----: |
428
+ | ready | 加载完成 | layer |
429
+
430
+ ## 3.地图工具组件
431
+
432
+ ### 3.1 OlToolbar
279
433
 
280
- ## 3.工具类
434
+ #### Example
435
+
436
+ <OlToolbar></OlToolbar>
281
437
 
282
- ### 3.1 OlHandler
283
- ### 3.2 VUtils
438
+ #### Attributes
284
439
 
440
+ | Param | Type | Description | Default |
441
+ | -------- | ------------------- | ----------- | ---------------------- |
442
+ | position | <code>String</code> | 位置 | <code>top-right</code> |
443
+ | offset | <code>Array</code> | 位置偏移量 | <code>\[0,50]</code> |
444
+
445
+ #### Event
446
+
447
+ | Name | Description | Param | |
448
+ | :----- | :---------: | ------: | --------------------------------: |
449
+ | change | 工具改变时触发 | handler | 返回mapConfig.toolbar中元素的handler属性值 |
450
+
451
+ ### 3.2 OlBasemap
452
+
453
+ #### Example
285
454
 
455
+ <OlBasemap></OlBasemap>
286
456
 
457
+ #### Attributes
458
+
459
+ | Param | Type | Description | Default |
460
+ | -------- | ------------------- | ----------- | ---------------------- |
461
+ | position | <code>String</code> | 位置 | <code>top-right</code> |
462
+ | offset | <code>Array</code> | 位置偏移量 | <code>\[0,0]</code> |
463
+
464
+ #### Event
465
+
466
+ | Name | Description | Param | |
467
+ | :----- | :---------: | ----: | ---------------------------------: |
468
+ | change | 底图改变时触发 | ids | 返回mapConfig.baseLayers中当前底图元素的id集合 |
469
+
470
+ ### 3.3 OlDrawer
471
+
472
+ #### Example
473
+
474
+ <OlDrawer></OlDrawer>
475
+
476
+ #### Attributes
477
+
478
+ | Param | Type | Description | Default |
479
+ | -------- | ------------------- | ----------- | ---------------------- |
480
+ | snapEnable | <code>Boolean</code> | 是否可捕获 | <code>false</code> |
481
+ | modifyEnable | <code>Boolean</code> | 是否可修改 | <code>false</code> |
482
+ | onceOnly | <code>Boolean</code> | 是否一次性绘制 | <code>false</code> |
483
+ | selectEnable | <code>Boolean</code> | 是否可选中 | <code>false</code> |
484
+
485
+ #### Event
486
+
487
+ | Name | Description | Param | |
488
+ | :----- | :---------: | ----: | ---------------------------------: |
489
+ | change | 底图改变时触发 | ids | 返回mapConfig.baseLayers中当前底图元素的id集合 |
490
+
491
+ ## 4.其他组件
492
+
493
+ ### 4.1 VTable
494
+
495
+ #### Example
496
+
497
+ #### Attributes
498
+
499
+ | Param | Type | Description | Default |
500
+ | ----------- | ------------------- | ----------- | ------- |
501
+ | mapProvider | <code>String</code> | 服务提供者 | |
502
+
503
+ #### Event
504
+
505
+ | Name | Description | Param |
506
+ | :--- | :---------: | ----: |
507
+ | | | |
508
+
509
+ ## 5.工具类
510
+
511
+ ### 5.1 OlHandler
512
+
513
+ ### 5.2 VUtils
514
+
515
+ ## x.xx组件
516
+
517
+ ### x.1 xxx
518
+
519
+ #### Example
520
+
521
+ #### Attributes
522
+
523
+ #### Event