egovamap 0.15.4 → 0.15.8
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/egovaBI.js +13 -9
- package/egovamap/egovagis.js +7 -0
- package/egovamap/egovagisviewer.js +1 -0
- package/egovamap/egovamap.js +11 -1
- package/package.json +1 -1
package/egovamap/egovaBI.js
CHANGED
|
@@ -306,6 +306,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
306
306
|
var drawParam = options.drawParam || {};
|
|
307
307
|
var ctrOption = drawParam.clusterOption;
|
|
308
308
|
var clusterOption = {
|
|
309
|
+
clusterType: ctrOption.clusterType,
|
|
309
310
|
level: ctrOption.level || 0,
|
|
310
311
|
style: {
|
|
311
312
|
"type": "simple-marker",
|
|
@@ -348,6 +349,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
348
349
|
var subUniqueCode = options.subUniqueCode;
|
|
349
350
|
let queryCallback = function (featureInfos) {
|
|
350
351
|
var features = featureInfos[queryParam.phyLayerIDs];
|
|
352
|
+
if (!features || !features.length) return;
|
|
351
353
|
var symbolUrl = "";
|
|
352
354
|
if (subUniqueCode.indexOf("http") > -1) {
|
|
353
355
|
symbolUrl = subUniqueCode;
|
|
@@ -377,7 +379,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
377
379
|
this.drawOtherParts = function (options, data) {
|
|
378
380
|
var self = this;
|
|
379
381
|
const geomType = options.geomType;
|
|
380
|
-
let queryParam = options.queryParam;
|
|
382
|
+
let queryParam = options.queryParam || {};
|
|
381
383
|
function showParts(data) {
|
|
382
384
|
|
|
383
385
|
}
|
|
@@ -391,17 +393,17 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
391
393
|
const keyValue = null;
|
|
392
394
|
const clearMap = queryParam.clearMap || true;
|
|
393
395
|
let inStyle = queryParam.style || {
|
|
394
|
-
color: "
|
|
396
|
+
color: "blue"
|
|
395
397
|
};
|
|
396
398
|
let inHStyle = queryParam.hStyle || {
|
|
397
|
-
color: "
|
|
399
|
+
color: "blue"
|
|
398
400
|
};
|
|
399
401
|
let style = null, hStyle = null;
|
|
400
402
|
if (geomType == 1) {
|
|
401
403
|
} else if (geomType == 2) {
|
|
402
404
|
style = {
|
|
403
405
|
type: "simple-line", // autocasts as new SimpleLineSymbol()
|
|
404
|
-
color: inStyle.color || "
|
|
406
|
+
color: inStyle.color || "blue",
|
|
405
407
|
width: inStyle.width || "2px",
|
|
406
408
|
style: inStyle.style || "solid",
|
|
407
409
|
cap: inStyle.cap || "round",
|
|
@@ -409,7 +411,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
409
411
|
};
|
|
410
412
|
hStyle = {
|
|
411
413
|
type: "simple-line", // autocasts as new SimpleLineSymbol()
|
|
412
|
-
color: inHStyle.color || "
|
|
414
|
+
color: inHStyle.color || "red",
|
|
413
415
|
width: inHStyle.width || inStyle.width || "2px",
|
|
414
416
|
style: inHStyle.style || inStyle.style || "solid",
|
|
415
417
|
cap: inHStyle.cap || inStyle.cap || "round",
|
|
@@ -421,7 +423,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
421
423
|
color: inStyle.color || [51, 51, 204, 0.9],
|
|
422
424
|
style: inStyle.style || "solid",
|
|
423
425
|
outline: { // autocasts as new SimpleLineSymbol()
|
|
424
|
-
color: inStyle.outlineColor || "
|
|
426
|
+
color: inStyle.outlineColor || "blue",
|
|
425
427
|
width: inStyle.outlineWidth || "1px",
|
|
426
428
|
style: inStyle.outlineStyle || "solid",
|
|
427
429
|
cap: inStyle.outlineCap || "round",
|
|
@@ -433,7 +435,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
433
435
|
color: inHStyle.color || [51, 51, 204, 0.9],
|
|
434
436
|
style: inHStyle.style || inStyle.style || "solid",
|
|
435
437
|
outline: { // autocasts as new SimpleLineSymbol()
|
|
436
|
-
color: inHStyle.outlineColor || "
|
|
438
|
+
color: inHStyle.outlineColor || "red",
|
|
437
439
|
width: inHStyle.outlineWidth || inStyle.outlineWidth || "1px",
|
|
438
440
|
style: inHStyle.outlineStyle || inStyle.outlineStyle || "solid",
|
|
439
441
|
cap: inHStyle.outlineCap || inStyle.outlineCap || "round",
|
|
@@ -448,10 +450,12 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
448
450
|
const geometry = null;
|
|
449
451
|
const where = queryParam.where || "1=1";
|
|
450
452
|
const opts = {
|
|
451
|
-
layerId: layerName
|
|
453
|
+
layerId: layerName,
|
|
454
|
+
mouseOverCallback: queryParam.mouseOverCallback
|
|
452
455
|
};
|
|
453
456
|
|
|
454
|
-
let param = [layerID, keyField, keyValue, clearMap, style, hStyle, bZoom, randomColor, labelField, labelstyle, geometry, where, null, null, opts];
|
|
457
|
+
let param = [layerID, keyField, keyValue, clearMap, style, hStyle, bZoom, randomColor, labelField, labelstyle, geometry, where, null, null, opts, null, null, null, null, null, null, queryParam.clickCallback];
|
|
458
|
+
//let param = [layerID, keyField, keyValue, clearMap, style, hStyle, bZoom, randomColor, labelField, labelstyle, geometry, where, null, null, opts, null, null, null, null, queryParam.callback];
|
|
455
459
|
if (globeMap) {
|
|
456
460
|
gisMap.locateFeatureByIDs(...param);
|
|
457
461
|
} else if (gisMap) {
|
package/egovamap/egovagis.js
CHANGED
|
@@ -581,6 +581,13 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
581
581
|
}
|
|
582
582
|
scene.fire((msgPrefix + ":getBuffer"), {args: args}, parentScene, true);
|
|
583
583
|
}
|
|
584
|
+
/* 获取多点的缓冲区 */
|
|
585
|
+
that.getMultiPointBuffer = function(points, radius){
|
|
586
|
+
if (scene == null)
|
|
587
|
+
return;
|
|
588
|
+
scene.fire((msgPrefix + ":getMultiPointBuffer"), {args: args}, parentScene, true);
|
|
589
|
+
|
|
590
|
+
}
|
|
584
591
|
/* 显示监督员责任网格 */
|
|
585
592
|
that.showPatrolDutygridCells = function(infoJson, zoom, clickCallback) {
|
|
586
593
|
if (scene == null)
|
|
@@ -751,6 +751,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
751
751
|
var cb = function (type, data) {
|
|
752
752
|
if (callback) {
|
|
753
753
|
if (type == 'locateFeatureByIDsCallback') callback(data);
|
|
754
|
+
else if (type == 'locateFeatureByIDsMouseOver') options && options.mouseOverCallback(data);
|
|
754
755
|
} else {
|
|
755
756
|
that.fireCallback(type, data);
|
|
756
757
|
}
|
package/egovamap/egovamap.js
CHANGED
|
@@ -1793,7 +1793,17 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
1793
1793
|
}
|
|
1794
1794
|
|
|
1795
1795
|
}
|
|
1796
|
-
|
|
1796
|
+
/**
|
|
1797
|
+
* @param {*} points 点位坐标list,[[x,y],...]
|
|
1798
|
+
* @param {*} radius 缓冲距离,单位为米
|
|
1799
|
+
* @returns
|
|
1800
|
+
*/
|
|
1801
|
+
that.getMultiPointBuffer = function(points, radius){
|
|
1802
|
+
if (scene == null)
|
|
1803
|
+
return;
|
|
1804
|
+
if (gisMap != null)
|
|
1805
|
+
gismap.getMultiPointBuffer(this, arguments);
|
|
1806
|
+
}
|
|
1797
1807
|
|
|
1798
1808
|
/* 显示监督员责任网格 */
|
|
1799
1809
|
that.showPatrolDutygridCells = function (infoJson, zoom, clickCallback) {
|