@mapgis/webclient-cesium-plugin 17.8.1 → 17.10.10
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 +280 -482
- package/dist/esm/commonjsHelpers.js +1 -0
- package/dist/esm/s3m.js +1 -0
- package/dist/esm/webclient-cesium-plugin.js +1 -0
- package/dist/umd/webclient-cesium-plugin.min.js +1 -0
- package/{documention → documentation}/AlgorithmLib.html +169 -149
- package/{documention → documentation}/AngulationTool.html +85 -51
- package/{documention → documentation}/AnimationTool.html +30 -30
- package/{documention → documentation}/ArcGISMapServerImageryProvider.html +9 -13
- package/{documention → documentation}/ArcGISMapServerSingleImageryProvider.html +90 -30
- package/{documention → documentation}/ArcGISTileServerImageryProvider.html +17 -17
- package/{documention → documentation}/ArcGISVectorTileImageryProvider.html +21 -8
- package/{documention → documentation}/BaseImageryProvider.html +2 -2
- package/{documention → documentation}/Cesium.Material.html +2 -2
- package/{documention → documentation}/Cesium.Viewer.html +5 -5
- package/{documention → documentation}/Cesium3DTileset.html +43 -25
- package/{documention → documentation}/CesiumHeatmap.html +22 -19
- package/{documention/S3MTileset.html → documentation/CesiumNavigation.html} +52 -85
- package/{documention → documentation}/CesiumTerrainProvider.html +55 -15
- package/{documention/OpenWeatherImageryProvider.html → documentation/CircleWaveMaterialProperty.html} +75 -95
- package/{documention → documentation}/CollisionDetectionByRender.html +245 -88
- package/{documention → documentation}/CompatibleFunc.html +24 -33
- package/{documention → documentation}/CustomPrimitive.html +3 -5
- package/{documention → documentation}/CustomProjection.html +3 -3
- package/{documention → documentation}/CustomTilingScheme.html +35 -36
- package/{documention → documentation}/CutFillAnalysis.html +59 -27
- package/{documention → documentation}/CuttingTool.html +198 -103
- package/{documention → documentation}/Deferred.html +2 -2
- package/{documention → documentation}/DrawElement.html +418 -34
- package/{documention → documentation}/DrawTool.html +81 -29
- package/documentation/EditTool.html +2819 -0
- package/{documention → documentation}/FirstPersonPerspective.html +18 -10
- package/{documention → documentation}/FloodAnalysis.html +93 -23
- package/{documention → documentation}/FloodAnalysisReflection.html +18 -44
- package/documentation/FlowParticle.html +863 -0
- package/{documention → documentation}/Fluid.html +473 -74
- package/{documention → documentation}/FluidFoam.html +36 -16
- package/{documention → documentation}/FluidReflection.html +68 -15
- package/{documention → documentation}/FluidShadow.html +67 -14
- package/{documention → documentation}/FluidSourceCollection.html +14 -7
- package/{documention → documentation}/FluidSpecular.html +33 -14
- package/documentation/FluidSurfaceDistortion.html +682 -0
- package/documentation/FluidSurfaceFoam.html +1006 -0
- package/{documention → documentation}/FollowPerspective.html +15 -7
- package/{documention → documentation}/GeoJSONLayerUtil.html +38 -10
- package/documentation/GeoJSONLayerView.html +1353 -0
- package/{documention → documentation}/GlobeIndependentTranslucency.html +89 -6
- package/{documention → documentation}/GodPerspective.html +14 -6
- package/{documention → documentation}/Graphic.html +1053 -1042
- package/{documention → documentation}/GraphicTransformTool.html +65 -23
- package/{documention → documentation}/GraphicsLayer.html +359 -156
- package/{documention → documentation}/GraphicsLayerUtil.html +28 -10
- package/documentation/GraphicsLayerView.html +759 -0
- package/{documention/EditTool.html → documentation/HashMap.html} +253 -418
- package/{documention → documentation}/HeightLimited.html +54 -21
- package/documentation/IGSFeatureLayerUtil.html +840 -0
- package/documentation/IGSFeatureLayerView.html +1348 -0
- package/documentation/IGSMapImageLayerUtil.html +855 -0
- package/{documention/IGSFeatureLayerUtil.html → documentation/IGSMapImageLayerView.html} +68 -46
- package/documentation/IGSTileLayerView.html +658 -0
- package/{documention → documentation}/ISSceneLayerUtil.html +3 -3
- package/{documention → documentation}/KeyboardCameraController.html +54 -6
- package/documentation/LightningStorm.html +2073 -0
- package/documentation/MapGISClusterPrimitiveCollection.html +1050 -0
- package/{documention → documentation}/MapGISDynamicLabelCollection.html +370 -178
- package/{documention → documentation}/MapGISFeatureGridCollection.html +123 -89
- package/{documention → documentation}/MapGISImageServerImageryProvider.html +93 -71
- package/{documention → documentation}/MapGISImageServerSingleImageryProvider.html +140 -92
- package/{documention → documentation}/MapGISM3DSet.html +49 -33
- package/{documention → documentation}/MapGISMapServerImageryProvider.html +78 -87
- package/{documention → documentation}/MapGISMapServerSingleImageryProvider.html +111 -43
- package/{documention → documentation}/MapGISTerrainProvider.html +268 -208
- package/{documention → documentation}/MapGISTerrainService.html +124 -82
- package/{documention → documentation}/MapGISTileAvailability.html +104 -47
- package/{documention → documentation}/MapGISTileServerImageryProvider.html +76 -83
- package/{documention → documentation}/MapGISVectorTileImageryProvider.html +135 -115
- package/{documention → documentation}/MeasureAreaTool.html +53 -14
- package/{documention → documentation}/MeasureLengthTool.html +17 -14
- package/{documention → documentation}/MeasureSlopeTool.html +73 -34
- package/{documention/FlowParticle.html → documentation/ModelEditor.html} +132 -116
- package/{documention → documentation}/ModelFilterTool.html +27 -32
- package/{documention → documentation}/ModelTransformTool.html +195 -110
- package/{documention → documentation}/NavigationControl.html +25 -5
- package/{documention → documentation}/NavigationTool.html +36 -14
- package/{documention → documentation}/NormalPerspective.html +33 -7
- package/documentation/OpenWeatherImageryProvider.html +1133 -0
- package/{documention → documentation}/PointFluidSource.html +22 -13
- package/{documention → documentation}/PolylineTrailLinkMaterialProperty.html +104 -20
- package/{documention → documentation}/Popup.html +246 -63
- package/{documention/CesiumNavigation.html → documentation/PostProcessShaderBuilder.html} +10 -54
- package/{documention → documentation}/PostProcessStageLibrary.html +3127 -121
- package/{documention → documentation}/Promise.html +6 -6
- package/{documention → documentation}/ProviderBaseUrlRegExp.html +20 -4
- package/{documention → documentation}/Puddle.html +30 -9
- package/{documention → documentation}/RadarMaterialProperty.html +73 -18
- package/{documention → documentation}/ReImg.html +164 -15
- package/{documention → documentation}/RenderUtil.html +158 -6
- package/{documention → documentation}/ResetViewNavigationControl.html +28 -8
- package/{documention → documentation}/RiverGeometry.html +7 -7
- package/{documention → documentation}/RoamParticle.html +86 -79
- package/{documention → documentation}/RouteAnimationControl.html +37 -15
- package/{documention → documentation}/RouteAnimationLabel.html +39 -12
- package/{documention → documentation}/RouteAnimationModel.html +43 -16
- package/{documention → documentation}/RouteAnimationPath.html +156 -18
- package/{documention → documentation}/RouteAnimationPerspective.html +12 -3
- package/{documention → documentation}/RouteAnimationTool.html +244 -24
- package/documentation/S3MTileset.html +570 -0
- package/{documention → documentation}/SSR.html +20 -39
- package/{documention → documentation}/SceneView.html +615 -419
- package/documentation/SceneViewUtil.html +1253 -0
- package/documentation/Screenshot.html +964 -0
- package/{documention → documentation}/SelectTool.html +31 -77
- package/{documention → documentation}/ShadowRateAnalysis.html +236 -54
- package/{documention → documentation}/ShadowRateDrawCommand.html +18 -6
- package/{documention → documentation}/SingleImageryProvider.html +32 -10
- package/{documention → documentation}/SketchEditor.html +280 -127
- package/documentation/SkyLineAnalysis.html +576 -0
- package/{documention → documentation}/StableParticle.html +165 -46
- package/{documention → documentation}/Style.html +249 -249
- package/{documention → documentation}/TerrainAnalyse.html +391 -105
- package/{documention → documentation}/TerrainExcavateTool.html +99 -3
- package/{documention → documentation}/TerrainProfile.html +198 -56
- package/{documention → documentation}/ThemeManager.html +93 -42
- package/{documention → documentation}/Tooltip.html +35 -18
- package/documentation/TransformTool.html +1010 -0
- package/{documention → documentation}/TriangulationTool.html +122 -83
- package/documentation/UnderfluidCaustic.html +843 -0
- package/documentation/UnderfluidDistortion.html +600 -0
- package/documentation/UnderfluidFog.html +843 -0
- package/documentation/UnderfluidGodRay.html +843 -0
- package/documentation/UnderwaterCaustic.html +867 -0
- package/documentation/UnderwaterDistortion.html +578 -0
- package/documentation/UnderwaterFog.html +867 -0
- package/documentation/UnderwaterGodRay.html +821 -0
- package/{documention → documentation}/UrlTemplateImageryProvider.html +21 -9
- package/{documention → documentation}/UserInterfaceControl.html +28 -9
- package/documentation/VectorTileLayerUtil.html +1364 -0
- package/{documention → documentation}/VisiblityAnalysis.html +15 -12
- package/{documention → documentation}/VolumeCloud.html +113 -21
- package/{documention → documentation}/VolumeFluidSource.html +24 -8
- package/{documention → documentation}/WFSLayerUtil.html +39 -10
- package/documentation/WFSLayerView.html +1353 -0
- package/documentation/WMSLayerUtil.html +879 -0
- package/documentation/WMTSLayerUtil.html +877 -0
- package/documentation/WaterDepth.html +583 -0
- package/{documention → documentation}/WaterReflection.html +29 -26
- package/documentation/WaterSurface.html +2555 -0
- package/{documention/Underwater.html → documentation/WaterSurfaceDistortion.html} +79 -81
- package/documentation/WaterSurfaceFoam.html +1029 -0
- package/documentation/WaterSurfaceSSR.html +867 -0
- package/{documention → documentation}/WebMapServiceImageryProvider.html +8 -12
- package/{documention → documentation}/WebMapServiceSingleImageryProvider.html +94 -32
- package/{documention → documentation}/WebMapTileServiceImageryProvider.html +10 -15
- package/documentation/WebTileLayerUtil.html +877 -0
- package/{documention → documentation}/Wind3D.html +133 -54
- package/{documention → documentation}/ZoomNavigationControl.html +145 -9
- package/documentation/fonts/glyphicons-halflings-regular.svg +543 -0
- package/{documention → documentation}/global.html +14130 -2719
- package/{documention → documentation}/index.html +1 -1
- package/{documention → documentation}/initializeOptions.html +2 -2
- package/{documention → documentation}/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.EchartsLayer.html +96 -95
- package/{documention → documentation}/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapVLayer.html +47 -46
- package/{documention → documentation}/module.exports_module.exports.html +2 -2
- package/{documention → documentation}/nav.html +3267 -1392
- package/documentation/nav.json +320 -0
- package/documentation/styles/adminlte/AdminLTE.min.css +4966 -0
- package/documentation/styles/adminlte/skin-blue.min.css +135 -0
- package/documentation/styles/bootstrap.min.css +7005 -0
- package/documentation/styles/common.css +173 -0
- package/documentation/styles/examples.css +119 -0
- package/{documention → documentation}/styles/font-awesome.css +692 -687
- package/documentation/styles/header.css +558 -0
- package/documentation/styles/jaguar.css +551 -0
- package/{documention → documentation}/styles/prettify-tomorrow.css +59 -28
- package/{documention → documentation}/styles/style.customize.css +83 -99
- package/package.json +42 -22
- package/dist/es5/webclient-cesium-plugin.min.js +0 -77
- package/dist/es5/webclient-common.min.js +0 -159
- package/dist/webclient-cesium-plugin-es6.min.js +0 -77
- package/documention/CircleWaveMaterialProperty.html +0 -382
- package/documention/DynamicEntityVisualizer.html +0 -348
- package/documention/DynamicLabelLayer.html +0 -1841
- package/documention/GroundPrimitiveLayer.html +0 -1675
- package/documention/HashMap.html +0 -4197
- package/documention/ModelEditor.html +0 -374
- package/documention/SceneViewCesium.html +0 -5544
- package/documention/Screenshot.html +0 -773
- package/documention/SketchEditorCesium.html +0 -1571
- package/documention/createColorTexture.html +0 -369
- package/documention/fonts/glyphicons-halflings-regular.svg +0 -288
- package/documention/isCounterClockwise.html +0 -760
- package/documention/scripts/app.min.js +0 -1
- package/documention/scripts/jquery.min.map +0 -1
- package/documention/scripts/search.js +0 -20
- package/documention/scripts/sideBar.js +0 -228
- package/documention/scripts/underscore-min.map +0 -1
- package/documention/styles/adminlte/AdminLTE.min.css +0 -7
- package/documention/styles/adminlte/skin-blue.min.css +0 -1
- package/documention/styles/anchor.png +0 -0
- package/documention/styles/app.min.css +0 -1
- package/documention/styles/bootstrap.min.css +0 -6
- package/documention/styles/c.png +0 -0
- package/documention/styles/common.css +0 -175
- package/documention/styles/examples.css +0 -116
- package/documention/styles/header.css +0 -556
- package/documention/styles/iframe.css +0 -29
- package/documention/styles/jaguar.css +0 -553
- package/documention/styles/m.png +0 -0
- package/documention/styles/reset.css +0 -44
- package/documention/styles/up-arrow.png +0 -0
- package/documention/tutorial-1./345/277/253/351/200/237/345/205/245/351/227/250.html +0 -162
- /package/{documention → documentation}/fonts/fontawesome-webfont.woff2 +0 -0
- /package/{documention → documentation}/fonts/glyphicons-halflings-regular.eot +0 -0
- /package/{documention → documentation}/fonts/glyphicons-halflings-regular.ttf +0 -0
- /package/{documention → documentation}/fonts/glyphicons-halflings-regular.woff +0 -0
- /package/{documention → documentation}/fonts/glyphicons-halflings-regular.woff2 +0 -0
- /package/{documention → documentation}/scripts/adminlte/app.min.js +0 -0
- /package/{documention → documentation}/scripts/bootstrap.min.js +0 -0
- /package/{documention → documentation}/scripts/jquery.min.js +0 -0
- /package/{documention → documentation}/scripts/linenumber.js +0 -0
- /package/{documention → documentation}/scripts/main.js +0 -0
- /package/{documention → documentation}/scripts/prettify/Apache-License-2.0.txt +0 -0
- /package/{documention → documentation}/scripts/prettify/lang-css.js +0 -0
- /package/{documention → documentation}/scripts/prettify/prettify.js +0 -0
- /package/{documention → documentation}/scripts/underscore-min.js +0 -0
- /package/{documention → documentation}/styles/adminlte/font-awesome.min.css +0 -0
- /package/{documention → documentation}/styles/prettify-jsdoc.css +0 -0
|
@@ -83,44 +83,26 @@
|
|
|
83
83
|
<div class="nameContainer">
|
|
84
84
|
<h4 class="name" id="SceneView">
|
|
85
85
|
|
|
86
|
-
new SceneView<span class="signature">(options)</span>
|
|
86
|
+
new SceneView<span class="signature">(<span class="optional">options</span>)</span>
|
|
87
87
|
</h4>
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
<div class="tag-source">
|
|
91
|
-
view/SceneView.js, line
|
|
91
|
+
view/SceneView.js, line 42
|
|
92
92
|
</div>
|
|
93
93
|
|
|
94
94
|
</div>
|
|
95
95
|
|
|
96
96
|
|
|
97
|
-
<p class="summary"><h5>支持如下方法:</h5>
|
|
98
|
-
<a href='#flyTo'>[1、视点跳转]</a><br/>
|
|
99
|
-
<a href='#toJSON'>[2、导出场景视图的配置文件]</a><br/>
|
|
100
|
-
<a href='#fromJSON'>[3、通过一个配置生成一个场景视图对象]</a><br/>
|
|
101
|
-
<a href='#toMap'>[4、屏幕像素坐标点转地理坐标点]</a><br/>
|
|
102
|
-
<a href='#toScreen'>[5、地理坐标点转屏幕像素坐标点]</a><br/>
|
|
103
|
-
<a href='#getSize'>[6、获取当前视图容器的宽高]</a><br/>
|
|
104
|
-
<a href='#getCenter'>[7、获取当前视图中心点]</a><br/>
|
|
105
|
-
<a href='#getExtent'>[8、获取当前视图的地理范围]</a><br/>
|
|
106
|
-
<a href='#getZoom'>[9、获取当前层级]</a><br/>
|
|
107
|
-
<a href='#getScale'>[10、获取当前比例尺]</a><br/>
|
|
108
|
-
<code>11、注册事件</code><br/>
|
|
109
|
-
<code>12、移除事件</code><br/>
|
|
110
|
-
<a href='#getInnerLayer'>[15、获取实际的M3DSet对象]</a><br/>
|
|
111
|
-
<a href='#setCenter'>[16、设置缩视野中心]</a><br/>
|
|
112
|
-
<a href='#setExtent'>[17、设置视图的地理范围]</a><br/>
|
|
113
|
-
<a href='#takeScreenshot'>[18、屏幕快照]</a><br/>
|
|
114
|
-
<a href='#hitTest'>[19、图元检测]</a><br/>
|
|
115
|
-
<a href='#destroy'>[20、销毁视图对象]</a><br/></p>
|
|
116
|
-
|
|
117
97
|
</dt>
|
|
118
98
|
<dd>
|
|
119
99
|
|
|
120
100
|
|
|
121
101
|
<div class="description">
|
|
122
|
-
<p
|
|
123
|
-
|
|
102
|
+
<p>Cesium 引擎下的三维场景视图。</p>
|
|
103
|
+
<p>该类是 <code>@mapgis/webclient-common</code> 中 <code>SceneView</code> 的 Cesium 端具体实现,负责管理三维场景容器、
|
|
104
|
+
视图定位、屏幕坐标与地理坐标转换、图元拾取、屏幕快照以及图层视图联动等能力。
|
|
105
|
+
通常与 <code>Map</code>、各类三维图层和交互工具配合使用,是 Cesium 场景展示与交互的核心视图对象。</p>
|
|
124
106
|
</div>
|
|
125
107
|
|
|
126
108
|
|
|
@@ -141,6 +123,8 @@
|
|
|
141
123
|
<th>Type</th>
|
|
142
124
|
|
|
143
125
|
|
|
126
|
+
<th>Default</th>
|
|
127
|
+
|
|
144
128
|
|
|
145
129
|
<th class="last">Description</th>
|
|
146
130
|
</tr>
|
|
@@ -164,10 +148,23 @@
|
|
|
164
148
|
</td>
|
|
165
149
|
|
|
166
150
|
|
|
151
|
+
<td class="default">
|
|
152
|
+
|
|
153
|
+
{}
|
|
154
|
+
|
|
155
|
+
</td>
|
|
156
|
+
|
|
167
157
|
|
|
168
158
|
<td class="description last">
|
|
169
159
|
|
|
170
|
-
|
|
160
|
+
|
|
161
|
+
<span class="optional"> 可选</span>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<p>构造参数。</p>
|
|
171
168
|
|
|
172
169
|
|
|
173
170
|
<table class="params">
|
|
@@ -219,7 +216,7 @@
|
|
|
219
216
|
|
|
220
217
|
|
|
221
218
|
|
|
222
|
-
<p
|
|
219
|
+
<p>视图关联的地图对象,用于管理底图、业务图层和覆盖物图层。</p></td>
|
|
223
220
|
</tr>
|
|
224
221
|
|
|
225
222
|
|
|
@@ -253,7 +250,7 @@
|
|
|
253
250
|
|
|
254
251
|
|
|
255
252
|
|
|
256
|
-
<p
|
|
253
|
+
<p>场景容器的 DOM ID。未传入 <code>innerView</code> 时,会基于该容器创建 Cesium <code>Viewer</code>。</p></td>
|
|
257
254
|
</tr>
|
|
258
255
|
|
|
259
256
|
|
|
@@ -287,7 +284,7 @@
|
|
|
287
284
|
|
|
288
285
|
|
|
289
286
|
|
|
290
|
-
<p
|
|
287
|
+
<p>外部传入的原生 Cesium <code>Viewer</code> 实例。传入后将复用已有引擎对象,不再由当前类创建。</p></td>
|
|
291
288
|
</tr>
|
|
292
289
|
|
|
293
290
|
|
|
@@ -301,6 +298,12 @@
|
|
|
301
298
|
|
|
302
299
|
|
|
303
300
|
<span class="param-type">Point</span>
|
|
301
|
+
|
|
|
302
|
+
|
|
303
|
+
<span class="param-type">Object</span>
|
|
304
|
+
|
|
|
305
|
+
|
|
306
|
+
<span class="param-type">Array</span>
|
|
304
307
|
|
|
305
308
|
|
|
306
309
|
|
|
@@ -309,7 +312,7 @@
|
|
|
309
312
|
|
|
310
313
|
<td class="default">
|
|
311
314
|
|
|
312
|
-
new Point({coordinates:[105.1250000000032,24.427133220306196]})
|
|
315
|
+
new Point({ coordinates: [105.1250000000032, 24.427133220306196] })
|
|
313
316
|
|
|
314
317
|
</td>
|
|
315
318
|
|
|
@@ -323,7 +326,7 @@
|
|
|
323
326
|
|
|
324
327
|
|
|
325
328
|
|
|
326
|
-
<p
|
|
329
|
+
<p>视图初始中心点。若中心点包含高程,则优先按经纬高定位;若不包含高程,则结合 <code>scale</code> 或 <code>zoom</code> 计算相机高度。</p></td>
|
|
327
330
|
</tr>
|
|
328
331
|
|
|
329
332
|
|
|
@@ -345,6 +348,8 @@
|
|
|
345
348
|
|
|
346
349
|
<td class="default">
|
|
347
350
|
|
|
351
|
+
36978669.4318207
|
|
352
|
+
|
|
348
353
|
</td>
|
|
349
354
|
|
|
350
355
|
|
|
@@ -357,7 +362,7 @@
|
|
|
357
362
|
|
|
358
363
|
|
|
359
364
|
|
|
360
|
-
<p
|
|
365
|
+
<p>视图初始比例尺。仅在未显式传入高程中心点时参与定位计算;当同时传入 <code>scale</code> 和 <code>zoom</code> 时,<code>scale</code> 优先。</p></td>
|
|
361
366
|
</tr>
|
|
362
367
|
|
|
363
368
|
|
|
@@ -391,7 +396,7 @@
|
|
|
391
396
|
|
|
392
397
|
|
|
393
398
|
|
|
394
|
-
<p
|
|
399
|
+
<p>视图初始层级。仅在未传入 <code>scale</code> 且中心点不含高程时参与定位。</p></td>
|
|
395
400
|
</tr>
|
|
396
401
|
|
|
397
402
|
|
|
@@ -405,6 +410,9 @@
|
|
|
405
410
|
|
|
406
411
|
|
|
407
412
|
<span class="param-type">Extent</span>
|
|
413
|
+
|
|
|
414
|
+
|
|
415
|
+
<span class="param-type">Object</span>
|
|
408
416
|
|
|
409
417
|
|
|
410
418
|
|
|
@@ -425,7 +433,7 @@
|
|
|
425
433
|
|
|
426
434
|
|
|
427
435
|
|
|
428
|
-
<p
|
|
436
|
+
<p>视图初始范围。当未传入 <code>center</code> 时,可通过范围进行初始定位。</p></td>
|
|
429
437
|
</tr>
|
|
430
438
|
|
|
431
439
|
|
|
@@ -459,7 +467,7 @@
|
|
|
459
467
|
|
|
460
468
|
|
|
461
469
|
|
|
462
|
-
<p
|
|
470
|
+
<p>视图允许达到的最大比例尺分母。数值越小表示放得越近;若设置该值,会优先转换为对应的最大层级限制。</p></td>
|
|
463
471
|
</tr>
|
|
464
472
|
|
|
465
473
|
|
|
@@ -493,7 +501,7 @@
|
|
|
493
501
|
|
|
494
502
|
|
|
495
503
|
|
|
496
|
-
<p
|
|
504
|
+
<p>视图允许达到的最小比例尺分母。数值越大表示看得越远;若设置该值,会优先转换为对应的最小层级限制。</p></td>
|
|
497
505
|
</tr>
|
|
498
506
|
|
|
499
507
|
|
|
@@ -527,7 +535,7 @@
|
|
|
527
535
|
|
|
528
536
|
|
|
529
537
|
|
|
530
|
-
<p
|
|
538
|
+
<p>最大缩放级数。优先级低于 <code>maxScale</code>。</p></td>
|
|
531
539
|
</tr>
|
|
532
540
|
|
|
533
541
|
|
|
@@ -561,7 +569,7 @@
|
|
|
561
569
|
|
|
562
570
|
|
|
563
571
|
|
|
564
|
-
<p>最小缩放级数。优先级低于minScale</p></td>
|
|
572
|
+
<p>最小缩放级数。优先级低于 <code>minScale</code>。</p></td>
|
|
565
573
|
</tr>
|
|
566
574
|
|
|
567
575
|
|
|
@@ -595,7 +603,7 @@
|
|
|
595
603
|
|
|
596
604
|
|
|
597
605
|
|
|
598
|
-
<p
|
|
606
|
+
<p>视图弹窗配置或弹窗实例。</p></td>
|
|
599
607
|
</tr>
|
|
600
608
|
|
|
601
609
|
|
|
@@ -631,7 +639,7 @@
|
|
|
631
639
|
|
|
632
640
|
|
|
633
641
|
|
|
634
|
-
<p
|
|
642
|
+
<p>透传给原生 Cesium <code>Viewer</code> 的附加构造参数。</p></td>
|
|
635
643
|
</tr>
|
|
636
644
|
|
|
637
645
|
|
|
@@ -667,7 +675,7 @@
|
|
|
667
675
|
|
|
668
676
|
|
|
669
677
|
|
|
670
|
-
<p
|
|
678
|
+
<p>引擎商标缩放系数。默认按 1 倍显示,对应宽 98px、高 28px。</p></td>
|
|
671
679
|
</tr>
|
|
672
680
|
|
|
673
681
|
|
|
@@ -703,7 +711,7 @@
|
|
|
703
711
|
|
|
704
712
|
|
|
705
713
|
|
|
706
|
-
<p
|
|
714
|
+
<p>是否在构造完成后根据 <code>center</code>、<code>scale</code>、<code>zoom</code>、<code>extent</code> 自动执行一次初始定位。</p></td>
|
|
707
715
|
</tr>
|
|
708
716
|
|
|
709
717
|
|
|
@@ -746,19 +754,19 @@
|
|
|
746
754
|
|
|
747
755
|
<h5>Fires</h5>
|
|
748
756
|
<ul>
|
|
749
|
-
<li>BaseView#event
|
|
757
|
+
<li>BaseView#event:click</li>
|
|
750
758
|
|
|
751
|
-
<li>BaseView#event
|
|
759
|
+
<li>BaseView#event:immediate-click</li>
|
|
752
760
|
|
|
753
|
-
<li>BaseView#event
|
|
761
|
+
<li>BaseView#event:double-click</li>
|
|
754
762
|
|
|
755
|
-
<li>BaseView#event
|
|
763
|
+
<li>BaseView#event:mouse-down</li>
|
|
756
764
|
|
|
757
|
-
<li>BaseView#event
|
|
765
|
+
<li>BaseView#event:mouse-up</li>
|
|
758
766
|
|
|
759
|
-
<li>BaseView#event
|
|
767
|
+
<li>BaseView#event:mouse-move</li>
|
|
760
768
|
|
|
761
|
-
<li>BaseView#event
|
|
769
|
+
<li>BaseView#event:view-change</li>
|
|
762
770
|
</ul>
|
|
763
771
|
|
|
764
772
|
|
|
@@ -773,49 +781,40 @@
|
|
|
773
781
|
|
|
774
782
|
<h5>Examples</h5>
|
|
775
783
|
|
|
776
|
-
<p class="code-caption"><h7>初始化三维视图对象</h7></p>
|
|
777
|
-
|
|
778
784
|
|
|
779
785
|
|
|
780
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
786
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
781
787
|
const { Map } = zondy
|
|
782
788
|
const { SceneView } = zondy.cesium
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
import {
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
+
|
|
790
|
+
// ES6 引入方式
|
|
791
|
+
import { Map } from '@mapgis/webclient-common'
|
|
792
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
793
|
+
|
|
794
|
+
const map = new Map()
|
|
789
795
|
const sceneView = new SceneView({
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
map: map
|
|
794
|
-
});</code></pre>
|
|
796
|
+
viewId: 'mapgis-3d-viewer',
|
|
797
|
+
map
|
|
798
|
+
})</code></pre>
|
|
795
799
|
|
|
796
800
|
|
|
797
|
-
<p class="code-caption"><h7>外部初始化三维视图对象</h7></p>
|
|
798
|
-
|
|
799
801
|
|
|
800
802
|
|
|
801
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
803
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
802
804
|
const { Map } = zondy
|
|
803
805
|
const { SceneView } = zondy.cesium
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
import {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
806
|
+
|
|
807
|
+
// ES6 引入方式
|
|
808
|
+
import { Map } from '@mapgis/webclient-common'
|
|
809
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
810
|
+
|
|
811
|
+
const map = new Map()
|
|
812
|
+
const innerView = new Cesium.Viewer('mapgis-3d-viewer')
|
|
811
813
|
const sceneView = new SceneView({
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
// 外部创建的三方cesium对象
|
|
817
|
-
innerView: innerView
|
|
818
|
-
});</code></pre>
|
|
814
|
+
viewId: 'mapgis-3d-viewer',
|
|
815
|
+
map,
|
|
816
|
+
innerView
|
|
817
|
+
})</code></pre>
|
|
819
818
|
|
|
820
819
|
|
|
821
820
|
|
|
@@ -860,7 +859,8 @@ const sceneView = new SceneView({
|
|
|
860
859
|
<dd>
|
|
861
860
|
|
|
862
861
|
<div class="description">
|
|
863
|
-
<p
|
|
862
|
+
<p>当前场景视图中心点。</p>
|
|
863
|
+
<p>该值来源于初始化参数或运行时相机位置换算结果;读取时会根据当前相机位置动态更新。</p>
|
|
864
864
|
</div>
|
|
865
865
|
|
|
866
866
|
|
|
@@ -905,7 +905,7 @@ const sceneView = new SceneView({
|
|
|
905
905
|
<dd>
|
|
906
906
|
|
|
907
907
|
<div class="description">
|
|
908
|
-
<p
|
|
908
|
+
<p>当前视图使用的底层引擎类型。</p>
|
|
909
909
|
</div>
|
|
910
910
|
|
|
911
911
|
|
|
@@ -950,7 +950,7 @@ const sceneView = new SceneView({
|
|
|
950
950
|
<dd>
|
|
951
951
|
|
|
952
952
|
<div class="description">
|
|
953
|
-
<p
|
|
953
|
+
<p>原生 Cesium Viewer 的附加构造参数。</p>
|
|
954
954
|
</div>
|
|
955
955
|
|
|
956
956
|
|
|
@@ -995,7 +995,8 @@ const sceneView = new SceneView({
|
|
|
995
995
|
<dd>
|
|
996
996
|
|
|
997
997
|
<div class="description">
|
|
998
|
-
<p
|
|
998
|
+
<p>当前场景视图地理范围。</p>
|
|
999
|
+
<p>该值会在相机移动结束后根据当前可视区域动态更新。</p>
|
|
999
1000
|
</div>
|
|
1000
1001
|
|
|
1001
1002
|
|
|
@@ -1040,7 +1041,7 @@ const sceneView = new SceneView({
|
|
|
1040
1041
|
<dd>
|
|
1041
1042
|
|
|
1042
1043
|
<div class="description">
|
|
1043
|
-
<p
|
|
1044
|
+
<p>当前视图容器高度,单位像素。</p>
|
|
1044
1045
|
</div>
|
|
1045
1046
|
|
|
1046
1047
|
|
|
@@ -1085,7 +1086,7 @@ const sceneView = new SceneView({
|
|
|
1085
1086
|
<dd>
|
|
1086
1087
|
|
|
1087
1088
|
<div class="description">
|
|
1088
|
-
<p
|
|
1089
|
+
<p>Cesium 商标缩放系数。</p>
|
|
1089
1090
|
</div>
|
|
1090
1091
|
|
|
1091
1092
|
|
|
@@ -1122,7 +1123,7 @@ const sceneView = new SceneView({
|
|
|
1122
1123
|
|
|
1123
1124
|
<dt>
|
|
1124
1125
|
<div class="nameContainer">
|
|
1125
|
-
<h4 class="name" id="
|
|
1126
|
+
<h4 class="name" id="maxScale">maxScale<span class="type-signature type number">Number</span> </h4>
|
|
1126
1127
|
</div>
|
|
1127
1128
|
|
|
1128
1129
|
|
|
@@ -1130,7 +1131,8 @@ const sceneView = new SceneView({
|
|
|
1130
1131
|
<dd>
|
|
1131
1132
|
|
|
1132
1133
|
<div class="description">
|
|
1133
|
-
<p
|
|
1134
|
+
<p>当前场景视图允许达到的最大比例尺分母。</p>
|
|
1135
|
+
<p>数值越小表示放得越近。未设置时由视图结合当前图层状态自动计算;若显式传入,则优先使用该值并换算为对应的最大层级限制。</p>
|
|
1134
1136
|
</div>
|
|
1135
1137
|
|
|
1136
1138
|
|
|
@@ -1167,7 +1169,7 @@ const sceneView = new SceneView({
|
|
|
1167
1169
|
|
|
1168
1170
|
<dt>
|
|
1169
1171
|
<div class="nameContainer">
|
|
1170
|
-
<h4 class="name" id="
|
|
1172
|
+
<h4 class="name" id="maxZoom">maxZoom<span class="type-signature type number">Number</span> </h4>
|
|
1171
1173
|
</div>
|
|
1172
1174
|
|
|
1173
1175
|
|
|
@@ -1175,7 +1177,7 @@ const sceneView = new SceneView({
|
|
|
1175
1177
|
<dd>
|
|
1176
1178
|
|
|
1177
1179
|
<div class="description">
|
|
1178
|
-
<p
|
|
1180
|
+
<p>允许缩放到的最大层级。</p>
|
|
1179
1181
|
</div>
|
|
1180
1182
|
|
|
1181
1183
|
|
|
@@ -1212,7 +1214,7 @@ const sceneView = new SceneView({
|
|
|
1212
1214
|
|
|
1213
1215
|
<dt>
|
|
1214
1216
|
<div class="nameContainer">
|
|
1215
|
-
<h4 class="name" id="
|
|
1217
|
+
<h4 class="name" id="minScale">minScale<span class="type-signature type number">Number</span> </h4>
|
|
1216
1218
|
</div>
|
|
1217
1219
|
|
|
1218
1220
|
|
|
@@ -1220,7 +1222,8 @@ const sceneView = new SceneView({
|
|
|
1220
1222
|
<dd>
|
|
1221
1223
|
|
|
1222
1224
|
<div class="description">
|
|
1223
|
-
<p
|
|
1225
|
+
<p>当前场景视图允许达到的最小比例尺分母。</p>
|
|
1226
|
+
<p>数值越大表示看得越远。未设置时由视图结合当前图层状态自动计算;若显式传入,则优先使用该值并换算为对应的最小层级限制。</p>
|
|
1224
1227
|
</div>
|
|
1225
1228
|
|
|
1226
1229
|
|
|
@@ -1257,7 +1260,7 @@ const sceneView = new SceneView({
|
|
|
1257
1260
|
|
|
1258
1261
|
<dt>
|
|
1259
1262
|
<div class="nameContainer">
|
|
1260
|
-
<h4 class="name" id="
|
|
1263
|
+
<h4 class="name" id="minZoom">minZoom<span class="type-signature type number">Number</span> </h4>
|
|
1261
1264
|
</div>
|
|
1262
1265
|
|
|
1263
1266
|
|
|
@@ -1265,7 +1268,7 @@ const sceneView = new SceneView({
|
|
|
1265
1268
|
<dd>
|
|
1266
1269
|
|
|
1267
1270
|
<div class="description">
|
|
1268
|
-
<p
|
|
1271
|
+
<p>允许缩放到的最小层级。</p>
|
|
1269
1272
|
</div>
|
|
1270
1273
|
|
|
1271
1274
|
|
|
@@ -1302,7 +1305,7 @@ const sceneView = new SceneView({
|
|
|
1302
1305
|
|
|
1303
1306
|
<dt>
|
|
1304
1307
|
<div class="nameContainer">
|
|
1305
|
-
<h4 class="name" id="
|
|
1308
|
+
<h4 class="name" id="popup">popup<span class="type-signature type popup"><a href="Popup.html">Popup</a></span> </h4>
|
|
1306
1309
|
</div>
|
|
1307
1310
|
|
|
1308
1311
|
|
|
@@ -1310,7 +1313,7 @@ const sceneView = new SceneView({
|
|
|
1310
1313
|
<dd>
|
|
1311
1314
|
|
|
1312
1315
|
<div class="description">
|
|
1313
|
-
<p
|
|
1316
|
+
<p>当前视图绑定的弹窗对象。</p>
|
|
1314
1317
|
</div>
|
|
1315
1318
|
|
|
1316
1319
|
|
|
@@ -1347,7 +1350,7 @@ const sceneView = new SceneView({
|
|
|
1347
1350
|
|
|
1348
1351
|
<dt>
|
|
1349
1352
|
<div class="nameContainer">
|
|
1350
|
-
<h4 class="name" id="
|
|
1353
|
+
<h4 class="name" id="scale">scale<span class="type-signature type number">Number</span> </h4>
|
|
1351
1354
|
</div>
|
|
1352
1355
|
|
|
1353
1356
|
|
|
@@ -1355,7 +1358,8 @@ const sceneView = new SceneView({
|
|
|
1355
1358
|
<dd>
|
|
1356
1359
|
|
|
1357
1360
|
<div class="description">
|
|
1358
|
-
<p
|
|
1361
|
+
<p>当前场景视图比例尺。</p>
|
|
1362
|
+
<p>比例尺会根据当前层级动态计算;写入时会触发视图重定位。</p>
|
|
1359
1363
|
</div>
|
|
1360
1364
|
|
|
1361
1365
|
|
|
@@ -1392,7 +1396,7 @@ const sceneView = new SceneView({
|
|
|
1392
1396
|
|
|
1393
1397
|
<dt>
|
|
1394
1398
|
<div class="nameContainer">
|
|
1395
|
-
<h4 class="name" id="
|
|
1399
|
+
<h4 class="name" id="spatialReference">spatialReference<span class="type-signature type spatialreference">SpatialReference</span> </h4>
|
|
1396
1400
|
</div>
|
|
1397
1401
|
|
|
1398
1402
|
|
|
@@ -1400,7 +1404,8 @@ const sceneView = new SceneView({
|
|
|
1400
1404
|
<dd>
|
|
1401
1405
|
|
|
1402
1406
|
<div class="description">
|
|
1403
|
-
<p
|
|
1407
|
+
<p>视图空间参考系。</p>
|
|
1408
|
+
<p>Cesium 三维场景内部统一使用 EPSG:4326 作为经纬度空间参考系,对外只读。</p>
|
|
1404
1409
|
</div>
|
|
1405
1410
|
|
|
1406
1411
|
|
|
@@ -1437,7 +1442,7 @@ const sceneView = new SceneView({
|
|
|
1437
1442
|
|
|
1438
1443
|
<dt>
|
|
1439
1444
|
<div class="nameContainer">
|
|
1440
|
-
<h4 class="name" id="
|
|
1445
|
+
<h4 class="name" id="stationary">stationary<span class="type-signature type boolean">Boolean</span> </h4>
|
|
1441
1446
|
</div>
|
|
1442
1447
|
|
|
1443
1448
|
|
|
@@ -1445,7 +1450,8 @@ const sceneView = new SceneView({
|
|
|
1445
1450
|
<dd>
|
|
1446
1451
|
|
|
1447
1452
|
<div class="description">
|
|
1448
|
-
<p
|
|
1453
|
+
<p>标识当前视图是否处于静止状态。</p>
|
|
1454
|
+
<p>当相机开始移动时为 <code>false</code>,移动结束后恢复为 <code>true</code>。</p>
|
|
1449
1455
|
</div>
|
|
1450
1456
|
|
|
1451
1457
|
|
|
@@ -1478,91 +1484,21 @@ const sceneView = new SceneView({
|
|
|
1478
1484
|
|
|
1479
1485
|
</dd>
|
|
1480
1486
|
|
|
1481
|
-
</dl>
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
<h3 class="subsection-title">Methods</h3>
|
|
1488
1487
|
|
|
1489
|
-
<dl>
|
|
1490
1488
|
|
|
1491
1489
|
<dt>
|
|
1492
1490
|
<div class="nameContainer">
|
|
1493
|
-
<h4 class="name" id="
|
|
1494
|
-
|
|
1495
|
-
SceneView.fromJSON<span class="signature">(json)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="SceneView.html">SceneView</a>}</span>
|
|
1496
|
-
</h4>
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
<div class="tag-source">
|
|
1500
|
-
view/SceneView.js, line 2315
|
|
1501
|
-
</div>
|
|
1502
|
-
|
|
1491
|
+
<h4 class="name" id="width">width<span class="type-signature type number">Number</span> </h4>
|
|
1503
1492
|
</div>
|
|
1504
|
-
|
|
1493
|
+
|
|
1505
1494
|
|
|
1506
1495
|
</dt>
|
|
1507
1496
|
<dd>
|
|
1508
1497
|
|
|
1509
|
-
|
|
1510
1498
|
<div class="description">
|
|
1511
|
-
<p
|
|
1512
|
-
通过一个配置生成一个场景视图对象</p>
|
|
1499
|
+
<p>当前视图容器宽度,单位像素。</p>
|
|
1513
1500
|
</div>
|
|
1514
1501
|
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
<table class="params">
|
|
1524
|
-
<thead>
|
|
1525
|
-
<tr>
|
|
1526
|
-
|
|
1527
|
-
<th>Name</th>
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
<th>Type</th>
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
<th class="last">Description</th>
|
|
1535
|
-
</tr>
|
|
1536
|
-
</thead>
|
|
1537
|
-
|
|
1538
|
-
<tbody>
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
<tr>
|
|
1542
|
-
|
|
1543
|
-
<td class="name"><code>json</code></td>
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
<td class="type">
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
<span class="param-type">Object</span>
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
</td>
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
<td class="description last">
|
|
1558
|
-
|
|
1559
|
-
<p>场景视图配置</p></td>
|
|
1560
|
-
</tr>
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
</tbody>
|
|
1564
|
-
</table>
|
|
1565
|
-
|
|
1566
1502
|
|
|
1567
1503
|
|
|
1568
1504
|
<dl class="details">
|
|
@@ -1591,59 +1527,74 @@ const sceneView = new SceneView({
|
|
|
1591
1527
|
|
|
1592
1528
|
|
|
1593
1529
|
|
|
1530
|
+
</dd>
|
|
1594
1531
|
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
<dt>
|
|
1535
|
+
<div class="nameContainer">
|
|
1536
|
+
<h4 class="name" id="zoom">zoom<span class="type-signature type number">Number</span> </h4>
|
|
1537
|
+
</div>
|
|
1595
1538
|
|
|
1596
|
-
|
|
1597
1539
|
|
|
1540
|
+
</dt>
|
|
1541
|
+
<dd>
|
|
1598
1542
|
|
|
1543
|
+
<div class="description">
|
|
1544
|
+
<p>当前场景视图层级。</p>
|
|
1545
|
+
<p>层级由相机高度换算得到,写入后会同步更新相机高度并触发视图跳转。</p>
|
|
1546
|
+
</div>
|
|
1599
1547
|
|
|
1600
1548
|
|
|
1601
1549
|
|
|
1602
|
-
|
|
1550
|
+
<dl class="details">
|
|
1603
1551
|
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
<table class="params">
|
|
1607
|
-
<thead>
|
|
1608
|
-
<tr>
|
|
1609
1552
|
|
|
1610
|
-
<th>Type</th>
|
|
1611
|
-
<th class="last">Description</th>
|
|
1612
|
-
</tr>
|
|
1613
|
-
</thead>
|
|
1614
|
-
<tbody>
|
|
1615
1553
|
|
|
1616
|
-
<tr>
|
|
1617
|
-
|
|
1618
|
-
<td class="type">
|
|
1619
|
-
|
|
1620
|
-
<a href="SceneView.html">SceneView</a>
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
</td>
|
|
1624
|
-
<td class="description last"></td>
|
|
1625
|
-
</tr>
|
|
1626
1554
|
|
|
1627
|
-
|
|
1628
|
-
</table>
|
|
1555
|
+
|
|
1629
1556
|
|
|
1630
1557
|
|
|
1631
1558
|
|
|
1632
1559
|
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
|
|
1572
|
+
</dl>
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
|
|
1633
1576
|
</dd>
|
|
1634
1577
|
|
|
1578
|
+
</dl>
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
<h3 class="subsection-title">Methods</h3>
|
|
1635
1585
|
|
|
1586
|
+
<dl>
|
|
1636
1587
|
|
|
1637
1588
|
<dt>
|
|
1638
1589
|
<div class="nameContainer">
|
|
1639
1590
|
<h4 class="name" id="destroy">
|
|
1640
1591
|
|
|
1641
|
-
destroy<span class="signature">()</span>
|
|
1592
|
+
destroy<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Promise.html">Promise</a>.<void>}</span>
|
|
1642
1593
|
</h4>
|
|
1643
1594
|
|
|
1644
1595
|
|
|
1645
1596
|
<div class="tag-source">
|
|
1646
|
-
view/SceneView.js, line
|
|
1597
|
+
view/SceneView.js, line 1897
|
|
1647
1598
|
</div>
|
|
1648
1599
|
|
|
1649
1600
|
</div>
|
|
@@ -1654,7 +1605,9 @@ const sceneView = new SceneView({
|
|
|
1654
1605
|
|
|
1655
1606
|
|
|
1656
1607
|
<div class="description">
|
|
1657
|
-
<p
|
|
1608
|
+
<p><a id='destroy'></a>
|
|
1609
|
+
销毁当前视图对象。</p>
|
|
1610
|
+
<p>调用后会释放父类视图资源并销毁底层 Cesium <code>Viewer</code>,不应继续使用当前实例。</p>
|
|
1658
1611
|
</div>
|
|
1659
1612
|
|
|
1660
1613
|
|
|
@@ -1699,6 +1652,35 @@ const sceneView = new SceneView({
|
|
|
1699
1652
|
|
|
1700
1653
|
|
|
1701
1654
|
|
|
1655
|
+
<h5>Returns:</h5>
|
|
1656
|
+
|
|
1657
|
+
|
|
1658
|
+
|
|
1659
|
+
<table class="params">
|
|
1660
|
+
<thead>
|
|
1661
|
+
<tr>
|
|
1662
|
+
|
|
1663
|
+
<th>Type</th>
|
|
1664
|
+
<th class="last">Description</th>
|
|
1665
|
+
</tr>
|
|
1666
|
+
</thead>
|
|
1667
|
+
<tbody>
|
|
1668
|
+
|
|
1669
|
+
<tr>
|
|
1670
|
+
|
|
1671
|
+
<td class="type">
|
|
1672
|
+
|
|
1673
|
+
<a href="Promise.html">Promise</a>.<void>
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
</td>
|
|
1677
|
+
<td class="description last">视图销毁完成后的 Promise。</td>
|
|
1678
|
+
</tr>
|
|
1679
|
+
|
|
1680
|
+
</tbody>
|
|
1681
|
+
</table>
|
|
1682
|
+
|
|
1683
|
+
|
|
1702
1684
|
|
|
1703
1685
|
|
|
1704
1686
|
</dd>
|
|
@@ -1714,7 +1696,7 @@ const sceneView = new SceneView({
|
|
|
1714
1696
|
|
|
1715
1697
|
|
|
1716
1698
|
<div class="tag-source">
|
|
1717
|
-
view/SceneView.js, line
|
|
1699
|
+
view/SceneView.js, line 654
|
|
1718
1700
|
</div>
|
|
1719
1701
|
|
|
1720
1702
|
</div>
|
|
@@ -1725,7 +1707,8 @@ const sceneView = new SceneView({
|
|
|
1725
1707
|
|
|
1726
1708
|
|
|
1727
1709
|
<div class="description">
|
|
1728
|
-
<p
|
|
1710
|
+
<p><a id='flyTo'></a>
|
|
1711
|
+
视点跳转</p>
|
|
1729
1712
|
</div>
|
|
1730
1713
|
|
|
1731
1714
|
|
|
@@ -2218,33 +2201,33 @@ const sceneView = new SceneView({
|
|
|
2218
2201
|
|
|
2219
2202
|
|
|
2220
2203
|
|
|
2221
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
2204
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
2222
2205
|
const { Map } = zondy
|
|
2223
2206
|
const { IGSMapImageLayer } = zondy.layer
|
|
2224
2207
|
const { LayerEventType } = zondy.Enum
|
|
2225
2208
|
const { Extent } = zondy.geometry
|
|
2226
2209
|
const { SceneView } = zondy.cesium
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
import {
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2210
|
+
|
|
2211
|
+
// ES6 引入方式
|
|
2212
|
+
import {
|
|
2213
|
+
Map,
|
|
2214
|
+
IGSMapImageLayer,
|
|
2215
|
+
LayerEventType,
|
|
2216
|
+
Extent
|
|
2217
|
+
} from '@mapgis/webclient-common'
|
|
2218
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
2219
|
+
|
|
2220
|
+
const map = new Map()
|
|
2233
2221
|
const sceneView = new SceneView({
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
});
|
|
2239
|
-
// 添加一个地图图层
|
|
2240
|
-
const igsMapImageLayer = new IGSMapImageLayer({
|
|
2222
|
+
viewId: 'mapgis-3d-viewer',
|
|
2223
|
+
map
|
|
2224
|
+
})
|
|
2225
|
+
const layer = new IGSMapImageLayer({
|
|
2241
2226
|
url: 'http://192.168.82.89:8089/igs/rest/services/Map/Hubei4326/MapServer'
|
|
2242
|
-
})
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
console.log("加载完毕:", result.layer)
|
|
2247
|
-
// 视点跳转
|
|
2227
|
+
})
|
|
2228
|
+
|
|
2229
|
+
map.add(layer)
|
|
2230
|
+
layer.on(LayerEventType.layerViewCreated, () => {
|
|
2248
2231
|
sceneView.flyTo({
|
|
2249
2232
|
extent: new Extent({
|
|
2250
2233
|
xmin: 108.34341,
|
|
@@ -2256,39 +2239,26 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2256
2239
|
})</code></pre>
|
|
2257
2240
|
|
|
2258
2241
|
|
|
2259
|
-
<p class="code-caption"><h7
|
|
2242
|
+
<p class="code-caption"><h7>按中心点跳转</h7></p>
|
|
2260
2243
|
|
|
2261
2244
|
|
|
2262
2245
|
|
|
2263
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
2246
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
2264
2247
|
const { Map } = zondy
|
|
2265
|
-
const { IGSMapImageLayer } = zondy.layer
|
|
2266
|
-
const { LayerEventType } = zondy.Enum
|
|
2267
2248
|
const { SceneView } = zondy.cesium
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
import {
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2249
|
+
|
|
2250
|
+
// ES6 引入方式
|
|
2251
|
+
import { Map } from '@mapgis/webclient-common'
|
|
2252
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
2253
|
+
|
|
2254
|
+
const map = new Map()
|
|
2274
2255
|
const sceneView = new SceneView({
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
const igsMapImageLayer = new IGSMapImageLayer({
|
|
2282
|
-
url: 'http://192.168.82.89:8089/igs/rest/services/Map/Hubei4326/MapServer'
|
|
2283
|
-
});
|
|
2284
|
-
map.add(igsMapImageLayer);
|
|
2285
|
-
// 图层加载完毕
|
|
2286
|
-
igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
2287
|
-
console.log("加载完毕:", result.layer)
|
|
2288
|
-
// 视点跳转
|
|
2289
|
-
sceneView.flyTo({
|
|
2290
|
-
center: [113, 30, 1000000]
|
|
2291
|
-
})
|
|
2256
|
+
viewId: 'mapgis-3d-viewer',
|
|
2257
|
+
map
|
|
2258
|
+
})
|
|
2259
|
+
|
|
2260
|
+
sceneView.flyTo({
|
|
2261
|
+
center: [113, 30, 1000000]
|
|
2292
2262
|
})</code></pre>
|
|
2293
2263
|
|
|
2294
2264
|
|
|
@@ -2301,12 +2271,12 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2301
2271
|
<div class="nameContainer">
|
|
2302
2272
|
<h4 class="name" id="getCenter">
|
|
2303
2273
|
|
|
2304
|
-
getCenter<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{
|
|
2274
|
+
getCenter<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Point|undefined}</span>
|
|
2305
2275
|
</h4>
|
|
2306
2276
|
|
|
2307
2277
|
|
|
2308
2278
|
<div class="tag-source">
|
|
2309
|
-
view/SceneView.js, line
|
|
2279
|
+
view/SceneView.js, line 1163
|
|
2310
2280
|
</div>
|
|
2311
2281
|
|
|
2312
2282
|
</div>
|
|
@@ -2318,7 +2288,8 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2318
2288
|
|
|
2319
2289
|
<div class="description">
|
|
2320
2290
|
<p><a id='getCenter'></a>
|
|
2321
|
-
|
|
2291
|
+
获取当前视图中心点。</p>
|
|
2292
|
+
<p>返回值来源于当前相机位置换算结果,包含经度、纬度和相机高度信息。</p>
|
|
2322
2293
|
</div>
|
|
2323
2294
|
|
|
2324
2295
|
|
|
@@ -2381,11 +2352,14 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2381
2352
|
|
|
2382
2353
|
<td class="type">
|
|
2383
2354
|
|
|
2384
|
-
|
|
2355
|
+
Point
|
|
2356
|
+
|
|
|
2357
|
+
|
|
2358
|
+
undefined
|
|
2385
2359
|
|
|
2386
2360
|
|
|
2387
2361
|
</td>
|
|
2388
|
-
<td class="description last"
|
|
2362
|
+
<td class="description last">当前视图中心点;视图尚未初始化完成时返回 <code>undefined</code>。</td>
|
|
2389
2363
|
</tr>
|
|
2390
2364
|
|
|
2391
2365
|
</tbody>
|
|
@@ -2402,12 +2376,12 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2402
2376
|
<div class="nameContainer">
|
|
2403
2377
|
<h4 class="name" id="getExtent">
|
|
2404
2378
|
|
|
2405
|
-
getExtent<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Extent}</span>
|
|
2379
|
+
getExtent<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Extent|undefined}</span>
|
|
2406
2380
|
</h4>
|
|
2407
2381
|
|
|
2408
2382
|
|
|
2409
2383
|
<div class="tag-source">
|
|
2410
|
-
view/SceneView.js, line
|
|
2384
|
+
view/SceneView.js, line 1215
|
|
2411
2385
|
</div>
|
|
2412
2386
|
|
|
2413
2387
|
</div>
|
|
@@ -2419,7 +2393,8 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2419
2393
|
|
|
2420
2394
|
<div class="description">
|
|
2421
2395
|
<p><a id='getExtent'></a>
|
|
2422
|
-
|
|
2396
|
+
获取当前视图范围。</p>
|
|
2397
|
+
<p>范围由当前相机可视区域动态计算得到,返回结果的空间参考系与视图保持一致。</p>
|
|
2423
2398
|
</div>
|
|
2424
2399
|
|
|
2425
2400
|
|
|
@@ -2483,10 +2458,13 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2483
2458
|
<td class="type">
|
|
2484
2459
|
|
|
2485
2460
|
Extent
|
|
2461
|
+
|
|
|
2462
|
+
|
|
2463
|
+
undefined
|
|
2486
2464
|
|
|
2487
2465
|
|
|
2488
2466
|
</td>
|
|
2489
|
-
<td class="description last"
|
|
2467
|
+
<td class="description last">当前视图范围;视图尚未初始化完成时返回 <code>undefined</code>。</td>
|
|
2490
2468
|
</tr>
|
|
2491
2469
|
|
|
2492
2470
|
</tbody>
|
|
@@ -2508,7 +2486,7 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2508
2486
|
|
|
2509
2487
|
|
|
2510
2488
|
<div class="tag-source">
|
|
2511
|
-
view/SceneView.js, line
|
|
2489
|
+
view/SceneView.js, line 1786
|
|
2512
2490
|
</div>
|
|
2513
2491
|
|
|
2514
2492
|
</div>
|
|
@@ -2519,7 +2497,8 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2519
2497
|
|
|
2520
2498
|
|
|
2521
2499
|
<div class="description">
|
|
2522
|
-
<p
|
|
2500
|
+
<p><a id='getScale'></a>
|
|
2501
|
+
获取当前比例尺</p>
|
|
2523
2502
|
</div>
|
|
2524
2503
|
|
|
2525
2504
|
|
|
@@ -2608,7 +2587,7 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2608
2587
|
|
|
2609
2588
|
|
|
2610
2589
|
<div class="tag-source">
|
|
2611
|
-
view/SceneView.js, line
|
|
2590
|
+
view/SceneView.js, line 1147
|
|
2612
2591
|
</div>
|
|
2613
2592
|
|
|
2614
2593
|
</div>
|
|
@@ -2620,7 +2599,8 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2620
2599
|
|
|
2621
2600
|
<div class="description">
|
|
2622
2601
|
<p><a id='getSize'></a>
|
|
2623
|
-
|
|
2602
|
+
获取当前视图容器的宽高。</p>
|
|
2603
|
+
<p>返回值单位为像素,可用于计算视图布局、截图范围或自定义屏幕坐标换算逻辑。</p>
|
|
2624
2604
|
</div>
|
|
2625
2605
|
|
|
2626
2606
|
|
|
@@ -2687,7 +2667,7 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2687
2667
|
|
|
2688
2668
|
|
|
2689
2669
|
</td>
|
|
2690
|
-
<td class="description last"
|
|
2670
|
+
<td class="description last">视图容器尺寸对象,包含 <code>x</code> 和 <code>y</code> 两个属性。</td>
|
|
2691
2671
|
</tr>
|
|
2692
2672
|
|
|
2693
2673
|
</tbody>
|
|
@@ -2709,7 +2689,7 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2709
2689
|
|
|
2710
2690
|
|
|
2711
2691
|
<div class="tag-source">
|
|
2712
|
-
view/SceneView.js, line
|
|
2692
|
+
view/SceneView.js, line 1729
|
|
2713
2693
|
</div>
|
|
2714
2694
|
|
|
2715
2695
|
</div>
|
|
@@ -2720,7 +2700,8 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2720
2700
|
|
|
2721
2701
|
|
|
2722
2702
|
<div class="description">
|
|
2723
|
-
<p
|
|
2703
|
+
<p><a id='getZoom'></a>
|
|
2704
|
+
获取当前层级</p>
|
|
2724
2705
|
</div>
|
|
2725
2706
|
|
|
2726
2707
|
|
|
@@ -2809,7 +2790,7 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
2809
2790
|
|
|
2810
2791
|
|
|
2811
2792
|
<div class="tag-source">
|
|
2812
|
-
view/SceneView.js, line
|
|
2793
|
+
view/SceneView.js, line 781
|
|
2813
2794
|
</div>
|
|
2814
2795
|
|
|
2815
2796
|
</div>
|
|
@@ -3299,50 +3280,44 @@ igsMapImageLayer.on(LayerEventType.layerViewCreated, function (result) {
|
|
|
3299
3280
|
|
|
3300
3281
|
|
|
3301
3282
|
|
|
3302
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
3283
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
3303
3284
|
const { Map } = zondy
|
|
3304
3285
|
const { SceneView } = zondy.cesium
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
import {
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
sceneView = new SceneView({
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
});
|
|
3317
|
-
// 视点跳转
|
|
3286
|
+
|
|
3287
|
+
// ES6 引入方式
|
|
3288
|
+
import { Map } from '@mapgis/webclient-common'
|
|
3289
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
3290
|
+
|
|
3291
|
+
const map = new Map()
|
|
3292
|
+
const sceneView = new SceneView({
|
|
3293
|
+
viewId: 'view-id',
|
|
3294
|
+
map
|
|
3295
|
+
})
|
|
3296
|
+
|
|
3318
3297
|
sceneView.goTo({
|
|
3319
|
-
// 跳转中心点
|
|
3320
3298
|
center: [115.47643872463577, 30.980700423496124],
|
|
3321
|
-
// 地图层级
|
|
3322
3299
|
zoom: 8
|
|
3323
|
-
})
|
|
3300
|
+
})</code></pre>
|
|
3324
3301
|
|
|
3325
3302
|
|
|
3326
3303
|
<p class="code-caption"><h7>按范围跳转示例</h7></p>
|
|
3327
3304
|
|
|
3328
3305
|
|
|
3329
3306
|
|
|
3330
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
3307
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
3331
3308
|
const { Map } = zondy
|
|
3332
3309
|
const { Extent, Circle } = zondy.geometry
|
|
3333
3310
|
const { SceneView } = zondy.cesium
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
import {
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
sceneView = new SceneView({
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
map: map
|
|
3345
|
-
});
|
|
3311
|
+
|
|
3312
|
+
// ES6 引入方式
|
|
3313
|
+
import { Map, Extent, Circle } from '@mapgis/webclient-common'
|
|
3314
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
3315
|
+
|
|
3316
|
+
const map = new Map()
|
|
3317
|
+
const sceneView = new SceneView({
|
|
3318
|
+
viewId: 'view-id',
|
|
3319
|
+
map
|
|
3320
|
+
})
|
|
3346
3321
|
const extent1 = new Extent({
|
|
3347
3322
|
xmin: 111.88463529230717,
|
|
3348
3323
|
ymin: 28.646934514163803,
|
|
@@ -3352,14 +3327,14 @@ const extent1 = new Extent({
|
|
|
3352
3327
|
const geometry2 = new Circle({
|
|
3353
3328
|
center: [111, 29],
|
|
3354
3329
|
radius: 100,
|
|
3355
|
-
radiusUnit:
|
|
3330
|
+
radiusUnit: 'kilometers'
|
|
3356
3331
|
})
|
|
3357
3332
|
sceneView
|
|
3358
3333
|
.goTo({
|
|
3359
|
-
target: [extent1, geometry2]
|
|
3334
|
+
target: [extent1, geometry2]
|
|
3360
3335
|
})
|
|
3361
3336
|
.then(() => {
|
|
3362
|
-
console.log(
|
|
3337
|
+
console.log('gotoExtent callback')
|
|
3363
3338
|
})</code></pre>
|
|
3364
3339
|
|
|
3365
3340
|
|
|
@@ -3372,12 +3347,12 @@ sceneView
|
|
|
3372
3347
|
<div class="nameContainer">
|
|
3373
3348
|
<h4 class="name" id="hitTest">
|
|
3374
3349
|
|
|
3375
|
-
hitTest<span class="signature">(screenPoint)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array}</span>
|
|
3350
|
+
hitTest<span class="signature">(screenPoint)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Array.<Object>}</span>
|
|
3376
3351
|
</h4>
|
|
3377
3352
|
|
|
3378
3353
|
|
|
3379
3354
|
<div class="tag-source">
|
|
3380
|
-
view/SceneView.js, line
|
|
3355
|
+
view/SceneView.js, line 1291
|
|
3381
3356
|
</div>
|
|
3382
3357
|
|
|
3383
3358
|
</div>
|
|
@@ -3388,7 +3363,10 @@ sceneView
|
|
|
3388
3363
|
|
|
3389
3364
|
|
|
3390
3365
|
<div class="description">
|
|
3391
|
-
<p
|
|
3366
|
+
<p><a id='hitTest'></a>
|
|
3367
|
+
根据屏幕像素坐标执行图元拾取。支持拾取的图层类型有GraphicLayer,IGSFeatureLayer,GeoJSONLayer, WFSLayer,M3DModelCacheLayer, Cesium3DTilesCacheLayer, IGSSceneLayer,ISSceneLayer。</p>
|
|
3368
|
+
<p>适用于点击查询、悬停高亮等交互场景。当前支持几何图层、要素图层以及模型缓存/场景图层的拾取结果解析。
|
|
3369
|
+
对于 10.7.4.10 及以后版本中的外置属性模型缓存数据,结果里的 <code>graphic</code> 可能为 <code>Promise</code>。</p>
|
|
3392
3370
|
</div>
|
|
3393
3371
|
|
|
3394
3372
|
|
|
@@ -3435,7 +3413,7 @@ sceneView
|
|
|
3435
3413
|
|
|
3436
3414
|
<td class="description last">
|
|
3437
3415
|
|
|
3438
|
-
<p>屏幕像素坐标点,例如{ x: 900, y: 500 }</p></td>
|
|
3416
|
+
<p>屏幕像素坐标点,例如 <code>{ x: 900, y: 500 }</code>。</p></td>
|
|
3439
3417
|
</tr>
|
|
3440
3418
|
|
|
3441
3419
|
|
|
@@ -3496,11 +3474,11 @@ sceneView
|
|
|
3496
3474
|
|
|
3497
3475
|
<td class="type">
|
|
3498
3476
|
|
|
3499
|
-
Array
|
|
3477
|
+
Array.<Object>
|
|
3500
3478
|
|
|
3501
3479
|
|
|
3502
3480
|
</td>
|
|
3503
|
-
<td class="description last"
|
|
3481
|
+
<td class="description last">图元检测结果数组,结果项中通常包含 <code>graphic</code>、<code>layer</code>、<code>mapPoint</code>、<code>type</code> 等信息。</td>
|
|
3504
3482
|
</tr>
|
|
3505
3483
|
|
|
3506
3484
|
</tbody>
|
|
@@ -3511,48 +3489,41 @@ sceneView
|
|
|
3511
3489
|
|
|
3512
3490
|
<h5>Example</h5>
|
|
3513
3491
|
|
|
3514
|
-
<p class="code-caption"><h7
|
|
3492
|
+
<p class="code-caption"><h7>屏幕位置拾取图元</h7></p>
|
|
3515
3493
|
|
|
3516
3494
|
|
|
3517
3495
|
|
|
3518
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
3496
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
3519
3497
|
const { Map, Feature } = zondy
|
|
3520
|
-
const { Point
|
|
3521
|
-
const { GraphicsLayer
|
|
3498
|
+
const { Point } = zondy.geometry
|
|
3499
|
+
const { GraphicsLayer } = zondy.layer
|
|
3522
3500
|
const { SceneView } = zondy.cesium
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
import { Map, Point,
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
// 图层管理容器
|
|
3533
|
-
map: map,
|
|
3501
|
+
|
|
3502
|
+
// ES6 引入方式
|
|
3503
|
+
import { Map, Point, GraphicsLayer, Feature } from '@mapgis/webclient-common'
|
|
3504
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
3505
|
+
|
|
3506
|
+
const map = new Map()
|
|
3507
|
+
const sceneView = new SceneView({
|
|
3508
|
+
viewId: 'mapgis-3d-viewer',
|
|
3509
|
+
map
|
|
3534
3510
|
})
|
|
3535
|
-
// 创建一个要素
|
|
3536
|
-
const feature = [
|
|
3537
|
-
new Feature({
|
|
3538
|
-
id: '11111',
|
|
3539
|
-
geometry: new Point({ coordinates: [113, 30] }),
|
|
3540
|
-
}),
|
|
3541
|
-
new Feature({
|
|
3542
|
-
id: '11112',
|
|
3543
|
-
geometry: new Point({ coordinates: [113, 30.15] }),
|
|
3544
|
-
}),
|
|
3545
|
-
new Feature({
|
|
3546
|
-
id: '11112',
|
|
3547
|
-
geometry: new Point({ coordinates: [113, 35] }),
|
|
3548
|
-
}),
|
|
3549
|
-
]
|
|
3550
|
-
// 初始化几何图层
|
|
3551
3511
|
const graphicsLayer = new GraphicsLayer({
|
|
3552
|
-
graphics:
|
|
3512
|
+
graphics: [
|
|
3513
|
+
new Feature({
|
|
3514
|
+
id: '11111',
|
|
3515
|
+
geometry: new Point({ coordinates: [113, 30] })
|
|
3516
|
+
}),
|
|
3517
|
+
new Feature({
|
|
3518
|
+
id: '11112',
|
|
3519
|
+
geometry: new Point({ coordinates: [113, 30.15] })
|
|
3520
|
+
})
|
|
3521
|
+
]
|
|
3553
3522
|
})
|
|
3554
|
-
|
|
3555
|
-
|
|
3523
|
+
|
|
3524
|
+
map.add(graphicsLayer)
|
|
3525
|
+
const result = sceneView.hitTest({ x: 1000, y: 600 })
|
|
3526
|
+
console.log(result)</code></pre>
|
|
3556
3527
|
|
|
3557
3528
|
|
|
3558
3529
|
|
|
@@ -3564,12 +3535,12 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3564
3535
|
<div class="nameContainer">
|
|
3565
3536
|
<h4 class="name" id="setCenter">
|
|
3566
3537
|
|
|
3567
|
-
setCenter<span class="signature">(value)</span>
|
|
3538
|
+
setCenter<span class="signature">(value)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{void}</span>
|
|
3568
3539
|
</h4>
|
|
3569
3540
|
|
|
3570
3541
|
|
|
3571
3542
|
<div class="tag-source">
|
|
3572
|
-
view/SceneView.js, line
|
|
3543
|
+
view/SceneView.js, line 1185
|
|
3573
3544
|
</div>
|
|
3574
3545
|
|
|
3575
3546
|
</div>
|
|
@@ -3581,7 +3552,8 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3581
3552
|
|
|
3582
3553
|
<div class="description">
|
|
3583
3554
|
<p><a id='setCenter'></a>
|
|
3584
|
-
|
|
3555
|
+
设置当前视图中心点。</p>
|
|
3556
|
+
<p>设置后会保留已有高程或使用传入高程,并立即触发一次视图跳转。</p>
|
|
3585
3557
|
</div>
|
|
3586
3558
|
|
|
3587
3559
|
|
|
@@ -3619,6 +3591,9 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3619
3591
|
|
|
3620
3592
|
|
|
3621
3593
|
<span class="param-type">Point</span>
|
|
3594
|
+
|
|
|
3595
|
+
|
|
3596
|
+
<span class="param-type">Array.<Number></span>
|
|
3622
3597
|
|
|
3623
3598
|
|
|
3624
3599
|
|
|
@@ -3628,7 +3603,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3628
3603
|
|
|
3629
3604
|
<td class="description last">
|
|
3630
3605
|
|
|
3631
|
-
<p
|
|
3606
|
+
<p>视图中心点,支持传入 <code>Point</code> 实例或 <code>[x, y]</code> / <code>[x, y, z]</code> 数组。</p></td>
|
|
3632
3607
|
</tr>
|
|
3633
3608
|
|
|
3634
3609
|
|
|
@@ -3671,6 +3646,35 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3671
3646
|
|
|
3672
3647
|
|
|
3673
3648
|
|
|
3649
|
+
<h5>Returns:</h5>
|
|
3650
|
+
|
|
3651
|
+
|
|
3652
|
+
|
|
3653
|
+
<table class="params">
|
|
3654
|
+
<thead>
|
|
3655
|
+
<tr>
|
|
3656
|
+
|
|
3657
|
+
<th>Type</th>
|
|
3658
|
+
<th class="last">Description</th>
|
|
3659
|
+
</tr>
|
|
3660
|
+
</thead>
|
|
3661
|
+
<tbody>
|
|
3662
|
+
|
|
3663
|
+
<tr>
|
|
3664
|
+
|
|
3665
|
+
<td class="type">
|
|
3666
|
+
|
|
3667
|
+
void
|
|
3668
|
+
|
|
3669
|
+
|
|
3670
|
+
</td>
|
|
3671
|
+
<td class="description last"></td>
|
|
3672
|
+
</tr>
|
|
3673
|
+
|
|
3674
|
+
</tbody>
|
|
3675
|
+
</table>
|
|
3676
|
+
|
|
3677
|
+
|
|
3674
3678
|
|
|
3675
3679
|
|
|
3676
3680
|
</dd>
|
|
@@ -3681,12 +3685,12 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3681
3685
|
<div class="nameContainer">
|
|
3682
3686
|
<h4 class="name" id="setExtent">
|
|
3683
3687
|
|
|
3684
|
-
setExtent<span class="signature">(value)</span>
|
|
3688
|
+
setExtent<span class="signature">(value)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{void}</span>
|
|
3685
3689
|
</h4>
|
|
3686
3690
|
|
|
3687
3691
|
|
|
3688
3692
|
<div class="tag-source">
|
|
3689
|
-
view/SceneView.js, line
|
|
3693
|
+
view/SceneView.js, line 1247
|
|
3690
3694
|
</div>
|
|
3691
3695
|
|
|
3692
3696
|
</div>
|
|
@@ -3698,7 +3702,8 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3698
3702
|
|
|
3699
3703
|
<div class="description">
|
|
3700
3704
|
<p><a id='setExtent'></a>
|
|
3701
|
-
|
|
3705
|
+
设置视图范围并跳转到该范围。</p>
|
|
3706
|
+
<p>适用于按业务范围快速重定位视图,调用后会同步更新内部缓存的范围状态。</p>
|
|
3702
3707
|
</div>
|
|
3703
3708
|
|
|
3704
3709
|
|
|
@@ -3745,7 +3750,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3745
3750
|
|
|
3746
3751
|
<td class="description last">
|
|
3747
3752
|
|
|
3748
|
-
<p
|
|
3753
|
+
<p>目标范围。</p></td>
|
|
3749
3754
|
</tr>
|
|
3750
3755
|
|
|
3751
3756
|
|
|
@@ -3788,6 +3793,35 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3788
3793
|
|
|
3789
3794
|
|
|
3790
3795
|
|
|
3796
|
+
<h5>Returns:</h5>
|
|
3797
|
+
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
<table class="params">
|
|
3801
|
+
<thead>
|
|
3802
|
+
<tr>
|
|
3803
|
+
|
|
3804
|
+
<th>Type</th>
|
|
3805
|
+
<th class="last">Description</th>
|
|
3806
|
+
</tr>
|
|
3807
|
+
</thead>
|
|
3808
|
+
<tbody>
|
|
3809
|
+
|
|
3810
|
+
<tr>
|
|
3811
|
+
|
|
3812
|
+
<td class="type">
|
|
3813
|
+
|
|
3814
|
+
void
|
|
3815
|
+
|
|
3816
|
+
|
|
3817
|
+
</td>
|
|
3818
|
+
<td class="description last"></td>
|
|
3819
|
+
</tr>
|
|
3820
|
+
|
|
3821
|
+
</tbody>
|
|
3822
|
+
</table>
|
|
3823
|
+
|
|
3824
|
+
|
|
3791
3825
|
|
|
3792
3826
|
|
|
3793
3827
|
</dd>
|
|
@@ -3798,12 +3832,12 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3798
3832
|
<div class="nameContainer">
|
|
3799
3833
|
<h4 class="name" id="takeScreenshot">
|
|
3800
3834
|
|
|
3801
|
-
takeScreenshot<span class="signature">(<span class="optional">options</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Promise.html">Promise</a>}</span>
|
|
3835
|
+
takeScreenshot<span class="signature">(<span class="optional">options</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Promise.html">Promise</a>.<Object>}</span>
|
|
3802
3836
|
</h4>
|
|
3803
3837
|
|
|
3804
3838
|
|
|
3805
3839
|
<div class="tag-source">
|
|
3806
|
-
view/SceneView.js, line
|
|
3840
|
+
view/SceneView.js, line 1844
|
|
3807
3841
|
</div>
|
|
3808
3842
|
|
|
3809
3843
|
</div>
|
|
@@ -3814,7 +3848,9 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3814
3848
|
|
|
3815
3849
|
|
|
3816
3850
|
<div class="description">
|
|
3817
|
-
<p
|
|
3851
|
+
<p><a id='takeScreenshot'></a>
|
|
3852
|
+
对当前场景执行屏幕快照。</p>
|
|
3853
|
+
<p>可用于导出当前视图画面,支持指定图片格式、截图范围和是否自动下载。</p>
|
|
3818
3854
|
</div>
|
|
3819
3855
|
|
|
3820
3856
|
|
|
@@ -3876,7 +3912,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3876
3912
|
|
|
3877
3913
|
|
|
3878
3914
|
|
|
3879
|
-
<p
|
|
3915
|
+
<p>屏幕快照配置。</p>
|
|
3880
3916
|
|
|
3881
3917
|
|
|
3882
3918
|
<table class="params">
|
|
@@ -3930,7 +3966,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3930
3966
|
|
|
3931
3967
|
|
|
3932
3968
|
|
|
3933
|
-
<p>图片格式,支持png
|
|
3969
|
+
<p>图片格式,支持 <code>png</code> 和 <code>jpeg</code>。</p></td>
|
|
3934
3970
|
</tr>
|
|
3935
3971
|
|
|
3936
3972
|
|
|
@@ -3966,7 +4002,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
3966
4002
|
|
|
3967
4003
|
|
|
3968
4004
|
|
|
3969
|
-
<p
|
|
4005
|
+
<p>下载文件名。</p></td>
|
|
3970
4006
|
</tr>
|
|
3971
4007
|
|
|
3972
4008
|
|
|
@@ -4000,7 +4036,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
4000
4036
|
|
|
4001
4037
|
|
|
4002
4038
|
|
|
4003
|
-
<p
|
|
4039
|
+
<p>输出图片宽度。</p></td>
|
|
4004
4040
|
</tr>
|
|
4005
4041
|
|
|
4006
4042
|
|
|
@@ -4034,7 +4070,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
4034
4070
|
|
|
4035
4071
|
|
|
4036
4072
|
|
|
4037
|
-
<p
|
|
4073
|
+
<p>输出图片高度。</p></td>
|
|
4038
4074
|
</tr>
|
|
4039
4075
|
|
|
4040
4076
|
|
|
@@ -4068,7 +4104,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
4068
4104
|
|
|
4069
4105
|
|
|
4070
4106
|
|
|
4071
|
-
<p
|
|
4107
|
+
<p>截图原点的横向像素坐标。</p></td>
|
|
4072
4108
|
</tr>
|
|
4073
4109
|
|
|
4074
4110
|
|
|
@@ -4102,7 +4138,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
4102
4138
|
|
|
4103
4139
|
|
|
4104
4140
|
|
|
4105
|
-
<p
|
|
4141
|
+
<p>截图原点的纵向像素坐标。</p></td>
|
|
4106
4142
|
</tr>
|
|
4107
4143
|
|
|
4108
4144
|
|
|
@@ -4138,7 +4174,7 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
4138
4174
|
|
|
4139
4175
|
|
|
4140
4176
|
|
|
4141
|
-
<p
|
|
4177
|
+
<p>是否在生成快照后自动下载图片。</p></td>
|
|
4142
4178
|
</tr>
|
|
4143
4179
|
|
|
4144
4180
|
|
|
@@ -4205,11 +4241,11 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
4205
4241
|
|
|
4206
4242
|
<td class="type">
|
|
4207
4243
|
|
|
4208
|
-
<a href="Promise.html">Promise</a>
|
|
4244
|
+
<a href="Promise.html">Promise</a>.<Object>
|
|
4209
4245
|
|
|
4210
4246
|
|
|
4211
4247
|
</td>
|
|
4212
|
-
<td class="description last"
|
|
4248
|
+
<td class="description last">屏幕快照结果,通常包含 <code>dataUrl</code> 等数据。</td>
|
|
4213
4249
|
</tr>
|
|
4214
4250
|
|
|
4215
4251
|
</tbody>
|
|
@@ -4224,29 +4260,28 @@ const result = this.sceneView.hitTest({x:1000,y:600})</code></pre>
|
|
|
4224
4260
|
|
|
4225
4261
|
|
|
4226
4262
|
|
|
4227
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4263
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
4264
|
+
const { Map } = zondy
|
|
4265
|
+
const { SceneView } = zondy.cesium
|
|
4266
|
+
const { PictureFormat } = zondy.Enum
|
|
4267
|
+
|
|
4268
|
+
// ES6 引入方式
|
|
4269
|
+
import { Map, PictureFormat } from '@mapgis/webclient-common'
|
|
4270
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
4271
|
+
|
|
4272
|
+
const map = new Map()
|
|
4236
4273
|
const sceneView = new SceneView({
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
// 图层管理容器
|
|
4240
|
-
map: map
|
|
4274
|
+
viewId: 'mapgis-3d-viewer',
|
|
4275
|
+
map
|
|
4241
4276
|
})
|
|
4242
|
-
|
|
4243
|
-
const screenshotOptions
|
|
4244
|
-
|
|
4277
|
+
|
|
4278
|
+
const screenshotOptions = {
|
|
4279
|
+
format: PictureFormat.PNG,
|
|
4280
|
+
isDownload: false
|
|
4245
4281
|
}
|
|
4246
|
-
|
|
4282
|
+
|
|
4247
4283
|
sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
4248
|
-
|
|
4249
|
-
console.log("dataUrl:", result.dataUrl)
|
|
4284
|
+
console.log('dataUrl:', result.dataUrl)
|
|
4250
4285
|
})</code></pre>
|
|
4251
4286
|
|
|
4252
4287
|
|
|
@@ -4264,7 +4299,7 @@ sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
|
4264
4299
|
|
|
4265
4300
|
|
|
4266
4301
|
<div class="tag-source">
|
|
4267
|
-
view/SceneView.js, line
|
|
4302
|
+
view/SceneView.js, line 1040
|
|
4268
4303
|
</div>
|
|
4269
4304
|
|
|
4270
4305
|
</div>
|
|
@@ -4275,8 +4310,8 @@ sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
|
4275
4310
|
|
|
4276
4311
|
|
|
4277
4312
|
<div class="description">
|
|
4278
|
-
<p
|
|
4279
|
-
|
|
4313
|
+
<p>导出当前场景视图的 JSON 配置。</p>
|
|
4314
|
+
<p>适用于保存视图初始化参数或与 <code>SceneView.fromJSON</code> 配套实现视图状态恢复。</p>
|
|
4280
4315
|
</div>
|
|
4281
4316
|
|
|
4282
4317
|
|
|
@@ -4343,7 +4378,7 @@ sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
|
4343
4378
|
|
|
4344
4379
|
|
|
4345
4380
|
</td>
|
|
4346
|
-
<td class="description last"
|
|
4381
|
+
<td class="description last">可用于恢复 <code>SceneView</code> 实例的配置对象。</td>
|
|
4347
4382
|
</tr>
|
|
4348
4383
|
|
|
4349
4384
|
</tbody>
|
|
@@ -4360,12 +4395,12 @@ sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
|
4360
4395
|
<div class="nameContainer">
|
|
4361
4396
|
<h4 class="name" id="toMap">
|
|
4362
4397
|
|
|
4363
|
-
toMap<span class="signature">(screenPoint)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Point}</span>
|
|
4398
|
+
toMap<span class="signature">(screenPoint)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{Point|null}</span>
|
|
4364
4399
|
</h4>
|
|
4365
4400
|
|
|
4366
4401
|
|
|
4367
4402
|
<div class="tag-source">
|
|
4368
|
-
view/SceneView.js, line
|
|
4403
|
+
view/SceneView.js, line 1052
|
|
4369
4404
|
</div>
|
|
4370
4405
|
|
|
4371
4406
|
</div>
|
|
@@ -4377,7 +4412,8 @@ sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
|
4377
4412
|
|
|
4378
4413
|
<div class="description">
|
|
4379
4414
|
<p><a id='toMap'></a>
|
|
4380
|
-
|
|
4415
|
+
将屏幕像素坐标转换为地理坐标点。</p>
|
|
4416
|
+
<p>通常用于鼠标点击、悬停等交互场景下,将屏幕位置换算为场景中的经纬高坐标。</p>
|
|
4381
4417
|
</div>
|
|
4382
4418
|
|
|
4383
4419
|
|
|
@@ -4424,7 +4460,7 @@ sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
|
4424
4460
|
|
|
4425
4461
|
<td class="description last">
|
|
4426
4462
|
|
|
4427
|
-
<p
|
|
4463
|
+
<p>屏幕像素坐标点,<code>x</code> 范围为 <code>[0, canvas.width - 1]</code>,<code>y</code> 范围为 <code>[0, canvas.height - 1]</code>,例如 <code>{ x: 900, y: 500 }</code>。</p></td>
|
|
4428
4464
|
</tr>
|
|
4429
4465
|
|
|
4430
4466
|
|
|
@@ -4486,10 +4522,13 @@ sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
|
4486
4522
|
<td class="type">
|
|
4487
4523
|
|
|
4488
4524
|
Point
|
|
4525
|
+
|
|
|
4526
|
+
|
|
4527
|
+
null
|
|
4489
4528
|
|
|
4490
4529
|
|
|
4491
4530
|
</td>
|
|
4492
|
-
<td class="description last"
|
|
4531
|
+
<td class="description last">转换得到的地理坐标点;当屏幕位置未拾取到有效场景位置时返回 <code>null</code>。</td>
|
|
4493
4532
|
</tr>
|
|
4494
4533
|
|
|
4495
4534
|
</tbody>
|
|
@@ -4504,21 +4543,18 @@ sceneView.takeScreenshot(screenshotOptions).then((result) => {
|
|
|
4504
4543
|
|
|
4505
4544
|
|
|
4506
4545
|
|
|
4507
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
4546
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
4508
4547
|
const { Map } = zondy
|
|
4509
|
-
const { Point } = zondy.geometry
|
|
4510
4548
|
const { SceneView } = zondy.cesium
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
import { Map
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4549
|
+
|
|
4550
|
+
// ES6 引入方式
|
|
4551
|
+
import { Map } from '@mapgis/webclient-common'
|
|
4552
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
4553
|
+
|
|
4554
|
+
const map = new Map()
|
|
4517
4555
|
const sceneView = new SceneView({
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
// 图层管理容器
|
|
4521
|
-
map: map,
|
|
4556
|
+
viewId: 'mapgis-3d-viewer',
|
|
4557
|
+
map
|
|
4522
4558
|
})
|
|
4523
4559
|
const screenPoint = { x: 900, y: 500 }
|
|
4524
4560
|
sceneView.toMap(screenPoint)</code></pre>
|
|
@@ -4538,7 +4574,7 @@ sceneView.toMap(screenPoint)</code></pre>
|
|
|
4538
4574
|
|
|
4539
4575
|
|
|
4540
4576
|
<div class="tag-source">
|
|
4541
|
-
view/SceneView.js, line
|
|
4577
|
+
view/SceneView.js, line 1113
|
|
4542
4578
|
</div>
|
|
4543
4579
|
|
|
4544
4580
|
</div>
|
|
@@ -4550,7 +4586,8 @@ sceneView.toMap(screenPoint)</code></pre>
|
|
|
4550
4586
|
|
|
4551
4587
|
<div class="description">
|
|
4552
4588
|
<p><a id='toScreen'></a>
|
|
4553
|
-
|
|
4589
|
+
将地理坐标点转换为当前视图中的屏幕像素坐标。</p>
|
|
4590
|
+
<p>适用于弹窗定位、覆盖物对齐和自定义交互提示等需要将地理位置映射到屏幕位置的场景。</p>
|
|
4554
4591
|
</div>
|
|
4555
4592
|
|
|
4556
4593
|
|
|
@@ -4597,7 +4634,7 @@ sceneView.toMap(screenPoint)</code></pre>
|
|
|
4597
4634
|
|
|
4598
4635
|
<td class="description last">
|
|
4599
4636
|
|
|
4600
|
-
<p
|
|
4637
|
+
<p>地理坐标点。</p></td>
|
|
4601
4638
|
</tr>
|
|
4602
4639
|
|
|
4603
4640
|
|
|
@@ -4662,7 +4699,7 @@ sceneView.toMap(screenPoint)</code></pre>
|
|
|
4662
4699
|
|
|
4663
4700
|
|
|
4664
4701
|
</td>
|
|
4665
|
-
<td class="description last"
|
|
4702
|
+
<td class="description last">屏幕像素坐标点对象。</td>
|
|
4666
4703
|
</tr>
|
|
4667
4704
|
|
|
4668
4705
|
</tbody>
|
|
@@ -4677,27 +4714,186 @@ sceneView.toMap(screenPoint)</code></pre>
|
|
|
4677
4714
|
|
|
4678
4715
|
|
|
4679
4716
|
|
|
4680
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
4717
|
+
<pre class="prettyprint"><code>// ES5 引入方式
|
|
4681
4718
|
const { Map } = zondy
|
|
4682
|
-
const { Point
|
|
4719
|
+
const { Point } = zondy.geometry
|
|
4683
4720
|
const { SceneView } = zondy.cesium
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
import { Map, Point
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4721
|
+
|
|
4722
|
+
// ES6 引入方式
|
|
4723
|
+
import { Map, Point } from '@mapgis/webclient-common'
|
|
4724
|
+
import { SceneView } from '@mapgis/webclient-cesium-plugin'
|
|
4725
|
+
|
|
4726
|
+
const map = new Map()
|
|
4690
4727
|
const sceneView = new SceneView({
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
map: map
|
|
4695
|
-
});
|
|
4728
|
+
viewId: 'mapgis-3d-viewer',
|
|
4729
|
+
map
|
|
4730
|
+
})
|
|
4696
4731
|
const geoPoint = new Point({ coordinates: [123, 23, 0] })
|
|
4697
4732
|
sceneView.toScreen(geoPoint)</code></pre>
|
|
4698
4733
|
|
|
4699
4734
|
|
|
4700
4735
|
|
|
4736
|
+
</dd>
|
|
4737
|
+
|
|
4738
|
+
|
|
4739
|
+
|
|
4740
|
+
<dt>
|
|
4741
|
+
<div class="nameContainer">
|
|
4742
|
+
<h4 class="name" id=".fromJSON">
|
|
4743
|
+
|
|
4744
|
+
SceneView.fromJSON<span class="signature">(<span class="optional">json</span>)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="SceneView.html">SceneView</a>}</span>
|
|
4745
|
+
</h4>
|
|
4746
|
+
|
|
4747
|
+
|
|
4748
|
+
<div class="tag-source">
|
|
4749
|
+
view/SceneView.js, line 2322
|
|
4750
|
+
</div>
|
|
4751
|
+
|
|
4752
|
+
</div>
|
|
4753
|
+
|
|
4754
|
+
|
|
4755
|
+
</dt>
|
|
4756
|
+
<dd>
|
|
4757
|
+
|
|
4758
|
+
|
|
4759
|
+
<div class="description">
|
|
4760
|
+
<p>通过 JSON 配置创建一个新的场景视图实例。</p>
|
|
4761
|
+
<p>适用于从持久化配置恢复 <code>SceneView</code>,通常与 <code>toJSON</code> 配套使用。</p>
|
|
4762
|
+
</div>
|
|
4763
|
+
|
|
4764
|
+
|
|
4765
|
+
|
|
4766
|
+
|
|
4767
|
+
|
|
4768
|
+
|
|
4769
|
+
|
|
4770
|
+
|
|
4771
|
+
|
|
4772
|
+
<table class="params">
|
|
4773
|
+
<thead>
|
|
4774
|
+
<tr>
|
|
4775
|
+
|
|
4776
|
+
<th>Name</th>
|
|
4777
|
+
|
|
4778
|
+
|
|
4779
|
+
<th>Type</th>
|
|
4780
|
+
|
|
4781
|
+
|
|
4782
|
+
<th>Default</th>
|
|
4783
|
+
|
|
4784
|
+
|
|
4785
|
+
<th class="last">Description</th>
|
|
4786
|
+
</tr>
|
|
4787
|
+
</thead>
|
|
4788
|
+
|
|
4789
|
+
<tbody>
|
|
4790
|
+
|
|
4791
|
+
|
|
4792
|
+
<tr>
|
|
4793
|
+
|
|
4794
|
+
<td class="name"><code>json</code></td>
|
|
4795
|
+
|
|
4796
|
+
|
|
4797
|
+
<td class="type">
|
|
4798
|
+
|
|
4799
|
+
|
|
4800
|
+
<span class="param-type">Object</span>
|
|
4801
|
+
|
|
4802
|
+
|
|
4803
|
+
|
|
4804
|
+
</td>
|
|
4805
|
+
|
|
4806
|
+
|
|
4807
|
+
<td class="default">
|
|
4808
|
+
|
|
4809
|
+
{}
|
|
4810
|
+
|
|
4811
|
+
</td>
|
|
4812
|
+
|
|
4813
|
+
|
|
4814
|
+
<td class="description last">
|
|
4815
|
+
|
|
4816
|
+
|
|
4817
|
+
<span class="optional"> 可选</span>
|
|
4818
|
+
|
|
4819
|
+
|
|
4820
|
+
|
|
4821
|
+
|
|
4822
|
+
|
|
4823
|
+
<p>场景视图配置对象。</p></td>
|
|
4824
|
+
</tr>
|
|
4825
|
+
|
|
4826
|
+
|
|
4827
|
+
</tbody>
|
|
4828
|
+
</table>
|
|
4829
|
+
|
|
4830
|
+
|
|
4831
|
+
|
|
4832
|
+
<dl class="details">
|
|
4833
|
+
|
|
4834
|
+
|
|
4835
|
+
|
|
4836
|
+
|
|
4837
|
+
|
|
4838
|
+
|
|
4839
|
+
|
|
4840
|
+
|
|
4841
|
+
|
|
4842
|
+
|
|
4843
|
+
|
|
4844
|
+
|
|
4845
|
+
|
|
4846
|
+
|
|
4847
|
+
|
|
4848
|
+
|
|
4849
|
+
|
|
4850
|
+
|
|
4851
|
+
|
|
4852
|
+
|
|
4853
|
+
|
|
4854
|
+
</dl>
|
|
4855
|
+
|
|
4856
|
+
|
|
4857
|
+
|
|
4858
|
+
|
|
4859
|
+
|
|
4860
|
+
|
|
4861
|
+
|
|
4862
|
+
|
|
4863
|
+
|
|
4864
|
+
|
|
4865
|
+
|
|
4866
|
+
<h5>Returns:</h5>
|
|
4867
|
+
|
|
4868
|
+
|
|
4869
|
+
|
|
4870
|
+
<table class="params">
|
|
4871
|
+
<thead>
|
|
4872
|
+
<tr>
|
|
4873
|
+
|
|
4874
|
+
<th>Type</th>
|
|
4875
|
+
<th class="last">Description</th>
|
|
4876
|
+
</tr>
|
|
4877
|
+
</thead>
|
|
4878
|
+
<tbody>
|
|
4879
|
+
|
|
4880
|
+
<tr>
|
|
4881
|
+
|
|
4882
|
+
<td class="type">
|
|
4883
|
+
|
|
4884
|
+
<a href="SceneView.html">SceneView</a>
|
|
4885
|
+
|
|
4886
|
+
|
|
4887
|
+
</td>
|
|
4888
|
+
<td class="description last">新创建的场景视图实例。</td>
|
|
4889
|
+
</tr>
|
|
4890
|
+
|
|
4891
|
+
</tbody>
|
|
4892
|
+
</table>
|
|
4893
|
+
|
|
4894
|
+
|
|
4895
|
+
|
|
4896
|
+
|
|
4701
4897
|
</dd>
|
|
4702
4898
|
|
|
4703
4899
|
</dl>
|
|
@@ -4714,7 +4910,7 @@ sceneView.toScreen(geoPoint)</code></pre>
|
|
|
4714
4910
|
|
|
4715
4911
|
|
|
4716
4912
|
<footer>
|
|
4717
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> on Fri
|
|
4913
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> on Fri Sep 18 2026 14:59:30 GMT+0800 (中国标准时间)
|
|
4718
4914
|
</footer>
|
|
4719
4915
|
</div>
|
|
4720
4916
|
</div>
|