@mapgis/webclient-cesium-plugin 17.0.4 → 17.0.7
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 +33 -0
- package/dist/es5/webclient-cesium-plugin.min.js +2 -2
- package/dist/es5/webclient-common.min.js +2 -2
- package/dist/webclient-cesium-plugin-es6.min.js +2 -2
- package/documention/ArcGISMapServerImageryProvider.html +112 -42
- package/documention/ArcGISTileServerImageryProvider.html +76 -30
- package/documention/CustomTilingScheme.html +248 -68
- package/documention/DynamicEntityVisualizer.html +18 -6
- package/documention/DynamicLabelLayer.html +168 -44
- package/documention/GeoJSONLayerUtil.html +21 -5
- package/documention/GraphicsLayerUtil.html +21 -5
- package/documention/HashMap.html +80 -16
- package/documention/IGSFeatureLayerUtil.html +21 -5
- package/documention/IGSSceneLayerUtil.html +178 -54
- package/documention/MapGISMapServerImageryProvider.html +334 -153
- package/documention/MapGISTerrainProvider.html +336 -80
- package/documention/MapGISTileServerImageryProvider.html +308 -86
- package/documention/MapGISVectorTileImageryProvider.html +407 -103
- package/documention/Popup.html +119 -31
- package/documention/SceneViewCesium.html +576 -177
- package/documention/Screenshot.html +30 -10
- package/documention/SketchEditorCesium.html +135 -43
- package/documention/UrlTemplateImageryProvider.html +23 -7
- package/documention/WFSLayerUtil.html +21 -5
- package/documention/WebMapServiceImageryProvider.html +22 -12
- package/documention/WebMapTileServiceImageryProvider.html +22 -12
- package/documention/global.html +17 -5
- 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.EchartsLayer.html +7 -3
- package/documention/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapVLayer.html +81 -29
- package/documention/module.exports_module.exports.html +36 -12
- package/documention/scripts/sideBar.js +111 -6
- package/package.json +1 -1
- package/documention/FeatureLayerUtil.html +0 -471
- package/documention/MapGISTileServerImageProvider.html +0 -2150
- package/documention/SceneView.html +0 -4250
|
@@ -124,12 +124,6 @@
|
|
|
124
124
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
125
125
|
url: url
|
|
126
126
|
// 获取provider的初始化参数
|
|
127
127
|
const options = initializeOptions(layer, viewer)
|
|
128
128
|
// 构造provider对象
|
|
129
129
|
provider = new Cesium.WebMapServiceImageryProvider(options)
|
|
130
130
|
// 添加图层到Cesium视图中
|
|
131
131
|
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
<p class="code-caption"><h7>添加一个WMS服务:混合接口开发</h7></p>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
138
134
|
// 获取tilingScheme
|
|
139
135
|
const tilingScheme = getTilingSchemeBySpatialReference(
|
|
140
136
|
layer.spatialReference,
|
|
141
137
|
layer.extent
|
|
142
138
|
)
|
|
143
139
|
// 获取图层范围
|
|
144
140
|
const extent = getExtent(layer, tilingScheme.rectangle)
|
|
145
141
|
const rectangle = new Cesium.Rectangle(
|
|
146
142
|
extent.xmin,
|
|
147
143
|
extent.ymin,
|
|
148
144
|
extent.xmax,
|
|
149
145
|
extent.ymax
|
|
150
146
|
)
|
|
151
147
|
// 获取服务基地址
|
|
152
148
|
let url = layer.url
|
|
153
149
|
// 设置token和tokenValue
|
|
154
150
|
if (layer.tokenKey && layer.tokenValue) {
|
|
155
151
|
url = `${url}?${layer.tokenKey}=${layer.tokenValue}`
|
|
156
152
|
}
|
|
157
153
|
// 添加图层到Cesium视图中
|
|
158
154
|
viewer.imageryLayers.addImageryProvider(
|
|
159
155
|
new Cesium.WebMapServiceImageryProvider({
|
|
160
156
|
// 服务基地址
|
|
161
157
|
url,
|
|
162
158
|
// 要显示的子图层
|
|
163
159
|
layers: layer.layers,
|
|
164
160
|
// WMS服务参数
|
|
165
161
|
parameters: {
|
|
166
162
|
// 图片格式
|
|
167
163
|
format: layer.imageFormat,
|
|
168
164
|
// 背景是否透明
|
|
169
165
|
transparent: layer.imageTransparency,
|
|
170
166
|
// 服务版本号
|
|
171
167
|
version: layer.version
|
|
172
168
|
},
|
|
173
169
|
// 裁图方式
|
|
174
170
|
tilingScheme,
|
|
175
171
|
// 瓦片宽度
|
|
176
172
|
tileWidth: layer.imageWidth,
|
|
177
173
|
// 瓦片高度
|
|
178
174
|
tileHeight: layer.imageHeight,
|
|
179
175
|
// 服务版本为1.1.0 or 1.1.1时设置srs
|
|
180
176
|
srs: `EPSG:${layer.spatialReference.wkid}`,
|
|
181
177
|
// 服务版本>= 1.3.0时设置crs
|
|
182
178
|
crs: `EPSG:${layer.spatialReference.wkid}`,
|
|
183
179
|
// 瓦片服务的加载范围
|
|
184
180
|
rectangle
|
|
185
181
|
})
|
|
186
182
|
)
|
|
187
|
-
|
|
188
|
-
|
|
189
183
|
|
|
190
184
|
|
|
191
185
|
</div>
|
|
@@ -175,7 +169,11 @@
|
|
|
175
169
|
<code>
|
|
176
170
|
|
|
177
171
|
|
|
178
|
-
<span class="param-type"
|
|
172
|
+
<span class="param-type">
|
|
173
|
+
|
|
174
|
+
<a link="WebMapServiceImageryProvider.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="WebMapServiceImageryProvider" WebMapServiceImageryProvider.html>WebMapServiceImageryProvider</a>
|
|
175
|
+
|
|
176
|
+
</span>
|
|
179
177
|
|
|
180
178
|
|
|
181
179
|
|
|
@@ -245,13 +243,17 @@
|
|
|
245
243
|
|
|
246
244
|
<tr class="deep-level-0">
|
|
247
245
|
|
|
248
|
-
<td class="name"
|
|
246
|
+
<td class="name"><code>url</code></td>
|
|
249
247
|
|
|
250
248
|
|
|
251
249
|
<td class="type">
|
|
252
250
|
|
|
253
251
|
|
|
254
|
-
<span class="param-type">
|
|
252
|
+
<span class="param-type">
|
|
253
|
+
|
|
254
|
+
String
|
|
255
|
+
|
|
256
|
+
</span>
|
|
255
257
|
|
|
256
258
|
|
|
257
259
|
|
|
@@ -270,13 +272,17 @@
|
|
|
270
272
|
|
|
271
273
|
<tr class="deep-level-0">
|
|
272
274
|
|
|
273
|
-
<td class="name"
|
|
275
|
+
<td class="name"><code>options</code></td>
|
|
274
276
|
|
|
275
277
|
|
|
276
278
|
<td class="type">
|
|
277
279
|
|
|
278
280
|
|
|
279
|
-
<span class="param-type">
|
|
281
|
+
<span class="param-type">
|
|
282
|
+
|
|
283
|
+
Object
|
|
284
|
+
|
|
285
|
+
</span>
|
|
280
286
|
|
|
281
287
|
|
|
282
288
|
|
|
@@ -363,7 +369,11 @@
|
|
|
363
369
|
<div class='column is-5 has-text-left'>
|
|
364
370
|
<label>类型: </label>
|
|
365
371
|
|
|
366
|
-
<span class="param-type"
|
|
372
|
+
<span class="param-type">
|
|
373
|
+
|
|
374
|
+
<a link="WebMapServiceImageryProvider.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="WebMapServiceImageryProvider" WebMapServiceImageryProvider.html>WebMapServiceImageryProvider</a>
|
|
375
|
+
|
|
376
|
+
</span>
|
|
367
377
|
|
|
368
378
|
|
|
369
379
|
|
|
@@ -124,12 +124,6 @@
|
|
|
124
124
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
125
125
|
url: url
|
|
126
126
|
// 获取provider的初始化参数
|
|
127
127
|
const options = initializeOptions(layer, viewer)
|
|
128
128
|
// 构造provider对象
|
|
129
129
|
provider = new Cesium.WebMapTileServiceImageryProvider(options)
|
|
130
130
|
// 添加图层到Cesium视图中
|
|
131
131
|
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
<p class="code-caption"><h7>添加一个WMTS服务:混合接口开发</h7></p>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
138
134
|
url: url
|
|
139
135
|
// 获取自定义的tilingScheme对象
|
|
140
136
|
const { tileMatrixSetId, tileMatrixSets } = layer.activeLayer
|
|
141
137
|
const TileMatrixSet = tileMatrixSets.find(
|
|
142
138
|
(tileMatrix) => tileMatrix.id === tileMatrixSetId
|
|
143
139
|
)
|
|
144
140
|
const tileInfo = TileMatrixSet.tileInfo
|
|
145
141
|
let tilingScheme = getTilingSchemeBySpatialReference(
|
|
146
142
|
layer.spatialReference,
|
|
147
143
|
layer.activeLayer.extent,
|
|
148
144
|
tileInfo
|
|
149
145
|
)
|
|
150
146
|
// 获取图层显示范围
|
|
151
147
|
const extent = getExtent(layer, tilingScheme.rectangle)
|
|
152
148
|
const rectangle = new Cesium.Rectangle(
|
|
153
149
|
extent.xmin,
|
|
154
150
|
extent.ymin,
|
|
155
151
|
extent.xmax,
|
|
156
152
|
extent.ymax
|
|
157
153
|
)
|
|
158
154
|
// 如果由token则设置token
|
|
159
155
|
let url = layer.url
|
|
160
156
|
if (layer.tokenValue && layer.tokenKey) {
|
|
161
157
|
url += `?${layer.tokenKey}=${layer.tokenValue}`
|
|
162
158
|
}
|
|
163
159
|
// 设置图层加载级数范围
|
|
164
160
|
const tileMatrixLabels = []
|
|
165
161
|
for (let i = 0; i < tileInfo.lods.length; i++) {
|
|
166
162
|
tileMatrixLabels.push(tileInfo.lods[i].level)
|
|
167
163
|
}
|
|
168
164
|
// 添加图层到Cesium视图中
|
|
169
165
|
viewer.imageryLayers.addImageryProvider(
|
|
170
166
|
new Cesium.WebMapTileServiceImageryProvider({
|
|
171
167
|
// 服务基地址
|
|
172
168
|
url,
|
|
173
169
|
// 图层名称
|
|
174
170
|
layer: layer.activeLayer.title,
|
|
175
171
|
// 请求格式
|
|
176
172
|
format: layer.activeLayer.imageFormat,
|
|
177
173
|
// 瓦片样式
|
|
178
174
|
style: layer.activeLayer.styleId,
|
|
179
175
|
// 比例尺
|
|
180
176
|
tileMatrixSetID: layer.activeLayer.tileMatrixSetId,
|
|
181
177
|
// 裁图方式
|
|
182
178
|
tilingScheme,
|
|
183
179
|
// 瓦片宽度
|
|
184
180
|
tileWidth: layer.imageWidth,
|
|
185
181
|
// 瓦片高度
|
|
186
182
|
tileHeight: layer.imageHeight,
|
|
187
183
|
// 瓦片服务的加载范围
|
|
188
184
|
rectangle,
|
|
189
185
|
// 设置图层加载级数范围
|
|
190
186
|
tileMatrixLabels
|
|
191
187
|
})
|
|
192
188
|
)
|
|
193
|
-
|
|
194
|
-
|
|
195
189
|
|
|
196
190
|
|
|
197
191
|
</div>
|
|
@@ -175,7 +169,11 @@
|
|
|
175
169
|
<code>
|
|
176
170
|
|
|
177
171
|
|
|
178
|
-
<span class="param-type"
|
|
172
|
+
<span class="param-type">
|
|
173
|
+
|
|
174
|
+
<a link="WebMapTileServiceImageryProvider.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="WebMapTileServiceImageryProvider" WebMapTileServiceImageryProvider.html>WebMapTileServiceImageryProvider</a>
|
|
175
|
+
|
|
176
|
+
</span>
|
|
179
177
|
|
|
180
178
|
|
|
181
179
|
|
|
@@ -245,13 +243,17 @@
|
|
|
245
243
|
|
|
246
244
|
<tr class="deep-level-0">
|
|
247
245
|
|
|
248
|
-
<td class="name"
|
|
246
|
+
<td class="name"><code>url</code></td>
|
|
249
247
|
|
|
250
248
|
|
|
251
249
|
<td class="type">
|
|
252
250
|
|
|
253
251
|
|
|
254
|
-
<span class="param-type">
|
|
252
|
+
<span class="param-type">
|
|
253
|
+
|
|
254
|
+
String
|
|
255
|
+
|
|
256
|
+
</span>
|
|
255
257
|
|
|
256
258
|
|
|
257
259
|
|
|
@@ -270,13 +272,17 @@
|
|
|
270
272
|
|
|
271
273
|
<tr class="deep-level-0">
|
|
272
274
|
|
|
273
|
-
<td class="name"
|
|
275
|
+
<td class="name"><code>options</code></td>
|
|
274
276
|
|
|
275
277
|
|
|
276
278
|
<td class="type">
|
|
277
279
|
|
|
278
280
|
|
|
279
|
-
<span class="param-type">
|
|
281
|
+
<span class="param-type">
|
|
282
|
+
|
|
283
|
+
Object
|
|
284
|
+
|
|
285
|
+
</span>
|
|
280
286
|
|
|
281
287
|
|
|
282
288
|
|
|
@@ -363,7 +369,11 @@
|
|
|
363
369
|
<div class='column is-5 has-text-left'>
|
|
364
370
|
<label>类型: </label>
|
|
365
371
|
|
|
366
|
-
<span class="param-type"
|
|
372
|
+
<span class="param-type">
|
|
373
|
+
|
|
374
|
+
<a link="WebMapTileServiceImageryProvider.html" onclick="getTypeHTML(event)" class="mapgis-link-name" title="WebMapTileServiceImageryProvider" WebMapTileServiceImageryProvider.html>WebMapTileServiceImageryProvider</a>
|
|
375
|
+
|
|
376
|
+
</span>
|
|
367
377
|
|
|
368
378
|
|
|
369
379
|
|
package/documention/global.html
CHANGED
|
@@ -129,13 +129,17 @@
|
|
|
129
129
|
|
|
130
130
|
<tr class="deep-level-0">
|
|
131
131
|
|
|
132
|
-
<td class="name"
|
|
132
|
+
<td class="name"><code>layer</code></td>
|
|
133
133
|
|
|
134
134
|
|
|
135
135
|
<td class="type">
|
|
136
136
|
|
|
137
137
|
|
|
138
|
-
<span class="param-type">
|
|
138
|
+
<span class="param-type">
|
|
139
|
+
|
|
140
|
+
Layer
|
|
141
|
+
|
|
142
|
+
</span>
|
|
139
143
|
|
|
140
144
|
|
|
141
145
|
|
|
@@ -154,13 +158,17 @@
|
|
|
154
158
|
|
|
155
159
|
<tr class="deep-level-0">
|
|
156
160
|
|
|
157
|
-
<td class="name"
|
|
161
|
+
<td class="name"><code>viewer</code></td>
|
|
158
162
|
|
|
159
163
|
|
|
160
164
|
<td class="type">
|
|
161
165
|
|
|
162
166
|
|
|
163
|
-
<span class="param-type">
|
|
167
|
+
<span class="param-type">
|
|
168
|
+
|
|
169
|
+
Object
|
|
170
|
+
|
|
171
|
+
</span>
|
|
164
172
|
|
|
165
173
|
|
|
166
174
|
|
|
@@ -249,7 +257,11 @@
|
|
|
249
257
|
<div class='column is-5 has-text-left'>
|
|
250
258
|
<label>类型: </label>
|
|
251
259
|
|
|
252
|
-
<span class="param-type">
|
|
260
|
+
<span class="param-type">
|
|
261
|
+
|
|
262
|
+
Object
|
|
263
|
+
|
|
264
|
+
</span>
|
|
253
265
|
|
|
254
266
|
|
|
255
267
|
|