egovamap 0.33.23 → 0.33.25
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 +173 -163
- package/egovamap/egovaglobe.js +9 -0
- package/egovamap/egovamap.js +1 -1
- package/package.json +1 -1
package/egovamap/egovaBI.js
CHANGED
|
@@ -58,8 +58,8 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
58
58
|
function rgbToRgbArray(color) {
|
|
59
59
|
if (
|
|
60
60
|
!color ||
|
|
61
|
-
typeof color !==
|
|
62
|
-
(typeof color ==
|
|
61
|
+
typeof color !== 'string' ||
|
|
62
|
+
(typeof color == 'string' && color.indexOf('rgb') == -1)
|
|
63
63
|
)
|
|
64
64
|
return color;
|
|
65
65
|
|
|
@@ -79,14 +79,14 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
79
79
|
function checkObjectStore(storeName) {
|
|
80
80
|
return new Promise((resolve, reject) => {
|
|
81
81
|
// 打开网格数据库
|
|
82
|
-
let idbRequest = window.indexedDB.open(
|
|
82
|
+
let idbRequest = window.indexedDB.open('regionDB');
|
|
83
83
|
idbRequest.onblocked = function (event) {
|
|
84
84
|
// 如果其他的一些页签加载了该数据库,在我们继续之前需要关闭它们
|
|
85
85
|
// alert("请关闭其他由该站点打开的页签!");
|
|
86
|
-
console.log(
|
|
86
|
+
console.log('请关闭其他由该站点打开的页签!');
|
|
87
87
|
};
|
|
88
88
|
idbRequest.onerror = (event) => {
|
|
89
|
-
console.log(
|
|
89
|
+
console.log('数据库打开报错(checkObjectStore)');
|
|
90
90
|
// resolve(undefined)
|
|
91
91
|
reject(event.target.error.message);
|
|
92
92
|
};
|
|
@@ -107,7 +107,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
107
107
|
let highLightType = -1;
|
|
108
108
|
let infoStyle = null;
|
|
109
109
|
let renderCanvas = null;
|
|
110
|
-
if(options.option && options.option.renderCanvas !== undefined){
|
|
110
|
+
if (options.option && options.option.renderCanvas !== undefined) {
|
|
111
111
|
renderCanvas = options.option.renderCanvas;
|
|
112
112
|
}
|
|
113
113
|
let tagName = layerName;
|
|
@@ -119,10 +119,10 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
119
119
|
if (options.textStyle.label) {
|
|
120
120
|
for (const key in p) {
|
|
121
121
|
if (
|
|
122
|
-
key !==
|
|
123
|
-
key !==
|
|
124
|
-
key !==
|
|
125
|
-
key !==
|
|
122
|
+
key !== 'id' &&
|
|
123
|
+
key !== 'x' &&
|
|
124
|
+
key !== 'y' &&
|
|
125
|
+
key !== 'objectID'
|
|
126
126
|
) {
|
|
127
127
|
if (!p.label) p.label = [];
|
|
128
128
|
var labelItem = {};
|
|
@@ -134,7 +134,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
134
134
|
p.minZoom = options.common.beginLevel;
|
|
135
135
|
p.maxZoom = options.common.endLevel;
|
|
136
136
|
p.symbolType = -1;
|
|
137
|
-
p.symbolUrl = options.textStyle.symbolUrl ||
|
|
137
|
+
p.symbolUrl = options.textStyle.symbolUrl || 'location.png';
|
|
138
138
|
if (options.selected && options.selected.hSymbolUrl)
|
|
139
139
|
p.hSymbolUrl = options.selected.hSymbolUrl;
|
|
140
140
|
p.scale = options.textStyle.scale;
|
|
@@ -149,9 +149,12 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
// 杭州现场,需要叠加图片和地图放大同时存在
|
|
152
|
-
if(options.developer){
|
|
153
|
-
if(
|
|
154
|
-
|
|
152
|
+
if (options.developer) {
|
|
153
|
+
if (
|
|
154
|
+
options.developer.enableScaleAndOverImage &&
|
|
155
|
+
options.developer.scaleAndOverImageFactor
|
|
156
|
+
) {
|
|
157
|
+
p.aScale = options.developer.scaleAndOverImageFactor;
|
|
155
158
|
}
|
|
156
159
|
}
|
|
157
160
|
//classify symbol
|
|
@@ -161,7 +164,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
161
164
|
if (
|
|
162
165
|
p[classField] &&
|
|
163
166
|
Object.prototype.toString.call(customScheme) ==
|
|
164
|
-
|
|
167
|
+
'[object Array]' &&
|
|
165
168
|
customScheme.length
|
|
166
169
|
) {
|
|
167
170
|
customScheme.forEach((scheme) => {
|
|
@@ -175,31 +178,31 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
175
178
|
if (options.textStyle.enableText) {
|
|
176
179
|
let labelMinZoom = options.common.beginLevel;
|
|
177
180
|
let labelMaxZoom = options.common.endLevel;
|
|
178
|
-
if(options.textStyle.labelZoomEnabled) {
|
|
181
|
+
if (options.textStyle.labelZoomEnabled) {
|
|
179
182
|
labelMinZoom = options.textStyle.textBeginLevel;
|
|
180
183
|
labelMaxZoom = options.textStyle.textEndLevel;
|
|
181
184
|
}
|
|
182
185
|
p.labelStyle = {
|
|
183
|
-
type:
|
|
186
|
+
type: 'text',
|
|
184
187
|
minZoom: labelMinZoom,
|
|
185
188
|
maxZoom: labelMaxZoom,
|
|
186
|
-
xoffset: options.textStyle.xoffset +
|
|
187
|
-
yoffset: options.textStyle.yoffset +
|
|
189
|
+
xoffset: options.textStyle.xoffset + 'px',
|
|
190
|
+
yoffset: options.textStyle.yoffset + 'px',
|
|
188
191
|
text: p.textValue,
|
|
189
192
|
color: options.textStyle.fillColor,
|
|
190
193
|
font: {
|
|
191
|
-
size: options.textStyle.fontSize +
|
|
194
|
+
size: options.textStyle.fontSize + 'px',
|
|
192
195
|
weight: options.textStyle.fontWeight,
|
|
193
196
|
family:
|
|
194
197
|
options.textStyle.family ||
|
|
195
|
-
|
|
198
|
+
'microsoft-yahei-regular',
|
|
196
199
|
},
|
|
197
200
|
};
|
|
198
201
|
}
|
|
199
202
|
p.useLabelBg = options.textStyle.textBackground;
|
|
200
203
|
if (p.useLabelBg) {
|
|
201
204
|
p.labelBgStyle = {
|
|
202
|
-
type:
|
|
205
|
+
type: 'picture-marker',
|
|
203
206
|
url: options.textStyle.textBackgroundUrl,
|
|
204
207
|
};
|
|
205
208
|
}
|
|
@@ -225,22 +228,23 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
225
228
|
clusterType: options.clusterStyle.clusterType,
|
|
226
229
|
distance: options.clusterStyle.clusterDistance,
|
|
227
230
|
style: null,
|
|
228
|
-
critical:options.clusterStyle.critical || 10,
|
|
231
|
+
critical: options.clusterStyle.critical || 10,
|
|
229
232
|
level: options.clusterStyle.level,
|
|
230
|
-
clickShowSpiralPoint:
|
|
233
|
+
clickShowSpiralPoint:
|
|
234
|
+
options.clusterStyle.clickShowSpiralPoint,
|
|
231
235
|
labelStyle: {
|
|
232
|
-
type:
|
|
236
|
+
type: 'text',
|
|
233
237
|
color: options.clusterStyle.fillColor,
|
|
234
|
-
text:
|
|
235
|
-
xoffset: options.clusterStyle.xoffset +
|
|
236
|
-
yoffset: options.clusterStyle.yoffset +
|
|
238
|
+
text: '',
|
|
239
|
+
xoffset: options.clusterStyle.xoffset + 'px',
|
|
240
|
+
yoffset: options.clusterStyle.yoffset + 'px',
|
|
237
241
|
font: {
|
|
238
|
-
size: options.clusterStyle.fontSize +
|
|
242
|
+
size: options.clusterStyle.fontSize + 'px',
|
|
239
243
|
weight:
|
|
240
|
-
options.clusterStyle.fontWeight ||
|
|
244
|
+
options.clusterStyle.fontWeight || 'normal',
|
|
241
245
|
family:
|
|
242
246
|
options.clusterStyle.family ||
|
|
243
|
-
|
|
247
|
+
'microsoft-yahei-regular',
|
|
244
248
|
},
|
|
245
249
|
},
|
|
246
250
|
};
|
|
@@ -249,10 +253,10 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
249
253
|
options.clusterStyle.symbolUrl &&
|
|
250
254
|
options.clusterStyle.useCustomStyle;
|
|
251
255
|
let clusterStyle = {
|
|
252
|
-
type:
|
|
253
|
-
style:
|
|
256
|
+
type: 'simple-marker',
|
|
257
|
+
style: 'circle',
|
|
254
258
|
color: [255, 168, 0, 200],
|
|
255
|
-
size: 25 * options.clusterStyle.scale +
|
|
259
|
+
size: 25 * options.clusterStyle.scale + 'px',
|
|
256
260
|
outline: {
|
|
257
261
|
color: [255, 168, 0, 200],
|
|
258
262
|
width: 2,
|
|
@@ -263,16 +267,16 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
263
267
|
getImgSize(options.clusterStyle.symbolUrl).then(
|
|
264
268
|
(szie) => {
|
|
265
269
|
clusterStyle = {
|
|
266
|
-
type:
|
|
270
|
+
type: 'picture-marker',
|
|
267
271
|
url: options.clusterStyle.symbolUrl,
|
|
268
272
|
width:
|
|
269
273
|
szie.width *
|
|
270
274
|
options.clusterStyle.scale +
|
|
271
|
-
|
|
275
|
+
'px',
|
|
272
276
|
height:
|
|
273
277
|
szie.height *
|
|
274
278
|
options.clusterStyle.scale +
|
|
275
|
-
|
|
279
|
+
'px',
|
|
276
280
|
};
|
|
277
281
|
clusterOption.style = clusterStyle;
|
|
278
282
|
args.clusterOption = clusterOption;
|
|
@@ -310,9 +314,9 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
310
314
|
//data必须包含x y 和 value属性
|
|
311
315
|
if (
|
|
312
316
|
data.length === 0 ||
|
|
313
|
-
!data[0].hasOwnProperty(
|
|
314
|
-
!data[0].hasOwnProperty(
|
|
315
|
-
!data[0].hasOwnProperty(
|
|
317
|
+
!data[0].hasOwnProperty('x') ||
|
|
318
|
+
!data[0].hasOwnProperty('y') ||
|
|
319
|
+
!data[0].hasOwnProperty('value')
|
|
316
320
|
) {
|
|
317
321
|
return;
|
|
318
322
|
}
|
|
@@ -339,7 +343,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
339
343
|
//组装info.options
|
|
340
344
|
info.options = {
|
|
341
345
|
clampStyle: heatOpt.heatType === 0 ? 0 : 3, // 如果设置了为0,则为0,其余则全部为旧逻辑的3绘制方式,即贴地贴建筑
|
|
342
|
-
renderType: defaultValue(heatOpt.renderType,
|
|
346
|
+
renderType: defaultValue(heatOpt.renderType, 'line'),
|
|
343
347
|
dynamicGranularity: defaultValue(
|
|
344
348
|
heatOpt.dynamicGranularity,
|
|
345
349
|
false
|
|
@@ -350,9 +354,9 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
350
354
|
radiusScale: defaultValue(heatOpt.radiusScale, 1.0),
|
|
351
355
|
radius: defaultValue(heatOpt.radius, 40),
|
|
352
356
|
gradient: defaultValue(heatOpt.gradient, {
|
|
353
|
-
0.35:
|
|
354
|
-
0.7:
|
|
355
|
-
1.0:
|
|
357
|
+
0.35: 'rgb(136,218,104)',
|
|
358
|
+
0.7: 'rgb(241,238,124)',
|
|
359
|
+
1.0: 'rgb(243,118,116)',
|
|
356
360
|
}),
|
|
357
361
|
|
|
358
362
|
// 下面的部分不建议传,逐步舍弃
|
|
@@ -379,9 +383,9 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
379
383
|
*/
|
|
380
384
|
this.drawPoints = function (layerName, positions, options) {
|
|
381
385
|
let drawData = function (layerName, positions, options) {
|
|
382
|
-
if (globeMap && mapType ==
|
|
386
|
+
if (globeMap && mapType == 'globe') {
|
|
383
387
|
globeMap.drawPoints(layerName, positions, options);
|
|
384
|
-
} else if (gisMap && mapType ==
|
|
388
|
+
} else if (gisMap && mapType == 'map') {
|
|
385
389
|
deal2DPoints(layerName, positions, options).then((args) => {
|
|
386
390
|
gisMap.showMultiObjectCurrentPosition(
|
|
387
391
|
args.datalist,
|
|
@@ -419,16 +423,16 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
419
423
|
}
|
|
420
424
|
});
|
|
421
425
|
};
|
|
422
|
-
|
|
423
|
-
|
|
426
|
+
var filterString = '1=1';
|
|
427
|
+
if (options.filterString) filterString = options.filterString + '';
|
|
424
428
|
let queryParams = {
|
|
425
429
|
layerID: options.usageID || options.phyLayerID,
|
|
426
|
-
|
|
430
|
+
where: filterString,
|
|
427
431
|
outGeometry: true,
|
|
428
432
|
};
|
|
429
433
|
queryFeature(queryParams).then(function (resultData) {
|
|
430
434
|
if (!resultData) {
|
|
431
|
-
console.log(
|
|
435
|
+
console.log('没有查询到数据,请检查查询参数');
|
|
432
436
|
return;
|
|
433
437
|
}
|
|
434
438
|
let dataCache = [];
|
|
@@ -441,10 +445,10 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
441
445
|
}
|
|
442
446
|
if (x && y) {
|
|
443
447
|
let item = { ...element.attributes, x, y };
|
|
444
|
-
if (globeMap && mapType ==
|
|
448
|
+
if (globeMap && mapType == 'globe' && options.primaryKey) {
|
|
445
449
|
let primaryKeyValue = item[options.primaryKey];
|
|
446
450
|
primaryKeyValue != undefined &&
|
|
447
|
-
(item[
|
|
451
|
+
(item['attributes'] = {
|
|
448
452
|
objectID: primaryKeyValue,
|
|
449
453
|
});
|
|
450
454
|
}
|
|
@@ -456,7 +460,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
456
460
|
if (errorSize > 0) {
|
|
457
461
|
console.error(`${errorSize}个点格式错误,无法正常加载`);
|
|
458
462
|
}
|
|
459
|
-
if(options.callback && typeof options.callback === 'function'){
|
|
463
|
+
if (options.callback && typeof options.callback === 'function') {
|
|
460
464
|
options.callback(dataCache);
|
|
461
465
|
}
|
|
462
466
|
drawData(layerName, dataCache, options);
|
|
@@ -480,13 +484,13 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
480
484
|
var ctrOption = drawParam.clusterOption;
|
|
481
485
|
var zoom = options.zoom === undefined ? true : !!options.zoom;
|
|
482
486
|
var clusterOption = null;
|
|
483
|
-
if(ctrOption){
|
|
487
|
+
if (ctrOption) {
|
|
484
488
|
clusterOption = {
|
|
485
489
|
clusterType: ctrOption.clusterType,
|
|
486
490
|
level: ctrOption.level || 0,
|
|
487
491
|
style: {
|
|
488
|
-
type:
|
|
489
|
-
style:
|
|
492
|
+
type: 'simple-marker',
|
|
493
|
+
style: 'circle',
|
|
490
494
|
color: ctrOption.color || [255, 0, 0, 0.6],
|
|
491
495
|
size: ctrOption.size || 20,
|
|
492
496
|
outline: {
|
|
@@ -496,18 +500,18 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
496
500
|
},
|
|
497
501
|
},
|
|
498
502
|
labelStyle: {
|
|
499
|
-
type:
|
|
503
|
+
type: 'text',
|
|
500
504
|
color: ctrOption.labelColor || [255, 255, 255, 1],
|
|
501
|
-
text:
|
|
505
|
+
text: '',
|
|
502
506
|
zlevel: ctrOption.labelZlevel || 1,
|
|
503
507
|
yoffset: 0,
|
|
504
508
|
font: ctrOption.labelFont || {
|
|
505
|
-
family:
|
|
509
|
+
family: 'Arial',
|
|
506
510
|
size: 10,
|
|
507
511
|
},
|
|
508
512
|
},
|
|
509
513
|
distance: ctrOption.distance || 50,
|
|
510
|
-
}
|
|
514
|
+
};
|
|
511
515
|
}
|
|
512
516
|
var param = [
|
|
513
517
|
data,
|
|
@@ -535,23 +539,23 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
535
539
|
layerName: drawParam.layerName,
|
|
536
540
|
minSize: 30,
|
|
537
541
|
clusterLimit: 20,
|
|
538
|
-
style:
|
|
542
|
+
style: 'default',
|
|
539
543
|
clusterImageInfo: {
|
|
540
|
-
horizontalOrigin:
|
|
541
|
-
verticalOrigin:
|
|
544
|
+
horizontalOrigin: 'center',
|
|
545
|
+
verticalOrigin: 'bottom',
|
|
542
546
|
cssStyle: {
|
|
543
547
|
borderRadius: 500,
|
|
544
|
-
fillColor:
|
|
548
|
+
fillColor: 'rgba(0,0,0,0.7)',
|
|
545
549
|
borderLineWidth: 3,
|
|
546
|
-
borderLineColor:
|
|
550
|
+
borderLineColor: 'rgba(250,140,0,0.9)',
|
|
547
551
|
paddingX: 15,
|
|
548
552
|
paddingY: 6,
|
|
549
553
|
marginBottom: 2,
|
|
550
554
|
},
|
|
551
555
|
textStyle: {
|
|
552
|
-
font:
|
|
553
|
-
fillColor:
|
|
554
|
-
outlineColor:
|
|
556
|
+
font: '60px Helvetica',
|
|
557
|
+
fillColor: 'rgba(220,220,220,1.0)',
|
|
558
|
+
outlineColor: 'black',
|
|
555
559
|
outlineWidth: 1,
|
|
556
560
|
padding: 1,
|
|
557
561
|
textScale: 0.5,
|
|
@@ -584,13 +588,13 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
584
588
|
return;
|
|
585
589
|
}
|
|
586
590
|
if (!features || !features.length) return;
|
|
587
|
-
var symbolUrl =
|
|
588
|
-
if (subUniqueCode.indexOf(
|
|
591
|
+
var symbolUrl = '';
|
|
592
|
+
if (subUniqueCode.indexOf('http') > -1) {
|
|
589
593
|
symbolUrl = subUniqueCode;
|
|
590
|
-
} else if (subUniqueCode.indexOf(
|
|
594
|
+
} else if (subUniqueCode.indexOf('.') > -1) {
|
|
591
595
|
symbolUrl = subUniqueCode;
|
|
592
596
|
} else {
|
|
593
|
-
symbolUrl =
|
|
597
|
+
symbolUrl = ''.concat(subUniqueCode, '.png');
|
|
594
598
|
if (globeMap)
|
|
595
599
|
symbolUrl = queryParam.gisServerURL
|
|
596
600
|
? `${queryParam.gisServerURL}/symbol/${symbolUrl}`
|
|
@@ -598,11 +602,11 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
598
602
|
}
|
|
599
603
|
var map = globeMap || gisMap;
|
|
600
604
|
//验证图标是否可查询
|
|
601
|
-
map.getMapConfig(
|
|
605
|
+
map.getMapConfig('serverURL', function (key, data) {
|
|
602
606
|
var symbolServiceURL = `${data}/symbol`;
|
|
603
607
|
var picUrl =
|
|
604
|
-
symbolUrl.indexOf(
|
|
605
|
-
symbolUrl.indexOf(
|
|
608
|
+
symbolUrl.indexOf('http') > -1 ||
|
|
609
|
+
symbolUrl.indexOf('https') > -1
|
|
606
610
|
? symbolUrl
|
|
607
611
|
: `${symbolServiceURL}/${symbolUrl}`;
|
|
608
612
|
getImgSize(picUrl).then((size) => {
|
|
@@ -628,7 +632,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
628
632
|
);
|
|
629
633
|
});
|
|
630
634
|
callback && callback(dataList);
|
|
631
|
-
if(!options.onlyGetData) {
|
|
635
|
+
if (!options.onlyGetData) {
|
|
632
636
|
showParts(dataList);
|
|
633
637
|
}
|
|
634
638
|
});
|
|
@@ -662,68 +666,68 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
662
666
|
const keyValue = null;
|
|
663
667
|
const clearMap = queryParam.clearMap;
|
|
664
668
|
let inStyle = queryParam.style || {
|
|
665
|
-
color:
|
|
669
|
+
color: 'blue',
|
|
666
670
|
};
|
|
667
671
|
let inHStyle = queryParam.hStyle || {
|
|
668
|
-
color:
|
|
672
|
+
color: 'blue',
|
|
669
673
|
};
|
|
670
674
|
let style = null,
|
|
671
675
|
hStyle = null;
|
|
672
676
|
if (geomType == 1) {
|
|
673
677
|
} else if (geomType == 2) {
|
|
674
678
|
style = {
|
|
675
|
-
type:
|
|
676
|
-
color: inStyle.color ||
|
|
677
|
-
width: inStyle.width ||
|
|
678
|
-
style: inStyle.style ||
|
|
679
|
-
cap: inStyle.cap ||
|
|
680
|
-
join: inStyle.join ||
|
|
679
|
+
type: 'simple-line', // autocasts as new SimpleLineSymbol()
|
|
680
|
+
color: inStyle.color || 'blue',
|
|
681
|
+
width: inStyle.width || '2px',
|
|
682
|
+
style: inStyle.style || 'solid',
|
|
683
|
+
cap: inStyle.cap || 'round',
|
|
684
|
+
join: inStyle.join || 'round',
|
|
681
685
|
};
|
|
682
686
|
hStyle = {
|
|
683
|
-
type:
|
|
684
|
-
color: inHStyle.color ||
|
|
685
|
-
width: inHStyle.width || inStyle.width ||
|
|
686
|
-
style: inHStyle.style || inStyle.style ||
|
|
687
|
-
cap: inHStyle.cap || inStyle.cap ||
|
|
688
|
-
join: inHStyle.join || inStyle.join ||
|
|
687
|
+
type: 'simple-line', // autocasts as new SimpleLineSymbol()
|
|
688
|
+
color: inHStyle.color || 'red',
|
|
689
|
+
width: inHStyle.width || inStyle.width || '2px',
|
|
690
|
+
style: inHStyle.style || inStyle.style || 'solid',
|
|
691
|
+
cap: inHStyle.cap || inStyle.cap || 'round',
|
|
692
|
+
join: inHStyle.join || inStyle.join || 'round',
|
|
689
693
|
};
|
|
690
694
|
} else if (geomType == 3) {
|
|
691
695
|
style = {
|
|
692
|
-
type:
|
|
696
|
+
type: 'simple-fill', // autocasts as new SimpleFillSymbol()
|
|
693
697
|
color: inStyle.color || [51, 51, 204, 0.9],
|
|
694
|
-
style: inStyle.style ||
|
|
698
|
+
style: inStyle.style || 'solid',
|
|
695
699
|
outline: {
|
|
696
700
|
// autocasts as new SimpleLineSymbol()
|
|
697
|
-
color: inStyle.outlineColor ||
|
|
698
|
-
width: inStyle.outlineWidth ||
|
|
699
|
-
style: inStyle.outlineStyle ||
|
|
700
|
-
cap: inStyle.outlineCap ||
|
|
701
|
-
join: inStyle.outlineJoin ||
|
|
701
|
+
color: inStyle.outlineColor || 'blue',
|
|
702
|
+
width: inStyle.outlineWidth || '1px',
|
|
703
|
+
style: inStyle.outlineStyle || 'solid',
|
|
704
|
+
cap: inStyle.outlineCap || 'round',
|
|
705
|
+
join: inStyle.outlineJoin || 'round',
|
|
702
706
|
},
|
|
703
707
|
};
|
|
704
708
|
hStyle = {
|
|
705
|
-
type:
|
|
709
|
+
type: 'simple-fill', // autocasts as new SimpleFillSymbol()
|
|
706
710
|
color: inHStyle.color || [51, 51, 204, 0.9],
|
|
707
|
-
style: inHStyle.style || inStyle.style ||
|
|
711
|
+
style: inHStyle.style || inStyle.style || 'solid',
|
|
708
712
|
outline: {
|
|
709
713
|
// autocasts as new SimpleLineSymbol()
|
|
710
|
-
color: inHStyle.outlineColor ||
|
|
714
|
+
color: inHStyle.outlineColor || 'red',
|
|
711
715
|
width:
|
|
712
716
|
inHStyle.outlineWidth ||
|
|
713
717
|
inStyle.outlineWidth ||
|
|
714
|
-
|
|
718
|
+
'1px',
|
|
715
719
|
style:
|
|
716
720
|
inHStyle.outlineStyle ||
|
|
717
721
|
inStyle.outlineStyle ||
|
|
718
|
-
|
|
722
|
+
'solid',
|
|
719
723
|
cap:
|
|
720
724
|
inHStyle.outlineCap ||
|
|
721
725
|
inStyle.outlineCap ||
|
|
722
|
-
|
|
726
|
+
'round',
|
|
723
727
|
join:
|
|
724
728
|
inHStyle.outlineJoin ||
|
|
725
729
|
inStyle.outlineJoin ||
|
|
726
|
-
|
|
730
|
+
'round',
|
|
727
731
|
},
|
|
728
732
|
};
|
|
729
733
|
}
|
|
@@ -732,7 +736,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
732
736
|
const labelField = null;
|
|
733
737
|
const labelstyle = null;
|
|
734
738
|
const geometry = null;
|
|
735
|
-
const where = queryParam.where ||
|
|
739
|
+
const where = queryParam.where || '1=1';
|
|
736
740
|
const opts = {
|
|
737
741
|
...queryParam.options,
|
|
738
742
|
layerId: layerName,
|
|
@@ -775,8 +779,8 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
775
779
|
this.drawOtherPartsGlobe = function (options, data) {
|
|
776
780
|
const geomType = options.geomType;
|
|
777
781
|
const drawParam = options.drawParam || {};
|
|
778
|
-
const color = drawParam.color ||
|
|
779
|
-
const clickColor = drawParam.clickColor ||
|
|
782
|
+
const color = drawParam.color || 'rgba(255, 0.0, 0.0, 0.8)';
|
|
783
|
+
const clickColor = drawParam.clickColor || 'rgba(255, 255, 0.0, 0.8)';
|
|
780
784
|
function showParts(features) {
|
|
781
785
|
if (!globeMap) {
|
|
782
786
|
return;
|
|
@@ -793,7 +797,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
793
797
|
});
|
|
794
798
|
return {
|
|
795
799
|
positions,
|
|
796
|
-
type:
|
|
800
|
+
type: 'color',
|
|
797
801
|
color: color,
|
|
798
802
|
width: 2,
|
|
799
803
|
attributes: feature.attributes,
|
|
@@ -834,8 +838,8 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
834
838
|
|
|
835
839
|
return {
|
|
836
840
|
positions,
|
|
837
|
-
type:
|
|
838
|
-
colorType:
|
|
841
|
+
type: 'polygon',
|
|
842
|
+
colorType: 'color',
|
|
839
843
|
color: color,
|
|
840
844
|
attributes: feature.attributes,
|
|
841
845
|
};
|
|
@@ -844,7 +848,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
844
848
|
var zoom = true;
|
|
845
849
|
var clear = true;
|
|
846
850
|
var layerName = drawParam.layerName;
|
|
847
|
-
var drawWay =
|
|
851
|
+
var drawWay = 'entityWay';
|
|
848
852
|
var options = {
|
|
849
853
|
heading: 0,
|
|
850
854
|
pitch: -90,
|
|
@@ -929,14 +933,14 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
929
933
|
}
|
|
930
934
|
|
|
931
935
|
let storeName = !!globeMap
|
|
932
|
-
?
|
|
933
|
-
:
|
|
936
|
+
? 'usageID'
|
|
937
|
+
: 'usage2D' + '_' + options.idbSetting.usageID;
|
|
934
938
|
let queryFromGIS = () => {
|
|
935
|
-
let filterString = options.idbSetting.filterString ||
|
|
939
|
+
let filterString = options.idbSetting.filterString || '1=1';
|
|
936
940
|
let queryParam = {
|
|
937
941
|
layerID: options.idbSetting.usageID,
|
|
938
942
|
where: filterString,
|
|
939
|
-
geometry:
|
|
943
|
+
geometry: '',
|
|
940
944
|
outGeometry: true,
|
|
941
945
|
options: {
|
|
942
946
|
originalData: true,
|
|
@@ -989,18 +993,18 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
989
993
|
// 样式类
|
|
990
994
|
styleOpt: {
|
|
991
995
|
period: 4, // 动画线段的周期,越短越快
|
|
992
|
-
image:
|
|
996
|
+
image: 'road.png', // type为image时线段所使用的纹理图案,位置在data3d/polyline/目录下(type为image限定)
|
|
993
997
|
repeatX: 2, // 横向纹理重复,越大则越密(type为image限定)
|
|
994
998
|
repeatY: 1, //纵向纹理重复(type为image限定)
|
|
995
999
|
glowPower: 0, //中心亮度
|
|
996
1000
|
intensity: 1.2, //纹理图片颜色强度
|
|
997
|
-
gapColor:
|
|
1001
|
+
gapColor: 'rgba(0, 0, 0, 0)', //间隙颜色(type为dash限定)
|
|
998
1002
|
dashLength: 15, //间隙宽(type为dash限定)
|
|
999
1003
|
outlineWidth: 0, // 边框线宽(type为outline限定)
|
|
1000
|
-
outlineColor:
|
|
1001
|
-
type:
|
|
1004
|
+
outlineColor: 'rgba(0, 0, 0, 0)', // 边框颜色(type为outline限定)
|
|
1005
|
+
type: 'color', // 线条类型,有 image color dash outline glow
|
|
1002
1006
|
width: 10,
|
|
1003
|
-
color:
|
|
1007
|
+
color: 'rgba(255,255,0,1)',
|
|
1004
1008
|
},
|
|
1005
1009
|
// 视角缩放类
|
|
1006
1010
|
zoomOpt: {
|
|
@@ -1019,7 +1023,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1019
1023
|
// 交互类
|
|
1020
1024
|
interactOpt: {
|
|
1021
1025
|
//click相关
|
|
1022
|
-
clickColor:
|
|
1026
|
+
clickColor: 'rgb(255, 255, 0.0)', // 点击后的颜色
|
|
1023
1027
|
clickWidth: 30, // 点击后的宽度
|
|
1024
1028
|
clickCallback: undefined, // function(e) {console.log('click polyline', e)},
|
|
1025
1029
|
mouseOverCallBack: undefined,
|
|
@@ -1052,11 +1056,11 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1052
1056
|
// let interactOpt = options.interactOpt;
|
|
1053
1057
|
//hth 此处进行参数转换
|
|
1054
1058
|
switch (mergedOptions.styleOpt.type) {
|
|
1055
|
-
case
|
|
1059
|
+
case 'image':
|
|
1056
1060
|
opt.period = defaultValue(mergedOptions.styleOpt.period, 4); // 纹理流动周期,越小越快
|
|
1057
1061
|
opt.image = defaultValue(
|
|
1058
1062
|
mergedOptions.styleOpt.image,
|
|
1059
|
-
|
|
1063
|
+
'road.png'
|
|
1060
1064
|
); //纹理图片,data3d/polyline/目录下
|
|
1061
1065
|
opt.repeatX = defaultValue(
|
|
1062
1066
|
mergedOptions.styleOpt.repeatX,
|
|
@@ -1075,30 +1079,30 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1075
1079
|
1.2
|
|
1076
1080
|
); //纹理图片颜色强度
|
|
1077
1081
|
break;
|
|
1078
|
-
case
|
|
1082
|
+
case 'glow':
|
|
1079
1083
|
opt.glowPower = defaultValue(
|
|
1080
1084
|
mergedOptions.styleOpt.glowPower,
|
|
1081
1085
|
0.2
|
|
1082
1086
|
); //中心亮度
|
|
1083
1087
|
break;
|
|
1084
|
-
case
|
|
1088
|
+
case 'dash':
|
|
1085
1089
|
opt.gapColor = defaultValue(
|
|
1086
1090
|
mergedOptions.styleOpt.gapColor,
|
|
1087
|
-
|
|
1091
|
+
'rgba(0, 0, 0, 0)'
|
|
1088
1092
|
); //间隙颜色
|
|
1089
1093
|
opt.dashLength = defaultValue(
|
|
1090
1094
|
mergedOptions.styleOpt.dashLength,
|
|
1091
1095
|
15
|
|
1092
1096
|
); //间隙宽
|
|
1093
1097
|
break;
|
|
1094
|
-
case
|
|
1098
|
+
case 'outline':
|
|
1095
1099
|
opt.outlineWidth = defaultValue(
|
|
1096
1100
|
mergedOptions.styleOpt.outlineWidth,
|
|
1097
1101
|
0
|
|
1098
1102
|
);
|
|
1099
1103
|
opt.outlineColor = defaultValue(
|
|
1100
1104
|
mergedOptions.styleOpt.outlineColor,
|
|
1101
|
-
|
|
1105
|
+
'rgba(0, 0, 0, 0)'
|
|
1102
1106
|
);
|
|
1103
1107
|
break;
|
|
1104
1108
|
default:
|
|
@@ -1166,16 +1170,16 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1166
1170
|
* @date: 2021-11-26 09:49:16
|
|
1167
1171
|
*/
|
|
1168
1172
|
this.activeLayer = function (layerName, options, filter) {
|
|
1169
|
-
if (globeMap != null && mapType ==
|
|
1173
|
+
if (globeMap != null && mapType == 'globe') {
|
|
1170
1174
|
globeMap.activeLayer(layerName, options, filter);
|
|
1171
1175
|
}
|
|
1172
|
-
if (gisMap != null && mapType ==
|
|
1176
|
+
if (gisMap != null && mapType == 'map') {
|
|
1173
1177
|
gisMap.activeLayer(layerName, options, filter);
|
|
1174
1178
|
}
|
|
1175
1179
|
};
|
|
1176
1180
|
|
|
1177
1181
|
this.deActiveLayer = function (layerName, filter) {
|
|
1178
|
-
if (gisMap != null && mapType ==
|
|
1182
|
+
if (gisMap != null && mapType == 'map') {
|
|
1179
1183
|
gisMap.deActiveLayer(layerName, filter);
|
|
1180
1184
|
}
|
|
1181
1185
|
};
|
|
@@ -1253,13 +1257,13 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1253
1257
|
inverse: options.inverse,
|
|
1254
1258
|
...options.option, // option的其他参数
|
|
1255
1259
|
};
|
|
1256
|
-
if (options.labelSetting.labelZoomEnabled ==
|
|
1260
|
+
if (options.labelSetting.labelZoomEnabled == 'show') {
|
|
1257
1261
|
lfcOpt.labelMinZoom = options.labelSetting.labelMinZoom;
|
|
1258
1262
|
lfcOpt.labelMaxZoom = options.labelSetting.labelMaxZoom;
|
|
1259
1263
|
}
|
|
1260
1264
|
gisMap.locateFeatureByCoords(
|
|
1261
1265
|
geometries,
|
|
1262
|
-
|
|
1266
|
+
'polygon',
|
|
1263
1267
|
options.layerName, // id,如果已经有attributes就没用了
|
|
1264
1268
|
options.style, // style
|
|
1265
1269
|
options.highlightStyle, // highlightStyle
|
|
@@ -1283,13 +1287,13 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1283
1287
|
order: options.order,
|
|
1284
1288
|
// hLabelStyle: options.hLabelStyle, // 选中文字时效果,没用
|
|
1285
1289
|
};
|
|
1286
|
-
if (options.labelSetting.labelZoomEnabled ==
|
|
1290
|
+
if (options.labelSetting.labelZoomEnabled == 'show') {
|
|
1287
1291
|
lfceOpt.labelMinZoom = options.labelSetting.labelMinZoom;
|
|
1288
1292
|
lfceOpt.labelMaxZoom = options.labelSetting.labelMaxZoom;
|
|
1289
1293
|
}
|
|
1290
1294
|
gisMap.locateFeatureByCoords(
|
|
1291
1295
|
extraGeometries,
|
|
1292
|
-
|
|
1296
|
+
'polygon',
|
|
1293
1297
|
options.layerName, // id,如果已经有attributes就没用了
|
|
1294
1298
|
options.specialAreaStyle, // style
|
|
1295
1299
|
options.highlightStyle, // highlightStyle
|
|
@@ -1315,7 +1319,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1315
1319
|
order: options.order,
|
|
1316
1320
|
// hLabelStyle: options.hLabelStyle, // 选中文字时效果,没用
|
|
1317
1321
|
};
|
|
1318
|
-
if (options.labelSetting.labelZoomEnabled ==
|
|
1322
|
+
if (options.labelSetting.labelZoomEnabled == 'show') {
|
|
1319
1323
|
lfcsOpt.labelMinZoom = options.labelSetting.labelMinZoom;
|
|
1320
1324
|
lfcsOpt.labelMaxZoom = options.labelSetting.labelMaxZoom;
|
|
1321
1325
|
}
|
|
@@ -1324,7 +1328,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1324
1328
|
if (specialArea.geometries.length > 0) {
|
|
1325
1329
|
gisMap.locateFeatureByCoords(
|
|
1326
1330
|
specialArea.geometries,
|
|
1327
|
-
|
|
1331
|
+
'polygon',
|
|
1328
1332
|
options.layerName, // id,如果已经有attributes就没用了
|
|
1329
1333
|
specialArea.style, // style
|
|
1330
1334
|
options.highlightStyle, // highlightStyle
|
|
@@ -1351,7 +1355,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1351
1355
|
|
|
1352
1356
|
if (!data) {
|
|
1353
1357
|
// 数据来自本地
|
|
1354
|
-
var dbOpenRequest = window.indexedDB.open(
|
|
1358
|
+
var dbOpenRequest = window.indexedDB.open('regionDB');
|
|
1355
1359
|
dbOpenRequest.onsuccess = function (event) {
|
|
1356
1360
|
var db = this.result;
|
|
1357
1361
|
var store = db.transaction(storeName).objectStore(storeName);
|
|
@@ -1377,13 +1381,13 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1377
1381
|
showGrid(data[0]);
|
|
1378
1382
|
}
|
|
1379
1383
|
|
|
1380
|
-
var dbRequest = window.indexedDB.open(
|
|
1384
|
+
var dbRequest = window.indexedDB.open('regionDB');
|
|
1381
1385
|
dbRequest.onsuccess = function () {
|
|
1382
1386
|
addStore(this.result.version);
|
|
1383
1387
|
};
|
|
1384
1388
|
function addStore(version) {
|
|
1385
1389
|
var dbOpenRequest = window.indexedDB.open(
|
|
1386
|
-
|
|
1390
|
+
'regionDB',
|
|
1387
1391
|
version + 1
|
|
1388
1392
|
);
|
|
1389
1393
|
dbOpenRequest.onupgradeneeded = function (event) {
|
|
@@ -1396,7 +1400,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1396
1400
|
store.put(_data[i]);
|
|
1397
1401
|
}
|
|
1398
1402
|
store.transaction.oncomplete = function () {
|
|
1399
|
-
console.log(
|
|
1403
|
+
console.log('complete');
|
|
1400
1404
|
};
|
|
1401
1405
|
}
|
|
1402
1406
|
};
|
|
@@ -1418,7 +1422,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1418
1422
|
};
|
|
1419
1423
|
this.lineOperation = function (options, data, dataLoadCb) {
|
|
1420
1424
|
if (!options || !options.layerName) {
|
|
1421
|
-
console.log(
|
|
1425
|
+
console.log('图层名必须传递');
|
|
1422
1426
|
return;
|
|
1423
1427
|
}
|
|
1424
1428
|
// 数据获取
|
|
@@ -1441,16 +1445,16 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1441
1445
|
let style = options.style || {};
|
|
1442
1446
|
let hStyle = options.hStyle || {};
|
|
1443
1447
|
let symbol = {
|
|
1444
|
-
type:
|
|
1445
|
-
color: style.color ||
|
|
1446
|
-
width: (style.width || 2) +
|
|
1447
|
-
style: style.style ||
|
|
1448
|
+
type: 'simple-line', // autocasts as new SimpleLineSymbol()
|
|
1449
|
+
color: style.color || 'lightblue',
|
|
1450
|
+
width: (style.width || 2) + 'px',
|
|
1451
|
+
style: style.style || 'short-dot',
|
|
1448
1452
|
};
|
|
1449
1453
|
let hsymbol = {
|
|
1450
|
-
type:
|
|
1451
|
-
color: hStyle.color ||
|
|
1452
|
-
width: (hStyle.width || 2) +
|
|
1453
|
-
style: hStyle.style ||
|
|
1454
|
+
type: 'simple-line', // autocasts as new SimpleLineSymbol()
|
|
1455
|
+
color: hStyle.color || 'lightblue',
|
|
1456
|
+
width: (hStyle.width || 2) + 'px',
|
|
1457
|
+
style: hStyle.style || 'short-dot',
|
|
1454
1458
|
};
|
|
1455
1459
|
var opt = options.options || {};
|
|
1456
1460
|
gisMap.locateFeatureByCoords(
|
|
@@ -1478,7 +1482,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1478
1482
|
drawLine(options, data);
|
|
1479
1483
|
} else {
|
|
1480
1484
|
if (!options.usageID) {
|
|
1481
|
-
console.log(
|
|
1485
|
+
console.log('图层用途必须传递');
|
|
1482
1486
|
return;
|
|
1483
1487
|
}
|
|
1484
1488
|
|
|
@@ -1486,8 +1490,8 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1486
1490
|
if (globeMap) originalData = true;
|
|
1487
1491
|
let queryParams = {
|
|
1488
1492
|
layerID: options.usageID,
|
|
1489
|
-
where: options.filterString ||
|
|
1490
|
-
geometry:
|
|
1493
|
+
where: options.filterString || '1=1',
|
|
1494
|
+
geometry: '',
|
|
1491
1495
|
outGeometry: true,
|
|
1492
1496
|
options: { originalData: originalData },
|
|
1493
1497
|
};
|
|
@@ -1496,7 +1500,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1496
1500
|
dataLoadCb(resultData);
|
|
1497
1501
|
}
|
|
1498
1502
|
if (!resultData) {
|
|
1499
|
-
console.log(
|
|
1503
|
+
console.log('没有查询到数据,请检查查询参数');
|
|
1500
1504
|
return;
|
|
1501
1505
|
}
|
|
1502
1506
|
drawLine(options, resultData);
|
|
@@ -1504,12 +1508,12 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1504
1508
|
}
|
|
1505
1509
|
};
|
|
1506
1510
|
this.enableMapEvents = function (enablePan, enableZoom, callbackArray) {
|
|
1507
|
-
if (gisMap != null && mapType ==
|
|
1511
|
+
if (gisMap != null && mapType == 'map') {
|
|
1508
1512
|
gisMap.enableMapEvents(enablePan, enableZoom, callbackArray);
|
|
1509
1513
|
}
|
|
1510
1514
|
};
|
|
1511
1515
|
this.setMapOpacity = function (opacity) {
|
|
1512
|
-
if (gisMap != null && mapType ==
|
|
1516
|
+
if (gisMap != null && mapType == 'map') {
|
|
1513
1517
|
gisMap.setMapOpacity(opacity);
|
|
1514
1518
|
}
|
|
1515
1519
|
};
|
|
@@ -1540,7 +1544,7 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1540
1544
|
// 二维引擎下加载图层目录树中的图层接口
|
|
1541
1545
|
this.setTreeLayerShow = function (options, cb) {
|
|
1542
1546
|
let mapInstance;
|
|
1543
|
-
if (gisMap != null && mapType ==
|
|
1547
|
+
if (gisMap != null && mapType == 'map') {
|
|
1544
1548
|
mapInstance = gisMap;
|
|
1545
1549
|
}
|
|
1546
1550
|
mapInstance.setTreeLayerShow(options, cb);
|
|
@@ -1550,9 +1554,9 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1550
1554
|
// 适配热力图,具体参数转换等逻辑在引擎层面实现,确保后续接口平替时只需要修改引擎层面即可
|
|
1551
1555
|
this.heatMap = function (options, cb) {
|
|
1552
1556
|
let mapInstance;
|
|
1553
|
-
if (globeMap != null && mapType ==
|
|
1557
|
+
if (globeMap != null && mapType == 'globe') {
|
|
1554
1558
|
mapInstance = globeMap;
|
|
1555
|
-
} else if (gisMap != null && mapType ==
|
|
1559
|
+
} else if (gisMap != null && mapType == 'map') {
|
|
1556
1560
|
mapInstance = gisMap;
|
|
1557
1561
|
}
|
|
1558
1562
|
mapInstance.heatMap(options, cb);
|
|
@@ -1561,9 +1565,9 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1561
1565
|
// 适配网格
|
|
1562
1566
|
this.area = function (options, cb) {
|
|
1563
1567
|
let mapInstance;
|
|
1564
|
-
if (globeMap != null && mapType ==
|
|
1568
|
+
if (globeMap != null && mapType == 'globe') {
|
|
1565
1569
|
mapInstance = globeMap;
|
|
1566
|
-
} else if (gisMap != null && mapType ==
|
|
1570
|
+
} else if (gisMap != null && mapType == 'map') {
|
|
1567
1571
|
mapInstance = gisMap;
|
|
1568
1572
|
}
|
|
1569
1573
|
mapInstance.area(options, cb);
|
|
@@ -1572,13 +1576,19 @@ var egovaBI = function (globeMap, gisMap, mapType) {
|
|
|
1572
1576
|
// 适配网格
|
|
1573
1577
|
this.line = function (options, cb) {
|
|
1574
1578
|
let mapInstance;
|
|
1575
|
-
if (globeMap != null && mapType ==
|
|
1579
|
+
if (globeMap != null && mapType == 'globe') {
|
|
1576
1580
|
mapInstance = globeMap;
|
|
1577
|
-
} else if (gisMap != null && mapType ==
|
|
1581
|
+
} else if (gisMap != null && mapType == 'map') {
|
|
1578
1582
|
mapInstance = gisMap;
|
|
1579
1583
|
}
|
|
1580
1584
|
mapInstance.line(options, cb);
|
|
1581
1585
|
};
|
|
1586
|
+
// webgl无人机机场接口
|
|
1587
|
+
that.addSpotEffect = function (options) {
|
|
1588
|
+
if (globeMap != null && mapType == 'globe') {
|
|
1589
|
+
globeMap.addDock(options);
|
|
1590
|
+
}
|
|
1591
|
+
};
|
|
1582
1592
|
};
|
|
1583
1593
|
|
|
1584
1594
|
export default egovaBI;
|
package/egovamap/egovaglobe.js
CHANGED
|
@@ -3713,6 +3713,15 @@ var EGovaGlobeMap = function (
|
|
|
3713
3713
|
false
|
|
3714
3714
|
);
|
|
3715
3715
|
};
|
|
3716
|
+
that.addDock = function (options) {
|
|
3717
|
+
if (scene == null) return;
|
|
3718
|
+
scene.fire(
|
|
3719
|
+
msgPrefix + ':addDock',
|
|
3720
|
+
{ args: [options, data] },
|
|
3721
|
+
parentScene,
|
|
3722
|
+
false
|
|
3723
|
+
);
|
|
3724
|
+
};
|
|
3716
3725
|
that.init();
|
|
3717
3726
|
};
|
|
3718
3727
|
|
package/egovamap/egovamap.js
CHANGED
|
@@ -5531,7 +5531,7 @@ var EGovaMap = function (
|
|
|
5531
5531
|
}
|
|
5532
5532
|
};
|
|
5533
5533
|
|
|
5534
|
-
that.initMap(containerID, callback, mapType, mapConfig);
|
|
5534
|
+
that.initMap(containerID, callback, mapType, mapConfig, mapParam);
|
|
5535
5535
|
|
|
5536
5536
|
// EGovaBI(globeMap).bind(this)();
|
|
5537
5537
|
EGovaBI.call(this, globeMap, gisMap, mapType);
|