egovamap 0.15.14 → 0.15.17

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.
@@ -142,6 +142,9 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
142
142
  }
143
143
  }
144
144
  that.$gisMapFrame.src = url;
145
+ that.$gisMapFrame.onload = function(){
146
+ that.$gisMapFrame.contentWindow.postMessage(gisServerURL, "*");
147
+ }
145
148
  });
146
149
  try {
147
150
  //如果启用了实景功能需要注册实景监听
@@ -475,7 +478,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
475
478
  parentScene);
476
479
  }
477
480
  /* 显示案件分布 */
478
- that.showRecListDistribution = function(infoJson, zoom, clickCallback, labelInfo,isShowLegend) {
481
+ that.showRecListDistribution = function(infoJson, zoom, clickCallback, labelInfo,isShowLegend, symbolUrl, options) {
479
482
  if (scene == null || infoJson.length == 0)
480
483
  return;
481
484
  //如果xy坐标没有值不处理
@@ -493,7 +496,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
493
496
  clickCallback(evt.args);
494
497
  });
495
498
  }
496
- scene.fire((msgPrefix + ":showRecListDistribution"), { args : [ infoJson, zoom, labelInfo,isShowLegend ] }, parentScene, false);
499
+ scene.fire((msgPrefix + ":showRecListDistribution"), { args : [ infoJson, zoom, labelInfo,isShowLegend, symbolUrl, options] }, parentScene, false);
497
500
 
498
501
  //如果启用了实景功能,同时进行实景定位
499
502
  if(mmsMap && infoJson.length == 1) {
@@ -516,32 +519,31 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
516
519
  // 移除监听
517
520
  var clickBackName = "showMultiObjectCurrentPositionClick";
518
521
  var mouseOverBackName = "showMultiObjectCurrentPositionMouseover";
519
- if(options&&options.callbacksuffix){
522
+ var mouseOutBackName = "showMultiObjectCurrentPositionMouseout";
523
+ if (options&&options.callbacksuffix) {
520
524
  clickBackName += options.callbacksuffix;
521
525
  mouseOverBackName += options.callbacksuffix;
526
+ mouseOutBackName += options.callbacksuffix;
522
527
  }
523
528
  that.removeEventBind(clickBackName);
524
529
  that.removeEventBind(mouseOverBackName);
525
- var args =[];
526
- var FuncList = [];
527
- for(var i = 0;i<arguments.length;i++){
528
- if (arguments[i] instanceof Function) {
529
- FuncList.push(arguments[i]);
530
- }else{
531
- args.push(arguments[i]);
532
- }
533
- }
534
- if (FuncList[0] instanceof Function) {
530
+ that.removeEventBind(mouseOutBackName);
531
+ if (clickCallback instanceof Function) {
535
532
  that.bindEvent(clickBackName, function(evt) {
536
- FuncList[0](evt.args);
533
+ clickCallback(evt.args);
537
534
  });
538
535
  }
539
- if (FuncList[1] instanceof Function) {
536
+ if (mouseOverCallBack instanceof Function) {
540
537
  that.bindEvent(mouseOverBackName, function(evt) {
541
- FuncList[1](evt.args);
538
+ mouseOverCallBack(evt.args);
539
+ });
540
+ }
541
+ if(mouseOutCallback instanceof Function){
542
+ that.bindEvent(mouseOutBackName, function(evt) {
543
+ mouseOutCallback(evt.args);
542
544
  });
543
545
  }
544
- scene.fire((msgPrefix + ":showMultiObjectCurrentPosition"), {args: args}, parentScene, false);
546
+ scene.fire((msgPrefix + ":showMultiObjectCurrentPosition"), {args: [jsonInfo, zoom, bClear, hStyleID, infoStyle, bCanvas, tagName, clusterOption, hasHover, layerID, options]}, parentScene, false);
545
547
  }
546
548
  /* 显示监督员 */
547
549
  that.showPatrolCurrentPosition = function (jsonInfo, zoom, bClear, hStyleID, clickCallback) {
@@ -303,7 +303,6 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
303
303
  var mainScript = document.createElement('script');
304
304
  mainScript.setAttribute('type', 'text/javascript');
305
305
  var distOrSource = getLocalStorageItem('gisDebug') ? 'source' : 'dist';
306
- distOrSource = 'source';
307
306
  var cssUrl = gisServerURL + '/library/egovaviewer/build/' + distOrSource + '/index.css';
308
307
  var mainLink = document.createElement('link');
309
308
  // mainLink.setAttribute('name','egoavagisviewer_' + uniqueID);
@@ -759,7 +758,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
759
758
  that.callMap('locateFeatureByIDs', layerID, keyValue, keyFiled, clearMap, style, hStyle, bZoom, randomColor, labelfield, labelstyle, geometry, where, renderCanvas, singleSelected, options, extendProperty, layerTag, outFieldStr, animiteStep, index, clipGeom, cb, popupTemplate);
760
759
  }
761
760
  /* 显示案件分布 */
762
- that.showRecListDistribution = function (infoJson, zoom, clickCallback, labelInfo, isShowLegend, symbolUrl) {
761
+ that.showRecListDistribution = function (infoJson, zoom, clickCallback, labelInfo, isShowLegend, symbolUrl, options) {
763
762
  if (scene == null || infoJson.length == 0)
764
763
  return;
765
764
  //如果xy坐标没有值不处理
@@ -769,23 +768,12 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
769
768
  return;
770
769
  }
771
770
  }
772
- /*
773
- // 移除监听
774
- that.removeEventBind("showRecListDistributionCallback");
775
-
776
- if (clickCallback != undefined) {
777
- that.bindEvent("showRecListDistributionCallback", function (evt) {
778
- clickCallback(evt.args);
779
- });
780
- }
781
- scene.fire((msgPrefix + ":showRecListDistribution"), { args: [infoJson, zoom, labelInfo, isShowLegend] }, parentScene, false);
782
- */
783
-
771
+
784
772
  var cb = function (type, data) {
785
773
  if (clickCallback && type == 'showRecListDistributionCallback')
786
774
  clickCallback(data);
787
775
  };
788
- that.callMap('showRecListDistribution', infoJson, zoom, labelInfo, isShowLegend, symbolUrl, cb);
776
+ that.callMap('showRecListDistribution', infoJson, zoom, labelInfo, isShowLegend, symbolUrl, cb, options);
789
777
  //如果启用了实景功能,同时进行实景定位
790
778
  if (mmsMap && infoJson.length == 1) {
791
779
  var recInfo = infoJson[0];
@@ -1785,48 +1773,52 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
1785
1773
  };
1786
1774
  that.callMap('getCenterPoint', polygon, cb);
1787
1775
  }
1788
-
1789
- /*设置图层显示与隐藏*/
1776
+
1777
+ /*设置图层显示与隐藏*/
1790
1778
  that.setLayerVisible = function (name, visible) {
1791
1779
  if (scene == null)
1792
1780
  return;
1793
-
1781
+
1794
1782
  that.callMap('setLayerVisible', name, visible);
1795
1783
  }
1796
1784
 
1797
- that.removeWMSLayer = function(layerName){
1785
+ that.removeWMSLayer = function (layerName) {
1798
1786
  if (scene == null)
1799
1787
  return;
1800
-
1788
+
1801
1789
  that.callMap('removeWMSLayer', layerName);
1802
1790
  }
1803
-
1804
- that.getMainSubTypeTree = function (params, callback) {
1805
- if (scene == null)
1806
- return;
1807
- var cb = function (type, data) {
1808
- if (callback && type == 'getMainSubTypeTreeCallback') {
1809
- callback(data);
1810
- }
1811
- };
1812
- that.callMap('getMainSubTypeTree', params, cb);
1813
- }
1814
1791
 
1815
- that.getRegion = function (params, callback) {
1816
- if (scene == null)
1817
- return;
1818
- var cb = function (type, data) {
1819
- if (callback && type == 'getRegionCallback') {
1820
- callback(data);
1821
- }
1822
- };
1823
- that.callMap('getRegion', params, cb);
1824
- }
1792
+ that.getMainSubTypeTree = function (params, callback) {
1793
+ if (scene == null)
1794
+ return;
1795
+ var cb = function (type, data) {
1796
+ if (callback && type == 'getMainSubTypeTreeCallback') {
1797
+ callback(data);
1798
+ }
1799
+ };
1800
+ that.callMap('getMainSubTypeTree', params, cb);
1801
+ }
1802
+
1803
+ that.getRegion = function (params, callback) {
1804
+ if (scene == null)
1805
+ return;
1806
+ var cb = function (type, data) {
1807
+ if (callback && type == 'getRegionCallback') {
1808
+ callback(data);
1809
+ }
1810
+ };
1811
+ that.callMap('getRegion', params, cb);
1812
+ }
1825
1813
 
1826
- that.getMapConfig = function(key, callback){
1814
+ that.getMapConfig = function (key, callback) {
1827
1815
  that.callMap('getMapConfig', key, callback);
1828
1816
  }
1829
1817
 
1818
+ that.clearLayerSelectStyle = function (id, options) {
1819
+ that.callMap('clearLayerSelectStyle', id, options);
1820
+ }
1821
+
1830
1822
  that.init();
1831
1823
  }
1832
1824
 
@@ -130,6 +130,9 @@ var EGovaGlobeMap = function ($container, pScene, prefix, mapConfig, context, ca
130
130
  }
131
131
  }
132
132
  that.$globeMapFrame.src = globeMapUrl;
133
+ that.$globeMapFrame.onload = function(){
134
+ that.$globeMapFrame.contentWindow.postMessage(globeConfig.globeServerURL, "*");
135
+ }
133
136
  }
134
137
  }
135
138
  //callback && callback();
@@ -1638,7 +1638,7 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
1638
1638
  }
1639
1639
  };
1640
1640
  /* 显示案件分布 */
1641
- that.showRecListDistribution = function (infoJson, zoom, clickCallback, labelInfo, isShowLegend) {
1641
+ that.showRecListDistribution = function (infoJson, zoom, clickCallback, labelInfo, isShowLegend, symbolUrl, options) {
1642
1642
  if (scene == null)
1643
1643
  return;
1644
1644
  if (gisMap != null) {
@@ -3729,10 +3729,10 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
3729
3729
  }
3730
3730
 
3731
3731
  //获取GIS配置
3732
- that.getMapConfig = function(key, callback){
3732
+ that.getMapConfig = function (key, callback) {
3733
3733
  if (scene == null)
3734
3734
  return;
3735
- if(globeMap != null) {
3735
+ if (globeMap != null) {
3736
3736
  return globeMap.getMapConfig(key, callback)
3737
3737
  }
3738
3738
  if (gisMap != null) {
@@ -3740,6 +3740,14 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
3740
3740
  }
3741
3741
  }
3742
3742
 
3743
+ that.clearLayerSelectStyle = function (id, options) {
3744
+ if (scene == null)
3745
+ return;
3746
+ if (gisMap != null) {
3747
+ gisMap.clearLayerSelectStyle.apply(this, arguments);
3748
+ }
3749
+ }
3750
+
3743
3751
 
3744
3752
  that.initMap(containerID, callback, mapType, mapConfig);
3745
3753
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.15.14",
3
+ "version": "0.15.17",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {