egovamap 0.28.0 → 0.28.2
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/egovamap/coordconvert/CoordConvConfig.js +5 -5
- package/egovamap/egovaBI.js +31 -11
- package/egovamap/egovagisviewer.js +18 -8
- package/egovamap/egovaglobe.js +5 -0
- package/egovamap/egovamms.js +461 -461
- package/egovamap/globe.html +22 -22
- package/egovamap/globe.jsp +14 -14
- package/egovamap/map.html +26 -26
- package/egovamap/map.jsp +36 -36
- package/egovamap/mapswich.js +152 -152
- package/egovamap/mms.jsp +57 -57
- package/index.js +2 -2
- package/map.html +60 -60
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var CoordConvConfig={
|
|
2
|
-
coordConvert4Params:'-47363.969#-4112623.75#0.0039286694040273984#1.0000046699602922#0#116.0',
|
|
3
|
-
coordConvert4ParamsReverse:'31175.966131687164#4112791.5852928162#-0.003850255399136165#1.0000100832629242#0#116.0'
|
|
4
|
-
}
|
|
5
|
-
export default CoordConvConfig;
|
|
1
|
+
var CoordConvConfig={
|
|
2
|
+
coordConvert4Params:'-47363.969#-4112623.75#0.0039286694040273984#1.0000046699602922#0#116.0',
|
|
3
|
+
coordConvert4ParamsReverse:'31175.966131687164#4112791.5852928162#-0.003850255399136165#1.0000100832629242#0#116.0'
|
|
4
|
+
}
|
|
5
|
+
export default CoordConvConfig;
|
package/egovamap/egovaBI.js
CHANGED
|
@@ -58,7 +58,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
58
58
|
|
|
59
59
|
function rgbToRgbArray(color) {
|
|
60
60
|
if (!color || typeof color !== 'string' || (typeof color == 'string'&&color.indexOf('rgb') == -1) ) return color;
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
var r, g, b, a;
|
|
63
63
|
var rgbaAttr = color.match(/[\d.]+/g);
|
|
64
64
|
if (rgbaAttr.length >= 3) {
|
|
@@ -359,7 +359,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
359
359
|
return Promise.resolve(undefined)
|
|
360
360
|
}
|
|
361
361
|
})
|
|
362
|
-
|
|
362
|
+
|
|
363
363
|
}
|
|
364
364
|
let queryParams = {
|
|
365
365
|
layerID: options.usageID,
|
|
@@ -393,10 +393,10 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
393
393
|
if(errorSize>0){
|
|
394
394
|
console.error(`${errorSize}个点格式错误,无法正常加载`);
|
|
395
395
|
}
|
|
396
|
-
|
|
396
|
+
|
|
397
397
|
drawData(layerName, dataCache, options);
|
|
398
398
|
})
|
|
399
|
-
|
|
399
|
+
|
|
400
400
|
}
|
|
401
401
|
this.getLabel = function (attributes) {
|
|
402
402
|
if (!attributes) return;
|
|
@@ -498,7 +498,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
498
498
|
if (features.length == 0) {
|
|
499
499
|
callback && callback([]);
|
|
500
500
|
return;
|
|
501
|
-
}
|
|
501
|
+
}
|
|
502
502
|
if (!features || !features.length) return;
|
|
503
503
|
var symbolUrl = "";
|
|
504
504
|
if (subUniqueCode.indexOf("http") > -1) {
|
|
@@ -640,7 +640,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
640
640
|
if (!globeMap) {
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
|
-
|
|
643
|
+
|
|
644
644
|
if (geomType == 2) {
|
|
645
645
|
var infoJson = features.map((feature) => {
|
|
646
646
|
var paths = feature.geometry.paths[0];
|
|
@@ -710,7 +710,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
710
710
|
globeMap.showPolygon(infoJson, drawWay, zoom, clear, options, layerName, drawParam.clickCallback);
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
|
|
713
|
+
|
|
714
714
|
if (data) {
|
|
715
715
|
showParts(data);
|
|
716
716
|
} else {
|
|
@@ -1111,7 +1111,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
1111
1111
|
options.eventSetting.mouseMoveCallback
|
|
1112
1112
|
);
|
|
1113
1113
|
}
|
|
1114
|
-
|
|
1114
|
+
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
1117
|
if(dataLoadCb){
|
|
@@ -1164,7 +1164,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
1164
1164
|
console.log("complete");
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
|
-
|
|
1167
|
+
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
@@ -1225,7 +1225,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
1225
1225
|
options.layerTag,
|
|
1226
1226
|
options.callback
|
|
1227
1227
|
);
|
|
1228
|
-
}
|
|
1228
|
+
}
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
1231
1231
|
// 主逻辑
|
|
@@ -1275,13 +1275,33 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
1275
1275
|
}
|
|
1276
1276
|
return list;
|
|
1277
1277
|
}
|
|
1278
|
-
|
|
1278
|
+
|
|
1279
|
+
// 屏幕坐标转地理坐标
|
|
1280
|
+
this.convertScreenToMap=function (list) {
|
|
1281
|
+
if (gisMap != null) {
|
|
1282
|
+
return gisMap.convertScreenToMap(list);
|
|
1283
|
+
}
|
|
1284
|
+
return list;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1279
1287
|
//设置地下模式悟空
|
|
1280
1288
|
this.SetTerrainAlpha = function(alpha) {
|
|
1281
1289
|
if (globeMap != null) {
|
|
1282
1290
|
globeMap.onUndergroundModel(alpha);
|
|
1283
1291
|
}
|
|
1284
1292
|
};
|
|
1293
|
+
|
|
1294
|
+
// 新版通用接口
|
|
1295
|
+
// 适配热力图,具体参数转换等逻辑在引擎层面实现,确保
|
|
1296
|
+
this.heatMap = function (options, cb) {
|
|
1297
|
+
let mapInstance
|
|
1298
|
+
if (globeMap != null && mapType == 'globe') {
|
|
1299
|
+
mapInstance = globeMap;
|
|
1300
|
+
} else if (gisMap != null && mapType == 'map') {
|
|
1301
|
+
mapInstance = gisMap;
|
|
1302
|
+
}
|
|
1303
|
+
mapInstance.heatMap(options, cb);
|
|
1304
|
+
}
|
|
1285
1305
|
}
|
|
1286
1306
|
|
|
1287
1307
|
|
|
@@ -19,7 +19,7 @@ function setCookie(name, value) {
|
|
|
19
19
|
|
|
20
20
|
function checkGisServerURL(url, callback) {
|
|
21
21
|
if(!url) return;
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
var cookieUrl = getCookie("gisUrl");
|
|
24
24
|
var gisProxyList = url.split(";");
|
|
25
25
|
cookieUrl && gisProxyList.push(cookieUrl);
|
|
@@ -287,7 +287,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
287
287
|
}
|
|
288
288
|
that.loadGISLibrary = function (gisServerURL) {
|
|
289
289
|
var t = (new Date()).getTime();
|
|
290
|
-
if(gisServerURL !== _egovagisviewerUrl && _egovagisviewerUrl){
|
|
290
|
+
if(gisServerURL !== _egovagisviewerUrl && _egovagisviewerUrl){
|
|
291
291
|
//如果第二次的GIS地址与上次不一致则删除上一次的,不考虑同一页面多个地图,地图GIS地址不一致的情况。(页面中始终只存在一个引用egovaviewer.js)
|
|
292
292
|
var curScript = document.querySelector('script[egoavagisviewer="' + _egovagisviewerUrl +'"]');
|
|
293
293
|
var curLink = document.querySelector('link[egoavagisviewer="' + _egovagisviewerUrl +'"]');
|
|
@@ -570,7 +570,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
570
570
|
var cb = function (type, data) {
|
|
571
571
|
if (callback && type == 'locateFeatureByIDsCallback'){
|
|
572
572
|
callback(data);
|
|
573
|
-
}
|
|
573
|
+
}
|
|
574
574
|
if (mouseMoveCallback && type != 'locateFeatureByIDsCallback'){
|
|
575
575
|
mouseMoveCallback(type, data);
|
|
576
576
|
}
|
|
@@ -791,7 +791,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
791
791
|
return;
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
|
-
|
|
794
|
+
|
|
795
795
|
var cb = function (type, data) {
|
|
796
796
|
if (clickCallback && type == 'showRecListDistributionCallback')
|
|
797
797
|
clickCallback(data);
|
|
@@ -1385,7 +1385,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1385
1385
|
params.push(cb);
|
|
1386
1386
|
that.callMap.apply(that, params);
|
|
1387
1387
|
}
|
|
1388
|
-
|
|
1388
|
+
|
|
1389
1389
|
that.stopEdit = function() {
|
|
1390
1390
|
if (scene == null)
|
|
1391
1391
|
return;
|
|
@@ -1440,7 +1440,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1440
1440
|
};
|
|
1441
1441
|
that.callMap('drawGeometry', type, style, clear, cb, options);
|
|
1442
1442
|
}
|
|
1443
|
-
|
|
1443
|
+
|
|
1444
1444
|
/* 热力图*/
|
|
1445
1445
|
that.addHeatMap = function (data, option) {
|
|
1446
1446
|
that.callMap('addHeatMap', data, option);
|
|
@@ -1609,7 +1609,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1609
1609
|
'yFieldName': yFieldName
|
|
1610
1610
|
};
|
|
1611
1611
|
if(params) queryParam = MapUtils.deepClones(true, {}, queryParam, params);
|
|
1612
|
-
|
|
1612
|
+
|
|
1613
1613
|
var cb = function (type, data) {
|
|
1614
1614
|
if (callback && type == 'queryObjectInfoCallback') {
|
|
1615
1615
|
callback(data);
|
|
@@ -1777,6 +1777,11 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1777
1777
|
return that.callMap('convertMapToScreen', list);
|
|
1778
1778
|
}
|
|
1779
1779
|
|
|
1780
|
+
// 屏幕坐标转地理坐标
|
|
1781
|
+
that.convertScreenToMap = function (list) {
|
|
1782
|
+
return that.callMap('convertScreenToMap', list);
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1780
1785
|
that.destroyMap = function () {
|
|
1781
1786
|
that.callMap('destroyMap');
|
|
1782
1787
|
}
|
|
@@ -1867,7 +1872,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1867
1872
|
that.clearLayerSelectStyle = function (id, options) {
|
|
1868
1873
|
that.callMap('clearLayerSelectStyle', id, options);
|
|
1869
1874
|
}
|
|
1870
|
-
|
|
1875
|
+
|
|
1871
1876
|
that.getLayersByLayerGroup = function (layerGroupName, callback) {
|
|
1872
1877
|
that.callMap('getLayersByLayerGroup', layerGroupName, callback);
|
|
1873
1878
|
}
|
|
@@ -1922,6 +1927,11 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1922
1927
|
that.zoomOut = function () {
|
|
1923
1928
|
that.callMap('zoomOut');
|
|
1924
1929
|
}
|
|
1930
|
+
|
|
1931
|
+
that.heatMap = function(options, cb) {
|
|
1932
|
+
that.callMap('agsToWKT', options, cb);
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1925
1935
|
that.init();
|
|
1926
1936
|
}
|
|
1927
1937
|
|
package/egovamap/egovaglobe.js
CHANGED
|
@@ -2204,6 +2204,11 @@ var EGovaGlobeMap = function ($container, pScene, prefix, mapConfig, context, ca
|
|
|
2204
2204
|
return;
|
|
2205
2205
|
scene.fire((msgPrefix + ":wmsLayerPick"), { args: [options, cb] }, parentScene, false);
|
|
2206
2206
|
};
|
|
2207
|
+
that.heatMap = function (options, cb) {
|
|
2208
|
+
if (scene == null)
|
|
2209
|
+
return;
|
|
2210
|
+
scene.fire((msgPrefix + ":heatMap"), { args: [options, cb] }, parentScene, false);
|
|
2211
|
+
}
|
|
2207
2212
|
that.init();
|
|
2208
2213
|
};
|
|
2209
2214
|
|