@mapgis/webclient-cesium-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 +23 -5
- package/dist/es5/webclient-cesium-plugin.min.js +4 -4
- package/dist/es5/webclient-common.min.js +5 -5
- package/dist/webclient-cesium-plugin-es6.min.js +4 -4
- package/documention/ArcGISMapServerImageryProvider.html +2 -2
- package/documention/ArcGISTileServerImageryProvider.html +2 -2
- package/documention/CustomTilingScheme.html +1 -1
- package/documention/GeoJSONLayerUtil.html +1 -1
- package/documention/IGSFeatureLayerUtil.html +1 -1
- package/documention/IGSSceneLayerUtil.html +29 -626
- package/documention/ISSceneLayerUtil.html +1131 -0
- package/documention/MapGISMapServerImageryProvider.html +7 -7
- package/documention/MapGISTerrainProvider.html +7540 -1054
- package/documention/MapGISTileServerImageryProvider.html +2 -2
- package/documention/MapGISVectorTileImageryProvider.html +1 -1
- package/documention/Popup.html +5 -3
- package/documention/S3MTileset.html +235 -0
- package/documention/SceneViewCesium.html +14 -14
- package/documention/Screenshot.html +6 -4
- package/documention/SketchEditorCesium.html +14 -10
- package/documention/WFSLayerUtil.html +1 -1
- package/documention/WebMapServiceImageryProvider.html +2 -2
- package/documention/WebMapTileServiceImageryProvider.html +2 -2
- package/documention/index.html +4 -4
- package/documention/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapVLayer.html +1 -1
- package/package.json +2 -1
|
@@ -636,13 +636,13 @@
|
|
|
636
636
|
<p class="code-caption"><h7>添加一个MapGIS瓦片服务:原生接口</h7></p>
|
|
637
637
|
|
|
638
638
|
|
|
639
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
640
639
|
const provider = await MapGISTileServerImageryProvider.fromUrl(url)
|
|
641
640
|
viewer.imageryLayers.addImageryProvider(provider)
|
|
641
|
+
<pre class="prettyprint"><code>// ES5引入方式
|
|
642
642
|
const provider = await MapGISTileServerImageryProvider.fromUrl(url)
|
|
643
643
|
viewer.imageryLayers.addImageryProvider(provider)
|
|
644
644
|
|
|
645
645
|
|
|
646
646
|
<p class="code-caption"><h7>添加一个MapGIS瓦片服务:混合接口</h7></p>
|
|
647
647
|
|
|
648
648
|
|
|
649
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
650
649
|
// 获取provider的初始化参数
|
|
651
650
|
const options = initializeOptions(layer, viewer)
|
|
652
651
|
// 构造provider对象
|
|
653
652
|
provider = new MapGISTileServerImageryProvider(options)
|
|
654
653
|
// 添加图层到Cesium视图中
|
|
655
654
|
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
655
|
+
<pre class="prettyprint"><code>// ES5引入方式
|
|
656
656
|
// 获取provider的初始化参数
|
|
657
657
|
const options = initializeOptions(layer, viewer)
|
|
658
658
|
// 构造provider对象
|
|
659
659
|
provider = new MapGISTileServerImageryProvider(options)
|
|
660
660
|
// 添加图层到Cesium视图中
|
|
661
661
|
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
662
662
|
|
|
663
663
|
|
|
664
664
|
|
|
@@ -772,7 +772,7 @@
|
|
|
772
772
|
|
|
773
773
|
|
|
774
774
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
775
|
-
const { MapGISVectorTileImageryProvider } =
|
|
775
|
+
const { MapGISVectorTileImageryProvider } = zondy
|
|
776
776
|
// ES6引入方式
|
|
777
777
|
import { MapGISVectorTileImageryProvider } from "@mapgis/webclient-cesium-plugin"
|
|
778
778
|
|
package/documention/Popup.html
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
参考示例:
|
|
40
40
|
<a href='#SceneView'>[初始化三维场景视图]</a>
|
|
41
41
|
<br>[ES5引入方式]:<br/>
|
|
42
|
-
|
|
42
|
+
zondy.cesium.SceneView() <br/>
|
|
43
43
|
[ES6引入方式]:<br/>
|
|
44
44
|
import { SceneView } from '@mapgis/webclient-cesium-plugin' <br/>
|
|
45
45
|
自定义样式说明:<br/>
|
|
@@ -378,9 +378,11 @@ zondy-popup__footer 弹窗底部样式<br/></p>
|
|
|
378
378
|
|
|
379
379
|
|
|
380
380
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
381
|
-
const { Map
|
|
381
|
+
const { Map } = zondy
|
|
382
|
+
const { SceneView } = zondy.cesium
|
|
382
383
|
// ES6引入方式
|
|
383
|
-
import {
|
|
384
|
+
import { SceneView } from "@mapgis/webclient-cesium-plugin"
|
|
385
|
+
import { Map } from "@mapgis/webclient-common"
|
|
384
386
|
// 初始化图层管理容器
|
|
385
387
|
const map = new Map();
|
|
386
388
|
// 初始化地图视图对象
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
<header id="page-title" class="page-title">
|
|
2
|
+
|
|
3
|
+
<span class="page-title-main">类名</span>
|
|
4
|
+
<span class="page-title-sub">S3MTileset</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="S3MTileset">
|
|
26
|
+
<a class="href-link" href="#S3MTileset">#</a>
|
|
27
|
+
|
|
28
|
+
<span class="code-name" id="S3MTileset" style="font-size:30px">
|
|
29
|
+
|
|
30
|
+
new S3MTileset<span class="signature">(options)</span>
|
|
31
|
+
|
|
32
|
+
</span>
|
|
33
|
+
</h4>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<div class="description">
|
|
38
|
+
<p>S3MTileset类</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>options</code></td>
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<td class="type">
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
<span class="param-type">
|
|
83
|
+
|
|
84
|
+
Object
|
|
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
|
+
<tr class="deep-level-1">
|
|
106
|
+
|
|
107
|
+
<td class="name"><code>url</code></td>
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<td class="type">
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
<span class="param-type">
|
|
114
|
+
|
|
115
|
+
String
|
|
116
|
+
|
|
117
|
+
</span>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
</td>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
<td class="default">
|
|
126
|
+
|
|
127
|
+
''
|
|
128
|
+
|
|
129
|
+
</td>
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
<td class="description last"><p>服务链接,必填</p></td>
|
|
133
|
+
</tr>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
</tbody>
|
|
142
|
+
</table>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
<dl class="details">
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
</dl>
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
</article>
|
|
234
|
+
|
|
235
|
+
</section>
|
|
@@ -532,7 +532,7 @@
|
|
|
532
532
|
|
|
533
533
|
|
|
534
534
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
535
|
-
const { Map, SceneViewCesium } =
|
|
535
|
+
const { Map, SceneViewCesium } = zondy
|
|
536
536
|
// ES6引入方式
|
|
537
537
|
import { Map, SceneViewCesium } from "@mapgis/webclient-cesium-plugin"
|
|
538
538
|
// 初始化图层管理容器
|
|
@@ -550,7 +550,7 @@ const sceneView = new SceneViewCesium({
|
|
|
550
550
|
|
|
551
551
|
|
|
552
552
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
553
|
-
const { Map, SceneViewCesium } =
|
|
553
|
+
const { Map, SceneViewCesium } = zondy
|
|
554
554
|
// ES6引入方式
|
|
555
555
|
import { Map, SceneViewCesium } from "@mapgis/webclient-cesium-plugin"
|
|
556
556
|
// 初始化图层管理容器
|
|
@@ -2744,10 +2744,10 @@ const sceneView = new SceneViewCesium({
|
|
|
2744
2744
|
|
|
2745
2745
|
|
|
2746
2746
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
2747
|
-
const { Map, SceneViewCesium } =
|
|
2748
|
-
const { IGSMapImageLayer } =
|
|
2749
|
-
const { LayerEventType } =
|
|
2750
|
-
const { Extent } =
|
|
2747
|
+
const { Map, SceneViewCesium } = zondy
|
|
2748
|
+
const { IGSMapImageLayer } = zondy.Layer
|
|
2749
|
+
const { LayerEventType } = zondy.Enum
|
|
2750
|
+
const { Extent } = zondy.Geometry
|
|
2751
2751
|
// ES6引入方式
|
|
2752
2752
|
import { Map, SceneViewCesium, IGSMapImageLayer, LayerEventType, Extent } from "@mapgis/webclient-cesium-plugin"
|
|
2753
2753
|
// 初始化图层管理容器
|
|
@@ -2783,9 +2783,9 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2783
2783
|
|
|
2784
2784
|
|
|
2785
2785
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
2786
|
-
const { Map, SceneViewCesium } =
|
|
2787
|
-
const { IGSMapImageLayer } =
|
|
2788
|
-
const { LayerEventType } =
|
|
2786
|
+
const { Map, SceneViewCesium } = zondy
|
|
2787
|
+
const { IGSMapImageLayer } = zondy.Layer
|
|
2788
|
+
const { LayerEventType } = zondy.Enum
|
|
2789
2789
|
// ES6引入方式
|
|
2790
2790
|
import { Map, SceneViewCesium, IGSMapImageLayer, LayerEventType } from "@mapgis/webclient-cesium-plugin"
|
|
2791
2791
|
// 初始化图层管理容器
|
|
@@ -4004,7 +4004,7 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
4004
4004
|
|
|
4005
4005
|
|
|
4006
4006
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
4007
|
-
const { Map, SceneViewCesium } =
|
|
4007
|
+
const { Map, SceneViewCesium } = zondy
|
|
4008
4008
|
// ES6引入方式
|
|
4009
4009
|
import { Map, SceneViewCesium } from "@mapgis/webclient-cesium-plugin"
|
|
4010
4010
|
// 初始化图层管理容器
|
|
@@ -4029,8 +4029,8 @@ sceneView.goTo({
|
|
|
4029
4029
|
|
|
4030
4030
|
|
|
4031
4031
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
4032
|
-
const { Map, SceneViewCesium } =
|
|
4033
|
-
const { Extent, Circle } =
|
|
4032
|
+
const { Map, SceneViewCesium } = zondy
|
|
4033
|
+
const { Extent, Circle } = zondy.Geometry
|
|
4034
4034
|
// ES6引入方式
|
|
4035
4035
|
import { Map, SceneViewCesium } from "@mapgis/webclient-cesium-plugin"
|
|
4036
4036
|
// 初始化图层管理容器
|
|
@@ -4986,8 +4986,8 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
4986
4986
|
|
|
4987
4987
|
|
|
4988
4988
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
4989
|
-
var { Map, SceneViewCesium } =
|
|
4990
|
-
var { PictureFormat } =
|
|
4989
|
+
var { Map, SceneViewCesium } = zondy
|
|
4990
|
+
var { PictureFormat } = zondy.Enum
|
|
4991
4991
|
// ES6引入方式
|
|
4992
4992
|
import { Map, SceneViewCesium } from "@mapgis/webclient-cesium-plugin"
|
|
4993
4993
|
import { PictureFormat } from "@mapgis/webclient-common"
|
|
@@ -278,14 +278,16 @@
|
|
|
278
278
|
|
|
279
279
|
|
|
280
280
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
281
|
-
const { Map
|
|
282
|
-
const {
|
|
281
|
+
const { Map } = zondy
|
|
282
|
+
const { SceneView } = zondy.cesium
|
|
283
|
+
const { Screenshot } = zondy.tool
|
|
283
284
|
// ES6引入方式
|
|
284
|
-
import {
|
|
285
|
+
import { SceneView, Screenshot } from "@mapgis/webclient-leaflet-plugin"
|
|
286
|
+
import { Map } from "@mapgis/webclient-common"
|
|
285
287
|
// 初始化图层管理容器
|
|
286
288
|
const map = new Map();
|
|
287
289
|
// 初始化地图视图对象
|
|
288
|
-
const mapView = new
|
|
290
|
+
const mapView = new SceneView({
|
|
289
291
|
// 视图id
|
|
290
292
|
viewId: "viewer-id",
|
|
291
293
|
// 图层管理容器
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
<div class="description">
|
|
38
38
|
<p>Cesium引擎草图编辑类<br/>
|
|
39
39
|
<br>[ES5引入方式]:<br/>
|
|
40
|
-
const {
|
|
40
|
+
const { SketchEditor } = zondy.tool.sketch <br/>
|
|
41
41
|
[ES6引入方式]:<br/>
|
|
42
|
-
import {
|
|
42
|
+
import { SketchEditor } from "@mapgis/webclient-leaflet-plugin" <br/></p>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
@@ -854,9 +854,11 @@ import { SketchEditorCesium } from "@mapgis/webclient-leaflet-plugin"
|
|
|
854
854
|
|
|
855
855
|
|
|
856
856
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
857
|
-
const {
|
|
857
|
+
const { Polygon, LineString } = zondy.geometry
|
|
858
|
+
const { SceneView} = zondy.cesium
|
|
859
|
+
const { SketchEditor } = zondy.cesium.tool.sketch
|
|
858
860
|
[ES6引入方式]:
|
|
859
|
-
import { SceneView,
|
|
861
|
+
import { SceneView, SketchEditor } from "@mapgis/webclient-cesium-plugin" <br/>
|
|
860
862
|
import { Polygon, LineString } from "@mapgis/webclient-common" <br/>
|
|
861
863
|
var map = new Map()
|
|
862
864
|
var sceneView = new SceneView({
|
|
@@ -915,11 +917,11 @@ var testLayer = new GraphicsLayer({
|
|
|
915
917
|
graphics: this.testFeatures
|
|
916
918
|
})
|
|
917
919
|
map.add(testLayer)
|
|
918
|
-
var
|
|
920
|
+
var sketchEditor = new SketchEditor({
|
|
919
921
|
view: sceneView,
|
|
920
922
|
layer: new GraphicsLayer()
|
|
921
923
|
})
|
|
922
|
-
|
|
924
|
+
sketchEditor.drawPolylineToPolygon(testGeometries)</code></pre>
|
|
923
925
|
|
|
924
926
|
|
|
925
927
|
|
|
@@ -1315,16 +1317,18 @@ sketchEditorCesium.drawPolylineToPolygon(testGeometries)</code></pre>
|
|
|
1315
1317
|
|
|
1316
1318
|
|
|
1317
1319
|
<pre class="prettyprint"><code>// [ES5引入方式]:
|
|
1318
|
-
const {
|
|
1320
|
+
const { Polygon, LineString } = zondy.geometry
|
|
1321
|
+
const { SceneView} = zondy.cesium
|
|
1322
|
+
const { SketchEditor } = zondy.cesium.tool.sketch
|
|
1319
1323
|
[ES6引入方式]:
|
|
1320
|
-
import { SceneView,
|
|
1324
|
+
import { SceneView, SketchEditor } from "@mapgis/webclient-cesium-plugin" <br/>
|
|
1321
1325
|
import { Polygon, LineString } from "@mapgis/webclient-common" <br/>
|
|
1322
1326
|
var map = new Map()
|
|
1323
1327
|
var sceneView = new SceneView({
|
|
1324
1328
|
viewId: "mapgis-3d-viewer",
|
|
1325
1329
|
map: map,
|
|
1326
1330
|
})
|
|
1327
|
-
var
|
|
1331
|
+
var SketchEditor = new SketchEditor({
|
|
1328
1332
|
view: sceneView,
|
|
1329
1333
|
layer: new GraphicsLayer()
|
|
1330
1334
|
})
|
|
@@ -1345,7 +1349,7 @@ const polyline = new LineString({
|
|
|
1345
1349
|
[120, 30]
|
|
1346
1350
|
]
|
|
1347
1351
|
})
|
|
1348
|
-
const newSketchEditors =
|
|
1352
|
+
const newSketchEditors = SketchEditor.split(polygon,polyline)</code></pre>
|
|
1349
1353
|
|
|
1350
1354
|
|
|
1351
1355
|
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
<h5>示例</h5>
|
|
361
361
|
|
|
362
362
|
|
|
363
|
-
<pre class="prettyprint"><code>const url = 'http://192.168.82.91:8089/igs/rest/services/Map/湖北省4326/WFSServer'
|
|
364
363
|
const renderer = new SimpleRenderer({
|
|
365
364
|
//...
|
|
366
365
|
})
|
|
367
366
|
// 创建wfsLayer对象
|
|
368
367
|
const wfsLayer = new WFSLayer({
|
|
369
368
|
url,
|
|
370
369
|
sublayerId: 'Map_湖北省4326:t70',
|
|
371
370
|
})
|
|
372
371
|
// 请求获取要素集
|
|
373
372
|
const featureSet = await wfsLayer.queryFeatures()
|
|
374
373
|
const features = featureSet.features
|
|
375
374
|
// 为要素集设置renderer
|
|
376
375
|
RendererUtil.updateRenderer(features, renderer)
|
|
377
376
|
// 将要素集转换为原生Primitive对象
|
|
378
377
|
const primitives = WFSLayerUtil.toPrimitive(features, {
|
|
379
378
|
viewer
|
|
380
379
|
})
|
|
381
380
|
// 将Primitive对象添加到场景中
|
|
382
381
|
for (let i = 0; i < primitives.length; i++) {
|
|
383
382
|
viewer.scene.primitives.add(primitives[i])
|
|
384
383
|
}
|
|
384
|
+
<pre class="prettyprint"><code>const url = 'http://webclient.smaryun.com:8089/igs/rest/services/Map/湖北省4326/WFSServer'
|
|
385
385
|
const renderer = new SimpleRenderer({
|
|
386
386
|
//...
|
|
387
387
|
})
|
|
388
388
|
// 创建wfsLayer对象
|
|
389
389
|
const wfsLayer = new WFSLayer({
|
|
390
390
|
url,
|
|
391
391
|
sublayerId: 'Map_湖北省4326:t70',
|
|
392
392
|
})
|
|
393
393
|
// 请求获取要素集
|
|
394
394
|
const featureSet = await wfsLayer.queryFeatures()
|
|
395
395
|
const features = featureSet.features
|
|
396
396
|
// 为要素集设置renderer
|
|
397
397
|
RendererUtil.updateRenderer(features, renderer)
|
|
398
398
|
// 将要素集转换为原生Primitive对象
|
|
399
399
|
const primitives = WFSLayerUtil.toPrimitive(features, {
|
|
400
400
|
viewer
|
|
401
401
|
})
|
|
402
402
|
// 将Primitive对象添加到场景中
|
|
403
403
|
for (let i = 0; i < primitives.length; i++) {
|
|
404
404
|
viewer.scene.primitives.add(primitives[i])
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
|
|
408
408
|
|
|
@@ -115,13 +115,13 @@
|
|
|
115
115
|
<p class="code-caption"><h7>添加一个WMS服务:原生接口开发</h7></p>
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
119
118
|
const provider = await WebMapServiceImageryProvider.fromUrl(url)
|
|
120
119
|
viewer.imageryLayers.addImageryProvider(provider)
|
|
120
|
+
<pre class="prettyprint"><code>// ES5引入方式
|
|
121
121
|
const provider = await WebMapServiceImageryProvider.fromUrl(url)
|
|
122
122
|
viewer.imageryLayers.addImageryProvider(provider)
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
<p class="code-caption"><h7>添加一个WMS服务:混合接口开发</h7></p>
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
129
128
|
url: url
|
|
130
129
|
// 获取provider的初始化参数
|
|
131
130
|
const options = initializeOptions(layer, viewer)
|
|
132
131
|
// 构造provider对象
|
|
133
132
|
provider = new Cesium.WebMapServiceImageryProvider(options)
|
|
134
133
|
// 添加图层到Cesium视图中
|
|
135
134
|
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
135
|
+
<pre class="prettyprint"><code>// ES5引入方式
|
|
136
136
|
url: url
|
|
137
137
|
// 获取provider的初始化参数
|
|
138
138
|
const options = initializeOptions(layer, viewer)
|
|
139
139
|
// 构造provider对象
|
|
140
140
|
provider = new Cesium.WebMapServiceImageryProvider(options)
|
|
141
141
|
// 添加图层到Cesium视图中
|
|
142
142
|
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
|
|
@@ -115,13 +115,13 @@
|
|
|
115
115
|
<p class="code-caption"><h7>添加一个WMTS服务:原生接口开发</h7></p>
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
119
118
|
const provider = await WebMapTileServiceImageryProvider.fromUrl(url)
|
|
120
119
|
viewer.imageryLayers.addImageryProvider(provider)
|
|
120
|
+
<pre class="prettyprint"><code>// ES5引入方式
|
|
121
121
|
const provider = await WebMapTileServiceImageryProvider.fromUrl(url)
|
|
122
122
|
viewer.imageryLayers.addImageryProvider(provider)
|
|
123
123
|
|
|
124
124
|
|
|
125
125
|
<p class="code-caption"><h7>添加一个WMTS服务:混合接口开发</h7></p>
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
129
128
|
url: url
|
|
130
129
|
// 获取provider的初始化参数
|
|
131
130
|
const options = initializeOptions(layer, viewer)
|
|
132
131
|
// 构造provider对象
|
|
133
132
|
provider = new Cesium.WebMapTileServiceImageryProvider(options)
|
|
134
133
|
// 添加图层到Cesium视图中
|
|
135
134
|
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
135
|
+
<pre class="prettyprint"><code>// ES5引入方式
|
|
136
136
|
url: url
|
|
137
137
|
// 获取provider的初始化参数
|
|
138
138
|
const options = initializeOptions(layer, viewer)
|
|
139
139
|
// 构造provider对象
|
|
140
140
|
provider = new Cesium.WebMapTileServiceImageryProvider(options)
|
|
141
141
|
// 添加图层到Cesium视图中
|
|
142
142
|
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
143
143
|
|
|
144
144
|
|
|
145
145
|
|