@syncfusion/ej2-maps 21.2.10 → 22.1.34
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/.eslintrc.json +1 -0
- package/CHANGELOG.md +1 -42
- package/dist/ej2-maps.min.js +2 -2
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +210 -51
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +209 -50
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/data-label.js +2 -0
- package/src/maps/layers/layer-panel.js +6 -7
- package/src/maps/layers/legend.js +4 -0
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +4 -0
- package/src/maps/maps.js +16 -18
- package/src/maps/model/base-model.d.ts +8 -4
- package/src/maps/model/base.d.ts +8 -4
- package/src/maps/model/base.js +4 -4
- package/src/maps/model/export-image.js +15 -2
- package/src/maps/model/export-pdf.js +11 -3
- package/src/maps/model/interface.d.ts +22 -4
- package/src/maps/model/print.js +14 -1
- package/src/maps/model/theme.js +126 -10
- package/src/maps/user-interaction/tooltip.js +6 -2
- package/src/maps/user-interaction/zoom.js +4 -3
- package/src/maps/utils/enum.d.ts +5 -1
- package/src/maps/utils/helper.d.ts +1 -1
- package/src/maps/utils/helper.js +5 -2
package/src/maps/model/theme.js
CHANGED
|
@@ -191,6 +191,14 @@ export function getShapeColor(theme) {
|
|
|
191
191
|
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
192
192
|
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
193
193
|
break;
|
|
194
|
+
case 'material3':
|
|
195
|
+
themePalette = ['#6200EE', '#E77A16', '#82C100', '#7107DC', '#05BB3D',
|
|
196
|
+
'#D21020', '#FAD200', '#0085FF', '#9204EA', '#08EE9B'];
|
|
197
|
+
break;
|
|
198
|
+
case 'material3dark':
|
|
199
|
+
themePalette = ['#4EAAFF', '#FA4EAB', '#FFF500', '#17EA58', '#38FFE7',
|
|
200
|
+
'#FF9E45', '#B3F32F', '#B93CE4', '#FC5664', '#9B55FF'];
|
|
201
|
+
break;
|
|
194
202
|
default:
|
|
195
203
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
196
204
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -339,9 +347,14 @@ export function getThemeStyle(theme) {
|
|
|
339
347
|
zoomFillColor: '#FFFFFF',
|
|
340
348
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
341
349
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
350
|
+
fontSize: '12px',
|
|
351
|
+
fontWeight: 'Medium',
|
|
342
352
|
titleFontWeight: 'Medium',
|
|
343
353
|
zoomSelectionColor: '#e61576',
|
|
344
|
-
shapeFill: '#A6A6A6'
|
|
354
|
+
shapeFill: '#A6A6A6',
|
|
355
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
356
|
+
rectangleZoomFillOpacity: 0.5,
|
|
357
|
+
rectangleZoomBorderColor: "#009900"
|
|
345
358
|
};
|
|
346
359
|
break;
|
|
347
360
|
case 'highcontrast':
|
|
@@ -358,10 +371,15 @@ export function getThemeStyle(theme) {
|
|
|
358
371
|
tooltipFillColor: '#ffffff',
|
|
359
372
|
zoomFillColor: '#FFFFFF',
|
|
360
373
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
374
|
+
fontSize: '12px',
|
|
375
|
+
fontWeight: 'Medium',
|
|
361
376
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
362
377
|
titleFontWeight: 'Medium',
|
|
363
378
|
zoomSelectionColor: '#e61576',
|
|
364
|
-
shapeFill: '#A6A6A6'
|
|
379
|
+
shapeFill: '#A6A6A6',
|
|
380
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
381
|
+
rectangleZoomFillOpacity: 0.5,
|
|
382
|
+
rectangleZoomBorderColor: "#009900"
|
|
365
383
|
};
|
|
366
384
|
break;
|
|
367
385
|
case 'bootstrap4':
|
|
@@ -377,6 +395,8 @@ export function getThemeStyle(theme) {
|
|
|
377
395
|
tooltipFillColor: '#000000',
|
|
378
396
|
zoomFillColor: '#5B6269',
|
|
379
397
|
fontFamily: 'HelveticaNeue-Medium',
|
|
398
|
+
fontSize: '12px',
|
|
399
|
+
fontWeight: 'Medium',
|
|
380
400
|
titleFontSize: '16px',
|
|
381
401
|
legendFontSize: '14px',
|
|
382
402
|
tooltipFillOpacity: 1,
|
|
@@ -384,7 +404,10 @@ export function getThemeStyle(theme) {
|
|
|
384
404
|
labelFontFamily: 'HelveticaNeue-Medium',
|
|
385
405
|
titleFontWeight: 'Medium',
|
|
386
406
|
zoomSelectionColor: '#e61576',
|
|
387
|
-
shapeFill: '#A6A6A6'
|
|
407
|
+
shapeFill: '#A6A6A6',
|
|
408
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
409
|
+
rectangleZoomFillOpacity: 0.5,
|
|
410
|
+
rectangleZoomBorderColor: "#009900"
|
|
388
411
|
};
|
|
389
412
|
break;
|
|
390
413
|
case 'tailwind':
|
|
@@ -400,6 +423,8 @@ export function getThemeStyle(theme) {
|
|
|
400
423
|
tooltipFillColor: '#111827',
|
|
401
424
|
zoomFillColor: '#6b7280',
|
|
402
425
|
fontFamily: 'Inter',
|
|
426
|
+
fontSize: '12px',
|
|
427
|
+
fontWeight: 'Medium',
|
|
403
428
|
titleFontSize: '14px',
|
|
404
429
|
legendFontSize: '12px',
|
|
405
430
|
tooltipFillOpacity: 1,
|
|
@@ -407,7 +432,10 @@ export function getThemeStyle(theme) {
|
|
|
407
432
|
labelFontFamily: 'Inter',
|
|
408
433
|
titleFontWeight: '500',
|
|
409
434
|
zoomSelectionColor: '#374151',
|
|
410
|
-
shapeFill: '#E5E7EB'
|
|
435
|
+
shapeFill: '#E5E7EB',
|
|
436
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
437
|
+
rectangleZoomFillOpacity: 0.5,
|
|
438
|
+
rectangleZoomBorderColor: "#009900"
|
|
411
439
|
};
|
|
412
440
|
break;
|
|
413
441
|
case 'tailwinddark':
|
|
@@ -423,6 +451,8 @@ export function getThemeStyle(theme) {
|
|
|
423
451
|
tooltipFillColor: '#F9FAFB',
|
|
424
452
|
zoomFillColor: '#D1D5DB',
|
|
425
453
|
fontFamily: 'Inter',
|
|
454
|
+
fontSize: '12px',
|
|
455
|
+
fontWeight: 'Medium',
|
|
426
456
|
titleFontSize: '14px',
|
|
427
457
|
legendFontSize: '12px',
|
|
428
458
|
tooltipFillOpacity: 1,
|
|
@@ -430,7 +460,10 @@ export function getThemeStyle(theme) {
|
|
|
430
460
|
labelFontFamily: 'Inter',
|
|
431
461
|
titleFontWeight: '500',
|
|
432
462
|
zoomSelectionColor: '#F3F4F6',
|
|
433
|
-
shapeFill: '#374151'
|
|
463
|
+
shapeFill: '#374151',
|
|
464
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
465
|
+
rectangleZoomFillOpacity: 0.5,
|
|
466
|
+
rectangleZoomBorderColor: "#009900"
|
|
434
467
|
};
|
|
435
468
|
break;
|
|
436
469
|
case 'bootstrap5':
|
|
@@ -446,6 +479,8 @@ export function getThemeStyle(theme) {
|
|
|
446
479
|
tooltipFillColor: '#212529',
|
|
447
480
|
zoomFillColor: '#6C757D',
|
|
448
481
|
fontFamily: 'Helvetica Neue',
|
|
482
|
+
fontSize: '12px',
|
|
483
|
+
fontWeight: 'Medium',
|
|
449
484
|
titleFontSize: '14px',
|
|
450
485
|
legendFontSize: '12px',
|
|
451
486
|
tooltipFillOpacity: 1,
|
|
@@ -453,7 +488,10 @@ export function getThemeStyle(theme) {
|
|
|
453
488
|
labelFontFamily: 'Helvetica Neue',
|
|
454
489
|
titleFontWeight: 'normal',
|
|
455
490
|
zoomSelectionColor: '#343A40',
|
|
456
|
-
shapeFill: '#E9ECEF'
|
|
491
|
+
shapeFill: '#E9ECEF',
|
|
492
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
493
|
+
rectangleZoomFillOpacity: 0.5,
|
|
494
|
+
rectangleZoomBorderColor: "#009900"
|
|
457
495
|
};
|
|
458
496
|
break;
|
|
459
497
|
case 'bootstrap5dark':
|
|
@@ -469,6 +507,8 @@ export function getThemeStyle(theme) {
|
|
|
469
507
|
tooltipFillColor: '#E9ECEF',
|
|
470
508
|
zoomFillColor: '#B5BABE',
|
|
471
509
|
fontFamily: 'Helvetica Neue',
|
|
510
|
+
fontSize: '12px',
|
|
511
|
+
fontWeight: 'Medium',
|
|
472
512
|
titleFontSize: '14px',
|
|
473
513
|
legendFontSize: '12px',
|
|
474
514
|
tooltipFillOpacity: 1,
|
|
@@ -476,7 +516,10 @@ export function getThemeStyle(theme) {
|
|
|
476
516
|
labelFontFamily: 'Helvetica Neue',
|
|
477
517
|
titleFontWeight: 'normal',
|
|
478
518
|
zoomSelectionColor: '#DEE2E6',
|
|
479
|
-
shapeFill: '#495057'
|
|
519
|
+
shapeFill: '#495057',
|
|
520
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
521
|
+
rectangleZoomFillOpacity: 0.5,
|
|
522
|
+
rectangleZoomBorderColor: "#009900"
|
|
480
523
|
};
|
|
481
524
|
break;
|
|
482
525
|
case 'fluent':
|
|
@@ -492,6 +535,8 @@ export function getThemeStyle(theme) {
|
|
|
492
535
|
tooltipFillColor: '#FFFFFF',
|
|
493
536
|
zoomFillColor: '#A19F9D',
|
|
494
537
|
fontFamily: 'Segoe UI',
|
|
538
|
+
fontSize: '12px',
|
|
539
|
+
fontWeight: 'Medium',
|
|
495
540
|
titleFontSize: '14px',
|
|
496
541
|
legendFontSize: '12px',
|
|
497
542
|
tooltipFillOpacity: 1,
|
|
@@ -499,7 +544,10 @@ export function getThemeStyle(theme) {
|
|
|
499
544
|
labelFontFamily: 'Segoe UI',
|
|
500
545
|
titleFontWeight: '600',
|
|
501
546
|
zoomSelectionColor: '#323130',
|
|
502
|
-
shapeFill: '#F3F2F1'
|
|
547
|
+
shapeFill: '#F3F2F1',
|
|
548
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
549
|
+
rectangleZoomFillOpacity: 0.5,
|
|
550
|
+
rectangleZoomBorderColor: "#009900"
|
|
503
551
|
};
|
|
504
552
|
break;
|
|
505
553
|
case 'fluentdark':
|
|
@@ -515,6 +563,8 @@ export function getThemeStyle(theme) {
|
|
|
515
563
|
tooltipFillColor: '#252423',
|
|
516
564
|
zoomFillColor: '#484644',
|
|
517
565
|
fontFamily: 'Segoe UI',
|
|
566
|
+
fontSize: '12px',
|
|
567
|
+
fontWeight: 'Medium',
|
|
518
568
|
titleFontSize: '14px',
|
|
519
569
|
legendFontSize: '12px',
|
|
520
570
|
tooltipFillOpacity: 1,
|
|
@@ -522,7 +572,68 @@ export function getThemeStyle(theme) {
|
|
|
522
572
|
labelFontFamily: 'Segoe UI',
|
|
523
573
|
titleFontWeight: '600',
|
|
524
574
|
zoomSelectionColor: '#F3F2F1',
|
|
525
|
-
shapeFill: '#252423'
|
|
575
|
+
shapeFill: '#252423',
|
|
576
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
577
|
+
rectangleZoomFillOpacity: 0.5,
|
|
578
|
+
rectangleZoomBorderColor: "#009900"
|
|
579
|
+
};
|
|
580
|
+
break;
|
|
581
|
+
case 'material3':
|
|
582
|
+
style = {
|
|
583
|
+
backgroundColor: 'transparent',
|
|
584
|
+
areaBackgroundColor: 'transparent',
|
|
585
|
+
titleFontColor: '#1C1B1F',
|
|
586
|
+
subTitleFontColor: '#1C1B1F',
|
|
587
|
+
legendTitleFontColor: '#1C1B1F',
|
|
588
|
+
legendTextColor: '#49454E',
|
|
589
|
+
dataLabelFontColor: '#1C1B1F',
|
|
590
|
+
tooltipFontColor: '#F4EFF4',
|
|
591
|
+
tooltipFillColor: '#313033',
|
|
592
|
+
zoomFillColor: '#49454E',
|
|
593
|
+
fontFamily: 'Roboto',
|
|
594
|
+
fontSize: '14px',
|
|
595
|
+
titleFontSize: '16px',
|
|
596
|
+
subTitleFontSize: '14px',
|
|
597
|
+
legendFontSize: '12px',
|
|
598
|
+
tooltipFillOpacity: 1,
|
|
599
|
+
tooltipTextOpacity: 1,
|
|
600
|
+
labelFontFamily: 'Roboto',
|
|
601
|
+
titleFontWeight: '500',
|
|
602
|
+
fontWeight: '400',
|
|
603
|
+
zoomSelectionColor: '#49454E',
|
|
604
|
+
shapeFill: '#E7E0EC',
|
|
605
|
+
rectangleZoomFillColor: '#6750A4',
|
|
606
|
+
rectangleZoomFillOpacity: 0.24,
|
|
607
|
+
rectangleZoomBorderColor: "#6750A4"
|
|
608
|
+
};
|
|
609
|
+
break;
|
|
610
|
+
case 'material3dark':
|
|
611
|
+
style = {
|
|
612
|
+
backgroundColor: 'transparent',
|
|
613
|
+
areaBackgroundColor: 'transparent',
|
|
614
|
+
titleFontColor: '#E6E1E5',
|
|
615
|
+
subTitleFontColor: '#E6E1E5',
|
|
616
|
+
legendTitleFontColor: '#E6E1E5',
|
|
617
|
+
legendTextColor: '#CAC4D0',
|
|
618
|
+
dataLabelFontColor: '#E6E1E5',
|
|
619
|
+
tooltipFontColor: '#313033',
|
|
620
|
+
tooltipFillColor: '#E6E1E5',
|
|
621
|
+
zoomFillColor: '#E6E1E5',
|
|
622
|
+
fontFamily: 'Roboto',
|
|
623
|
+
fontSize: '14px',
|
|
624
|
+
titleFontSize: '16px',
|
|
625
|
+
subTitleFontSize: '14px',
|
|
626
|
+
legendFontSize: '12px',
|
|
627
|
+
tooltipFillOpacity: 1,
|
|
628
|
+
tooltipTextOpacity: 1,
|
|
629
|
+
labelFontFamily: 'Roboto',
|
|
630
|
+
titleFontWeight: '500',
|
|
631
|
+
fontWeight: '400',
|
|
632
|
+
zoomSelectionColor: '#E6E1E5',
|
|
633
|
+
shapeFill: '#49454F',
|
|
634
|
+
rectangleZoomFillColor: '#D0BCFF',
|
|
635
|
+
rectangleZoomFillOpacity: 0.24,
|
|
636
|
+
rectangleZoomBorderColor: "#D0BCFF"
|
|
526
637
|
};
|
|
527
638
|
break;
|
|
528
639
|
default:
|
|
@@ -540,9 +651,14 @@ export function getThemeStyle(theme) {
|
|
|
540
651
|
zoomFillColor: '#737373',
|
|
541
652
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
542
653
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
654
|
+
fontSize: '12px',
|
|
655
|
+
fontWeight: 'Medium',
|
|
543
656
|
titleFontWeight: 'Medium',
|
|
544
657
|
zoomSelectionColor: '#e61576',
|
|
545
|
-
shapeFill: '#A6A6A6'
|
|
658
|
+
shapeFill: '#A6A6A6',
|
|
659
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
660
|
+
rectangleZoomFillOpacity: 0.5,
|
|
661
|
+
rectangleZoomBorderColor: "#009900"
|
|
546
662
|
};
|
|
547
663
|
break;
|
|
548
664
|
}
|
|
@@ -127,7 +127,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
127
127
|
currentData = this.formatter(marker.tooltipSettings.format, marker.dataSource[dataIndex]);
|
|
128
128
|
}
|
|
129
129
|
else {
|
|
130
|
-
if (marker.template && !marker.tooltipSettings.valuePath) {
|
|
130
|
+
if (typeof marker.template !== 'function' && marker.template && !marker.tooltipSettings.valuePath) {
|
|
131
131
|
currentData = marker.template.split('>')[1].split('<')[0];
|
|
132
132
|
}
|
|
133
133
|
else {
|
|
@@ -170,7 +170,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
170
170
|
tooltipEle.style.cssText = 'position: absolute;pointer-events:none;';
|
|
171
171
|
document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
|
|
172
172
|
}
|
|
173
|
-
if (option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
|
|
173
|
+
if (typeof option.template !== 'function' && option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
|
|
174
174
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
175
175
|
}
|
|
176
176
|
templateData = this.setTooltipContent(option, templateData);
|
|
@@ -195,10 +195,14 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
195
195
|
if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
|
|
196
196
|
(targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
|
|
197
197
|
_this.maps['isProtectedOnChange'] = true;
|
|
198
|
+
tooltipArgs.options['textStyle']['size'] = tooltipArgs.options['textStyle']['size']
|
|
199
|
+
|| _this.maps.themeStyle.fontSize;
|
|
198
200
|
tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
|
|
199
201
|
|| _this.maps.themeStyle.tooltipFontColor;
|
|
200
202
|
tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
|
|
201
203
|
|| _this.maps.themeStyle.fontFamily;
|
|
204
|
+
tooltipArgs.options['textStyle']['fontWeight'] = tooltipArgs.options['textStyle']['fontWeight']
|
|
205
|
+
|| _this.maps.themeStyle.fontWeight;
|
|
202
206
|
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
203
207
|
|| _this.maps.themeStyle.tooltipTextOpacity;
|
|
204
208
|
if (tooltipArgs.cancel) {
|
|
@@ -385,7 +385,7 @@ var Zoom = /** @class */ (function () {
|
|
|
385
385
|
var down = this.mouseDownPoints;
|
|
386
386
|
var move = this.mouseMovePoints;
|
|
387
387
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
388
|
-
var border = { width: 1, color:
|
|
388
|
+
var border = { width: 1, color: this.maps.themeStyle.rectangleZoomBorderColor };
|
|
389
389
|
var width = Math.abs(move.x - down.x);
|
|
390
390
|
var height = Math.abs(move.y - down.y);
|
|
391
391
|
var x = ((move.x > down.x) ? down.x : down.x - width);
|
|
@@ -400,7 +400,7 @@ var Zoom = /** @class */ (function () {
|
|
|
400
400
|
height: map.availableSize.height,
|
|
401
401
|
style: 'position: absolute;'
|
|
402
402
|
});
|
|
403
|
-
var rectOption = new RectOption(map.element.id + '_ZoomRect',
|
|
403
|
+
var rectOption = new RectOption(map.element.id + '_ZoomRect', this.maps.themeStyle.rectangleZoomFillColor, border, this.maps.themeStyle.rectangleZoomFillOpacity, this.zoomingRect, 0, 0, '', '3');
|
|
404
404
|
rectSVGObject.appendChild(map.renderer.drawRectangle(rectOption));
|
|
405
405
|
getElementByID(map.element.id + '_Secondary_Element').appendChild(rectSVGObject);
|
|
406
406
|
}
|
|
@@ -793,6 +793,7 @@ var Zoom = /** @class */ (function () {
|
|
|
793
793
|
zoomtextSize = measureText(zoomtext, style);
|
|
794
794
|
var start = labelY - zoomtextSize['height'] / 4;
|
|
795
795
|
var end = labelY + zoomtextSize['height'] / 4;
|
|
796
|
+
labelY = end;
|
|
796
797
|
var xpositionEnds = labelX + zoomtextSize['width'] / 2;
|
|
797
798
|
var xpositionStart = labelX - zoomtextSize['width'] / 2;
|
|
798
799
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1449,7 +1450,7 @@ var Zoom = /** @class */ (function () {
|
|
|
1449
1450
|
map.markerCenterLatitude = null;
|
|
1450
1451
|
map.markerCenterLongitude = null;
|
|
1451
1452
|
this.isZoomSelection = false;
|
|
1452
|
-
this.isPan =
|
|
1453
|
+
this.isPan = map.zoomSettings.enablePanning;
|
|
1453
1454
|
this.toolBarZooming(map.zoomSettings.minZoom, 'Reset');
|
|
1454
1455
|
if ((this.isPan && !this.isZoomSelection) || (!this.isPan && this.isZoomSelection)) {
|
|
1455
1456
|
if (!this.maps.zoomSettings.enablePanning) {
|
package/src/maps/utils/enum.d.ts
CHANGED
|
@@ -44,7 +44,11 @@ export declare type MapsTheme =
|
|
|
44
44
|
/** Renders a map with Fluent theme. */
|
|
45
45
|
'Fluent' |
|
|
46
46
|
/** Render a map with Fluent dark theme. */
|
|
47
|
-
'FluentDark'
|
|
47
|
+
'FluentDark' |
|
|
48
|
+
/** Renders a map with material3 theme. */
|
|
49
|
+
'Material3' |
|
|
50
|
+
/** Renders a map with material3dark theme. */
|
|
51
|
+
'Material3Dark';
|
|
48
52
|
/**
|
|
49
53
|
* Defines the position of the legend.
|
|
50
54
|
*/
|
|
@@ -884,7 +884,7 @@ export declare function Internalize(maps: Maps, value: number): string;
|
|
|
884
884
|
* @returns {Function} - Returns the function
|
|
885
885
|
* @private
|
|
886
886
|
*/
|
|
887
|
-
export declare function getTemplateFunction(template: string, maps: Maps): any;
|
|
887
|
+
export declare function getTemplateFunction(template: string | Function, maps: Maps): any;
|
|
888
888
|
/**
|
|
889
889
|
* Function to get element from id.
|
|
890
890
|
*
|
package/src/maps/utils/helper.js
CHANGED
|
@@ -846,7 +846,7 @@ export function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, ma
|
|
|
846
846
|
}
|
|
847
847
|
else if (shape === 'Image') {
|
|
848
848
|
x = location.x - (size.width / 2);
|
|
849
|
-
y = location.y - (size.height / 2);
|
|
849
|
+
y = location.y - (markerID.indexOf('cluster') > -1 ? (size.height / 2) : size.height);
|
|
850
850
|
merge(pathOptions, { 'href': imageUrl, 'height': size.height, 'width': size.width, x: x, y: y });
|
|
851
851
|
markerEle = maps.renderer.drawImage(pathOptions);
|
|
852
852
|
}
|
|
@@ -2393,13 +2393,16 @@ export function getTemplateFunction(template, maps) {
|
|
|
2393
2393
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2394
2394
|
var templateFn = null;
|
|
2395
2395
|
try {
|
|
2396
|
-
if (document.querySelectorAll(template).length) {
|
|
2396
|
+
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
2397
2397
|
templateFn = templateComplier(document.querySelector(template).innerHTML.trim());
|
|
2398
2398
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2399
2399
|
}
|
|
2400
2400
|
else if (maps.isVue || maps.isVue3) {
|
|
2401
2401
|
templateFn = templateComplier(template);
|
|
2402
2402
|
}
|
|
2403
|
+
else if (typeof template === 'function') {
|
|
2404
|
+
templateFn = templateComplier(template);
|
|
2405
|
+
}
|
|
2403
2406
|
}
|
|
2404
2407
|
catch (e) {
|
|
2405
2408
|
templateFn = templateComplier(template);
|