egovamap 0.15.24 → 0.15.27

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.
@@ -93,6 +93,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
93
93
  }
94
94
 
95
95
  that.id = msgPrefix ? msgPrefix + "_emap" : 'emap';
96
+ that.gisDebug = getLocalStorageItem('gisDebug');
96
97
  //that.gisMapContainer = $container.getElementsByClassName(id)[0];
97
98
  //that.gisMapContainer = $container.find("#" + that.id)[0];
98
99
  that.gisMapContainer = document.getElementById(that.id);
@@ -302,7 +303,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
302
303
  _egovagisviewerUrl = gisServerURL;
303
304
  var mainScript = document.createElement('script');
304
305
  mainScript.setAttribute('type', 'text/javascript');
305
- var distOrSource = getLocalStorageItem('gisDebug') ? 'source' : 'dist';
306
+ var distOrSource = that.gisDebug ? 'source' : 'dist';
306
307
  var cssUrl = gisServerURL + '/library/egovaviewer/build/' + distOrSource + '/index.css';
307
308
  var mainLink = document.createElement('link');
308
309
  // mainLink.setAttribute('name','egoavagisviewer_' + uniqueID);
@@ -485,7 +486,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
485
486
 
486
487
  that.fireCallback = function (msgId, msgData, stopOnTop) {
487
488
  var args = { args: msgData };
488
- console.log(msgId);
489
+ that.gisDebug && console.log(msgId);
489
490
  scene.fire(msgPrefix + ":" + msgId, args, stopOnTop);
490
491
  }
491
492
 
@@ -1982,10 +1982,10 @@ var EGovaGlobeMap = function ($container, pScene, prefix, mapConfig, context, ca
1982
1982
  return;
1983
1983
  scene.fire((msgPrefix + ":setLineOptions"), { args: [options] }, parentScene, false);
1984
1984
  };
1985
- that.bufferAnalysis = function(options,clear,update) {
1985
+ that.bufferAnalysis = function(options,clear,update,callback) {
1986
1986
  if (scene == null)
1987
1987
  return;
1988
- scene.fire((msgPrefix + ":bufferAnalysis"), { args: [options,clear,update] }, parentScene, false);
1988
+ scene.fire((msgPrefix + ":bufferAnalysis"), { args: [options,clear,update,callback] }, parentScene, false);
1989
1989
  };
1990
1990
  that.clearBufferAnalysis = function(options) {
1991
1991
  if (scene == null)
@@ -2070,57 +2070,97 @@ var EGovaGlobeMap = function ($container, pScene, prefix, mapConfig, context, ca
2070
2070
  return;
2071
2071
  scene.fire((msgPrefix + ":splitView"), { args: [options] }, parentScene, false);
2072
2072
  };
2073
-
2074
2073
  //4.13
2075
2074
  //淹没分析
2076
2075
  that.drawRange = function(type) {
2077
2076
  if (scene == null)
2078
2077
  return;
2079
2078
  scene.fire((msgPrefix + ":drawRange"), { args: [type] }, parentScene, false);
2080
- }
2079
+ };
2081
2080
  that.floodAnalysis = function(options) {
2082
2081
  if (scene == null)
2083
2082
  return;
2084
2083
  scene.fire((msgPrefix + ":floodAnalysis"), { args: [options] }, parentScene, false);
2085
- }
2084
+ };
2086
2085
  that.clearFloodAnalysis = function() {
2087
- if (scene == null)
2088
- return;
2089
- scene.fire((msgPrefix + ":clearFloodAnalysis"), { args: [] }, parentScene, false);
2090
- }
2091
- //空间分析
2086
+ if (scene == null)
2087
+ return;
2088
+ scene.fire((msgPrefix + ":clearFloodAnalysis"), { args: [] }, parentScene, false);
2089
+ };
2090
+ //空间分析
2092
2091
  that.currencyDraw = function(type) {
2093
2092
  if (scene == null)
2094
2093
  return;
2095
2094
  scene.fire((msgPrefix + ":currencyDraw"), { args: [type] }, parentScene, false);
2096
- }
2095
+ };
2097
2096
  that.intersect = function() {
2098
2097
  if (scene == null)
2099
2098
  return;
2100
2099
  scene.fire((msgPrefix + ":intersect"), { args: [] }, parentScene, false);
2101
- }
2100
+ };
2102
2101
  that.spatialAnalysisClear = function() {
2103
- if (scene == null)
2104
- return;
2105
- scene.fire((msgPrefix + ":spatialAnalysisClear"), { args: [] }, parentScene, false);
2106
- }
2107
- //挖掘分析
2102
+ if (scene == null)
2103
+ return;
2104
+ scene.fire((msgPrefix + ":spatialAnalysisClear"), { args: [] }, parentScene, false);
2105
+ };
2106
+ //挖掘分析
2108
2107
  that.openDigSurface = function(options) {
2109
2108
  if (scene == null)
2110
2109
  return;
2111
2110
  scene.fire((msgPrefix + ":openDigSurface"), { args: [options] }, parentScene, false);
2112
- }
2111
+ };
2113
2112
  that.closeDigSurface = function() {
2114
- if (scene == null)
2115
- return;
2116
- scene.fire((msgPrefix + ":closeDigSurface"), { args: [] }, parentScene, false);
2117
- }
2118
- //设置图层显隐
2113
+ if (scene == null)
2114
+ return;
2115
+ scene.fire((msgPrefix + ":closeDigSurface"), { args: [] }, parentScene, false);
2116
+ };
2117
+ //设置图层显隐
2119
2118
  that.setLayerAlpha = function(options) {
2120
2119
  if (scene == null)
2121
2120
  return;
2122
2121
  scene.fire((msgPrefix + ":setLayerAlpha"), { args: [options] }, parentScene, false);
2123
- }
2122
+ };
2123
+ //打开天气设置
2124
+ that.changeWeather = function(options) {
2125
+ if (scene == null)
2126
+ return;
2127
+ scene.fire((msgPrefix + ":changeWeather"), { args: [options] }, parentScene, false);
2128
+ };
2129
+ //关闭天气效果
2130
+ that.closeWeather = function() {
2131
+ if (scene == null)
2132
+ return;
2133
+ scene.fire((msgPrefix + ":closeWeather"), { args: [] }, parentScene, false);
2134
+ };
2135
+ //模型容差
2136
+ that.changeModelTolerance = function(options) {
2137
+ if (scene == null)
2138
+ return;
2139
+ scene.fire((msgPrefix + ":changeModelTolerance"), { args: [options] }, parentScene, false);
2140
+ };
2141
+ //获取模型容差
2142
+ that.getModelTolerance = function(options) {
2143
+ if (scene == null)
2144
+ return;
2145
+ scene.fire((msgPrefix + ":getModelTolerance"), { args: [options] }, parentScene, false);
2146
+ };
2147
+ //设置天空盒
2148
+ that.setSkyBox = function(name, imgType) {
2149
+ if (scene == null)
2150
+ return;
2151
+ scene.fire((msgPrefix + ":setSkyBox"), { args: [name, imgType] }, parentScene, false);
2152
+ };
2153
+ //打开pbr
2154
+ that.showPbrPanel = function(style) {
2155
+ if (scene == null)
2156
+ return;
2157
+ scene.fire((msgPrefix + ":showPbrPanel"), { args: [style] }, parentScene, false);
2158
+ };
2159
+ that.hidePbrPanel = function() {
2160
+ if (scene == null)
2161
+ return;
2162
+ scene.fire((msgPrefix + ":hidePbrPanel"), { args: [] }, parentScene, false);
2163
+ };
2124
2164
  that.init();
2125
2165
  };
2126
2166
 
@@ -3907,11 +3907,11 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
3907
3907
  globeMap.setLineOptions(options);
3908
3908
  }
3909
3909
  };
3910
- that.bufferAnalysis = function(options,clear,update) {
3910
+ that.bufferAnalysis = function(options,clear,update,callback) {
3911
3911
  if (scene == null)
3912
3912
  return;
3913
3913
  if (globeMap != null) {
3914
- globeMap.bufferAnalysis(options,clear,update);
3914
+ globeMap.bufferAnalysis(options,clear,update,callback);
3915
3915
  }
3916
3916
  };
3917
3917
  that.clearBufferAnalysis = function() {
@@ -4096,6 +4096,62 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
4096
4096
  if (globeMap != null) {
4097
4097
  globeMap.setLayerAlpha(options);
4098
4098
  }
4099
+ };
4100
+ //打开天气设置
4101
+ that.changeWeather = function(options) {
4102
+ if (scene == null)
4103
+ return;
4104
+ if (globeMap != null) {
4105
+ globeMap.changeWeather(options);
4106
+ }
4107
+ };
4108
+ //关闭天气效果
4109
+ that.closeWeather = function() {
4110
+ if (scene == null)
4111
+ return;
4112
+ if (globeMap != null) {
4113
+ globeMap.closeWeather();
4114
+ }
4115
+ };
4116
+ //模型容差
4117
+ that.changeModelTolerance = function(options) {
4118
+ if (scene == null)
4119
+ return;
4120
+ if (globeMap != null) {
4121
+ globeMap.changeModelTolerance(options);
4122
+ }
4123
+ };
4124
+ //获取模型容差
4125
+ that.getModelTolerance = function(options) {
4126
+ if (scene == null)
4127
+ return;
4128
+ if (globeMap != null) {
4129
+ globeMap.getModelTolerance(options);
4130
+ }
4131
+ };
4132
+ //设置天空盒
4133
+ that.setSkyBox = function(name, imgType) {
4134
+ if (scene == null)
4135
+ return;
4136
+ if (globeMap != null) {
4137
+ globeMap.setSkyBox(name, imgType);
4138
+ }
4139
+ };
4140
+ //打开pbr
4141
+ that.showPbrPanel = function(style) {
4142
+ if (scene == null)
4143
+ return;
4144
+ if (globeMap != null) {
4145
+ globeMap.showPbrPanel(style);
4146
+ }
4147
+ };
4148
+ //guanbi pbr
4149
+ that.hidePbrPanel = function() {
4150
+ if (scene == null)
4151
+ return;
4152
+ if (globeMap != null) {
4153
+ globeMap.hidePbrPanel();
4154
+ }
4099
4155
  };
4100
4156
  that.initMap(containerID, callback, mapType, mapConfig);
4101
4157
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.15.24",
3
+ "version": "0.15.27",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {