egovamap 0.18.6 → 0.19.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.
@@ -0,0 +1,15 @@
1
+ {
2
+ // 使用 IntelliSense 了解相关属性。
3
+ // 悬停以查看现有属性的描述。
4
+ // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "pwa-chrome",
9
+ "request": "launch",
10
+ "name": "Launch Chrome against localhost",
11
+ "url": "http://localhost:8080",
12
+ "webRoot": "${workspaceFolder}"
13
+ }
14
+ ]
15
+ }
@@ -764,7 +764,73 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
764
764
  scene.fire(msgPrefix + ":updatePlaySpeed", { args: [value] },
765
765
  parentScene);
766
766
  }
767
-
767
+
768
+ that.startRealtimeTrace = function (groupIDs, objectIDs, objectType, resourceType, uiOption, traceOption, jobOption, options) {
769
+ if (scene == null)
770
+ return;
771
+
772
+ var groupIDStrs = "";
773
+ if (groupIDs instanceof Array && groupIDs.length > 0) {
774
+ for (var i = 0; i < groupIDs.length; i++) {
775
+ if (i != groupIDs.length - 1) {
776
+ groupIDStrs += "comp_" + groupIDs[i] + ","
777
+ } else {
778
+ groupIDStrs += "comp_" + groupIDs[i];
779
+ }
780
+ }
781
+ }
782
+
783
+ var objectIDStrs = "";
784
+ if (objectIDs instanceof Array && objectIDs.length > 0 && groupIDs instanceof Array && groupIDs.length > 0) {
785
+ for (var i = 0; i < groupIDs.length; i++) {
786
+ for (var j = 0; j < objectIDs.length; j++) {
787
+ if (j != objectIDs.length - 1) {
788
+ objectIDStrs += groupIDs[i] + "_" + objectIDs[j] + ",";
789
+ } else {
790
+ objectIDStrs += groupIDs[i] + "_" + objectIDs[j];
791
+ }
792
+
793
+ }
794
+ }
795
+ }
796
+ // 监听
797
+ if (!options) options = {};
798
+ if (typeof options.MultiTraceDataCallback === 'function') {
799
+ that.removeEventBind("MultiTraceDataCallback");
800
+ that.bindEvent("MultiTraceDataCallback", function (evt) {
801
+ options.MultiTraceDataCallback(evt && evt.args);
802
+ });
803
+ }
804
+
805
+ if (typeof options.mouseOverCallback === 'function') {
806
+ that.removeEventBind("MultiTraceMouseOver");
807
+ that.bindEvent("MultiTraceMouseOver", function (evt) {
808
+ options.mouseOverCallback(evt && evt.args);
809
+ });
810
+ }
811
+ if (typeof options.mouseOutCallback === 'function') {
812
+ that.removeEventBind("MultiTraceMouseOut");
813
+ that.bindEvent("MultiTraceMouseOut", function (evt) {
814
+ options.mouseOutCallback(evt && evt.args);
815
+ });
816
+ }
817
+ if (typeof options.clickCallback === 'function') {
818
+ that.removeEventBind("MultiTraceClick");
819
+ that.bindEvent("MultiTraceClick", function (evt) {
820
+ options.clickCallback(evt && evt.args);
821
+ });
822
+ }
823
+ scene.fire(msgPrefix + ":startRealtimeTrace", { args: [groupIDStrs, objectIDStrs, objectType, resourceType, uiOption, traceOption, jobOption] },
824
+ parentScene);
825
+ }
826
+
827
+ that.stopRealtimeTrace = function(){
828
+ if (scene == null)
829
+ return;
830
+
831
+ scene.fire(msgPrefix + ":stopRealtimeTrace", { args: [] },
832
+ parentScene);
833
+ }
768
834
  /**
769
835
  *停止绘制要素
770
836
  **/
@@ -2023,6 +2023,22 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
2023
2023
  }
2024
2024
  }
2025
2025
 
2026
+ that.startRealtimeTrace = function(groupIDs,objectIDs,objectType,resourceType,uiOption,traceOption,jobOption,options){
2027
+ if (scene == null)
2028
+ return;
2029
+ if (gisMap != null&& gisMap.gisVisible) {
2030
+ gisMap.startRealtimeTrace.apply(this, arguments);
2031
+ }
2032
+ }
2033
+
2034
+ that.stopRealtimeTrace = function(){
2035
+ if (scene == null)
2036
+ return;
2037
+ if (gisMap != null&& gisMap.gisVisible) {
2038
+ gisMap.stopRealtimeTrace.apply(this, arguments);
2039
+ }
2040
+ }
2041
+
2026
2042
  that.checkObjectTraceItem = function(name,visible){
2027
2043
  if (scene == null)
2028
2044
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.18.6",
3
+ "version": "0.19.0",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {