@mapgis/webclient-cesium-plugin 17.0.5 → 17.2.0
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 +9 -29
- package/dist/es5/webclient-cesium-plugin.min.js +6 -6
- package/dist/es5/webclient-common.min.js +15 -4
- package/dist/webclient-cesium-plugin-es6.min.js +6 -6
- package/documention/ArcGISMapServerImageryProvider.html +1 -7
- package/documention/ArcGISTileServerImageryProvider.html +0 -6
- package/documention/ArcGISVectorTileImageryProvider.html +866 -0
- package/documention/CustomTilingScheme.html +5 -5
- package/documention/GeoJSONLayerUtil.html +1 -1
- package/documention/IGSFeatureLayerUtil.html +1 -1
- package/documention/IGSSceneLayerUtil.html +626 -29
- package/documention/MapGISMapServerImageryProvider.html +7 -70
- package/documention/MapGISTerrainProvider.html +499 -558
- package/documention/MapGISTileServerImageryProvider.html +154 -8
- package/documention/MapGISVectorTileImageryProvider.html +253 -0
- package/documention/SceneViewCesium.html +4 -130
- package/documention/Screenshot.html +0 -11
- package/documention/SketchEditorCesium.html +63 -1
- package/documention/UrlTemplateImageryProvider.html +45 -1
- package/documention/WFSLayerUtil.html +1 -1
- package/documention/WebMapServiceImageryProvider.html +2 -8
- package/documention/WebMapTileServiceImageryProvider.html +55 -8
- package/documention/index.html +5 -5
- package/documention/scripts/sideBar.js +16 -2
- package/package.json +2 -3
- package/documention/FeatureLayerUtil.html +0 -471
- package/documention/MapGISTileServerImageProvider.html +0 -2150
- package/documention/SceneView.html +0 -4250
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
|
|
551
551
|
<tr class="deep-level-1">
|
|
552
552
|
|
|
553
|
-
<td class="name"><code>
|
|
553
|
+
<td class="name"><code>extensions</code></td>
|
|
554
554
|
|
|
555
555
|
|
|
556
556
|
<td class="type">
|
|
@@ -573,7 +573,7 @@
|
|
|
573
573
|
</td>
|
|
574
574
|
|
|
575
575
|
|
|
576
|
-
<td class="description last"><p
|
|
576
|
+
<td class="description last"><p>自定义扩展参数,将参数里面的对象解析出来拼装在出图地址后面</p></td>
|
|
577
577
|
</tr>
|
|
578
578
|
|
|
579
579
|
|
|
@@ -786,7 +786,7 @@ const { MapGISMapServerImageryProvider } = Zondy
|
|
|
786
786
|
import { MapGISMapServerImageryProvider } from "@mapgis/webclient-cesium-plugin"
|
|
787
787
|
|
|
788
788
|
// 定义IGS地图图片图层服务的基地址
|
|
789
|
-
const url = 'http://
|
|
789
|
+
const url = 'http://192.168.82.91:8089/igs/rest/services/Map/湖北省4326/MapServer'
|
|
790
790
|
|
|
791
791
|
// 添加IGS地图图片图层
|
|
792
792
|
async function addIGSMapImageLayer(url) {
|
|
@@ -809,7 +809,7 @@ import { MapGISMapServerImageryProvider, initializeOptions } from "@mapgis/webcl
|
|
|
809
809
|
import { IGSMapImageLayer } from "@mapgis/webclient-common"
|
|
810
810
|
|
|
811
811
|
// 定义IGS地图图片图层服务的基地址
|
|
812
|
-
const url = 'http://
|
|
812
|
+
const url = 'http://192.168.82.91:8089/igs/rest/services/Map/湖北省4326/MapServer'
|
|
813
813
|
|
|
814
814
|
// 创建地图图片图层对象
|
|
815
815
|
igsMapImageLayer = new IGSMapImageLayer({
|
|
@@ -827,70 +827,7 @@ igsMapImageLayer.load().then((layer) => {
|
|
|
827
827
|
})</code></pre>
|
|
828
828
|
|
|
829
829
|
|
|
830
|
-
<p class="code-caption"><h7
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
<pre class="prettyprint"><code>// ES5引入方式
|
|
834
|
-
const { MapGISMapServerImageryProvider } = Zondy
|
|
835
|
-
const { IGSMapImageLayer } = Zondy.Layer
|
|
836
|
-
const { getTilingSchemeBySpatialReference, getExtent } = Zondy.Utils
|
|
837
|
-
// ES6引入方式
|
|
838
|
-
import { MapGISMapServerImageryProvider, getTilingSchemeBySpatialReference, getExtent } from "@mapgis/webclient-cesium-plugin"
|
|
839
|
-
import { IGSMapImageLayer } from "@mapgis/webclient-common"
|
|
840
|
-
|
|
841
|
-
// 定义IGS地图图片图层服务的基地址
|
|
842
|
-
const url = 'http://webclient.smaryun.com:8089/igs/rest/services/Map/湖北省4326/MapServer'
|
|
843
|
-
|
|
844
|
-
// 创建地图图片图层对象
|
|
845
|
-
igsMapImageLayer = new IGSMapImageLayer({
|
|
846
|
-
url: url
|
|
847
|
-
})
|
|
848
|
-
|
|
849
|
-
// 获取地图图片图层服务的元信息
|
|
850
|
-
igsMapImageLayer.load().then((layer) => {
|
|
851
|
-
// 获取自定义的tilingScheme对象
|
|
852
|
-
const tilingScheme = getTilingSchemeBySpatialReference(
|
|
853
|
-
layer.spatialReference,
|
|
854
|
-
layer.extent
|
|
855
|
-
)
|
|
856
|
-
|
|
857
|
-
// 获取图层显示范围
|
|
858
|
-
const extent = getExtent(layer, tilingScheme.rectangle)
|
|
859
|
-
const rectangle = new Cesium.Rectangle(
|
|
860
|
-
extent.xmin,
|
|
861
|
-
extent.ymin,
|
|
862
|
-
extent.xmax,
|
|
863
|
-
extent.ymax
|
|
864
|
-
)
|
|
865
|
-
|
|
866
|
-
// 构造provider对象
|
|
867
|
-
provider = new Cesium.MapGISMapServerImageryProvider({
|
|
868
|
-
// 服务基地址
|
|
869
|
-
url: layer.url,
|
|
870
|
-
// 瓦片宽度
|
|
871
|
-
tileWidth: layer.imageWidth,
|
|
872
|
-
// 瓦片高度
|
|
873
|
-
tileHeight: layer.imageHeight,
|
|
874
|
-
// 是否显示子图层
|
|
875
|
-
layers: layer.layers,
|
|
876
|
-
// 地图瓦片的切分方式,经纬度或者Web墨卡托
|
|
877
|
-
tilingScheme,
|
|
878
|
-
// 客户端id,用户的唯一标识;在地图服务中,调用接口时如果修改了地图的状态,包括设置动态投影、设置图层显示隐藏等,为了提升并发性能,服务端会根据clientId来生成临时地图,最佳做法是一个浏览器生成一个固定的唯一值;建议普通用户不要传该参数,webclient会根据当前浏览器生成一个固定的唯一值
|
|
879
|
-
clientId: layer.clientId,
|
|
880
|
-
// 支持IGS2.0动态投影
|
|
881
|
-
projectionSrs: 'EPSG:4326',
|
|
882
|
-
// 地图服务的加载范围
|
|
883
|
-
rectangle,
|
|
884
|
-
// 是否启用抗锯齿
|
|
885
|
-
isAntialiasing: true
|
|
886
|
-
})
|
|
887
|
-
|
|
888
|
-
// 添加图层到Cesium视图中
|
|
889
|
-
cesiumLayer = viewer.imageryLayers.addImageryProvider(provider)
|
|
890
|
-
})</code></pre>
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
<p class="code-caption"><h7>extendProps参数的配置方法</h7></p>
|
|
830
|
+
<p class="code-caption"><h7>extensions参数的配置方法</h7></p>
|
|
894
831
|
|
|
895
832
|
|
|
896
833
|
<pre class="prettyprint"><code>// ES5引入方式
|
|
@@ -898,11 +835,11 @@ const { MapGISMapServerImageryProvider } = Zondy
|
|
|
898
835
|
// ES6引入方式
|
|
899
836
|
import { MapGISMapServerImageryProvider } from "@mapgis/webclient-cesium-pulgin-mini"
|
|
900
837
|
|
|
901
|
-
//
|
|
838
|
+
// extensions参数为自定义扩展参数,需要确保服务端支持此类参数
|
|
902
839
|
const imageryProvider = new MapGISMapServerImageryProvider({
|
|
903
840
|
url,
|
|
904
841
|
tilingScheme,
|
|
905
|
-
|
|
842
|
+
extensions: [
|
|
906
843
|
{ key: 'token', value: 'example_token' },
|
|
907
844
|
{ key: 'filters', value: '1:ID>4,3:ID>1' },
|
|
908
845
|
{ key: 'proj', value: 'Web墨卡托_WGS1984' }
|