egovamap 0.18.4 → 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.
- package/.vscode/launch.json +15 -0
- package/egovamap/egovaBI.js +9 -3
- package/egovamap/egovagis.js +87 -1
- package/egovamap/egovagisviewer.js +9 -2
- package/egovamap/egovaglobe.js +5 -0
- package/egovamap/egovamap.js +37 -2
- package/package.json +1 -1
|
@@ -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
|
+
}
|
package/egovamap/egovaBI.js
CHANGED
|
@@ -693,6 +693,9 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
|
+
this.cancelHighlightedRegion=function(layerName){
|
|
697
|
+
globeMap.cancelHighlightedRegion(layerName);
|
|
698
|
+
}
|
|
696
699
|
/*
|
|
697
700
|
* @description:新参数格式的旧线接口,主要用来做中间层参数格式转换
|
|
698
701
|
* @method showPolyline_BI
|
|
@@ -902,7 +905,8 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
902
905
|
minZoom: options.visiblitySetting.beginLevel,
|
|
903
906
|
maxZoom: options.visiblitySetting.endLevel,
|
|
904
907
|
layerId: options.layerName,
|
|
905
|
-
comCallbak: callback
|
|
908
|
+
comCallbak: callback,
|
|
909
|
+
order: options.order
|
|
906
910
|
// hLabelStyle: options.hLabelStyle, // 选中文字时效果,没用
|
|
907
911
|
},
|
|
908
912
|
options.layerName, // layerTag
|
|
@@ -923,7 +927,8 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
923
927
|
{
|
|
924
928
|
minZoom: options.visiblitySetting.beginLevel,
|
|
925
929
|
maxZoom: options.visiblitySetting.endLevel,
|
|
926
|
-
layerId: options.layerName
|
|
930
|
+
layerId: options.layerName,
|
|
931
|
+
order: options.order
|
|
927
932
|
// hLabelStyle: options.hLabelStyle, // 选中文字时效果,没用
|
|
928
933
|
},
|
|
929
934
|
options.layerName, // layerTag
|
|
@@ -949,7 +954,8 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
949
954
|
minZoom: options.visiblitySetting.beginLevel,
|
|
950
955
|
maxZoom: options.visiblitySetting.endLevel,
|
|
951
956
|
layerId: options.layerName,
|
|
952
|
-
comCallbak: callback
|
|
957
|
+
comCallbak: callback,
|
|
958
|
+
order: options.order
|
|
953
959
|
// hLabelStyle: options.hLabelStyle, // 选中文字时效果,没用
|
|
954
960
|
},
|
|
955
961
|
options.layerName, // layerTag
|
package/egovamap/egovagis.js
CHANGED
|
@@ -462,6 +462,26 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
462
462
|
}
|
|
463
463
|
scene.fire(msgPrefix + ":getAddressByXY", { args : [ x, y, searchStr, radius ] }, parentScene);
|
|
464
464
|
}
|
|
465
|
+
that.getGaAddressByXY = function(x, y, options, callback) {
|
|
466
|
+
if (scene == null) return;
|
|
467
|
+
if(callback) {
|
|
468
|
+
that.removeEventBind("getGaAddressByXYCallback");
|
|
469
|
+
that.bindEvent("getGaAddressByXYCallback", function (evt) {
|
|
470
|
+
callback(evt.args);
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
scene.fire(msgPrefix + ":getGaAddressByXY", { args : [ x, y, options ] }, parentScene);
|
|
474
|
+
}
|
|
475
|
+
that.getGaStandardAddress = function(params, callback) {
|
|
476
|
+
if (scene == null) return;
|
|
477
|
+
if(callback) {
|
|
478
|
+
that.removeEventBind("getGaStandardAddressCallbackCallback");
|
|
479
|
+
that.bindEvent("getGaStandardAddressCallbackCallback", function (evt) {
|
|
480
|
+
callback(evt.args);
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
scene.fire(msgPrefix + ":getGaStandardAddress", { args : [ params ] }, parentScene);
|
|
484
|
+
}
|
|
465
485
|
/* 根据坐标获取单元网格 */
|
|
466
486
|
that.getCellNameByPosXY = function(x, y, gridType) {
|
|
467
487
|
if (scene == null)
|
|
@@ -744,7 +764,73 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
744
764
|
scene.fire(msgPrefix + ":updatePlaySpeed", { args: [value] },
|
|
745
765
|
parentScene);
|
|
746
766
|
}
|
|
747
|
-
|
|
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
|
+
}
|
|
748
834
|
/**
|
|
749
835
|
*停止绘制要素
|
|
750
836
|
**/
|
|
@@ -497,6 +497,13 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
497
497
|
scene.remove(msgPrefix + ":" + msgId, parentScene, stopOnTop);
|
|
498
498
|
}
|
|
499
499
|
|
|
500
|
+
/* 切换到平移工具 */
|
|
501
|
+
that.reorderLayer = function (id, order, options) {
|
|
502
|
+
if (scene == null)
|
|
503
|
+
return;
|
|
504
|
+
that.callMap('reorderLayer', id, order, options);
|
|
505
|
+
}
|
|
506
|
+
|
|
500
507
|
/* 切换到平移工具 */
|
|
501
508
|
that.panMap = function () {
|
|
502
509
|
if (scene == null)
|
|
@@ -966,10 +973,10 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
966
973
|
return;
|
|
967
974
|
that.callMap('showMapLayers', layerTag, showLevel, mode, styles);
|
|
968
975
|
}
|
|
969
|
-
that.showWMSLayer = function (layerUsageID, IDs, keyField, geometry, where, layerName) {
|
|
976
|
+
that.showWMSLayer = function (layerUsageID, IDs, keyField, geometry, where, layerName, options) {
|
|
970
977
|
if (scene == null)
|
|
971
978
|
return;
|
|
972
|
-
that.callMap('showWMSLayer', layerUsageID, IDs, keyField, geometry, where, layerName);
|
|
979
|
+
that.callMap('showWMSLayer', layerUsageID, IDs, keyField, geometry, where, layerName, options);
|
|
973
980
|
}
|
|
974
981
|
that.removeWMSLayerId = function (layerId, options) {
|
|
975
982
|
if (scene == null)
|
package/egovamap/egovaglobe.js
CHANGED
|
@@ -1837,6 +1837,11 @@ var EGovaGlobeMap = function ($container, pScene, prefix, mapConfig, context, ca
|
|
|
1837
1837
|
if (scene == null)
|
|
1838
1838
|
return;
|
|
1839
1839
|
scene.fire((msgPrefix + ":regionOperation"), {args: [options, data]}, parentScene, false);
|
|
1840
|
+
};
|
|
1841
|
+
that.cancelHighlightedRegion = function(layerName){
|
|
1842
|
+
if (scene == null)
|
|
1843
|
+
return;
|
|
1844
|
+
scene.fire((msgPrefix + ":cancelHighlightedPrimitive"), {args: [layerName]}, parentScene, false);
|
|
1840
1845
|
};
|
|
1841
1846
|
that.activeLayer = function(layerName, options, filter){
|
|
1842
1847
|
if (scene == null)
|
package/egovamap/egovamap.js
CHANGED
|
@@ -386,6 +386,14 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
386
386
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
|
+
that.reorderLayer = function (id, order, options) {
|
|
390
|
+
if (scene == null)
|
|
391
|
+
return;
|
|
392
|
+
if (gisMap != null) {
|
|
393
|
+
gisMap.reorderLayer(id, order, options);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
389
397
|
|
|
390
398
|
/* 切换到平移工具 */
|
|
391
399
|
that.panMap = function () {
|
|
@@ -573,7 +581,7 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
573
581
|
|
|
574
582
|
|
|
575
583
|
/*添加WMS服务图层*/
|
|
576
|
-
that.showWMSLayer = function (layerUsageID, IDs, keyField, geometry, where, layerName) {
|
|
584
|
+
that.showWMSLayer = function (layerUsageID, IDs, keyField, geometry, where, layerName, options) {
|
|
577
585
|
if (scene == null)
|
|
578
586
|
return;
|
|
579
587
|
if (gisMap != null) {
|
|
@@ -964,7 +972,18 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
964
972
|
gisMap.getAddressByXY.apply(this, arguments);
|
|
965
973
|
}
|
|
966
974
|
};
|
|
967
|
-
|
|
975
|
+
that.getGaAddressByXY = function (x, y, options, callback) {
|
|
976
|
+
if (scene == null) return;
|
|
977
|
+
if (gisMap != null) {
|
|
978
|
+
gisMap.getGaAddressByXY.apply(this, arguments);
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
that.getGaStandardAddress = function (params, callback) {
|
|
982
|
+
if (scene == null) return;
|
|
983
|
+
if (gisMap != null) {
|
|
984
|
+
gisMap.getGaStandardAddress.apply(this, arguments);
|
|
985
|
+
}
|
|
986
|
+
};
|
|
968
987
|
/* 根据坐标获取单元网格 */
|
|
969
988
|
that.getCellNameByPosXY = function (x, y, gridType) {
|
|
970
989
|
if (scene == null)
|
|
@@ -2004,6 +2023,22 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
2004
2023
|
}
|
|
2005
2024
|
}
|
|
2006
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
|
+
|
|
2007
2042
|
that.checkObjectTraceItem = function(name,visible){
|
|
2008
2043
|
if (scene == null)
|
|
2009
2044
|
return;
|