egovamap 0.19.5 → 0.19.6
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/egovagis.js +12 -5
- package/egovamap/egovagisviewer.js +18 -14
- package/egovamap/egovamap.js +2 -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/egovagis.js
CHANGED
|
@@ -700,10 +700,10 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
700
700
|
scene.fire(msgPrefix + ":eventLocate", { args : [ eventID, defaultMapRange ] }, parentScene, false);
|
|
701
701
|
}
|
|
702
702
|
/* 显示特定图层 */
|
|
703
|
-
that.showMapLayers = function(layerTag, showLevel, mode, styles) {
|
|
703
|
+
that.showMapLayers = function(layerTag, showLevel, mode, styles,layerDefs) {
|
|
704
704
|
if (scene == null)
|
|
705
705
|
return;
|
|
706
|
-
scene.fire(msgPrefix + ":showMapLayers", { args : [ layerTag, showLevel, mode, styles] }, parentScene, false);
|
|
706
|
+
scene.fire(msgPrefix + ":showMapLayers", { args : [ layerTag, showLevel, mode, styles,layerDefs] }, parentScene, false);
|
|
707
707
|
}
|
|
708
708
|
/* 显示车辆人员轨迹 */
|
|
709
709
|
that.showObjectTrace = function (objectID, symbolType, dateTime, queryCondition, hideControlPanel, symbolPic, optimizeParams, infoCallback, updatePositionCallback, closeCallback, traceDigCallback) {
|
|
@@ -883,7 +883,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
883
883
|
scene.fire(msgPrefix + ":showObjectTrace", { args : [ objectID, symbolType, dataTime, queryCondition ]}, parentScene);
|
|
884
884
|
}
|
|
885
885
|
/* 绘制巡更路线 */
|
|
886
|
-
that.showPatrolRoute = function(routeList, type, bClear, editable) {
|
|
886
|
+
that.showPatrolRoute = function(routeList, type, bClear, editable, zoom, options) {
|
|
887
887
|
if (scene == null)
|
|
888
888
|
return;
|
|
889
889
|
if (!(routeList instanceof Array))
|
|
@@ -906,14 +906,21 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
906
906
|
}
|
|
907
907
|
graphics.push(graphic);
|
|
908
908
|
}
|
|
909
|
-
var
|
|
909
|
+
var lineStyle = options.lineStyle || {};
|
|
910
|
+
var arrowStyle = options.arrowStyle || {};
|
|
911
|
+
var style = { color : [ 255, 0, 0, 150 ], width : 6 };
|
|
910
912
|
if (type == "dutyGridRoute") {
|
|
911
913
|
style.color = [ 0, 0, 255, 150 ]
|
|
912
914
|
}
|
|
913
915
|
if (type == "patrolRoute") {
|
|
914
916
|
style.color = [ 0, 255, 0, 150 ]
|
|
915
917
|
}
|
|
916
|
-
|
|
918
|
+
var lineSymbol = Object.assign(style, lineStyle);
|
|
919
|
+
var arrowSymbol = Object.assign({size: 6}, arrowStyle);
|
|
920
|
+
var option = {};
|
|
921
|
+
option.arrowStyle = arrowSymbol;
|
|
922
|
+
option.visible = options.visible == null || options.visible == "undefined" ? true:options.visible;
|
|
923
|
+
scene.fire(msgPrefix + ":showPatrolRoute", { args : [ graphics, bClear, lineSymbol, editable, zoom, option ] }, parentScene);
|
|
917
924
|
}
|
|
918
925
|
/* 添加巡更路线 */
|
|
919
926
|
that.addPatrolRoute = function(addCallback, editCallback) {
|
|
@@ -968,10 +968,10 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
968
968
|
|
|
969
969
|
}
|
|
970
970
|
/* 显示特定图层 */
|
|
971
|
-
that.showMapLayers = function (layerTag, showLevel, mode, styles) {
|
|
971
|
+
that.showMapLayers = function (layerTag, showLevel, mode, styles,layerDefs) {
|
|
972
972
|
if (scene == null)
|
|
973
973
|
return;
|
|
974
|
-
that.callMap('showMapLayers', layerTag, showLevel, mode, styles);
|
|
974
|
+
that.callMap('showMapLayers', layerTag, showLevel, mode, styles,layerDefs);
|
|
975
975
|
}
|
|
976
976
|
that.showWMSLayer = function (layerUsageID, IDs, keyField, geometry, where, layerName, options) {
|
|
977
977
|
if (scene == null)
|
|
@@ -1103,7 +1103,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1103
1103
|
that.callMap('showObjectTrace', objectID, symbolType, dataTime, queryCondition, hidePanel, symbolPic, optimizeParams, cb);
|
|
1104
1104
|
}
|
|
1105
1105
|
/* 绘制巡更路线 */
|
|
1106
|
-
that.showPatrolRoute = function (routeList, type, bClear, editable, zoom, callback) {
|
|
1106
|
+
that.showPatrolRoute = function (routeList, type, bClear, editable, zoom, callback, options) {
|
|
1107
1107
|
if (scene == null)
|
|
1108
1108
|
return;
|
|
1109
1109
|
if (!(routeList instanceof Array))
|
|
@@ -1141,16 +1141,20 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1141
1141
|
graphic.label = route.label;
|
|
1142
1142
|
graphics.push(graphic);
|
|
1143
1143
|
}
|
|
1144
|
-
var
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1144
|
+
var lineStyle = options.lineStyle || {};
|
|
1145
|
+
var arrowStyle = options.arrowStyle || {};
|
|
1146
|
+
var style = { color : [ 255, 0, 0, 150 ], width : 2 };
|
|
1147
|
+
if (type == "dutyGridRoute") {
|
|
1148
|
+
style.color = [ 0, 0, 255, 150 ]
|
|
1149
|
+
}
|
|
1150
|
+
if (type == "patrolRoute") {
|
|
1151
|
+
style.color = [ 0, 255, 0, 150 ]
|
|
1152
|
+
}
|
|
1153
|
+
var lineSymbol = Object.assign(style, lineStyle);
|
|
1154
|
+
var arrowSymbol = Object.assign({}, arrowStyle);
|
|
1155
|
+
var option = {};
|
|
1156
|
+
option.arrowStyle = arrowSymbol;
|
|
1157
|
+
option.visible = options.visible || true;
|
|
1154
1158
|
var cb = function (type, data) {
|
|
1155
1159
|
if (callback && type == 'drawPatrolRouteEditCallback') {
|
|
1156
1160
|
callback(data);
|
|
@@ -1158,7 +1162,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1158
1162
|
that.fireCallback(type, data);
|
|
1159
1163
|
}
|
|
1160
1164
|
};
|
|
1161
|
-
that.callMap('showPatrolRoute', graphics, bClear,
|
|
1165
|
+
that.callMap('showPatrolRoute', graphics, bClear, lineSymbol, editable, zoom, cb, option);
|
|
1162
1166
|
}
|
|
1163
1167
|
/* 添加巡更路线 */
|
|
1164
1168
|
that.addPatrolRoute = function (addCallback, editCallback) {
|
package/egovamap/egovamap.js
CHANGED
|
@@ -1935,7 +1935,7 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
1935
1935
|
}
|
|
1936
1936
|
|
|
1937
1937
|
/* 显示特定图层 */
|
|
1938
|
-
that.showMapLayers = function (layerTag, showLevel, mode, styles) {
|
|
1938
|
+
that.showMapLayers = function (layerTag, showLevel, mode, styles,layerDefs) {
|
|
1939
1939
|
if (scene == null)
|
|
1940
1940
|
return;
|
|
1941
1941
|
if (gisMap != null) {
|
|
@@ -2103,7 +2103,7 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
2103
2103
|
}
|
|
2104
2104
|
|
|
2105
2105
|
/* 绘制巡更路线 */
|
|
2106
|
-
that.showPatrolRoute = function (routeList, type, bClear, editable) {
|
|
2106
|
+
that.showPatrolRoute = function (routeList, type, bClear, editable, zoom, options) {
|
|
2107
2107
|
if (scene == null)
|
|
2108
2108
|
return;
|
|
2109
2109
|
if (gisMap != null) {
|