egovamap 0.13.2 → 0.13.3

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.
@@ -621,6 +621,65 @@ var egovaBI = function(globeMap, gisMap, mapType){
621
621
  }
622
622
  }
623
623
  }
624
+
625
+ this.networkCloud = function (options, positions) {
626
+ if(!globeMap) {return}
627
+ globeMap.networkCloud(options, positions)
628
+ }
629
+ this.clearNetworkCloud = function (layerNames) {
630
+ if(!globeMap) {return}
631
+ globeMap.clearNetworkCloud(layerNames)
632
+ }
633
+ this.lineOperation = function(options, data) {
634
+ if(!options || !options.layerName){
635
+ console.log('图层名必须传递')
636
+ return
637
+ }
638
+ // 数据获取
639
+ let queryFeature = (queryParams) => {
640
+ if(gisMap) {
641
+ return new Promise(function(resolve) {
642
+ let cb = function(result) {
643
+ resolve(result)
644
+ }
645
+ gisMap.queryFeature(queryParams, cb)
646
+ })
647
+ } else {
648
+ return Promise.resolve(undefined)
649
+ }
650
+ }
651
+ // 执行绘制
652
+ let drawLine = (options, data) => {
653
+ if(!globeMap) {return}
654
+ globeMap.lineOperation(options, data)
655
+ }
656
+
657
+ // 主逻辑
658
+ if(!!data) {
659
+ drawLine(options, data)
660
+ } else {
661
+ if(!options.usageID) {
662
+ console.log('图层用途必须传递')
663
+ return
664
+ }
665
+ let queryParams = {
666
+ layerID: options.usageID,
667
+ where: options.filterString || "1=1",
668
+ geometry: '',
669
+ outGeometry: true,
670
+ options: { originalData: true }
671
+ }
672
+ queryFeature(queryParams)
673
+ .then(function(resultData) {
674
+ if(!resultData) {
675
+ console.log('没有查询到数据,请检查查询参数')
676
+ return
677
+ }
678
+ drawLine(options, resultData)
679
+ })
680
+ }
681
+
682
+ }
624
683
  }
625
684
 
626
685
 
@@ -1819,6 +1819,21 @@ var EGovaGlobeMap = function ($container, pScene, prefix, mapConfig, context, ca
1819
1819
  return;
1820
1820
  scene.fire((msgPrefix + ":activeLayer"), {args: [layerName, options, filter]}, parentScene, false);
1821
1821
  };
1822
+ that.networkCloud = function(options, positions){
1823
+ if (scene == null)
1824
+ return;
1825
+ scene.fire((msgPrefix + ":networkCloud"), {args: [options, positions]}, parentScene, false);
1826
+ };
1827
+ that.clearNetworkCloud = function(layerNames){
1828
+ if (scene == null)
1829
+ return;
1830
+ scene.fire((msgPrefix + ":clearNetworkCloud"), {args: [layerNames]}, parentScene, false);
1831
+ };
1832
+ that.lineOperation = function(options, data){
1833
+ if (scene == null)
1834
+ return;
1835
+ scene.fire((msgPrefix + ":lineOperation"), {args: [options, data]}, parentScene, false);
1836
+ };
1822
1837
 
1823
1838
  that.init();
1824
1839
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {