@mapgis/webclient-leaflet-plugin 17.2.0 → 17.2.2
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 +22 -4
- package/dist/es5/webclient-common.min.js +5 -5
- package/dist/es5/webclient-leaflet-plugin.min.js +6 -6
- package/dist/webclient-leaflet-plugin-es6.min.js +6 -6
- package/documention/ArcGISMapImageLayer.html +820 -0
- package/documention/ArcGISTileLayer.html +498 -0
- package/documention/EchartsLayer.html +261 -0
- package/documention/FeatureLayer.html +212 -0
- package/documention/FeatureLayerUtil.html +288 -0
- package/documention/IGSMapImageLayer.html +948 -0
- package/documention/IGSTileLayer.html +562 -0
- package/documention/MapLayer.html +330 -0
- package/documention/MapVLayer.html +320 -0
- package/documention/MapViewLeaflet.html +7 -7
- package/documention/Popup.html +4 -2
- package/documention/Screenshot.html +5 -3
- package/documention/SketchEditorLeaflet.html +76 -46
- package/documention/TileLayer.html +279 -0
- package/documention/TileLayerWMS.html +222 -0
- package/documention/VectorTileLayer.html +529 -0
- package/documention/WMSLayerView.html +689 -0
- package/documention/WebMapServiceLayer.html +723 -0
- package/documention/WebMapTileServiceLayer.html +754 -0
- package/documention/WebTileLayer.html +663 -0
- package/documention/Zondy.ThemeLayer.GeoFeatureThemeLayer.html +22 -22
- package/documention/Zondy.ThemeLayer.GraphThemeLayer.html +30 -30
- package/documention/Zondy.ThemeLayer.RandomThemeLayer.html +34 -34
- package/documention/Zondy.ThemeLayer.ThemeLayer.html +3 -3
- package/documention/Zondy.ThemeLayer.rangeThemeLayer.html +34 -34
- package/documention/Zondy.ThemeLayer.rankSymbolThemeLayer.html +47 -47
- package/documention/Zondy.ThemeLayer.simpleThemeLayer.html +33 -33
- package/documention/Zondy.ThemeLayer.uniqueThemeLayer.html +30 -30
- package/documention/Zondy.Widget.html +5 -5
- package/documention/global.html +454 -0
- package/documention/index.html +3 -3
- package/package.json +3 -2
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
<header id="page-title" class="page-title">
|
|
2
|
+
|
|
3
|
+
<span class="page-title-main">类名</span>
|
|
4
|
+
<span class="page-title-sub">MapLayer</span>
|
|
5
|
+
|
|
6
|
+
</header>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<section>
|
|
13
|
+
|
|
14
|
+
<article>
|
|
15
|
+
<div class="container-overview">
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<div class='vertical-section'>
|
|
19
|
+
<div class="members">
|
|
20
|
+
<div class="member">
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
<h4 class="name" id="MapLayer">
|
|
26
|
+
<a class="href-link" href="#MapLayer">#</a>
|
|
27
|
+
|
|
28
|
+
<span class="code-name" id="MapLayer" style="font-size:30px">
|
|
29
|
+
|
|
30
|
+
new MapLayer<span class="signature">(url, options)</span>
|
|
31
|
+
|
|
32
|
+
</span>
|
|
33
|
+
</h4>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<div class="description">
|
|
38
|
+
<p>屏幕出一张图图层基类</p>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<h4>参数</h4>
|
|
51
|
+
|
|
52
|
+
<div class="table-container">
|
|
53
|
+
<table class="params table">
|
|
54
|
+
<thead>
|
|
55
|
+
<tr>
|
|
56
|
+
|
|
57
|
+
<th>名称</th>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<th>类型</th>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
<th style="min-width: 100px;">默认值</th>
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
<th class="last">描述</th>
|
|
67
|
+
</tr>
|
|
68
|
+
</thead>
|
|
69
|
+
|
|
70
|
+
<tbody>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
<tr class="deep-level-0">
|
|
75
|
+
|
|
76
|
+
<td class="name"><code>url</code></td>
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<td class="type">
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<span class="param-type">
|
|
83
|
+
|
|
84
|
+
String
|
|
85
|
+
|
|
86
|
+
</span>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
</td>
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<td class="default">
|
|
95
|
+
|
|
96
|
+
</td>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<td class="description last"><p>服务基地址</p></td>
|
|
100
|
+
</tr>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
<tr class="deep-level-0">
|
|
108
|
+
|
|
109
|
+
<td class="name"><code>options</code></td>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
<td class="type">
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
<span class="param-type">
|
|
116
|
+
|
|
117
|
+
Object
|
|
118
|
+
|
|
119
|
+
</span>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
</td>
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<td class="default">
|
|
128
|
+
|
|
129
|
+
</td>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<td class="description last"><p>额外构造参数</p></td>
|
|
133
|
+
</tr>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<tr class="deep-level-1">
|
|
139
|
+
|
|
140
|
+
<td class="name"><code>clippingArea</code></td>
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
<td class="type">
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
<span class="param-type">
|
|
147
|
+
|
|
148
|
+
Object
|
|
149
|
+
|
|
150
|
+
</span>
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
</td>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
<td class="default">
|
|
159
|
+
|
|
160
|
+
</td>
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
<td class="description last"><p>图层空间裁剪区域,需要传入geojson对象。仅支持多多边形裁剪、多边形裁剪。</p></td>
|
|
164
|
+
</tr>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<tr class="deep-level-1">
|
|
170
|
+
|
|
171
|
+
<td class="name"><code>httpMethod</code></td>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
<td class="type">
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<span class="param-type">
|
|
178
|
+
|
|
179
|
+
FetchMethod
|
|
180
|
+
|
|
181
|
+
</span>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
</td>
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
<td class="default">
|
|
190
|
+
|
|
191
|
+
</td>
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
<td class="description last"><p>http请求方式,默认为GET</p></td>
|
|
195
|
+
</tr>
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
<tr class="deep-level-1">
|
|
201
|
+
|
|
202
|
+
<td class="name"><code>intervalTime</code></td>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
<td class="type">
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
<span class="param-type">
|
|
209
|
+
|
|
210
|
+
Number
|
|
211
|
+
|
|
212
|
+
</span>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
</td>
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
<td class="default">
|
|
221
|
+
|
|
222
|
+
120
|
|
223
|
+
|
|
224
|
+
</td>
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
<td class="description last"><p>刷新间隔,默认为120ms</p></td>
|
|
228
|
+
</tr>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
</tbody>
|
|
237
|
+
</table>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
<dl class="details">
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
</dl>
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
</div>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
</article>
|
|
329
|
+
|
|
330
|
+
</section>
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
<header id="page-title" class="page-title">
|
|
2
|
+
|
|
3
|
+
<span class="page-title-main">类名</span>
|
|
4
|
+
<span class="page-title-sub">MapVLayer</span>
|
|
5
|
+
|
|
6
|
+
</header>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<section>
|
|
13
|
+
|
|
14
|
+
<article>
|
|
15
|
+
<div class="container-overview">
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
<div class='vertical-section'>
|
|
19
|
+
<div class="members">
|
|
20
|
+
<div class="member">
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
<h4 class="name" id="MapVLayer">
|
|
26
|
+
<a class="href-link" href="#MapVLayer">#</a>
|
|
27
|
+
|
|
28
|
+
<span class="code-name" id="MapVLayer" style="font-size:30px">
|
|
29
|
+
|
|
30
|
+
new MapVLayer<span class="signature">(map, mapVData, mapVOptions, leafletOptions)</span>
|
|
31
|
+
|
|
32
|
+
</span>
|
|
33
|
+
</h4>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<div class="description">
|
|
38
|
+
<p>MapV图层(Leaflet)</p>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
<h4>参数</h4>
|
|
51
|
+
|
|
52
|
+
<div class="table-container">
|
|
53
|
+
<table class="params table">
|
|
54
|
+
<thead>
|
|
55
|
+
<tr>
|
|
56
|
+
|
|
57
|
+
<th>名称</th>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
<th>类型</th>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
<th class="last">描述</th>
|
|
65
|
+
</tr>
|
|
66
|
+
</thead>
|
|
67
|
+
|
|
68
|
+
<tbody>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<tr class="deep-level-0">
|
|
73
|
+
|
|
74
|
+
<td class="name"><code>map</code></td>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
<td class="type">
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<span class="param-type">
|
|
81
|
+
|
|
82
|
+
L.map
|
|
83
|
+
|
|
84
|
+
</span>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
</td>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
<td class="description last"><p>leaflet的地图视图对象</p></td>
|
|
94
|
+
</tr>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<tr class="deep-level-0">
|
|
102
|
+
|
|
103
|
+
<td class="name"><code>mapVData</code></td>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
<td class="type">
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
<span class="param-type">
|
|
110
|
+
|
|
111
|
+
Object
|
|
112
|
+
|
|
113
|
+
</span>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
</td>
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
<td class="description last"><p>MapV需要的数据集</p></td>
|
|
123
|
+
</tr>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
<tr class="deep-level-0">
|
|
131
|
+
|
|
132
|
+
<td class="name"><code>mapVOptions</code></td>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
<td class="type">
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<span class="param-type">
|
|
139
|
+
|
|
140
|
+
Object
|
|
141
|
+
|
|
142
|
+
</span>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
</td>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
<td class="description last"><p>MapV初始化参数</p></td>
|
|
152
|
+
</tr>
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<tr class="deep-level-0">
|
|
160
|
+
|
|
161
|
+
<td class="name"><code>leafletOptions</code></td>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<td class="type">
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<span class="param-type">
|
|
168
|
+
|
|
169
|
+
Object
|
|
170
|
+
|
|
171
|
+
</span>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
</td>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
<td class="description last"><p>Leaflet初始化参数</p></td>
|
|
181
|
+
</tr>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
</tbody>
|
|
187
|
+
</table>
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<dl class="details">
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
</dl>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
<h5>示例</h5>
|
|
252
|
+
|
|
253
|
+
<p class="code-caption"><h7 id='addLayer'>混合开发模式</h7></p>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
<pre class="prettyprint"><code>// ES5引入方式
|
|
257
|
+
const { WebTileLayer } = zondy.Layer
|
|
258
|
+
const { WebTileLayer, MapVLayer, leaflet } = zondy
|
|
259
|
+
// ES6引入方式
|
|
260
|
+
import { WebTileLayer } from "@mapgis/webclient-common"
|
|
261
|
+
import { WebTileLayer, MapVLayer } from "@mapgis/webclient-leaflet-plugin"
|
|
262
|
+
import * as leaflet from '@mapgis/leaflet'
|
|
263
|
+
// 请先确保引入了MapV库
|
|
264
|
+
<script src="http://{ip}:{port}/mapv.min.js"></script>
|
|
265
|
+
// 构造一个WebTileLayer图层对象作为底图
|
|
266
|
+
const layer = new WebTileLayer({
|
|
267
|
+
// 服务基地址
|
|
268
|
+
url: 'http://t1.tianditu.com/DataServer?T=vec_c&x={col}&y={row}&l={level}'
|
|
269
|
+
});
|
|
270
|
+
// 加载图层元数据
|
|
271
|
+
layer.load().then(function () {
|
|
272
|
+
// 构造地图视图的初始化参数
|
|
273
|
+
const mapViewOptions = initMapViewLeafletOptions(layer, [layer])
|
|
274
|
+
// 构造Leaflet地图视图对象
|
|
275
|
+
const map = L.map('地图视图容器ID', mapViewOptions)
|
|
276
|
+
// 构造图层的初始化参数
|
|
277
|
+
const layerOptions = initializeOptions(layer)
|
|
278
|
+
// 添加图层到地图视图中
|
|
279
|
+
const leafletLayer = new WebTileLayer(layer.url + '&tk=天地图token', layerOptions).addTo(map)
|
|
280
|
+
// 构造MapV数据和初始化参数
|
|
281
|
+
const mapVDate = {}
|
|
282
|
+
const mapVOptions = {}
|
|
283
|
+
// 创建并添加MapV图层
|
|
284
|
+
new MapVLayer(map, mapVDate, mapVOptions).addTo(
|
|
285
|
+
map
|
|
286
|
+
);
|
|
287
|
+
})</code></pre>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
</article>
|
|
319
|
+
|
|
320
|
+
</section>
|