mars3d-supermap 3.2.0 → 3.2.1

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 CHANGED
@@ -39,6 +39,7 @@ Mars3D平台插件, 结合supermap超图库使用的功能插件
39
39
 
40
40
  > Mars3D平台可用于构建无插件、跨操作系统、 跨浏览器的三维 GIS 应用程序。平台使用 WebGL 来进行硬件加速图形化,跨平台、跨浏览器来实现真正的动态大数据三维可视化。通过 Mars3D产品可快速实现浏览器和移动端上美观、流畅的三维地图呈现与空间分析。
41
41
 
42
+
42
43
  ## 相关网站
43
44
 
44
45
  - Mars3D官网:[http://mars3d.cn](http://mars3d.cn)
@@ -1,20 +1,20 @@
1
1
  /*!
2
2
  * Mars3D平台插件,结合supermap超图库使用的功能插件
3
- * 版本信息:v3.2.0, hash值: 6394c98c6553da1e9324
4
- * 编译日期:2022-01-28 14:22:05
3
+ * 版本信息:v3.2.1, hash值: 66aa3888f79f7a08535b
4
+ * 编译日期:2022-02-13 13:41:02
5
5
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
6
6
  *
7
7
  */
8
8
  (function webpackUniversalModuleDefinition(root, factory) {
9
9
  if(typeof exports === 'object' && typeof module === 'object')
10
- module.exports = factory(require("mars3d"), require("mars3d-cesium"));
10
+ module.exports = factory(require("mars3d"));
11
11
  else if(typeof define === 'function' && define.amd)
12
- define("mars3dSupermap", ["mars3d", "mars3d-cesium"], factory);
12
+ define("mars3dSupermap", ["mars3d"], factory);
13
13
  else if(typeof exports === 'object')
14
- exports["mars3dSupermap"] = factory(require("mars3d"), require("mars3d-cesium"));
14
+ exports["mars3dSupermap"] = factory(require("mars3d"));
15
15
  else
16
- root["mars3dSupermap"] = factory(root["mars3d"], root["Cesium"]);
17
- })(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__) {
16
+ root["mars3dSupermap"] = factory(root["mars3d"]);
17
+ })(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {
18
18
  return /******/ (function(modules) { // webpackBootstrap
19
19
  /******/ // The module cache
20
20
  /******/ var installedModules = {};
@@ -98,7 +98,7 @@ return /******/ (function(modules) { // webpackBootstrap
98
98
  /******/
99
99
  /******/
100
100
  /******/ // Load entry module and return exports
101
- /******/ return __webpack_require__(__webpack_require__.s = 13);
101
+ /******/ return __webpack_require__(__webpack_require__.s = 12);
102
102
  /******/ })
103
103
  /************************************************************************/
104
104
  /******/ ([
@@ -111,12 +111,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__0__;
111
111
  /* 1 */
112
112
  /***/ (function(module, exports) {
113
113
 
114
- module.exports = __WEBPACK_EXTERNAL_MODULE__1__;
115
-
116
- /***/ }),
117
- /* 2 */
118
- /***/ (function(module, exports) {
119
-
120
114
  function _getPrototypeOf(o) {
121
115
  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
122
116
  return o.__proto__ || Object.getPrototypeOf(o);
@@ -127,7 +121,7 @@ function _getPrototypeOf(o) {
127
121
  module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
128
122
 
129
123
  /***/ }),
130
- /* 3 */
124
+ /* 2 */
131
125
  /***/ (function(module, exports) {
132
126
 
133
127
  function _classCallCheck(instance, Constructor) {
@@ -139,7 +133,7 @@ function _classCallCheck(instance, Constructor) {
139
133
  module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
140
134
 
141
135
  /***/ }),
142
- /* 4 */
136
+ /* 3 */
143
137
  /***/ (function(module, exports) {
144
138
 
145
139
  function _defineProperties(target, props) {
@@ -164,10 +158,10 @@ function _createClass(Constructor, protoProps, staticProps) {
164
158
  module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
165
159
 
166
160
  /***/ }),
167
- /* 5 */
161
+ /* 4 */
168
162
  /***/ (function(module, exports, __webpack_require__) {
169
163
 
170
- var setPrototypeOf = __webpack_require__(9);
164
+ var setPrototypeOf = __webpack_require__(8);
171
165
 
172
166
  function _inherits(subClass, superClass) {
173
167
  if (typeof superClass !== "function" && superClass !== null) {
@@ -190,12 +184,12 @@ function _inherits(subClass, superClass) {
190
184
  module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
191
185
 
192
186
  /***/ }),
193
- /* 6 */
187
+ /* 5 */
194
188
  /***/ (function(module, exports, __webpack_require__) {
195
189
 
196
- var _typeof = __webpack_require__(10)["default"];
190
+ var _typeof = __webpack_require__(9)["default"];
197
191
 
198
- var assertThisInitialized = __webpack_require__(11);
192
+ var assertThisInitialized = __webpack_require__(10);
199
193
 
200
194
  function _possibleConstructorReturn(self, call) {
201
195
  if (call && (_typeof(call) === "object" || typeof call === "function")) {
@@ -210,10 +204,10 @@ function _possibleConstructorReturn(self, call) {
210
204
  module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
211
205
 
212
206
  /***/ }),
213
- /* 7 */
207
+ /* 6 */
214
208
  /***/ (function(module, exports, __webpack_require__) {
215
209
 
216
- var superPropBase = __webpack_require__(12);
210
+ var superPropBase = __webpack_require__(11);
217
211
 
218
212
  function _get() {
219
213
  if (typeof Reflect !== "undefined" && Reflect.get) {
@@ -238,7 +232,7 @@ function _get() {
238
232
  module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports;
239
233
 
240
234
  /***/ }),
241
- /* 8 */
235
+ /* 7 */
242
236
  /***/ (function(module, exports) {
243
237
 
244
238
  function _defineProperty(obj, key, value) {
@@ -259,7 +253,7 @@ function _defineProperty(obj, key, value) {
259
253
  module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
260
254
 
261
255
  /***/ }),
262
- /* 9 */
256
+ /* 8 */
263
257
  /***/ (function(module, exports) {
264
258
 
265
259
  function _setPrototypeOf(o, p) {
@@ -273,7 +267,7 @@ function _setPrototypeOf(o, p) {
273
267
  module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
274
268
 
275
269
  /***/ }),
276
- /* 10 */
270
+ /* 9 */
277
271
  /***/ (function(module, exports) {
278
272
 
279
273
  function _typeof(obj) {
@@ -289,7 +283,7 @@ function _typeof(obj) {
289
283
  module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
290
284
 
291
285
  /***/ }),
292
- /* 11 */
286
+ /* 10 */
293
287
  /***/ (function(module, exports) {
294
288
 
295
289
  function _assertThisInitialized(self) {
@@ -303,10 +297,10 @@ function _assertThisInitialized(self) {
303
297
  module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
304
298
 
305
299
  /***/ }),
306
- /* 12 */
300
+ /* 11 */
307
301
  /***/ (function(module, exports, __webpack_require__) {
308
302
 
309
- var getPrototypeOf = __webpack_require__(2);
303
+ var getPrototypeOf = __webpack_require__(1);
310
304
 
311
305
  function _superPropBase(object, property) {
312
306
  while (!Object.prototype.hasOwnProperty.call(object, property)) {
@@ -320,7 +314,7 @@ function _superPropBase(object, property) {
320
314
  module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
321
315
 
322
316
  /***/ }),
323
- /* 13 */
317
+ /* 12 */
324
318
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
325
319
 
326
320
  "use strict";
@@ -333,28 +327,25 @@ __webpack_require__.d(__webpack_exports__, "SmImgLayer", function() { return /*
333
327
  __webpack_require__.d(__webpack_exports__, "SmMvtLayer", function() { return /* reexport */ SmMvtLayer_SmMvtLayer; });
334
328
 
335
329
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
336
- var classCallCheck = __webpack_require__(3);
330
+ var classCallCheck = __webpack_require__(2);
337
331
  var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
338
332
 
339
333
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
340
- var createClass = __webpack_require__(4);
334
+ var createClass = __webpack_require__(3);
341
335
  var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
342
336
 
343
337
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
344
- var inherits = __webpack_require__(5);
338
+ var inherits = __webpack_require__(4);
345
339
  var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
346
340
 
347
341
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
348
- var possibleConstructorReturn = __webpack_require__(6);
342
+ var possibleConstructorReturn = __webpack_require__(5);
349
343
  var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);
350
344
 
351
345
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/getPrototypeOf.js
352
- var getPrototypeOf = __webpack_require__(2);
346
+ var getPrototypeOf = __webpack_require__(1);
353
347
  var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
354
348
 
355
- // EXTERNAL MODULE: external {"commonjs2":"mars3d-cesium","amd":"mars3d-cesium","commonjs":"mars3d-cesium","root":"Cesium"}
356
- var external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_ = __webpack_require__(1);
357
-
358
349
  // EXTERNAL MODULE: external "mars3d"
359
350
  var external_mars3d_ = __webpack_require__(0);
360
351
 
@@ -370,7 +361,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
370
361
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
371
362
 
372
363
 
373
-
364
+ var Cesium = external_mars3d_["Cesium"];
374
365
  var BaseLayer = external_mars3d_["layer"].BaseLayer;
375
366
  /**
376
367
  * 超图S3M三维模型图层,
@@ -443,7 +434,7 @@ var S3MLayer_S3MLayer = /*#__PURE__*/function (_BaseLayer) {
443
434
 
444
435
  if (key == "transparentBackColor") {
445
436
  //去黑边,与offset互斥,注意别配置offset
446
- val = external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["Color"].fromCssColorString(val);
437
+ val = Cesium.Color.fromCssColorString(val);
447
438
  } else if (key == "transparentBackColorTolerance") {
448
439
  val = Number(val);
449
440
  }
@@ -486,7 +477,7 @@ var S3MLayer_S3MLayer = /*#__PURE__*/function (_BaseLayer) {
486
477
  });
487
478
  }
488
479
 
489
- external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["when"](promise, function (smLayer) {
480
+ Cesium.when(promise, function (smLayer) {
490
481
  if (Array.isArray(smLayer)) {
491
482
  _this._layerArr = smLayer;
492
483
  } else {
@@ -512,7 +503,7 @@ var S3MLayer_S3MLayer = /*#__PURE__*/function (_BaseLayer) {
512
503
 
513
504
  if (key == "transparentBackColor") {
514
505
  //去黑边,与offset互斥,注意别配置offset
515
- layer[key] = external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["Color"].fromCssColorString(val);
506
+ layer[key] = Cesium.Color.fromCssColorString(val);
516
507
  } else if (key == "transparentBackColorTolerance") {
517
508
  layer[key] = Number(val);
518
509
  } else {
@@ -630,7 +621,7 @@ external_mars3d_["layer"].S3MLayer = S3MLayer_S3MLayer; //注册下
630
621
 
631
622
  external_mars3d_["LayerUtil"].register("supermap_s3m", S3MLayer_S3MLayer);
632
623
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/get.js
633
- var get = __webpack_require__(7);
624
+ var get = __webpack_require__(6);
634
625
  var get_default = /*#__PURE__*/__webpack_require__.n(get);
635
626
 
636
627
  // CONCATENATED MODULE: ./src/supermap/SmImgLayer.js
@@ -646,7 +637,7 @@ function SmImgLayer_createSuper(Derived) { var hasNativeReflectConstruct = SmImg
646
637
  function SmImgLayer_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
647
638
 
648
639
 
649
-
640
+ var SmImgLayer_Cesium = external_mars3d_["Cesium"];
650
641
  var BaseTileLayer = external_mars3d_["layer"].BaseTileLayer;
651
642
  /**
652
643
  * 超图影像瓦片服务图层,
@@ -744,7 +735,7 @@ var SmImgLayer_SmImgLayer = /*#__PURE__*/function (_BaseTileLayer) {
744
735
  value: function _addedHook() {
745
736
  get_default()(getPrototypeOf_default()(SmImgLayer.prototype), "_addedHook", this).call(this);
746
737
 
747
- if (external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["defined"](this.options.transparentBackColor)) {
738
+ if (SmImgLayer_Cesium.defined(this.options.transparentBackColor)) {
748
739
  this._imageryLayer.transparentBackColor = external_mars3d_["Util"].getCesiumColor(this.options.transparentBackColor);
749
740
  this._imageryLayer.transparentBackColorTolerance = this.options.transparentBackColorTolerance; //去黑边
750
741
  }
@@ -756,14 +747,14 @@ var SmImgLayer_SmImgLayer = /*#__PURE__*/function (_BaseTileLayer) {
756
747
 
757
748
  function createImageryProvider(options) {
758
749
  options = external_mars3d_["LayerUtil"].converOptions(options);
759
- if (options.url instanceof external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["Resource"]) options.url = options.url.url;
750
+ if (options.url instanceof SmImgLayer_Cesium.Resource) options.url = options.url.url;
760
751
 
761
- if (external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["defined"](options.transparentBackColor)) {
752
+ if (SmImgLayer_Cesium.defined(options.transparentBackColor)) {
762
753
  delete options.transparentBackColor;
763
754
  delete options.transparentBackColorTolerance;
764
755
  }
765
756
 
766
- return new external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["SuperMapImageryProvider"](options);
757
+ return new SmImgLayer_Cesium.SuperMapImageryProvider(options);
767
758
  }
768
759
  /**
769
760
  * 创建用于图层的 ImageryProvider对象
@@ -781,7 +772,7 @@ var layerType = "supermap_img";
781
772
  external_mars3d_["LayerUtil"].register(layerType, SmImgLayer_SmImgLayer);
782
773
  external_mars3d_["LayerUtil"].registerImageryProvider(layerType, createImageryProvider);
783
774
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
784
- var defineProperty = __webpack_require__(8);
775
+ var defineProperty = __webpack_require__(7);
785
776
  var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
786
777
 
787
778
  // CONCATENATED MODULE: ./src/supermap/SmMvtLayer.js
@@ -801,7 +792,7 @@ function SmMvtLayer_createSuper(Derived) { var hasNativeReflectConstruct = SmMvt
801
792
  function SmMvtLayer_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
802
793
 
803
794
 
804
-
795
+ var SmMvtLayer_Cesium = external_mars3d_["Cesium"];
805
796
  var SmMvtLayer_BaseLayer = external_mars3d_["layer"].BaseLayer;
806
797
  /**
807
798
  * 超图MVT矢量瓦片图层,
@@ -872,7 +863,7 @@ var SmMvtLayer_SmMvtLayer = /*#__PURE__*/function (_BaseLayer) {
872
863
  //options参考API文档:http://support.supermap.com.cn:8090/webgl/docs/Documentation/Scene.html
873
864
  this._mvtLayer = this._map.scene.addVectorTilesMap(this.options);
874
865
  var layerReadyPromise = this._mvtLayer.readyPromise;
875
- external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["when"](layerReadyPromise, function (data) {//setPaintProperty(layerId, name, value, options)
866
+ SmMvtLayer_Cesium.when(layerReadyPromise, function (data) {//setPaintProperty(layerId, name, value, options)
876
867
  // for(var layerId in that.options.style){
877
868
  // that._mvtLayer.setPaintProperty(layerId, "fill-color", "rgba(255,0,0,0.8)");
878
869
  // }
@@ -880,7 +871,7 @@ var SmMvtLayer_SmMvtLayer = /*#__PURE__*/function (_BaseLayer) {
880
871
  _this.showError("渲染时发生错误,已停止渲染。", error);
881
872
  });
882
873
  var scene = this._map.scene;
883
- var handler = new external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["ScreenSpaceEventHandler"](scene.canvas);
874
+ var handler = new SmMvtLayer_Cesium.ScreenSpaceEventHandler(scene.canvas);
884
875
  handler.setInputAction(function (event) {
885
876
  if (!_this.show) {
886
877
  return;
@@ -906,7 +897,7 @@ var SmMvtLayer_SmMvtLayer = /*#__PURE__*/function (_BaseLayer) {
906
897
 
907
898
  _this._map.openPopup(position, content, item);
908
899
  }, ["in", "$id"]);
909
- }, external_commonjs2_mars3d_cesium_amd_mars3d_cesium_commonjs_mars3d_cesium_root_Cesium_["ScreenSpaceEventType"].LEFT_CLICK);
900
+ }, SmMvtLayer_Cesium.ScreenSpaceEventType.LEFT_CLICK);
910
901
  this.handler = handler;
911
902
  }
912
903
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://mars3dSupermap/webpack/universalModuleDefinition","webpack://mars3dSupermap/webpack/bootstrap","webpack://mars3dSupermap/external \"mars3d\"","webpack://mars3dSupermap/external {\"commonjs2\":\"mars3d-cesium\",\"amd\":\"mars3d-cesium\",\"commonjs\":\"mars3d-cesium\",\"root\":\"Cesium\"}","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/createClass.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/inherits.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/get.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/typeof.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/superPropBase.js","webpack://mars3dSupermap/./src/supermap/S3MLayer.js","webpack://mars3dSupermap/./src/supermap/SmImgLayer.js","webpack://mars3dSupermap/./src/supermap/SmMvtLayer.js","webpack://mars3dSupermap/./src/index.js"],"names":["BaseLayer","mars3d","S3MLayer","_layerArr","options","s3mOptions","value","key","val","Cesium","fromCssColorString","Number","i","length","layer","promise","layername","_map","scene","addS3MTilesLayerByScp","url","name","autoSetVie","flyTo","cullEnabled","open","sceneName","smLayer","Array","isArray","isS3M","position","alt","style3D","bottomAltitude","refresh","flyToByAnimationEnd","dataUrl","ql","setQueryParameter","dataSourceName","split","dataSetName","isMerge","selectEnabled","error","showError","visible","show","item","fillForeColor","alpha","center","setCameraView","extent","flyToExtent","register","BaseTileLayer","SmImgLayer","createImageryProvider","transparentBackColor","_imageryLayer","getCesiumColor","transparentBackColorTolerance","converOptions","layerType","registerImageryProvider","SmMvtLayer","_mvtLayer","addVectorTilesMap","layerReadyPromise","readyPromise","data","handler","canvas","setInputAction","event","getCurrentMousePosition","features","queryRenderedFeatures","filter","reduce","memo","result","attr","feature","properties","content","getPopupForConfig","openPopup","LEFT_CLICK","parseFloat","camera","destination","rectangle"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,gD;;;;;;ACAA,gD;;;;;;ACAA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,+G;;;;;;ACPA;AACA;AACA;AACA;AACA;;AAEA,+G;;;;;;ACNA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,4G;;;;;;ACnBA,qBAAqB,mBAAO,CAAC,CAAqB;;AAElD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA,yG;;;;;;ACpBA,cAAc,mBAAO,CAAC,EAA+B;;AAErD,4BAA4B,mBAAO,CAAC,EAA4B;;AAEhE;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA,0H;;;;;;ACdA,oBAAoB,mBAAO,CAAC,EAAoB;;AAEhD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA,oG;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;;AAEA,+G;;;;;;ACfA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,+G;;;;;;ACRA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA,uG;;;;;;ACVA;AACA;AACA;AACA;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CAAagD,MAArC,EAA6ChD,OAA7C;AACD,OAFD,MAEO,IAAI,KAAKA,OAAL,CAAakD,MAAjB,EAAyB;AAC9B,aAAKrC,IAAL,CAAUsC,WAAV,CAAsB,KAAKnD,OAAL,CAAakD,MAAnC,EAA2ClD,OAA3C;AACD,OAFM,MAEA,IAAI,KAAKgE,SAAT,EAAoB;AACzB,aAAKnD,IAAL,CAAU2E,MAAV,CAAiBrE,KAAjB,iCACKnB,OADL;AAEEyF,qBAAW,EAAE,KAAKzB,SAAL,CAAe0B;AAF9B;AAID;AACF;AApHH;;AAAA;AAAA,EAAgC9F,oBAAhC;AAsHAC,yBAAA,CAAakE,UAAb,GAA0BA,qBAA1B,C,CAEA;;AACAlE,6BAAA,CAAiBuD,QAAjB,CAA0B,cAA1B,EAA0CW,qBAA1C,E;;AC5JA;AACA","file":"mars3d-supermap-src.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"mars3d\"), require(\"mars3d-cesium\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"mars3dSupermap\", [\"mars3d\", \"mars3d-cesium\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mars3dSupermap\"] = factory(require(\"mars3d\"), require(\"mars3d-cesium\"));\n\telse\n\t\troot[\"mars3dSupermap\"] = factory(root[\"mars3d\"], root[\"Cesium\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 13);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n Object.defineProperty(subClass, \"prototype\", {\n value: Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n }),\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"@babel/runtime/helpers/typeof\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var superPropBase = require(\"./superPropBase.js\");\n\nfunction _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n module.exports = _get = Reflect.get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n }\n\n return _get.apply(this, arguments);\n}\n\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import * as Cesium from \"cesium\";\nimport * as mars3d from \"mars3d\";\n\nlet BaseLayer = mars3d.layer.BaseLayer;\n\n/**\n * 超图S3M三维模型图层,\n * 【需要引入 mars3d-supermap 插件库】\n *\n * @param {Object} [options] 参数对象,包括以下:\n * @param {String} options.url supermap的S3M服务地址,示例:\"url\": \"http://www.supermapol.com/realspace/services/3D-Olympic/rest/realspace\"\n * @param {String} [options.layername] 指定图层名称,未指定时,打开iserver场景服务下所有图层\n * @param {String} [options.sceneName] 工作空间中有多个场景,需要指定场景名称;设置为undefined,默认打开第一个\n * @param {Object} [options.s3mOptions] [S3M支持的参数]{@link http://support.supermap.com.cn:8090/webgl/docs/Documentation/S3MTilesLayer.html?classFilter=S3MTilesLayer} ,示例: {\"selectEnabled\":false},\n * @param {Object} [options.position] 模型新的中心点位置(移动模型)\n * @param {Number} options.position.alt 获取或设置底部高程。(单位:米)\n *\n * @param {String|Number} [options.id = uuid()] 图层id标识\n * @param {String|Number} [options.pid = -1] 图层父级的id,一般图层管理中使用\n * @param {String} [options.name = ''] 图层名称\n * @param {Boolean} [options.show = true] 图层是否显示\n * @param {BaseClass|Boolean} [options.eventParent] 指定的事件冒泡对象,默认为map对象,false时不冒泡\n * @param {Object} [options.center] 图层自定义定位视角 {@link Map#setCameraView}\n * @param {Number} options.center.lng 经度值, 180 - 180\n * @param {Number} options.center.lat 纬度值, -90 - 90\n * @param {Number} [options.center.alt] 高度值\n * @param {Number} [options.center.heading] 方向角度值,绕垂直于地心的轴旋转角度, 0-360\n * @param {Number} [options.center.pitch] 俯仰角度值,绕纬度线旋转角度, 0-360\n * @param {Number} [options.center.roll] 翻滚角度值,绕经度线旋转角度, 0-360\n * @param {Boolean} [options.flyTo] 加载完成数据后是否自动飞行定位到数据所在的区域。\n * @export\n * @class S3MLayer\n * @extends {BaseLayer}\n */\nexport class S3MLayer extends BaseLayer {\n /**\n * 模型对应的Cesium.S3MTilesLayer图层组\n * @type {Object[]}\n * @readonly\n * @see http://support.supermap.com.cn:8090/webgl/docs/Documentation/S3MTilesLayer.html\n */\n get layer() {\n return this._layerArr;\n }\n\n /**\n * 设置S3M图层本身支持的参数\n * @type {Object}\n * @see [S3M支持的参数]{@link http://support.supermap.com.cn:8090/webgl/docs/Documentation/S3MTilesLayer.html?classFilter=S3MTilesLayer}\n */\n get s3mOptions() {\n return this.options.s3mOptions;\n }\n set s3mOptions(value) {\n for (let key in value) {\n let val = value[key];\n this.options.s3mOptions[key] = val;\n\n if (key == \"transparentBackColor\") {\n //去黑边,与offset互斥,注意别配置offset\n val = Cesium.Color.fromCssColorString(val);\n } else if (key == \"transparentBackColorTolerance\") {\n val = Number(val);\n }\n\n for (let i = 0; i < this._layerArr.length; i++) {\n let layer = this._layerArr[i];\n if (layer == null) {\n continue;\n }\n layer[key] = val;\n }\n }\n }\n\n /**\n * 对象添加到地图前创建一些对象的钩子方法,\n * 只会调用一次\n * @return {void} 无\n * @private\n */\n _mountedHook() {\n //场景添加S3M图层服务\n let promise;\n if (this.options.layername) {\n promise = this._map.scene.addS3MTilesLayerByScp(this.options.url, {\n name: this.options.layername,\n autoSetVie: this.options.flyTo,\n cullEnabled: this.options.cullEnabled,\n });\n } else {\n promise = this._map.scene.open(this.options.url, this.options.sceneName, {\n autoSetVie: this.options.flyTo,\n });\n }\n\n Cesium.when(\n promise,\n (smLayer) => {\n if (Array.isArray(smLayer)) {\n this._layerArr = smLayer;\n } else {\n this._layerArr = [smLayer];\n }\n\n //设置图层属性\n for (let i = 0; i < this._layerArr.length; i++) {\n let layer = this._layerArr[i];\n if (layer == null) {\n continue;\n }\n\n layer.isS3M = true; //标识下\n\n //s3mOptions\n if (this.options.s3mOptions) {\n for (let key in this.options.s3mOptions) {\n let val = this.options.s3mOptions[key];\n if (key == \"transparentBackColor\") {\n //去黑边,与offset互斥,注意别配置offset\n layer[key] = Cesium.Color.fromCssColorString(val);\n } else if (key == \"transparentBackColorTolerance\") {\n layer[key] = Number(val);\n } else {\n layer[key] = this.options.s3mOptions[key];\n }\n }\n }\n\n //高度调整 offset.z\n if (this.options?.position?.alt) {\n layer.style3D.bottomAltitude = this.options.position.alt;\n layer.refresh();\n }\n }\n\n if (this.options.flyTo) {\n this.flyToByAnimationEnd();\n }\n\n if (this.options.dataUrl) {\n for (let i = 0; i < this._layerArr.length; i++) {\n let ql = this._layerArr[i];\n\n //读取子图层信息,通过数组的方式返回子图层的名称以及子图层所包含的对象的IDs\n ql.setQueryParameter({\n url: this.options.dataUrl,\n dataSourceName: ql.name.split(\"@\")[1],\n dataSetName: ql.name.split(\"@\")[0],\n isMerge: true,\n });\n\n //获取图层风格\n //Note_GJ: rgba, 1为不透明,0为全透明。已经在模型中导入材质,所以这里的颜色不特别设置\n //var style3D = new Cesium.Style3D();\n // var color = Cesium.Color.fromCssColorString(\"#919191\");//混泥土颜色 RGB(145, 145,145)\n // style3D.fillForeColor = color;\n // ql.style3D = style3D;\n //设置后需刷新图层\n // ql.refresh();\n ql.selectEnabled = true;\n }\n }\n },\n (error) => {\n this.showError(\"渲染时发生错误,已停止渲染。\", error);\n }\n );\n }\n\n /**\n * 对象添加到地图上的创建钩子方法,\n * 每次add时都会调用\n * @return {void} 无\n * @private\n */\n _addedHook() {\n for (let i in this._layerArr) {\n this._layerArr[i].visible = true;\n this._layerArr[i].show = true;\n }\n }\n\n /**\n * 对象从地图上移除的创建钩子方法,\n * 每次remove时都会调用\n * @return {void} 无\n * @private\n */\n _removedHook() {\n if (this._layerArr) {\n for (let i in this._layerArr) {\n this._layerArr[i].visible = false;\n this._layerArr[i].show = false;\n }\n }\n }\n\n /**\n * 设置透明度\n * @param {Number} value 透明度\n * @return {void} 无\n */\n setOpacity(value) {\n if (this._layerArr) {\n for (let i = 0; i < this._layerArr.length; i++) {\n let item = this._layerArr[i];\n if (item == null) {\n continue;\n }\n\n item.style3D.fillForeColor.alpha = value;\n }\n }\n }\n\n //定位至数据区域\n flyTo(options = {}) {\n if (this.options.center) {\n this._map.setCameraView(this.options.center, options);\n } else if (this.options.extent) {\n this._map.flyToExtent(this.options.extent, options);\n }\n }\n}\nmars3d.layer.S3MLayer = S3MLayer;\n\n//注册下\nmars3d.LayerUtil.register(\"supermap_s3m\", S3MLayer);\n","import * as Cesium from \"cesium\";\nimport * as mars3d from \"mars3d\";\n\nlet BaseTileLayer = mars3d.layer.BaseTileLayer;\n\n/**\n * 超图影像瓦片服务图层,\n * 【需要引入 mars3d-supermap 插件库】\n *\n * @param {Object} [options] 参数对象,包括以下:\n * @param {String} options.url supermap的影像服务地址\n * @param {String|String[]} [options.subdomains] URL模板中用于 {s} 占位符的子域。 如果此参数是单个字符串,则字符串中的每个字符都是一个子域。如果是 一个数组,数组中的每个元素都是一个子域。\n * @param {String} [options.tileFormat] 影像图片格式,默认为png。\n * @param {Boolean} [options.transparent=true] 设置请求的地图服务的参数是否为transparent。\n * @param {String|Cesium.Color} [options.transparentBackColor] 设置影像透明色。\n * @param {Number} [options.transparentBackColorTolerance] 去黑边,设置影像透明色容限,取值范围为0.0~1.0。0.0表示完全透明,1.0表示完全不透明。\n * @param {String} [options.cacheKey] 影像的三维缓存密钥。\n *\n * @param {Number} [options.minimumLevel=0] 瓦片所支持的最低层级,如果数据没有第0层,该参数必须配置,当地图小于该级别时,平台不去请求服务数据。\n * @param {Number} [options.maximumLevel] 瓦片所支持的最大层级,大于该层级时会显示上一层拉伸后的瓦片,当地图大于该级别时,平台不去请求服务数据。\n * @param {Number} [options.minimumTerrainLevel] 展示影像图层的最小地形细节级别,小于该级别时,平台不显示影像数据。\n * @param {Number} [options.maximumTerrainLevel] 展示影像图层的最大地形细节级别,大于该级别时,平台不显示影像数据。\n * @param {Object} [options.rectangle] 瓦片数据的矩形区域范围\n * @param {Number} options.rectangle.xmin 最小经度值, -180 至 180\n * @param {Number} options.rectangle.xmax 最大纬度值, -180 至 180\n * @param {Number} options.rectangle.ymin 最小纬度值, -90 至 90\n * @param {Number} options.rectangle.ymax 最大纬度值, -90 至 90\n * @param {Number[]} [options.bbox] bbox规范的瓦片数据的矩形区域范围,与rectangle二选一即可。\n * @param {Number} [options.zIndex] 控制图层的叠加层次,默认按加载的顺序进行叠加,但也可以自定义叠加顺序,数字大的在上面。\n * @param {CRS} [options.crs=CRS.EPSG:3857] 瓦片数据的坐标系信息,默认为墨卡托投影\n * @param {ChinaCRS} [options.chinaCRS] 标识瓦片的国内坐标系(用于自动纠偏或加偏),自动将瓦片转为map对应的chinaCRS类型坐标系。\n *\n * @param {String} [options.proxy] 加载资源时要使用的代理服务url。\n * @param {Object} [options.templateValues] 一个对象,用于替换Url中的模板值的键/值对\n * @param {Object} [options.queryParameters] 一个对象,其中包含在检索资源时将发送的查询参数。比如:queryParameters: {'access_token': '123-435-456-000'},\n * @param {Object} [options.headers] 一个对象,将发送的其他HTTP标头。比如:headers: { 'X-My-Header': 'valueOfHeader' },\n * @param {Boolean} [options.enablePickFeatures=true] 如果为true,则 {@link UrlTemplateImageryProvider#pickFeatures} 请求 pickFeaturesUrl 并尝试解释响应中包含的功能。\n * 如果为 false{@link UrlTemplateImageryProvider#pickFeatures} 会立即返回未定义(表示没有可拾取的内容) 功能)而无需与服务器通信。如果您知道数据,则将此属性设置为false 源不支持选择功能,或者您不希望该提供程序的功能可供选择。注意 可以通过修改 {@link UriTemplateImageryProvider#enablePickFeatures}来动态覆盖 属性。\n * @param {Cesium.GetFeatureInfoFormat[]} [options.getFeatureInfoFormats] 在某处获取功能信息的格式 调用 {@link UrlTemplateImageryProvider#pickFeatures} 的特定位置。如果这 参数未指定,功能选择已禁用。\n *\n * @param {Number} [options.opacity = 1.0] 透明度,取值范围:0.0-1.0。\n * @param {Number|Function} [options.alpha=1.0] 同opacity。\n * @param {Number|Function} [options.nightAlpha=1.0] 当 enableLighting 为 true 时 ,在地球的夜晚区域的透明度,取值范围:0.0-1.0。\n * @param {Number|Function} [options.dayAlpha=1.0] 当 enableLighting 为 true 时,在地球的白天区域的透明度,取值范围:0.0-1.0。\n * @param {Number|Function} [options.brightness=1.0] 亮度\n * @param {Number|Function} [options.contrast=1.0] 对比度。 1.0使用未修改的图像颜色,小于1.0会降低对比度,而大于1.0则会提高对比度。\n * @param {Number|Function} [options.hue=0.0] 色调。 0.0 时未修改的图像颜色。\n * @param {Number|Function} [options.saturation=1.0] 饱和度。 1.0使用未修改的图像颜色,小于1.0会降低饱和度,而大于1.0则会增加饱和度。\n * @param {Number|Function} [options.gamma=1.0] 伽马校正值。 1.0使用未修改的图像颜色。\n * @param {Number} [options.maximumAnisotropy=maximum supported] 使用的最大各向异性水平 用于纹理过滤。如果未指定此参数,则支持最大各向异性 将使用WebGL堆栈。较大的值可使影像在水平方向上看起来更好 视图。\n * @param {Cesium.Rectangle} [options.cutoutRectangle] 制图矩形,用于裁剪此ImageryLayer的一部分。\n * @param {Cesium.Color} [options.colorToAlpha] 用作Alpha的颜色。\n * @param {Number} [options.colorToAlphaThreshold=0.004] 颜色到Alpha的阈值。\n * @param {Boolean} [options.hasAlphaChannel=true] 如果此图像提供者提供的图像为真 包括一个Alpha通道;否则为假。如果此属性为false,则为Alpha通道,如果 目前,将被忽略。如果此属性为true,则任何没有Alpha通道的图像都将 它们的alpha随处可见。当此属性为false时,内存使用情况 和纹理上传时间可能会减少。\n * @param {Number} [options.tileWidth=256] 图像图块的像素宽度。\n * @param {Number} [options.tileHeight=256] 图像图块的像素高度。\n * @param {Object} [options.customTags] 允许替换网址模板中的自定义关键字。该对象必须具有字符串作为键,并且必须具有值。\n *\n * @param {String|Number} [options.id = uuid()] 图层id标识\n * @param {String|Number} [options.pid = -1] 图层父级的id,一般图层管理中使用\n * @param {String} [options.name = ''] 图层名称\n * @param {Boolean} [options.show = true] 图层是否显示\n * @param {BaseClass|Boolean} [options.eventParent] 指定的事件冒泡对象,默认为map对象,false时不冒泡\n * @param {Object} [options.center] 图层自定义定位视角 {@link Map#setCameraView}\n * @param {Number} options.center.lng 经度值, 180 - 180\n * @param {Number} options.center.lat 纬度值, -90 - 90\n * @param {Number} [options.center.alt] 高度值\n * @param {Number} [options.center.heading] 方向角度值,绕垂直于地心的轴旋转角度, 0-360\n * @param {Number} [options.center.pitch] 俯仰角度值,绕纬度线旋转角度, 0-360\n * @param {Number} [options.center.roll] 翻滚角度值,绕经度线旋转角度, 0-360\n * @param {Boolean} [options.flyTo] 加载完成数据后是否自动飞行定位到数据所在的区域。\n * @export\n * @class SmImgLayer\n * @extends {BaseTileLayer}\n *\n * @see http://support.supermap.com.cn:8090/webgl/docs/Documentation/SuperMapImageryProvider.html?classFilter=SuperMapImageryProvider\n */\nexport class SmImgLayer extends BaseTileLayer {\n //构建ImageryProvider\n _createImageryProvider(options) {\n return createImageryProvider(options);\n }\n //添加时\n _addedHook() {\n super._addedHook();\n\n if (Cesium.defined(this.options.transparentBackColor)) {\n this._imageryLayer.transparentBackColor = mars3d.Util.getCesiumColor(this.options.transparentBackColor);\n this._imageryLayer.transparentBackColorTolerance = this.options.transparentBackColorTolerance; //去黑边\n }\n }\n}\nfunction createImageryProvider(options) {\n options = mars3d.LayerUtil.converOptions(options);\n\n if (options.url instanceof Cesium.Resource) options.url = options.url.url;\n\n if (Cesium.defined(options.transparentBackColor)) {\n delete options.transparentBackColor;\n delete options.transparentBackColorTolerance;\n }\n return new Cesium.SuperMapImageryProvider(options);\n}\n\n/**\n * 创建用于图层的 ImageryProvider对象\n *\n * @param {Object} options Provider参数,同图层构造参数。\n * @return {Cesium.ImageryProvider} ImageryProvider类\n * @function\n */\nSmImgLayer.createImageryProvider = createImageryProvider;\n\nmars3d.layer.SmImgLayer = SmImgLayer;\n\n//注册下\nconst layerType = \"supermap_img\";\nmars3d.LayerUtil.register(layerType, SmImgLayer);\nmars3d.LayerUtil.registerImageryProvider(layerType, createImageryProvider);\n","import * as Cesium from \"cesium\";\nimport * as mars3d from \"mars3d\";\n\nlet BaseLayer = mars3d.layer.BaseLayer;\n\n/**\n * 超图MVT矢量瓦片图层,\n * 【需要引入 mars3d-supermap 插件库】\n *\n * @param {Object} [options] 参数对象,包括以下:\n * @param {String} options.url 适用于通过SuperMap桌面软件生成mvt数据,经iServer发布为rest风格的地图服务,只需提供服务地址。\n * @param {String} options.layer 图层名称,适用于第三方发布的WMTS服务。\n * @param {Number} [options.canvasWidth] 用来绘制矢量的纹理边长。默认是512,越大越精细,越小性能越高。\n * @param {String} [options.format='mvt'] 适用于第三方发布的WMTS服务。\n * @param {Object} [options.mapboxStyle] 使用的mapBox风格。\n * @param {Object} [options.多个参数] 参考[supermap官方API]{@link http://support.supermap.com.cn:8090/webgl/docs/Documentation/Scene.html#addVectorTilesLayer}\n *\n *\n * @param {String|Number} [options.id = uuid()] 图层id标识\n * @param {String|Number} [options.pid = -1] 图层父级的id,一般图层管理中使用\n * @param {String} [options.name = ''] 图层名称\n * @param {Boolean} [options.show = true] 图层是否显示\n * @param {BaseClass|Boolean} [options.eventParent] 指定的事件冒泡对象,默认为map对象,false时不冒泡\n * @param {Object} [options.center] 图层自定义定位视角 {@link Map#setCameraView}\n * @param {Number} options.center.lng 经度值, 180 - 180\n * @param {Number} options.center.lat 纬度值, -90 - 90\n * @param {Number} [options.center.alt] 高度值\n * @param {Number} [options.center.heading] 方向角度值,绕垂直于地心的轴旋转角度, 0-360\n * @param {Number} [options.center.pitch] 俯仰角度值,绕纬度线旋转角度, 0-360\n * @param {Number} [options.center.roll] 翻滚角度值,绕经度线旋转角度, 0-360\n * @param {Boolean} [options.flyTo] 加载完成数据后是否自动飞行定位到数据所在的区域。\n * @export\n * @class SmMvtLayer\n * @extends {BaseLayer}\n */\nexport class SmMvtLayer extends BaseLayer {\n /**\n * 对应的supermap图层 Cesium.VectorTilesLayer\n * @type {*}\n * @readonly\n * @see http://support.supermap.com.cn:8090/webgl/docs/Documentation/VectorTilesLayer.html\n */\n get layer() {\n return this._mvtLayer;\n }\n\n /**\n * 对象添加到地图前创建一些对象的钩子方法,\n * 只会调用一次\n * @return {void} 无\n * @private\n */\n _mountedHook() {\n //options参考API文档:http://support.supermap.com.cn:8090/webgl/docs/Documentation/Scene.html\n this._mvtLayer = this._map.scene.addVectorTilesMap(this.options);\n let layerReadyPromise = this._mvtLayer.readyPromise;\n\n Cesium.when(\n layerReadyPromise,\n (data) => {\n //setPaintProperty(layerId, name, value, options)\n // for(var layerId in that.options.style){\n // that._mvtLayer.setPaintProperty(layerId, \"fill-color\", \"rgba(255,0,0,0.8)\");\n // }\n },\n (error) => {\n this.showError(\"渲染时发生错误,已停止渲染。\", error);\n }\n );\n\n let scene = this._map.scene;\n let handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);\n handler.setInputAction((event) => {\n if (!this.show) {\n return;\n }\n\n let position = mars3d.PointUtil.getCurrentMousePosition(scene, event.position);\n\n //查询出相交图层的feature\n let features = this._mvtLayer.queryRenderedFeatures([position], {\n // layers: [selectLayer.id]\n });\n\n let filter = features.reduce(\n (memo, result) => {\n let attr = result.feature.properties;\n if (!attr) {\n return;\n }\n\n let content = mars3d.Util.getPopupForConfig(this.options, attr);\n let item = {\n data: attr,\n event: event,\n };\n this._map.openPopup(position, content, item);\n },\n [\"in\", \"$id\"]\n );\n }, Cesium.ScreenSpaceEventType.LEFT_CLICK);\n\n this.handler = handler;\n }\n\n /**\n * 对象添加到地图上的创建钩子方法,\n * 每次add时都会调用\n * @return {void} 无\n * @private\n */\n _addedHook() {\n this._mvtLayer.show = true;\n // this._mvtLayer.refresh();\n }\n\n /**\n * 对象从地图上移除的创建钩子方法,\n * 每次remove时都会调用\n * @return {void} 无\n * @private\n */\n _removedHook() {\n if (this._mvtLayer) {\n this._mvtLayer.show = false;\n }\n }\n\n /**\n * 设置透明度\n * @param {Number} value 透明度\n * @return {void} 无\n */\n setOpacity(value) {\n if (this._mvtLayer) {\n this._mvtLayer.alpha = parseFloat(value);\n }\n }\n\n //定位至数据区域\n flyTo(options = {}) {\n if (this.options.center) {\n this._map.setCameraView(this.options.center, options);\n } else if (this.options.extent) {\n this._map.flyToExtent(this.options.extent, options);\n } else if (this._mvtLayer) {\n this._map.camera.flyTo({\n ...options,\n destination: this._mvtLayer.rectangle,\n });\n }\n }\n}\nmars3d.layer.SmMvtLayer = SmMvtLayer;\n\n//注册下\nmars3d.LayerUtil.register(\"supermap_mvt\", SmMvtLayer);\n","export { S3MLayer } from \"./supermap/S3MLayer\";\nexport { SmImgLayer } from \"./supermap/SmImgLayer\";\nexport { SmMvtLayer } from \"./supermap/SmMvtLayer\";\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://mars3dSupermap/webpack/universalModuleDefinition","webpack://mars3dSupermap/webpack/bootstrap","webpack://mars3dSupermap/external \"mars3d\"","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/createClass.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/inherits.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/get.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/defineProperty.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/typeof.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://mars3dSupermap/./node_modules/@babel/runtime/helpers/superPropBase.js","webpack://mars3dSupermap/./src/supermap/S3MLayer.js","webpack://mars3dSupermap/./src/supermap/SmImgLayer.js","webpack://mars3dSupermap/./src/supermap/SmMvtLayer.js","webpack://mars3dSupermap/./src/index.js"],"names":["Cesium","mars3d","BaseLayer","S3MLayer","_layerArr","options","s3mOptions","value","key","val","Color","fromCssColorString","Number","i","length","layer","promise","layername","_map","scene","addS3MTilesLayerByScp","url","name","autoSetVie","flyTo","cullEnabled","open","sceneName","when","smLayer","Array","isArray","isS3M","position","alt","style3D","bottomAltitude","refresh","flyToByAnimationEnd","dataUrl","ql","setQueryParameter","dataSourceName","split","dataSetName","isMerge","selectEnabled","error","showError","visible","show","item","fillForeColor","alpha","center","setCameraView","extent","flyToExtent","register","BaseTileLayer","SmImgLayer","createImageryProvider","defined","transparentBackColor","_imageryLayer","getCesiumColor","transparentBackColorTolerance","converOptions","Resource","SuperMapImageryProvider","layerType","registerImageryProvider","SmMvtLayer","_mvtLayer","addVectorTilesMap","layerReadyPromise","readyPromise","data","handler","ScreenSpaceEventHandler","canvas","setInputAction","event","getCurrentMousePosition","features","queryRenderedFeatures","filter","reduce","memo","result","attr","feature","properties","content","getPopupForConfig","openPopup","ScreenSpaceEventType","LEFT_CLICK","parseFloat","camera","destination","rectangle"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;AClFA,gD;;;;;;ACAA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,+G;;;;;;ACPA;AACA;AACA;AACA;AACA;;AAEA,+G;;;;;;ACNA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,4G;;;;;;ACnBA,qBAAqB,mBAAO,CAAC,CAAqB;;AAElD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA,yG;;;;;;ACpBA,cAAc,mBAAO,CAAC,CAA+B;;AAErD,4BAA4B,mBAAO,CAAC,EAA4B;;AAEhE;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA,0H;;;;;;ACdA,oBAAoB,mBAAO,CAAC,EAAoB;;AAEhD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA,oG;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA;;AAEA,+G;;;;;;ACfA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,+G;;;;;;ACRA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;;AAEA,uG;;;;;;ACVA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sH;;;;;;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D;AACF,KAtGH,CAwGE;;AAxGF;AAAA;AAAA,WAyGE,iBAAoB;AAAA,UAAdF,OAAc,uEAAJ,EAAI;;AAClB,UAAI,KAAKA,OAAL,CAAaiD,MAAjB,EAAyB;AACvB,aAAKpC,IAAL,CAAUqC,aAAV,CAAwB,KAAKlD,OAAL,CAAaiD,MAArC,EAA6CjD,OAA7C;AACD,OAFD,MAEO,IAAI,KAAKA,OAAL,CAAamD,MAAjB,EAAyB;AAC9B,aAAKtC,IAAL,CAAUuC,WAAV,CAAsB,KAAKpD,OAAL,CAAamD,MAAnC,EAA2CnD,OAA3C;AACD,OAFM,MAEA,IAAI,KAAKoE,SAAT,EAAoB;AACzB,aAAKvD,IAAL,CAAUiF,MAAV,CAAiB3E,KAAjB,iCACKnB,OADL;AAEE+F,qBAAW,EAAE,KAAK3B,SAAL,CAAe4B;AAF9B;AAID;AACF;AApHH;;AAAA;AAAA,EAAgCnG,oBAAhC;AAsHAD,yBAAA,CAAauE,UAAb,GAA0BA,qBAA1B,C,CAEA;;AACAvE,6BAAA,CAAiByD,QAAjB,CAA0B,cAA1B,EAA0Cc,qBAA1C,E;;AC5JA;AACA","file":"mars3d-supermap-src.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"mars3d\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"mars3dSupermap\", [\"mars3d\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mars3dSupermap\"] = factory(require(\"mars3d\"));\n\telse\n\t\troot[\"mars3dSupermap\"] = factory(root[\"mars3d\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__0__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 12);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\n\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n Object.defineProperty(subClass, \"prototype\", {\n value: Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n }),\n writable: false\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"@babel/runtime/helpers/typeof\")[\"default\"];\n\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var superPropBase = require(\"./superPropBase.js\");\n\nfunction _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n module.exports = _get = Reflect.get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n } else {\n module.exports = _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n\n return desc.value;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n }\n\n return _get.apply(this, arguments);\n}\n\nmodule.exports = _get, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\n\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var getPrototypeOf = require(\"./getPrototypeOf.js\");\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nmodule.exports = _superPropBase, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","import * as mars3d from \"mars3d\";\nconst Cesium = mars3d.Cesium;\n\nlet BaseLayer = mars3d.layer.BaseLayer;\n\n/**\n * 超图S3M三维模型图层,\n * 【需要引入 mars3d-supermap 插件库】\n *\n * @param {Object} [options] 参数对象,包括以下:\n * @param {String} options.url supermap的S3M服务地址,示例:\"url\": \"http://www.supermapol.com/realspace/services/3D-Olympic/rest/realspace\"\n * @param {String} [options.layername] 指定图层名称,未指定时,打开iserver场景服务下所有图层\n * @param {String} [options.sceneName] 工作空间中有多个场景,需要指定场景名称;设置为undefined,默认打开第一个\n * @param {Object} [options.s3mOptions] [S3M支持的参数]{@link http://support.supermap.com.cn:8090/webgl/docs/Documentation/S3MTilesLayer.html?classFilter=S3MTilesLayer} ,示例: {\"selectEnabled\":false},\n * @param {Object} [options.position] 模型新的中心点位置(移动模型)\n * @param {Number} options.position.alt 获取或设置底部高程。(单位:米)\n *\n * @param {String|Number} [options.id = uuid()] 图层id标识\n * @param {String|Number} [options.pid = -1] 图层父级的id,一般图层管理中使用\n * @param {String} [options.name = ''] 图层名称\n * @param {Boolean} [options.show = true] 图层是否显示\n * @param {BaseClass|Boolean} [options.eventParent] 指定的事件冒泡对象,默认为map对象,false时不冒泡\n * @param {Object} [options.center] 图层自定义定位视角 {@link Map#setCameraView}\n * @param {Number} options.center.lng 经度值, 180 - 180\n * @param {Number} options.center.lat 纬度值, -90 - 90\n * @param {Number} [options.center.alt] 高度值\n * @param {Number} [options.center.heading] 方向角度值,绕垂直于地心的轴旋转角度, 0-360\n * @param {Number} [options.center.pitch] 俯仰角度值,绕纬度线旋转角度, 0-360\n * @param {Number} [options.center.roll] 翻滚角度值,绕经度线旋转角度, 0-360\n * @param {Boolean} [options.flyTo] 加载完成数据后是否自动飞行定位到数据所在的区域。\n * @export\n * @class S3MLayer\n * @extends {BaseLayer}\n */\nexport class S3MLayer extends BaseLayer {\n /**\n * 模型对应的Cesium.S3MTilesLayer图层组\n * @type {Object[]}\n * @readonly\n * @see http://support.supermap.com.cn:8090/webgl/docs/Documentation/S3MTilesLayer.html\n */\n get layer() {\n return this._layerArr;\n }\n\n /**\n * 设置S3M图层本身支持的参数\n * @type {Object}\n * @see [S3M支持的参数]{@link http://support.supermap.com.cn:8090/webgl/docs/Documentation/S3MTilesLayer.html?classFilter=S3MTilesLayer}\n */\n get s3mOptions() {\n return this.options.s3mOptions;\n }\n set s3mOptions(value) {\n for (let key in value) {\n let val = value[key];\n this.options.s3mOptions[key] = val;\n\n if (key == \"transparentBackColor\") {\n //去黑边,与offset互斥,注意别配置offset\n val = Cesium.Color.fromCssColorString(val);\n } else if (key == \"transparentBackColorTolerance\") {\n val = Number(val);\n }\n\n for (let i = 0; i < this._layerArr.length; i++) {\n let layer = this._layerArr[i];\n if (layer == null) {\n continue;\n }\n layer[key] = val;\n }\n }\n }\n\n /**\n * 对象添加到地图前创建一些对象的钩子方法,\n * 只会调用一次\n * @return {void} 无\n * @private\n */\n _mountedHook() {\n //场景添加S3M图层服务\n let promise;\n if (this.options.layername) {\n promise = this._map.scene.addS3MTilesLayerByScp(this.options.url, {\n name: this.options.layername,\n autoSetVie: this.options.flyTo,\n cullEnabled: this.options.cullEnabled,\n });\n } else {\n promise = this._map.scene.open(this.options.url, this.options.sceneName, {\n autoSetVie: this.options.flyTo,\n });\n }\n\n Cesium.when(\n promise,\n (smLayer) => {\n if (Array.isArray(smLayer)) {\n this._layerArr = smLayer;\n } else {\n this._layerArr = [smLayer];\n }\n\n //设置图层属性\n for (let i = 0; i < this._layerArr.length; i++) {\n let layer = this._layerArr[i];\n if (layer == null) {\n continue;\n }\n\n layer.isS3M = true; //标识下\n\n //s3mOptions\n if (this.options.s3mOptions) {\n for (let key in this.options.s3mOptions) {\n let val = this.options.s3mOptions[key];\n if (key == \"transparentBackColor\") {\n //去黑边,与offset互斥,注意别配置offset\n layer[key] = Cesium.Color.fromCssColorString(val);\n } else if (key == \"transparentBackColorTolerance\") {\n layer[key] = Number(val);\n } else {\n layer[key] = this.options.s3mOptions[key];\n }\n }\n }\n\n //高度调整 offset.z\n if (this.options?.position?.alt) {\n layer.style3D.bottomAltitude = this.options.position.alt;\n layer.refresh();\n }\n }\n\n if (this.options.flyTo) {\n this.flyToByAnimationEnd();\n }\n\n if (this.options.dataUrl) {\n for (let i = 0; i < this._layerArr.length; i++) {\n let ql = this._layerArr[i];\n\n //读取子图层信息,通过数组的方式返回子图层的名称以及子图层所包含的对象的IDs\n ql.setQueryParameter({\n url: this.options.dataUrl,\n dataSourceName: ql.name.split(\"@\")[1],\n dataSetName: ql.name.split(\"@\")[0],\n isMerge: true,\n });\n\n //获取图层风格\n //Note_GJ: rgba, 1为不透明,0为全透明。已经在模型中导入材质,所以这里的颜色不特别设置\n //var style3D = new Cesium.Style3D();\n // var color = Cesium.Color.fromCssColorString(\"#919191\");//混泥土颜色 RGB(145, 145,145)\n // style3D.fillForeColor = color;\n // ql.style3D = style3D;\n //设置后需刷新图层\n // ql.refresh();\n ql.selectEnabled = true;\n }\n }\n },\n (error) => {\n this.showError(\"渲染时发生错误,已停止渲染。\", error);\n }\n );\n }\n\n /**\n * 对象添加到地图上的创建钩子方法,\n * 每次add时都会调用\n * @return {void} 无\n * @private\n */\n _addedHook() {\n for (let i in this._layerArr) {\n this._layerArr[i].visible = true;\n this._layerArr[i].show = true;\n }\n }\n\n /**\n * 对象从地图上移除的创建钩子方法,\n * 每次remove时都会调用\n * @return {void} 无\n * @private\n */\n _removedHook() {\n if (this._layerArr) {\n for (let i in this._layerArr) {\n this._layerArr[i].visible = false;\n this._layerArr[i].show = false;\n }\n }\n }\n\n /**\n * 设置透明度\n * @param {Number} value 透明度\n * @return {void} 无\n */\n setOpacity(value) {\n if (this._layerArr) {\n for (let i = 0; i < this._layerArr.length; i++) {\n let item = this._layerArr[i];\n if (item == null) {\n continue;\n }\n\n item.style3D.fillForeColor.alpha = value;\n }\n }\n }\n\n //定位至数据区域\n flyTo(options = {}) {\n if (this.options.center) {\n this._map.setCameraView(this.options.center, options);\n } else if (this.options.extent) {\n this._map.flyToExtent(this.options.extent, options);\n }\n }\n}\nmars3d.layer.S3MLayer = S3MLayer;\n\n//注册下\nmars3d.LayerUtil.register(\"supermap_s3m\", S3MLayer);\n","import * as mars3d from \"mars3d\";\nconst Cesium = mars3d.Cesium;\n\nlet BaseTileLayer = mars3d.layer.BaseTileLayer;\n\n/**\n * 超图影像瓦片服务图层,\n * 【需要引入 mars3d-supermap 插件库】\n *\n * @param {Object} [options] 参数对象,包括以下:\n * @param {String} options.url supermap的影像服务地址\n * @param {String|String[]} [options.subdomains] URL模板中用于 {s} 占位符的子域。 如果此参数是单个字符串,则字符串中的每个字符都是一个子域。如果是 一个数组,数组中的每个元素都是一个子域。\n * @param {String} [options.tileFormat] 影像图片格式,默认为png。\n * @param {Boolean} [options.transparent=true] 设置请求的地图服务的参数是否为transparent。\n * @param {String|Cesium.Color} [options.transparentBackColor] 设置影像透明色。\n * @param {Number} [options.transparentBackColorTolerance] 去黑边,设置影像透明色容限,取值范围为0.0~1.0。0.0表示完全透明,1.0表示完全不透明。\n * @param {String} [options.cacheKey] 影像的三维缓存密钥。\n *\n * @param {Number} [options.minimumLevel=0] 瓦片所支持的最低层级,如果数据没有第0层,该参数必须配置,当地图小于该级别时,平台不去请求服务数据。\n * @param {Number} [options.maximumLevel] 瓦片所支持的最大层级,大于该层级时会显示上一层拉伸后的瓦片,当地图大于该级别时,平台不去请求服务数据。\n * @param {Number} [options.minimumTerrainLevel] 展示影像图层的最小地形细节级别,小于该级别时,平台不显示影像数据。\n * @param {Number} [options.maximumTerrainLevel] 展示影像图层的最大地形细节级别,大于该级别时,平台不显示影像数据。\n * @param {Object} [options.rectangle] 瓦片数据的矩形区域范围\n * @param {Number} options.rectangle.xmin 最小经度值, -180 至 180\n * @param {Number} options.rectangle.xmax 最大纬度值, -180 至 180\n * @param {Number} options.rectangle.ymin 最小纬度值, -90 至 90\n * @param {Number} options.rectangle.ymax 最大纬度值, -90 至 90\n * @param {Number[]} [options.bbox] bbox规范的瓦片数据的矩形区域范围,与rectangle二选一即可。\n * @param {Number} [options.zIndex] 控制图层的叠加层次,默认按加载的顺序进行叠加,但也可以自定义叠加顺序,数字大的在上面。\n * @param {CRS} [options.crs=CRS.EPSG:3857] 瓦片数据的坐标系信息,默认为墨卡托投影\n * @param {ChinaCRS} [options.chinaCRS] 标识瓦片的国内坐标系(用于自动纠偏或加偏),自动将瓦片转为map对应的chinaCRS类型坐标系。\n *\n * @param {String} [options.proxy] 加载资源时要使用的代理服务url。\n * @param {Object} [options.templateValues] 一个对象,用于替换Url中的模板值的键/值对\n * @param {Object} [options.queryParameters] 一个对象,其中包含在检索资源时将发送的查询参数。比如:queryParameters: {'access_token': '123-435-456-000'},\n * @param {Object} [options.headers] 一个对象,将发送的其他HTTP标头。比如:headers: { 'X-My-Header': 'valueOfHeader' },\n * @param {Boolean} [options.enablePickFeatures=true] 如果为true,则 {@link UrlTemplateImageryProvider#pickFeatures} 请求 pickFeaturesUrl 并尝试解释响应中包含的功能。\n * 如果为 false{@link UrlTemplateImageryProvider#pickFeatures} 会立即返回未定义(表示没有可拾取的内容) 功能)而无需与服务器通信。如果您知道数据,则将此属性设置为false 源不支持选择功能,或者您不希望该提供程序的功能可供选择。注意 可以通过修改 {@link UriTemplateImageryProvider#enablePickFeatures}来动态覆盖 属性。\n * @param {Cesium.GetFeatureInfoFormat[]} [options.getFeatureInfoFormats] 在某处获取功能信息的格式 调用 {@link UrlTemplateImageryProvider#pickFeatures} 的特定位置。如果这 参数未指定,功能选择已禁用。\n *\n * @param {Number} [options.opacity = 1.0] 透明度,取值范围:0.0-1.0。\n * @param {Number|Function} [options.alpha=1.0] 同opacity。\n * @param {Number|Function} [options.nightAlpha=1.0] 当 enableLighting 为 true 时 ,在地球的夜晚区域的透明度,取值范围:0.0-1.0。\n * @param {Number|Function} [options.dayAlpha=1.0] 当 enableLighting 为 true 时,在地球的白天区域的透明度,取值范围:0.0-1.0。\n * @param {Number|Function} [options.brightness=1.0] 亮度\n * @param {Number|Function} [options.contrast=1.0] 对比度。 1.0使用未修改的图像颜色,小于1.0会降低对比度,而大于1.0则会提高对比度。\n * @param {Number|Function} [options.hue=0.0] 色调。 0.0 时未修改的图像颜色。\n * @param {Number|Function} [options.saturation=1.0] 饱和度。 1.0使用未修改的图像颜色,小于1.0会降低饱和度,而大于1.0则会增加饱和度。\n * @param {Number|Function} [options.gamma=1.0] 伽马校正值。 1.0使用未修改的图像颜色。\n * @param {Number} [options.maximumAnisotropy=maximum supported] 使用的最大各向异性水平 用于纹理过滤。如果未指定此参数,则支持最大各向异性 将使用WebGL堆栈。较大的值可使影像在水平方向上看起来更好 视图。\n * @param {Cesium.Rectangle} [options.cutoutRectangle] 制图矩形,用于裁剪此ImageryLayer的一部分。\n * @param {Cesium.Color} [options.colorToAlpha] 用作Alpha的颜色。\n * @param {Number} [options.colorToAlphaThreshold=0.004] 颜色到Alpha的阈值。\n * @param {Boolean} [options.hasAlphaChannel=true] 如果此图像提供者提供的图像为真 包括一个Alpha通道;否则为假。如果此属性为false,则为Alpha通道,如果 目前,将被忽略。如果此属性为true,则任何没有Alpha通道的图像都将 它们的alpha随处可见。当此属性为false时,内存使用情况 和纹理上传时间可能会减少。\n * @param {Number} [options.tileWidth=256] 图像图块的像素宽度。\n * @param {Number} [options.tileHeight=256] 图像图块的像素高度。\n * @param {Object} [options.customTags] 允许替换网址模板中的自定义关键字。该对象必须具有字符串作为键,并且必须具有值。\n *\n * @param {String|Number} [options.id = uuid()] 图层id标识\n * @param {String|Number} [options.pid = -1] 图层父级的id,一般图层管理中使用\n * @param {String} [options.name = ''] 图层名称\n * @param {Boolean} [options.show = true] 图层是否显示\n * @param {BaseClass|Boolean} [options.eventParent] 指定的事件冒泡对象,默认为map对象,false时不冒泡\n * @param {Object} [options.center] 图层自定义定位视角 {@link Map#setCameraView}\n * @param {Number} options.center.lng 经度值, 180 - 180\n * @param {Number} options.center.lat 纬度值, -90 - 90\n * @param {Number} [options.center.alt] 高度值\n * @param {Number} [options.center.heading] 方向角度值,绕垂直于地心的轴旋转角度, 0-360\n * @param {Number} [options.center.pitch] 俯仰角度值,绕纬度线旋转角度, 0-360\n * @param {Number} [options.center.roll] 翻滚角度值,绕经度线旋转角度, 0-360\n * @param {Boolean} [options.flyTo] 加载完成数据后是否自动飞行定位到数据所在的区域。\n * @export\n * @class SmImgLayer\n * @extends {BaseTileLayer}\n *\n * @see http://support.supermap.com.cn:8090/webgl/docs/Documentation/SuperMapImageryProvider.html?classFilter=SuperMapImageryProvider\n */\nexport class SmImgLayer extends BaseTileLayer {\n //构建ImageryProvider\n _createImageryProvider(options) {\n return createImageryProvider(options);\n }\n //添加时\n _addedHook() {\n super._addedHook();\n\n if (Cesium.defined(this.options.transparentBackColor)) {\n this._imageryLayer.transparentBackColor = mars3d.Util.getCesiumColor(this.options.transparentBackColor);\n this._imageryLayer.transparentBackColorTolerance = this.options.transparentBackColorTolerance; //去黑边\n }\n }\n}\nfunction createImageryProvider(options) {\n options = mars3d.LayerUtil.converOptions(options);\n\n if (options.url instanceof Cesium.Resource) options.url = options.url.url;\n\n if (Cesium.defined(options.transparentBackColor)) {\n delete options.transparentBackColor;\n delete options.transparentBackColorTolerance;\n }\n return new Cesium.SuperMapImageryProvider(options);\n}\n\n/**\n * 创建用于图层的 ImageryProvider对象\n *\n * @param {Object} options Provider参数,同图层构造参数。\n * @return {Cesium.ImageryProvider} ImageryProvider类\n * @function\n */\nSmImgLayer.createImageryProvider = createImageryProvider;\n\nmars3d.layer.SmImgLayer = SmImgLayer;\n\n//注册下\nconst layerType = \"supermap_img\";\nmars3d.LayerUtil.register(layerType, SmImgLayer);\nmars3d.LayerUtil.registerImageryProvider(layerType, createImageryProvider);\n","import * as mars3d from \"mars3d\";\nconst Cesium = mars3d.Cesium;\n\nlet BaseLayer = mars3d.layer.BaseLayer;\n\n/**\n * 超图MVT矢量瓦片图层,\n * 【需要引入 mars3d-supermap 插件库】\n *\n * @param {Object} [options] 参数对象,包括以下:\n * @param {String} options.url 适用于通过SuperMap桌面软件生成mvt数据,经iServer发布为rest风格的地图服务,只需提供服务地址。\n * @param {String} options.layer 图层名称,适用于第三方发布的WMTS服务。\n * @param {Number} [options.canvasWidth] 用来绘制矢量的纹理边长。默认是512,越大越精细,越小性能越高。\n * @param {String} [options.format='mvt'] 适用于第三方发布的WMTS服务。\n * @param {Object} [options.mapboxStyle] 使用的mapBox风格。\n * @param {Object} [options.多个参数] 参考[supermap官方API]{@link http://support.supermap.com.cn:8090/webgl/docs/Documentation/Scene.html#addVectorTilesLayer}\n *\n *\n * @param {String|Number} [options.id = uuid()] 图层id标识\n * @param {String|Number} [options.pid = -1] 图层父级的id,一般图层管理中使用\n * @param {String} [options.name = ''] 图层名称\n * @param {Boolean} [options.show = true] 图层是否显示\n * @param {BaseClass|Boolean} [options.eventParent] 指定的事件冒泡对象,默认为map对象,false时不冒泡\n * @param {Object} [options.center] 图层自定义定位视角 {@link Map#setCameraView}\n * @param {Number} options.center.lng 经度值, 180 - 180\n * @param {Number} options.center.lat 纬度值, -90 - 90\n * @param {Number} [options.center.alt] 高度值\n * @param {Number} [options.center.heading] 方向角度值,绕垂直于地心的轴旋转角度, 0-360\n * @param {Number} [options.center.pitch] 俯仰角度值,绕纬度线旋转角度, 0-360\n * @param {Number} [options.center.roll] 翻滚角度值,绕经度线旋转角度, 0-360\n * @param {Boolean} [options.flyTo] 加载完成数据后是否自动飞行定位到数据所在的区域。\n * @export\n * @class SmMvtLayer\n * @extends {BaseLayer}\n */\nexport class SmMvtLayer extends BaseLayer {\n /**\n * 对应的supermap图层 Cesium.VectorTilesLayer\n * @type {*}\n * @readonly\n * @see http://support.supermap.com.cn:8090/webgl/docs/Documentation/VectorTilesLayer.html\n */\n get layer() {\n return this._mvtLayer;\n }\n\n /**\n * 对象添加到地图前创建一些对象的钩子方法,\n * 只会调用一次\n * @return {void} 无\n * @private\n */\n _mountedHook() {\n //options参考API文档:http://support.supermap.com.cn:8090/webgl/docs/Documentation/Scene.html\n this._mvtLayer = this._map.scene.addVectorTilesMap(this.options);\n let layerReadyPromise = this._mvtLayer.readyPromise;\n\n Cesium.when(\n layerReadyPromise,\n (data) => {\n //setPaintProperty(layerId, name, value, options)\n // for(var layerId in that.options.style){\n // that._mvtLayer.setPaintProperty(layerId, \"fill-color\", \"rgba(255,0,0,0.8)\");\n // }\n },\n (error) => {\n this.showError(\"渲染时发生错误,已停止渲染。\", error);\n }\n );\n\n let scene = this._map.scene;\n let handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);\n handler.setInputAction((event) => {\n if (!this.show) {\n return;\n }\n\n let position = mars3d.PointUtil.getCurrentMousePosition(scene, event.position);\n\n //查询出相交图层的feature\n let features = this._mvtLayer.queryRenderedFeatures([position], {\n // layers: [selectLayer.id]\n });\n\n let filter = features.reduce(\n (memo, result) => {\n let attr = result.feature.properties;\n if (!attr) {\n return;\n }\n\n let content = mars3d.Util.getPopupForConfig(this.options, attr);\n let item = {\n data: attr,\n event: event,\n };\n this._map.openPopup(position, content, item);\n },\n [\"in\", \"$id\"]\n );\n }, Cesium.ScreenSpaceEventType.LEFT_CLICK);\n\n this.handler = handler;\n }\n\n /**\n * 对象添加到地图上的创建钩子方法,\n * 每次add时都会调用\n * @return {void} 无\n * @private\n */\n _addedHook() {\n this._mvtLayer.show = true;\n // this._mvtLayer.refresh();\n }\n\n /**\n * 对象从地图上移除的创建钩子方法,\n * 每次remove时都会调用\n * @return {void} 无\n * @private\n */\n _removedHook() {\n if (this._mvtLayer) {\n this._mvtLayer.show = false;\n }\n }\n\n /**\n * 设置透明度\n * @param {Number} value 透明度\n * @return {void} 无\n */\n setOpacity(value) {\n if (this._mvtLayer) {\n this._mvtLayer.alpha = parseFloat(value);\n }\n }\n\n //定位至数据区域\n flyTo(options = {}) {\n if (this.options.center) {\n this._map.setCameraView(this.options.center, options);\n } else if (this.options.extent) {\n this._map.flyToExtent(this.options.extent, options);\n } else if (this._mvtLayer) {\n this._map.camera.flyTo({\n ...options,\n destination: this._mvtLayer.rectangle,\n });\n }\n }\n}\nmars3d.layer.SmMvtLayer = SmMvtLayer;\n\n//注册下\nmars3d.LayerUtil.register(\"supermap_mvt\", SmMvtLayer);\n","export { S3MLayer } from \"./supermap/S3MLayer\";\nexport { SmImgLayer } from \"./supermap/SmImgLayer\";\nexport { SmMvtLayer } from \"./supermap/SmMvtLayer\";\n"],"sourceRoot":""}
@@ -1,22 +1,10 @@
1
1
  /*!
2
2
  * Mars3D平台插件,结合supermap超图库使用的功能插件
3
- * 版本信息:v3.2.0
4
- * 编译日期:2022-01-28 14:22:09
3
+ * 版本信息:v3.2.1
4
+ * 编译日期:2022-02-13 13:41:06
5
5
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
6
6
  */
7
7
  (function webpackUniversalModuleDefinition(window) {
8
-
9
- let Cesium = window.Cesium //通过index.html的head引入
10
- // if (!Cesium && typeof exports === 'object') {
11
- // Cesium = require('mars3d-cesium') //使用npm安装内置的Cesium
12
- // require('mars3d-cesium/Build/Cesium/Widgets/widgets.css')
13
- // window['Cesium'] = Cesium
14
- // }
15
- if (!Cesium) {
16
- console.error('请引入超图版本Cesium库,可参考教程:http://mars3d.cn/dev/guide/basics/import.html')
17
- }
18
-
19
-
20
8
  let mars3d = window.mars3d //通过index.html的head引入
21
9
  if (!mars3d && typeof exports === 'object') {
22
10
  mars3d = require("mars3d")
@@ -28,12 +16,12 @@
28
16
 
29
17
  /*!
30
18
  * Mars3D平台插件,结合supermap超图库使用的功能插件
31
- * 版本信息:v3.2.0, hash值: 12da016c4b601b8df293
32
- * 编译日期:2022-01-28 14:22:09
19
+ * 版本信息:v3.2.1, hash值: a39cb9996861d1d47fae
20
+ * 编译日期:2022-02-13 13:41:06
33
21
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
34
22
  *
35
23
  */
36
- window.mars3dSupermap=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=13)}([function(e,t){e.exports=window.mars3d},function(e,t){e.exports=window.Cesium},function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&r(e.prototype,t),o&&r(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(9);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&o(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(10).default,n=r(11);e.exports=function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(12);function n(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=n=Reflect.get,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=n=function(e,t,r){var n=o(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},e.exports.__esModule=!0,e.exports.default=e.exports),n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t,o){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,o)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(2);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.r(t),r.d(t,"S3MLayer",(function(){return v})),r.d(t,"SmImgLayer",(function(){return b})),r.d(t,"SmMvtLayer",(function(){return j}));var o=r(3),n=r.n(o),i=r(4),a=r.n(i),s=r(5),u=r.n(s),l=r(6),c=r.n(l),p=r(2),f=r.n(p),y=r(1),d=r(0);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=f()(e);if(t){var n=f()(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c()(this,r)}}var v=function(e){u()(r,e);var t=h(r);function r(){return n()(this,r),t.apply(this,arguments)}return a()(r,[{key:"layer",get:function(){return this._layerArr}},{key:"s3mOptions",get:function(){return this.options.s3mOptions},set:function(e){for(var t in e){var r=e[t];this.options.s3mOptions[t]=r,"transparentBackColor"==t?r=y.Color.fromCssColorString(r):"transparentBackColorTolerance"==t&&(r=Number(r));for(var o=0;o<this._layerArr.length;o++){var n=this._layerArr[o];null!=n&&(n[t]=r)}}}},{key:"_mountedHook",value:function(){var e,t=this;e=this.options.layername?this._map.scene.addS3MTilesLayerByScp(this.options.url,{name:this.options.layername,autoSetVie:this.options.flyTo,cullEnabled:this.options.cullEnabled}):this._map.scene.open(this.options.url,this.options.sceneName,{autoSetVie:this.options.flyTo}),y.when(e,(function(e){Array.isArray(e)?t._layerArr=e:t._layerArr=[e];for(var r=0;r<t._layerArr.length;r++){var o,n,i=t._layerArr[r];if(null!=i){if(i.isS3M=!0,t.options.s3mOptions)for(var a in t.options.s3mOptions){var s=t.options.s3mOptions[a];i[a]="transparentBackColor"==a?y.Color.fromCssColorString(s):"transparentBackColorTolerance"==a?Number(s):t.options.s3mOptions[a]}null!==(o=t.options)&&void 0!==o&&null!==(n=o.position)&&void 0!==n&&n.alt&&(i.style3D.bottomAltitude=t.options.position.alt,i.refresh())}}if(t.options.flyTo&&t.flyToByAnimationEnd(),t.options.dataUrl)for(var u=0;u<t._layerArr.length;u++){var l=t._layerArr[u];l.setQueryParameter({url:t.options.dataUrl,dataSourceName:l.name.split("@")[1],dataSetName:l.name.split("@")[0],isMerge:!0}),l.selectEnabled=!0}}),(function(e){t.showError("渲染时发生错误,已停止渲染。",e)}))}},{key:"_addedHook",value:function(){for(var e in this._layerArr)this._layerArr[e].visible=!0,this._layerArr[e].show=!0}},{key:"_removedHook",value:function(){if(this._layerArr)for(var e in this._layerArr)this._layerArr[e].visible=!1,this._layerArr[e].show=!1}},{key:"setOpacity",value:function(e){if(this._layerArr)for(var t=0;t<this._layerArr.length;t++){var r=this._layerArr[t];null!=r&&(r.style3D.fillForeColor.alpha=e)}}},{key:"flyTo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options.center?this._map.setCameraView(this.options.center,e):this.options.extent&&this._map.flyToExtent(this.options.extent,e)}}]),r}(d.layer.BaseLayer);d.layer.S3MLayer=v,d.LayerUtil.register("supermap_s3m",v);var _=r(7),m=r.n(_);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=f()(e);if(t){var n=f()(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c()(this,r)}}var b=function(e){u()(r,e);var t=x(r);function r(){return n()(this,r),t.apply(this,arguments)}return a()(r,[{key:"_createImageryProvider",value:function(e){return g(e)}},{key:"_addedHook",value:function(){m()(f()(r.prototype),"_addedHook",this).call(this),y.defined(this.options.transparentBackColor)&&(this._imageryLayer.transparentBackColor=d.Util.getCesiumColor(this.options.transparentBackColor),this._imageryLayer.transparentBackColorTolerance=this.options.transparentBackColorTolerance)}}]),r}(d.layer.BaseTileLayer);function g(e){return(e=d.LayerUtil.converOptions(e)).url instanceof y.Resource&&(e.url=e.url.url),y.defined(e.transparentBackColor)&&(delete e.transparentBackColor,delete e.transparentBackColorTolerance),new y.SuperMapImageryProvider(e)}b.createImageryProvider=g,d.layer.SmImgLayer=b;d.LayerUtil.register("supermap_img",b),d.LayerUtil.registerImageryProvider("supermap_img",g);var O=r(8),w=r.n(O);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?k(Object(r),!0).forEach((function(t){w()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=f()(e);if(t){var n=f()(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c()(this,r)}}var j=function(e){u()(r,e);var t=S(r);function r(){return n()(this,r),t.apply(this,arguments)}return a()(r,[{key:"layer",get:function(){return this._mvtLayer}},{key:"_mountedHook",value:function(){var e=this;this._mvtLayer=this._map.scene.addVectorTilesMap(this.options);var t=this._mvtLayer.readyPromise;y.when(t,(function(e){}),(function(t){e.showError("渲染时发生错误,已停止渲染。",t)}));var r=this._map.scene,o=new y.ScreenSpaceEventHandler(r.canvas);o.setInputAction((function(t){if(e.show){var o=d.PointUtil.getCurrentMousePosition(r,t.position);e._mvtLayer.queryRenderedFeatures([o],{}).reduce((function(r,n){var i=n.feature.properties;if(i){var a=d.Util.getPopupForConfig(e.options,i),s={data:i,event:t};e._map.openPopup(o,a,s)}}),["in","$id"])}}),y.ScreenSpaceEventType.LEFT_CLICK),this.handler=o}},{key:"_addedHook",value:function(){this._mvtLayer.show=!0}},{key:"_removedHook",value:function(){this._mvtLayer&&(this._mvtLayer.show=!1)}},{key:"setOpacity",value:function(e){this._mvtLayer&&(this._mvtLayer.alpha=parseFloat(e))}},{key:"flyTo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options.center?this._map.setCameraView(this.options.center,e):this.options.extent?this._map.flyToExtent(this.options.extent,e):this._mvtLayer&&this._map.camera.flyTo(P(P({},e),{},{destination:this._mvtLayer.rectangle}))}}]),r}(d.layer.BaseLayer);d.layer.SmMvtLayer=j,d.LayerUtil.register("supermap_mvt",j)}]);
24
+ window.mars3dSupermap=function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=12)}([function(e,t){e.exports=window.mars3d},function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,t,o){return t&&r(e.prototype,t),o&&r(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(8);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&o(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(9).default,n=r(10);e.exports=function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(11);function n(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=n=Reflect.get,e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=n=function(e,t,r){var n=o(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},e.exports.__esModule=!0,e.exports.default=e.exports),n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t,o){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t,o)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(1);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.r(t),r.d(t,"S3MLayer",(function(){return v})),r.d(t,"SmImgLayer",(function(){return g})),r.d(t,"SmMvtLayer",(function(){return L}));var o=r(2),n=r.n(o),i=r(3),a=r.n(i),s=r(4),u=r.n(s),l=r(5),c=r.n(l),p=r(1),f=r.n(p),y=r(0);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=f()(e);if(t){var n=f()(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c()(this,r)}}var h=y.Cesium,v=function(e){u()(r,e);var t=d(r);function r(){return n()(this,r),t.apply(this,arguments)}return a()(r,[{key:"layer",get:function(){return this._layerArr}},{key:"s3mOptions",get:function(){return this.options.s3mOptions},set:function(e){for(var t in e){var r=e[t];this.options.s3mOptions[t]=r,"transparentBackColor"==t?r=h.Color.fromCssColorString(r):"transparentBackColorTolerance"==t&&(r=Number(r));for(var o=0;o<this._layerArr.length;o++){var n=this._layerArr[o];null!=n&&(n[t]=r)}}}},{key:"_mountedHook",value:function(){var e,t=this;e=this.options.layername?this._map.scene.addS3MTilesLayerByScp(this.options.url,{name:this.options.layername,autoSetVie:this.options.flyTo,cullEnabled:this.options.cullEnabled}):this._map.scene.open(this.options.url,this.options.sceneName,{autoSetVie:this.options.flyTo}),h.when(e,(function(e){Array.isArray(e)?t._layerArr=e:t._layerArr=[e];for(var r=0;r<t._layerArr.length;r++){var o,n,i=t._layerArr[r];if(null!=i){if(i.isS3M=!0,t.options.s3mOptions)for(var a in t.options.s3mOptions){var s=t.options.s3mOptions[a];i[a]="transparentBackColor"==a?h.Color.fromCssColorString(s):"transparentBackColorTolerance"==a?Number(s):t.options.s3mOptions[a]}null!==(o=t.options)&&void 0!==o&&null!==(n=o.position)&&void 0!==n&&n.alt&&(i.style3D.bottomAltitude=t.options.position.alt,i.refresh())}}if(t.options.flyTo&&t.flyToByAnimationEnd(),t.options.dataUrl)for(var u=0;u<t._layerArr.length;u++){var l=t._layerArr[u];l.setQueryParameter({url:t.options.dataUrl,dataSourceName:l.name.split("@")[1],dataSetName:l.name.split("@")[0],isMerge:!0}),l.selectEnabled=!0}}),(function(e){t.showError("渲染时发生错误,已停止渲染。",e)}))}},{key:"_addedHook",value:function(){for(var e in this._layerArr)this._layerArr[e].visible=!0,this._layerArr[e].show=!0}},{key:"_removedHook",value:function(){if(this._layerArr)for(var e in this._layerArr)this._layerArr[e].visible=!1,this._layerArr[e].show=!1}},{key:"setOpacity",value:function(e){if(this._layerArr)for(var t=0;t<this._layerArr.length;t++){var r=this._layerArr[t];null!=r&&(r.style3D.fillForeColor.alpha=e)}}},{key:"flyTo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options.center?this._map.setCameraView(this.options.center,e):this.options.extent&&this._map.flyToExtent(this.options.extent,e)}}]),r}(y.layer.BaseLayer);y.layer.S3MLayer=v,y.LayerUtil.register("supermap_s3m",v);var m=r(6),_=r.n(m);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=f()(e);if(t){var n=f()(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c()(this,r)}}var b=y.Cesium,g=function(e){u()(r,e);var t=x(r);function r(){return n()(this,r),t.apply(this,arguments)}return a()(r,[{key:"_createImageryProvider",value:function(e){return O(e)}},{key:"_addedHook",value:function(){_()(f()(r.prototype),"_addedHook",this).call(this),b.defined(this.options.transparentBackColor)&&(this._imageryLayer.transparentBackColor=y.Util.getCesiumColor(this.options.transparentBackColor),this._imageryLayer.transparentBackColorTolerance=this.options.transparentBackColorTolerance)}}]),r}(y.layer.BaseTileLayer);function O(e){return(e=y.LayerUtil.converOptions(e)).url instanceof b.Resource&&(e.url=e.url.url),b.defined(e.transparentBackColor)&&(delete e.transparentBackColor,delete e.transparentBackColorTolerance),new b.SuperMapImageryProvider(e)}g.createImageryProvider=O,y.layer.SmImgLayer=g;y.LayerUtil.register("supermap_img",g),y.LayerUtil.registerImageryProvider("supermap_img",O);var w=r(7),k=r.n(w);function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){k()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=f()(e);if(t){var n=f()(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return c()(this,r)}}var C=y.Cesium,L=function(e){u()(r,e);var t=j(r);function r(){return n()(this,r),t.apply(this,arguments)}return a()(r,[{key:"layer",get:function(){return this._mvtLayer}},{key:"_mountedHook",value:function(){var e=this;this._mvtLayer=this._map.scene.addVectorTilesMap(this.options);var t=this._mvtLayer.readyPromise;C.when(t,(function(e){}),(function(t){e.showError("渲染时发生错误,已停止渲染。",t)}));var r=this._map.scene,o=new C.ScreenSpaceEventHandler(r.canvas);o.setInputAction((function(t){if(e.show){var o=y.PointUtil.getCurrentMousePosition(r,t.position);e._mvtLayer.queryRenderedFeatures([o],{}).reduce((function(r,n){var i=n.feature.properties;if(i){var a=y.Util.getPopupForConfig(e.options,i),s={data:i,event:t};e._map.openPopup(o,a,s)}}),["in","$id"])}}),C.ScreenSpaceEventType.LEFT_CLICK),this.handler=o}},{key:"_addedHook",value:function(){this._mvtLayer.show=!0}},{key:"_removedHook",value:function(){this._mvtLayer&&(this._mvtLayer.show=!1)}},{key:"setOpacity",value:function(e){this._mvtLayer&&(this._mvtLayer.alpha=parseFloat(e))}},{key:"flyTo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options.center?this._map.setCameraView(this.options.center,e):this.options.extent?this._map.flyToExtent(this.options.extent,e):this._mvtLayer&&this._map.camera.flyTo(S(S({},e),{},{destination:this._mvtLayer.rectangle}))}}]),r}(y.layer.BaseLayer);y.layer.SmMvtLayer=L,y.LayerUtil.register("supermap_mvt",L)}]);
37
25
 
38
26
  })(window);
39
27
 
package/package.json CHANGED
@@ -1,34 +1,57 @@
1
1
  {
2
2
  "name": "mars3d-supermap",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Mars3D平台插件,结合supermap超图库使用的功能插件",
5
5
  "main": "dist/mars3d-supermap.js",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "dependencies": {},
10
- "devDependencies": {},
10
+ "devDependencies": {
11
+ "mars3d": "^3.2.1",
12
+ "@babel/core": "^7.14.3",
13
+ "@babel/eslint-parser": "^7.14.3",
14
+ "@babel/plugin-proposal-class-properties": "^7.14.3",
15
+ "@babel/plugin-transform-runtime": "^7.14.3",
16
+ "@babel/preset-env": "^7.14.3",
17
+ "babel-eslint": "^10.1.0",
18
+ "babel-loader": "^8.2.2",
19
+ "eslint": "^7.26.0",
20
+ "eslint-config-prettier": "^7.2.0",
21
+ "eslint-plugin-import": "^2.22.1",
22
+ "eslint-plugin-node": "^11.1.0",
23
+ "eslint-plugin-prettier": "^3.3.1",
24
+ "eslint-plugin-promise": "^4.3.1",
25
+ "prettier": "^2.2.1",
26
+ "webpack": "^4.46.0",
27
+ "webpack-cli": "^3.3.12"
28
+ },
11
29
  "scripts": {
12
- "test": "echo \"Error: no test specified\" && exit 1",
30
+ "build": "webpack --env.prod --env.min --progress --profile --colors --config ./scripts/webpack.config.js && webpack --env.prod --progress --profile --colors --config ./scripts/webpack.config.js --devtool source-map",
31
+ "build-src": "webpack --env.prod --progress --profile --colors --config ./scripts/webpack.config.js --devtool source-map",
32
+ "build-min": "webpack --env.prod --env.min --progress --profile --colors --config ./scripts/webpack.config.js",
33
+ "build-npm": "webpack --env.prod --progress --profile --colors --config ./scripts/webpack.config.js --devtool source-map && webpack --env.prod --env.min --progress --profile --colors --config ./scripts/webpack.npm.js && node scripts/npm/buildNpm.js",
13
34
  "push": "npm publish"
14
35
  },
15
36
  "repository": {
16
37
  "type": "git",
17
- "url": "https://github.com/marsgis/mars3d.git"
38
+ "url": "https://github.com/marsgis/mars3d-plugin.git"
18
39
  },
19
40
  "bugs": {
20
- "url": "https://github.com/marsgis/mars3d/issues",
41
+ "url": "https://github.com/marsgis/mars3d-plugin/issues",
21
42
  "email": "wh@marsgis.cn"
22
43
  },
23
44
  "keywords": [
24
45
  "marsgis",
25
46
  "mars3d",
26
47
  "cesium",
48
+ "webgl",
49
+ "gis",
27
50
  "3dgis",
28
51
  "webgis",
29
52
  "heatmap"
30
53
  ],
31
- "license": "Apache-2.0",
32
54
  "author": "火星科技",
55
+ "license": "Apache-2.0",
33
56
  "homepage": "http://mars3d.cn"
34
57
  }