egovamap 0.28.8 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -172,7 +172,9 @@ XScene.prototype = {
172
172
  };
173
173
 
174
174
  XScene.create = function (pageType, pageId) {
175
- window.__xsense = new XScene(pageType, pageId);
175
+ if(!window.__xsense){
176
+ window.__xsense = new XScene(pageType, pageId);
177
+ }
176
178
  return window.__xsense;
177
179
  };
178
180
 
@@ -2713,6 +2713,16 @@ var EGovaGISMap = function (
2713
2713
  return that.callMap("stopMeasure");
2714
2714
  };
2715
2715
 
2716
+ // 上视图
2717
+ that.previousView = function () {
2718
+ that.callMap("previousView");
2719
+ }
2720
+
2721
+ // 上视图
2722
+ that.nextView = function () {
2723
+ that.callMap("nextView");
2724
+ }
2725
+
2716
2726
  that.init();
2717
2727
  };
2718
2728
 
@@ -12,18 +12,20 @@ import GeometryTrans from "./GeometryTrans";
12
12
  var defaultMapID = null;
13
13
  var mapList = {};
14
14
  var mapArray = [];
15
- var mapCount = 0;
16
15
  var scene = null;
17
16
 
17
+ function getUid() {
18
+ return new Date().getTime() + Math.random().toString(36).substring(2);
19
+ }
20
+
18
21
  function getUniqueID(container) {
19
22
  var uniqueID = null;
20
23
  if (container == undefined || container == null || container == "")
21
24
  return undefined;
22
25
  uniqueID = container.uniqueID;
23
26
  if (!uniqueID) {
24
- uniqueID = "egovamappage" + mapCount;
27
+ uniqueID = "egovamap" + getUid();
25
28
  container.uniqueID = uniqueID;
26
- mapCount++;
27
29
  }
28
30
  return uniqueID;
29
31
  }
@@ -5152,6 +5154,36 @@ var EGovaMap = function (
5152
5154
  }
5153
5155
  };
5154
5156
 
5157
+ // 截屏
5158
+ that.snapScreen = function () {
5159
+ if (scene == null) {
5160
+ return;
5161
+ }
5162
+ if (gisMap != null) {
5163
+ gisMap.stopMeasure();
5164
+ }
5165
+ }
5166
+
5167
+ // 上视图
5168
+ that.previousView = function () {
5169
+ if (scene == null) {
5170
+ return;
5171
+ }
5172
+ if (gisMap != null) {
5173
+ gisMap.previousView();
5174
+ }
5175
+ }
5176
+
5177
+ // 上视图
5178
+ that.nextView = function () {
5179
+ if (scene == null) {
5180
+ return;
5181
+ }
5182
+ if (gisMap != null) {
5183
+ gisMap.nextView();
5184
+ }
5185
+ }
5186
+
5155
5187
  that.initMap(containerID, callback, mapType, mapConfig);
5156
5188
 
5157
5189
  // EGovaBI(globeMap).bind(this)();
@@ -5236,6 +5268,7 @@ var EGovaMapUtils = {
5236
5268
  for (var k in window.__xsense._evt.handlers) {
5237
5269
  if (k.startsWith(uniqueID)) {
5238
5270
  window.__xsense._evt.handlers[k] = null;
5271
+ delete window.__xsense._evt.handlers[k];
5239
5272
  }
5240
5273
  }
5241
5274
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.28.8",
3
+ "version": "0.29.0",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {