@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,288 @@
|
|
|
1
|
+
<header id="page-title" class="page-title">
|
|
2
|
+
|
|
3
|
+
<span class="page-title-main">类名</span>
|
|
4
|
+
<span class="page-title-sub">FeatureLayerUtil</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="FeatureLayerUtil">
|
|
26
|
+
<a class="href-link" href="#FeatureLayerUtil">#</a>
|
|
27
|
+
|
|
28
|
+
<span class="code-name" id="FeatureLayerUtil" style="font-size:30px">
|
|
29
|
+
|
|
30
|
+
new FeatureLayerUtil<span class="signature">()</span>
|
|
31
|
+
|
|
32
|
+
</span>
|
|
33
|
+
</h4>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<div class="description">
|
|
38
|
+
<p>要素图层工具类(Leaflet)</p>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
<dl class="details">
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
</dl>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<div class='vertical-section'>
|
|
132
|
+
<h3 id='member'>成员变量</h3>
|
|
133
|
+
<h4 style="margin-top: 20px;margin-bottom: 20px;">成员变量概述</h4>
|
|
134
|
+
<div class="table-container">
|
|
135
|
+
<table class="params table">
|
|
136
|
+
<thead>
|
|
137
|
+
<tr>
|
|
138
|
+
<th>名称</th>
|
|
139
|
+
<th>类型</th>
|
|
140
|
+
<th>描述</th>
|
|
141
|
+
</tr>
|
|
142
|
+
</thead>
|
|
143
|
+
<tbody>
|
|
144
|
+
|
|
145
|
+
<tr class="deep-level-0">
|
|
146
|
+
<td class="name"><code><a href="#convertFeature">convertFeature</a></code></td>
|
|
147
|
+
<td class="name">
|
|
148
|
+
<code>
|
|
149
|
+
|
|
150
|
+
</code>
|
|
151
|
+
</td>
|
|
152
|
+
<td class="name"><code><p>将Common的要素对象转为Leaflet的要素对象</p></code></td>
|
|
153
|
+
</tr>
|
|
154
|
+
|
|
155
|
+
</tbody>
|
|
156
|
+
</table>
|
|
157
|
+
</div>
|
|
158
|
+
<h4 style="margin-top: 20px;margin-bottom: 20px;">成员变量详情</h4>
|
|
159
|
+
<div class="members">
|
|
160
|
+
|
|
161
|
+
<div class="member">
|
|
162
|
+
|
|
163
|
+
<h4 class="name" id=".convertFeature">
|
|
164
|
+
<a class="href-link" href="#.convertFeature">#</a>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<span class='tag'>static</span>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
<span class="code-name">
|
|
171
|
+
convertFeature
|
|
172
|
+
</span>
|
|
173
|
+
|
|
174
|
+
</h4>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
<div class="description">
|
|
180
|
+
<p>将Common的要素对象转为Leaflet的要素对象</p>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
<dl class="details">
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
</dl>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
<h5>示例</h5>
|
|
226
|
+
|
|
227
|
+
<p class="code-caption"><h5>添加要素图层-原生接口</h5></p>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
<pre class="prettyprint"><code>// ES5引入方式
|
|
231
|
+
const { IGSFeatureLayer } = zondy.Layer
|
|
232
|
+
const { FeatureLayerUtil, leaflet } = zondy
|
|
233
|
+
const { SimpleFillSymbol } = zondy.Symbol
|
|
234
|
+
// ES6引入方式
|
|
235
|
+
import * as leaflet from '@mapgis/leaflet'
|
|
236
|
+
import { IGSFeatureLayer,SimpleFillSymbol } from "@mapgis/webclient-common"
|
|
237
|
+
import { FeatureLayerUtil } from "@mapgis/webclient-leaflet-plugin"
|
|
238
|
+
// 通过Common库创建一个要素图层对象
|
|
239
|
+
const featureLayer = new IGSFeatureLayer({
|
|
240
|
+
// 服务基地址
|
|
241
|
+
url: 'http://{ip}:{port}/igs/rest/services/{服务名}/FeatureServer'
|
|
242
|
+
})
|
|
243
|
+
// 查询要素,并绘制要素
|
|
244
|
+
featureLayer.queryFeatures({
|
|
245
|
+
// 指定要查询的子图层ID
|
|
246
|
+
layerId: '0',
|
|
247
|
+
// 指定查询结果的坐标系
|
|
248
|
+
outSrs: 'EPSG:4326',
|
|
249
|
+
// 指定查询数量
|
|
250
|
+
resultRecordCount: 100000
|
|
251
|
+
}).then((res) => {
|
|
252
|
+
// 创建一个Leaflet的要素图层
|
|
253
|
+
const featureLayerLeaflet = leaflet.featureGroup()
|
|
254
|
+
// 获取Leaflet的地图视图对象
|
|
255
|
+
const mapView = view.getInnerView()
|
|
256
|
+
// 添加要素图层
|
|
257
|
+
featureLayerLeaflet.addTo(mapView)
|
|
258
|
+
// 获取查询到的要素
|
|
259
|
+
const features = res.features
|
|
260
|
+
// 循环绘制要素
|
|
261
|
+
features.forEach((feature) => {
|
|
262
|
+
// 指定绘制要素的符号,根据不同几何类型设置不同的符号,示例中使用的是区几何
|
|
263
|
+
feature.symbol = new SimpleFillSymbol({
|
|
264
|
+
color: 'rgba(244, 122, 31, 0.5)'
|
|
265
|
+
})
|
|
266
|
+
// 将要素对象转为Leaflet的几何对象
|
|
267
|
+
const graphic = FeatureLayerUtil.convertFeature(feature)
|
|
268
|
+
// 添加并绘制几何对象
|
|
269
|
+
featureLayerLeaflet.addLayer(graphic)
|
|
270
|
+
})
|
|
271
|
+
})</code></pre>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
</article>
|
|
287
|
+
|
|
288
|
+
</section>
|