@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.
@@ -550,7 +550,7 @@
550
550
 
551
551
  <tr class="deep-level-1">
552
552
 
553
- <td class="name"><code>extendProps</code></td>
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>扩展参数,需要确保服务端支持</p></td>
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://webclient.smaryun.com:8089/igs/rest/services/Map/湖北省4326/MapServer'
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://webclient.smaryun.com:8089/igs/rest/services/Map/湖北省4326/MapServer'
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>添加一个MapGIS地图服务:混合接口开发</h7></p>
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
- // extendProps参数为自定义扩展参数,需要确保服务端支持此类参数
838
+ // extensions参数为自定义扩展参数,需要确保服务端支持此类参数
902
839
  const imageryProvider = new MapGISMapServerImageryProvider({
903
840
  url,
904
841
  tilingScheme,
905
- extendProps: [
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' }