@syncfusion/ej2-maps 25.2.5 → 26.1.35
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 +3 -2
- 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 +1011 -941
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +1049 -980
- 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 +13 -13
- package/src/maps/layers/bing-map.d.ts +2 -2
- package/src/maps/layers/data-label.js +5 -5
- package/src/maps/layers/layer-panel.js +118 -173
- package/src/maps/layers/legend.js +52 -37
- package/src/maps/layers/marker.js +101 -97
- package/src/maps/layers/navigation-selected-line.js +1 -1
- package/src/maps/layers/polygon.js +9 -6
- package/src/maps/maps.js +7 -16
- package/src/maps/model/base-model.d.ts +2 -91
- package/src/maps/model/base.d.ts +3 -81
- package/src/maps/model/base.js +6 -39
- package/src/maps/model/export-image.js +5 -2
- package/src/maps/model/export-pdf.js +5 -2
- package/src/maps/model/interface.d.ts +12 -0
- package/src/maps/model/interface.js +0 -1
- package/src/maps/model/print.js +5 -2
- package/src/maps/model/theme.js +189 -14
- package/src/maps/user-interaction/tooltip.js +12 -2
- package/src/maps/user-interaction/zoom.js +27 -40
- package/src/maps/utils/enum.d.ts +7 -53
- package/src/maps/utils/helper.js +16 -24
- package/CHANGELOG.md +0 -653
package/src/maps/model/theme.js
CHANGED
|
@@ -46,7 +46,7 @@ export var Theme;
|
|
|
46
46
|
};
|
|
47
47
|
/** @private */
|
|
48
48
|
Theme.dataLabelFont = {
|
|
49
|
-
size:
|
|
49
|
+
size: null,
|
|
50
50
|
fontWeight: 'Medium',
|
|
51
51
|
color: '#000000',
|
|
52
52
|
fontStyle: 'Medium',
|
|
@@ -199,6 +199,15 @@ export function getShapeColor(theme) {
|
|
|
199
199
|
themePalette = ['#4EAAFF', '#FA4EAB', '#FFF500', '#17EA58', '#38FFE7',
|
|
200
200
|
'#FF9E45', '#B3F32F', '#B93CE4', '#FC5664', '#9B55FF'];
|
|
201
201
|
break;
|
|
202
|
+
case 'fluent2':
|
|
203
|
+
themePalette = ['#6200EE', '#09AF74', '#0076E5', '#CB3587', '#E7910F',
|
|
204
|
+
'#0364DE', '#66CD15', '#F3A93C', '#107C10', '#C19C00'];
|
|
205
|
+
break;
|
|
206
|
+
case 'fluent2dark':
|
|
207
|
+
case 'fluent2highcontrast':
|
|
208
|
+
themePalette = ['#9BB449', '#2A72D5', '#43B786', '#3F579A', '#584EC6',
|
|
209
|
+
'#E85F9C', '#6E7A89', '#EA6266', '#0B6A0B', '#C19C00'];
|
|
210
|
+
break;
|
|
202
211
|
default:
|
|
203
212
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
204
213
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -254,7 +263,7 @@ export var HighContrastTheme;
|
|
|
254
263
|
};
|
|
255
264
|
/** @private */
|
|
256
265
|
HighContrastTheme.dataLabelFont = {
|
|
257
|
-
size:
|
|
266
|
+
size: null,
|
|
258
267
|
fontWeight: 'Medium',
|
|
259
268
|
color: '#000000',
|
|
260
269
|
fontStyle: 'Medium',
|
|
@@ -348,13 +357,19 @@ export function getThemeStyle(theme) {
|
|
|
348
357
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
349
358
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
350
359
|
fontSize: '12px',
|
|
360
|
+
legendFontSize: '12px',
|
|
351
361
|
fontWeight: 'Medium',
|
|
352
362
|
titleFontWeight: 'Medium',
|
|
353
363
|
zoomSelectionColor: '#e61576',
|
|
354
364
|
shapeFill: '#A6A6A6',
|
|
365
|
+
shapeBorderColor: '#000000',
|
|
355
366
|
rectangleZoomFillColor: '#d3d3d3',
|
|
356
367
|
rectangleZoomFillOpacity: 0.5,
|
|
357
|
-
rectangleZoomBorderColor: '#009900'
|
|
368
|
+
rectangleZoomBorderColor: '#009900',
|
|
369
|
+
legendBorderColor: '#000000',
|
|
370
|
+
legendBorderWidth: 0,
|
|
371
|
+
tooltipBorderColor: 'transparent',
|
|
372
|
+
zoomButtonRadius: 30
|
|
358
373
|
};
|
|
359
374
|
break;
|
|
360
375
|
case 'highcontrast':
|
|
@@ -372,14 +387,20 @@ export function getThemeStyle(theme) {
|
|
|
372
387
|
zoomFillColor: '#FFFFFF',
|
|
373
388
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
374
389
|
fontSize: '12px',
|
|
390
|
+
legendFontSize: '12px',
|
|
375
391
|
fontWeight: 'Medium',
|
|
376
392
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
377
393
|
titleFontWeight: 'Medium',
|
|
378
394
|
zoomSelectionColor: '#e61576',
|
|
379
395
|
shapeFill: '#A6A6A6',
|
|
396
|
+
shapeBorderColor: '#000000',
|
|
380
397
|
rectangleZoomFillColor: '#d3d3d3',
|
|
381
398
|
rectangleZoomFillOpacity: 0.5,
|
|
382
|
-
rectangleZoomBorderColor: '#009900'
|
|
399
|
+
rectangleZoomBorderColor: '#009900',
|
|
400
|
+
legendBorderColor: '#000000',
|
|
401
|
+
legendBorderWidth: 0,
|
|
402
|
+
tooltipBorderColor: 'transparent',
|
|
403
|
+
zoomButtonRadius: 30
|
|
383
404
|
};
|
|
384
405
|
break;
|
|
385
406
|
case 'bootstrap4':
|
|
@@ -405,9 +426,14 @@ export function getThemeStyle(theme) {
|
|
|
405
426
|
titleFontWeight: 'Medium',
|
|
406
427
|
zoomSelectionColor: '#e61576',
|
|
407
428
|
shapeFill: '#A6A6A6',
|
|
429
|
+
shapeBorderColor: '#000000',
|
|
408
430
|
rectangleZoomFillColor: '#d3d3d3',
|
|
409
431
|
rectangleZoomFillOpacity: 0.5,
|
|
410
|
-
rectangleZoomBorderColor: '#009900'
|
|
432
|
+
rectangleZoomBorderColor: '#009900',
|
|
433
|
+
legendBorderColor: '#000000',
|
|
434
|
+
legendBorderWidth: 0,
|
|
435
|
+
tooltipBorderColor: 'transparent',
|
|
436
|
+
zoomButtonRadius: 30
|
|
411
437
|
};
|
|
412
438
|
break;
|
|
413
439
|
case 'tailwind':
|
|
@@ -433,9 +459,14 @@ export function getThemeStyle(theme) {
|
|
|
433
459
|
titleFontWeight: '500',
|
|
434
460
|
zoomSelectionColor: '#374151',
|
|
435
461
|
shapeFill: '#E5E7EB',
|
|
462
|
+
shapeBorderColor: '#000000',
|
|
436
463
|
rectangleZoomFillColor: '#d3d3d3',
|
|
437
464
|
rectangleZoomFillOpacity: 0.5,
|
|
438
|
-
rectangleZoomBorderColor: '#009900'
|
|
465
|
+
rectangleZoomBorderColor: '#009900',
|
|
466
|
+
legendBorderColor: '#000000',
|
|
467
|
+
legendBorderWidth: 0,
|
|
468
|
+
tooltipBorderColor: 'transparent',
|
|
469
|
+
zoomButtonRadius: 30
|
|
439
470
|
};
|
|
440
471
|
break;
|
|
441
472
|
case 'tailwinddark':
|
|
@@ -461,9 +492,14 @@ export function getThemeStyle(theme) {
|
|
|
461
492
|
titleFontWeight: '500',
|
|
462
493
|
zoomSelectionColor: '#F3F4F6',
|
|
463
494
|
shapeFill: '#374151',
|
|
495
|
+
shapeBorderColor: '#000000',
|
|
464
496
|
rectangleZoomFillColor: '#d3d3d3',
|
|
465
497
|
rectangleZoomFillOpacity: 0.5,
|
|
466
|
-
rectangleZoomBorderColor: '#009900'
|
|
498
|
+
rectangleZoomBorderColor: '#009900',
|
|
499
|
+
legendBorderColor: '#000000',
|
|
500
|
+
legendBorderWidth: 0,
|
|
501
|
+
tooltipBorderColor: 'transparent',
|
|
502
|
+
zoomButtonRadius: 30
|
|
467
503
|
};
|
|
468
504
|
break;
|
|
469
505
|
case 'bootstrap5':
|
|
@@ -489,9 +525,14 @@ export function getThemeStyle(theme) {
|
|
|
489
525
|
titleFontWeight: 'normal',
|
|
490
526
|
zoomSelectionColor: '#343A40',
|
|
491
527
|
shapeFill: '#E9ECEF',
|
|
528
|
+
shapeBorderColor: '#000000',
|
|
492
529
|
rectangleZoomFillColor: '#d3d3d3',
|
|
493
530
|
rectangleZoomFillOpacity: 0.5,
|
|
494
|
-
rectangleZoomBorderColor: '#009900'
|
|
531
|
+
rectangleZoomBorderColor: '#009900',
|
|
532
|
+
legendBorderColor: '#000000',
|
|
533
|
+
legendBorderWidth: 0,
|
|
534
|
+
tooltipBorderColor: 'transparent',
|
|
535
|
+
zoomButtonRadius: 30
|
|
495
536
|
};
|
|
496
537
|
break;
|
|
497
538
|
case 'bootstrap5dark':
|
|
@@ -517,9 +558,14 @@ export function getThemeStyle(theme) {
|
|
|
517
558
|
titleFontWeight: 'normal',
|
|
518
559
|
zoomSelectionColor: '#DEE2E6',
|
|
519
560
|
shapeFill: '#495057',
|
|
561
|
+
shapeBorderColor: '#000000',
|
|
520
562
|
rectangleZoomFillColor: '#d3d3d3',
|
|
521
563
|
rectangleZoomFillOpacity: 0.5,
|
|
522
|
-
rectangleZoomBorderColor: '#009900'
|
|
564
|
+
rectangleZoomBorderColor: '#009900',
|
|
565
|
+
legendBorderColor: '#000000',
|
|
566
|
+
legendBorderWidth: 0,
|
|
567
|
+
tooltipBorderColor: 'transparent',
|
|
568
|
+
zoomButtonRadius: 30
|
|
523
569
|
};
|
|
524
570
|
break;
|
|
525
571
|
case 'fluent':
|
|
@@ -545,9 +591,14 @@ export function getThemeStyle(theme) {
|
|
|
545
591
|
titleFontWeight: '600',
|
|
546
592
|
zoomSelectionColor: '#323130',
|
|
547
593
|
shapeFill: '#F3F2F1',
|
|
594
|
+
shapeBorderColor: '#000000',
|
|
548
595
|
rectangleZoomFillColor: '#d3d3d3',
|
|
549
596
|
rectangleZoomFillOpacity: 0.5,
|
|
550
|
-
rectangleZoomBorderColor: '#009900'
|
|
597
|
+
rectangleZoomBorderColor: '#009900',
|
|
598
|
+
legendBorderColor: '#000000',
|
|
599
|
+
legendBorderWidth: 0,
|
|
600
|
+
tooltipBorderColor: 'transparent',
|
|
601
|
+
zoomButtonRadius: 30
|
|
551
602
|
};
|
|
552
603
|
break;
|
|
553
604
|
case 'fluentdark':
|
|
@@ -573,9 +624,14 @@ export function getThemeStyle(theme) {
|
|
|
573
624
|
titleFontWeight: '600',
|
|
574
625
|
zoomSelectionColor: '#F3F2F1',
|
|
575
626
|
shapeFill: '#252423',
|
|
627
|
+
shapeBorderColor: '#000000',
|
|
576
628
|
rectangleZoomFillColor: '#d3d3d3',
|
|
577
629
|
rectangleZoomFillOpacity: 0.5,
|
|
578
|
-
rectangleZoomBorderColor: '#009900'
|
|
630
|
+
rectangleZoomBorderColor: '#009900',
|
|
631
|
+
legendBorderColor: '#000000',
|
|
632
|
+
legendBorderWidth: 0,
|
|
633
|
+
tooltipBorderColor: 'transparent',
|
|
634
|
+
zoomButtonRadius: 30
|
|
579
635
|
};
|
|
580
636
|
break;
|
|
581
637
|
case 'material3':
|
|
@@ -602,9 +658,14 @@ export function getThemeStyle(theme) {
|
|
|
602
658
|
fontWeight: '400',
|
|
603
659
|
zoomSelectionColor: '#49454E',
|
|
604
660
|
shapeFill: '#E7E0EC',
|
|
661
|
+
shapeBorderColor: '#000000',
|
|
605
662
|
rectangleZoomFillColor: '#6750A4',
|
|
606
663
|
rectangleZoomFillOpacity: 0.24,
|
|
607
|
-
rectangleZoomBorderColor: '#6750A4'
|
|
664
|
+
rectangleZoomBorderColor: '#6750A4',
|
|
665
|
+
legendBorderColor: '#000000',
|
|
666
|
+
legendBorderWidth: 0,
|
|
667
|
+
tooltipBorderColor: 'transparent',
|
|
668
|
+
zoomButtonRadius: 30
|
|
608
669
|
};
|
|
609
670
|
break;
|
|
610
671
|
case 'material3dark':
|
|
@@ -631,9 +692,117 @@ export function getThemeStyle(theme) {
|
|
|
631
692
|
fontWeight: '400',
|
|
632
693
|
zoomSelectionColor: '#E6E1E5',
|
|
633
694
|
shapeFill: '#49454F',
|
|
695
|
+
shapeBorderColor: '#000000',
|
|
634
696
|
rectangleZoomFillColor: '#D0BCFF',
|
|
635
697
|
rectangleZoomFillOpacity: 0.24,
|
|
636
|
-
rectangleZoomBorderColor: '#D0BCFF'
|
|
698
|
+
rectangleZoomBorderColor: '#D0BCFF',
|
|
699
|
+
legendBorderColor: '#000000',
|
|
700
|
+
legendBorderWidth: 0,
|
|
701
|
+
tooltipBorderColor: 'transparent',
|
|
702
|
+
zoomButtonRadius: 30
|
|
703
|
+
};
|
|
704
|
+
break;
|
|
705
|
+
case 'fluent2':
|
|
706
|
+
style = {
|
|
707
|
+
backgroundColor: 'transparent',
|
|
708
|
+
areaBackgroundColor: 'transparent',
|
|
709
|
+
titleFontColor: '#242424',
|
|
710
|
+
subTitleFontColor: '#242424',
|
|
711
|
+
legendTitleFontColor: '#242424',
|
|
712
|
+
legendTextColor: '#242424',
|
|
713
|
+
dataLabelFontColor: '#242424',
|
|
714
|
+
tooltipFontColor: '#242424',
|
|
715
|
+
tooltipFillColor: '#FFFFFF',
|
|
716
|
+
zoomFillColor: '#D1D1D1',
|
|
717
|
+
fontFamily: 'Segoe UI',
|
|
718
|
+
fontSize: '10px',
|
|
719
|
+
fontWeight: '400',
|
|
720
|
+
titleFontSize: '14px',
|
|
721
|
+
subTitleFontSize: '12px',
|
|
722
|
+
legendFontSize: '12px',
|
|
723
|
+
tooltipFillOpacity: 1,
|
|
724
|
+
tooltipTextOpacity: 1,
|
|
725
|
+
labelFontFamily: 'Segoe UI',
|
|
726
|
+
titleFontWeight: '600',
|
|
727
|
+
zoomSelectionColor: '#242424',
|
|
728
|
+
shapeFill: '#E6E6E6',
|
|
729
|
+
shapeBorderColor: '#EBEBEB',
|
|
730
|
+
rectangleZoomFillColor: '#B4D6FA',
|
|
731
|
+
rectangleZoomFillOpacity: 0.25,
|
|
732
|
+
rectangleZoomBorderColor: '#0F6CBD',
|
|
733
|
+
legendBorderColor: '#000000',
|
|
734
|
+
legendBorderWidth: 0,
|
|
735
|
+
tooltipBorderColor: 'transparent',
|
|
736
|
+
zoomButtonRadius: 32
|
|
737
|
+
};
|
|
738
|
+
break;
|
|
739
|
+
case 'fluent2dark':
|
|
740
|
+
style = {
|
|
741
|
+
backgroundColor: 'transparent',
|
|
742
|
+
areaBackgroundColor: 'transparent',
|
|
743
|
+
titleFontColor: '#FFFFFF',
|
|
744
|
+
subTitleFontColor: '#FFFFFF',
|
|
745
|
+
legendTitleFontColor: '#FFFFFF',
|
|
746
|
+
legendTextColor: '#FFFFFF',
|
|
747
|
+
dataLabelFontColor: '#FFFFFF',
|
|
748
|
+
tooltipFontColor: '#FFFFFF',
|
|
749
|
+
tooltipFillColor: '#292929',
|
|
750
|
+
zoomFillColor: '#666',
|
|
751
|
+
fontFamily: 'Segoe UI',
|
|
752
|
+
fontSize: '10px',
|
|
753
|
+
fontWeight: '400',
|
|
754
|
+
titleFontSize: '14px',
|
|
755
|
+
subTitleFontSize: '12px',
|
|
756
|
+
legendFontSize: '12px',
|
|
757
|
+
tooltipFillOpacity: 1,
|
|
758
|
+
tooltipTextOpacity: 1,
|
|
759
|
+
labelFontFamily: 'Segoe UI',
|
|
760
|
+
titleFontWeight: '600',
|
|
761
|
+
zoomSelectionColor: '#FFFFFF',
|
|
762
|
+
shapeFill: '#333333',
|
|
763
|
+
shapeBorderColor: '#000000',
|
|
764
|
+
rectangleZoomFillColor: '#0E4775',
|
|
765
|
+
rectangleZoomFillOpacity: 0.25,
|
|
766
|
+
rectangleZoomBorderColor: '#0E4775',
|
|
767
|
+
legendBorderColor: '#000000',
|
|
768
|
+
legendBorderWidth: 0,
|
|
769
|
+
tooltipBorderColor: 'transparent',
|
|
770
|
+
zoomButtonRadius: 32
|
|
771
|
+
};
|
|
772
|
+
break;
|
|
773
|
+
case 'fluent2highcontrast':
|
|
774
|
+
style = {
|
|
775
|
+
backgroundColor: 'transparent',
|
|
776
|
+
areaBackgroundColor: 'transparent',
|
|
777
|
+
titleFontColor: '#FFFFFF',
|
|
778
|
+
subTitleFontColor: '#FFFFFF',
|
|
779
|
+
legendTitleFontColor: '#FFFFFF',
|
|
780
|
+
legendTextColor: '#FFFFFF',
|
|
781
|
+
dataLabelFontColor: '#FFFFFF',
|
|
782
|
+
tooltipFontColor: '#FFFFFF',
|
|
783
|
+
tooltipFillColor: '#000000',
|
|
784
|
+
zoomFillColor: '#3FF23F',
|
|
785
|
+
fontFamily: 'Segoe UI',
|
|
786
|
+
fontSize: '10px',
|
|
787
|
+
fontWeight: '400',
|
|
788
|
+
titleFontSize: '14px',
|
|
789
|
+
subTitleFontSize: '12px',
|
|
790
|
+
legendFontSize: '12px',
|
|
791
|
+
tooltipFillOpacity: 1,
|
|
792
|
+
tooltipTextOpacity: 1,
|
|
793
|
+
labelFontFamily: 'Segoe UI',
|
|
794
|
+
titleFontWeight: '600',
|
|
795
|
+
zoomSelectionColor: '#FFFFFF',
|
|
796
|
+
zoomBorderColor: '#FFFFFF',
|
|
797
|
+
shapeFill: '#292827',
|
|
798
|
+
shapeBorderColor: '#292827',
|
|
799
|
+
rectangleZoomFillColor: '#1AEBFF',
|
|
800
|
+
rectangleZoomFillOpacity: 0.25,
|
|
801
|
+
rectangleZoomBorderColor: '#1AEBFF',
|
|
802
|
+
legendBorderColor: '#FFFFFF',
|
|
803
|
+
legendBorderWidth: 1,
|
|
804
|
+
tooltipBorderColor: '#FFF',
|
|
805
|
+
zoomButtonRadius: 32
|
|
637
806
|
};
|
|
638
807
|
break;
|
|
639
808
|
default:
|
|
@@ -652,13 +821,19 @@ export function getThemeStyle(theme) {
|
|
|
652
821
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
653
822
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
654
823
|
fontSize: '12px',
|
|
824
|
+
legendFontSize: '12px',
|
|
655
825
|
fontWeight: 'Medium',
|
|
656
826
|
titleFontWeight: 'Medium',
|
|
657
827
|
zoomSelectionColor: '#e61576',
|
|
658
828
|
shapeFill: '#A6A6A6',
|
|
829
|
+
shapeBorderColor: '#000000',
|
|
659
830
|
rectangleZoomFillColor: '#d3d3d3',
|
|
660
831
|
rectangleZoomFillOpacity: 0.5,
|
|
661
|
-
rectangleZoomBorderColor: '#009900'
|
|
832
|
+
rectangleZoomBorderColor: '#009900',
|
|
833
|
+
legendBorderColor: '#000000',
|
|
834
|
+
legendBorderWidth: 0,
|
|
835
|
+
tooltipBorderColor: 'transparent',
|
|
836
|
+
zoomButtonRadius: 30
|
|
662
837
|
};
|
|
663
838
|
break;
|
|
664
839
|
}
|
|
@@ -245,8 +245,17 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
245
245
|
|| _this.maps.themeStyle.fontWeight;
|
|
246
246
|
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
247
247
|
|| _this.maps.themeStyle.tooltipTextOpacity;
|
|
248
|
+
var borderObject = isPolygon ? {
|
|
249
|
+
color: polygonTooltipOption.border.color ||
|
|
250
|
+
_this.maps.themeStyle.tooltipBorderColor, width: polygonTooltipOption.border.width,
|
|
251
|
+
opacity: polygonTooltipOption.border.opacity
|
|
252
|
+
} : {
|
|
253
|
+
color: option.border.color ||
|
|
254
|
+
_this.maps.themeStyle.tooltipBorderColor, width: option.border.width, opacity: option.border.opacity
|
|
255
|
+
};
|
|
248
256
|
if (tooltipArgs.cancel) {
|
|
249
257
|
_this.svgTooltip = new Tooltip({
|
|
258
|
+
theme: _this.maps.theme,
|
|
250
259
|
enable: true,
|
|
251
260
|
header: '',
|
|
252
261
|
data: option['data'],
|
|
@@ -261,11 +270,12 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
261
270
|
availableSize: _this.maps.availableSize,
|
|
262
271
|
fill: option.fill || _this.maps.themeStyle.tooltipFillColor,
|
|
263
272
|
enableShadow: true,
|
|
264
|
-
border:
|
|
273
|
+
border: borderObject
|
|
265
274
|
});
|
|
266
275
|
}
|
|
267
276
|
else {
|
|
268
277
|
_this.svgTooltip = new Tooltip({
|
|
278
|
+
theme: _this.maps.theme,
|
|
269
279
|
enable: true,
|
|
270
280
|
header: '',
|
|
271
281
|
data: tooltipArgs.options['data'],
|
|
@@ -280,7 +290,7 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
280
290
|
availableSize: _this.maps.availableSize,
|
|
281
291
|
fill: tooltipArgs.fill || _this.maps.themeStyle.tooltipFillColor,
|
|
282
292
|
enableShadow: true,
|
|
283
|
-
border:
|
|
293
|
+
border: borderObject
|
|
284
294
|
});
|
|
285
295
|
}
|
|
286
296
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -42,10 +42,8 @@ var Zoom = /** @class */ (function () {
|
|
|
42
42
|
this.maps = maps;
|
|
43
43
|
this.wheelEvent = this.browserName === 'mozilla' ? (this.isPointer ? 'mousewheel' : 'DOMMouseScroll') : 'mousewheel';
|
|
44
44
|
this.cancelEvent = this.isPointer ? 'pointerleave' : 'mouseleave';
|
|
45
|
-
this.selectionColor = this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor
|
|
46
|
-
|
|
47
|
-
this.fillColor = this.maps.zoomSettings.toolbarSettings.buttonSettings.color == null ? this.maps.zoomSettings.color :
|
|
48
|
-
this.maps.zoomSettings.toolbarSettings.buttonSettings.color;
|
|
45
|
+
this.selectionColor = this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor;
|
|
46
|
+
this.fillColor = this.maps.zoomSettings.toolbarSettings.buttonSettings.color;
|
|
49
47
|
this.addEventListener();
|
|
50
48
|
}
|
|
51
49
|
/**
|
|
@@ -547,7 +545,9 @@ var Zoom = /** @class */ (function () {
|
|
|
547
545
|
var markerData = polygonSettings.points;
|
|
548
546
|
var path = calculatePolygonPath(maps, maps.tileZoomLevel, _this.currentLayer, markerData);
|
|
549
547
|
var element = document.getElementById(maps.element.id + '_LayerIndex_' + _this.index + '_PolygonIndex_' + polygonIndex);
|
|
550
|
-
element
|
|
548
|
+
if (!isNullOrUndefined(element)) {
|
|
549
|
+
element.setAttribute('d', path);
|
|
550
|
+
}
|
|
551
551
|
});
|
|
552
552
|
document.getElementById(maps.element.id + '_LayerIndex_' + this_1.index + '_Polygons_Group').style.visibility = '';
|
|
553
553
|
}
|
|
@@ -1041,19 +1041,6 @@ var Zoom = /** @class */ (function () {
|
|
|
1041
1041
|
var templateOffset = element.getBoundingClientRect();
|
|
1042
1042
|
element.style.left = ((location_2.x - (templateOffset.width / 2)) + marker.offset.x) + 'px';
|
|
1043
1043
|
element.style.top = ((location_2.y - (templateOffset.height / 2)) + marker.offset.y) + 'px';
|
|
1044
|
-
if (this.maps.layers[this.maps.baseLayerIndex].layerType === 'GoogleStaticMap') {
|
|
1045
|
-
var staticMapOffset = getElementByID(this.maps.element.id + '_StaticGoogleMap').getBoundingClientRect();
|
|
1046
|
-
var staticMapOffsetWidth = 640;
|
|
1047
|
-
if (element['style']['display'] !== 'none') {
|
|
1048
|
-
if ((staticMapOffset['x'] > templateOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < templateOffset['x'] + templateOffset['width'])
|
|
1049
|
-
&& (staticMapOffset['y'] > templateOffset['y'] || staticMapOffset['y'] + staticMapOffset['height'] < templateOffset['y'] + templateOffset['height'])) {
|
|
1050
|
-
element.style.display = 'none';
|
|
1051
|
-
}
|
|
1052
|
-
else if ((staticMapOffset['x'] > templateOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < templateOffset['x'] + templateOffset['width'])) {
|
|
1053
|
-
element.style.display = 'none';
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
1044
|
}
|
|
1058
1045
|
else {
|
|
1059
1046
|
location_2.x += marker.offset.x;
|
|
@@ -1336,44 +1323,44 @@ var Zoom = /** @class */ (function () {
|
|
|
1336
1323
|
var toolbar = map.zoomSettings.toolbarSettings;
|
|
1337
1324
|
var button = map.zoomSettings.toolbarSettings.buttonSettings;
|
|
1338
1325
|
this.maps.toolbarProperties = {
|
|
1339
|
-
toolBarOrientation: toolbar.orientation
|
|
1340
|
-
highlightColor: button.highlightColor
|
|
1341
|
-
selectionColor: button.selectionColor
|
|
1342
|
-
horizontalAlignment: toolbar.horizontalAlignment
|
|
1343
|
-
verticalAlignment: toolbar.verticalAlignment
|
|
1344
|
-
color: button.color
|
|
1345
|
-
shapeOpacity: button.opacity
|
|
1346
|
-
borderOpacity: button.borderOpacity
|
|
1326
|
+
toolBarOrientation: toolbar.orientation,
|
|
1327
|
+
highlightColor: button.highlightColor,
|
|
1328
|
+
selectionColor: button.selectionColor,
|
|
1329
|
+
horizontalAlignment: toolbar.horizontalAlignment,
|
|
1330
|
+
verticalAlignment: toolbar.verticalAlignment,
|
|
1331
|
+
color: button.color,
|
|
1332
|
+
shapeOpacity: button.opacity,
|
|
1333
|
+
borderOpacity: button.borderOpacity
|
|
1347
1334
|
};
|
|
1348
|
-
var
|
|
1349
|
-
var
|
|
1350
|
-
var
|
|
1335
|
+
var buttonRadius = button.radius || map.themeStyle.zoomButtonRadius;
|
|
1336
|
+
var cx = buttonRadius / 4;
|
|
1337
|
+
var cy = buttonRadius / 4;
|
|
1338
|
+
var radius = buttonRadius / 2;
|
|
1351
1339
|
var padding = button.padding;
|
|
1352
1340
|
var orientation = this.maps.toolbarProperties.toolBarOrientation;
|
|
1353
1341
|
var toolbarCollection = map.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map(function (value) { return value; });
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
ySpacing = (button.radius / 4) + (button.borderWidth / 2) + padding;
|
|
1342
|
+
xSpacing = (buttonRadius / 4) + (button.borderWidth / 2) + padding;
|
|
1343
|
+
ySpacing = (buttonRadius / 4) + (button.borderWidth / 2) + padding;
|
|
1357
1344
|
var shadowElement = '<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';
|
|
1358
1345
|
shadowElement += '<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>';
|
|
1359
1346
|
shadowElement += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';
|
|
1360
1347
|
var toolBarLength = toolbarCollection.length;
|
|
1361
|
-
var toolWidth = (orientation === 'Horizontal') ? ((toolBarLength *
|
|
1362
|
-
var toolHeight = (orientation === 'Horizontal') ? (
|
|
1348
|
+
var toolWidth = (orientation === 'Horizontal') ? ((toolBarLength * buttonRadius) + (toolBarLength * padding) + padding + (toolBarLength * button.borderWidth)) : (buttonRadius + button.borderWidth + (2 * padding));
|
|
1349
|
+
var toolHeight = (orientation === 'Horizontal') ? (buttonRadius + button.borderWidth + (2 * padding)) : ((toolBarLength * buttonRadius) + (toolBarLength * padding) + padding + (toolBarLength * button.borderWidth));
|
|
1363
1350
|
var defElement = map.renderer.createDefs();
|
|
1364
1351
|
defElement.innerHTML = shadowElement;
|
|
1365
1352
|
this.toolBarGroup.appendChild(defElement);
|
|
1366
1353
|
var outerElement = map.renderer.drawRectangle(new RectOption(map.element.id + '_Zooming_Rect', toolbar.backgroundColor, { color: toolbar.borderColor, width: toolbar.borderWidth, opacity: toolbar.borderOpacity }, toolbar.borderOpacity, new Rect((toolbar.borderWidth / 2), (toolbar.borderWidth / 2), (toolWidth - toolbar.borderWidth), (toolHeight - toolbar.borderWidth)), 0, 0));
|
|
1367
1354
|
this.toolBarGroup.appendChild(outerElement);
|
|
1368
|
-
var scaleX = (
|
|
1369
|
-
for (var i = 0; i <
|
|
1355
|
+
var scaleX = (buttonRadius - (button.borderWidth / 2)) / 30;
|
|
1356
|
+
for (var i = 0; i < toolbarCollection.length; i++) {
|
|
1370
1357
|
if (i !== 0) {
|
|
1371
|
-
xSpacing = (map.toolbarProperties.toolBarOrientation === 'Horizontal') ? (xSpacing + (
|
|
1372
|
-
ySpacing = (map.toolbarProperties.toolBarOrientation === 'Horizontal') ? ySpacing : (ySpacing + (
|
|
1358
|
+
xSpacing = (map.toolbarProperties.toolBarOrientation === 'Horizontal') ? (xSpacing + (buttonRadius + padding) + button.borderWidth) : xSpacing;
|
|
1359
|
+
ySpacing = (map.toolbarProperties.toolBarOrientation === 'Horizontal') ? ySpacing : (ySpacing + (buttonRadius + padding) + button.borderWidth);
|
|
1373
1360
|
}
|
|
1374
|
-
var toolbar_1 =
|
|
1361
|
+
var toolbar_1 = toolbarCollection[i];
|
|
1375
1362
|
var pathStroke = !isNullOrUndefined(this.maps.toolbarProperties.color) ? this.maps.toolbarProperties.color : this.maps.themeStyle.zoomFillColor;
|
|
1376
|
-
var borderColor = button.borderColor || this.maps.themeStyle.zoomFillColor;
|
|
1363
|
+
var borderColor = button.borderColor || (this.maps.themeStyle.zoomBorderColor || this.maps.themeStyle.zoomFillColor);
|
|
1377
1364
|
this.currentToolbarEle = map.renderer.createGroup({
|
|
1378
1365
|
id: map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Group',
|
|
1379
1366
|
transform: 'translate( ' + xSpacing + ' ' + ySpacing + ' ) '
|
package/src/maps/utils/enum.d.ts
CHANGED
|
@@ -48,7 +48,13 @@ export declare type MapsTheme =
|
|
|
48
48
|
/** Renders a map with material3 theme. */
|
|
49
49
|
'Material3' |
|
|
50
50
|
/** Renders a map with material3dark theme. */
|
|
51
|
-
'Material3Dark'
|
|
51
|
+
'Material3Dark' |
|
|
52
|
+
/** Renders a map with fluent2 theme. */
|
|
53
|
+
'Fluent2' |
|
|
54
|
+
/** Renders a map with fluent2 dark theme. */
|
|
55
|
+
'Fluent2Dark' |
|
|
56
|
+
/** Renders a map with fluent2 high contrast theme. */
|
|
57
|
+
'Fluent2HighContrast';
|
|
52
58
|
/**
|
|
53
59
|
* Defines the position of the legend.
|
|
54
60
|
*/
|
|
@@ -110,30 +116,6 @@ export declare type LegendMode =
|
|
|
110
116
|
'Default' |
|
|
111
117
|
/** Set the legend as interactive, which is rectangular in shape with an indicator showcasing legend items. */
|
|
112
118
|
'Interactive';
|
|
113
|
-
/**
|
|
114
|
-
* Defines the type of the layer to be rendered in the maps.
|
|
115
|
-
*/
|
|
116
|
-
export declare type ShapeLayerType =
|
|
117
|
-
/**
|
|
118
|
-
* Defines that the geometry shapes will be rendered as map layer.
|
|
119
|
-
*/
|
|
120
|
-
'Geometry' |
|
|
121
|
-
/**
|
|
122
|
-
* Defines that the OpenStreetMap will be rendered as map layer.
|
|
123
|
-
*/
|
|
124
|
-
'OSM' |
|
|
125
|
-
/**
|
|
126
|
-
* Defines that the Bing maps will be rendered as map layer.
|
|
127
|
-
*/
|
|
128
|
-
'Bing' |
|
|
129
|
-
/**
|
|
130
|
-
* Defines that the Google static map will be rendered as map layer.
|
|
131
|
-
*/
|
|
132
|
-
'GoogleStaticMap' |
|
|
133
|
-
/**
|
|
134
|
-
* Defines that Google map will be rendered as map layer.
|
|
135
|
-
*/
|
|
136
|
-
'Google';
|
|
137
119
|
/**
|
|
138
120
|
* Defines the type of the layer in maps.
|
|
139
121
|
*/
|
|
@@ -194,34 +176,6 @@ export declare type ProjectionType =
|
|
|
194
176
|
'AitOff' |
|
|
195
177
|
/** Specifies the maps to be rendered in Equirectangular projection type. */
|
|
196
178
|
'Equirectangular';
|
|
197
|
-
/**
|
|
198
|
-
* Defines the type of Bing map to be rendered in the maps.
|
|
199
|
-
*/
|
|
200
|
-
export declare type BingMapType =
|
|
201
|
-
/** Defines the maps to render Bing map layer with aerial type. */
|
|
202
|
-
'Aerial' |
|
|
203
|
-
/** Defines the maps to render Bing map layer with aerial type with label over the regions. */
|
|
204
|
-
'AerialWithLabel' |
|
|
205
|
-
/** Defines the maps to render Bing map layer with road maps. */
|
|
206
|
-
'Road' |
|
|
207
|
-
/** Defines the maps to render a dark version of the road maps. */
|
|
208
|
-
'CanvasDark' |
|
|
209
|
-
/** Defines the maps to render a lighter version of the road maps. */
|
|
210
|
-
'CanvasLight' |
|
|
211
|
-
/** Defines the maps to render a grayscale version of the road maps. */
|
|
212
|
-
'CanvasGray';
|
|
213
|
-
/**
|
|
214
|
-
* Defines the type of the Google static map to be rendered in the maps.
|
|
215
|
-
*/
|
|
216
|
-
export declare type StaticMapType =
|
|
217
|
-
/** Specifies the maps to render Google static map layer with road map. */
|
|
218
|
-
'RoadMap' |
|
|
219
|
-
/** Specifies the maps to render Google static map layer with terrain type. */
|
|
220
|
-
'Terrain' |
|
|
221
|
-
/** Specifies the maps to render Google static map layer with satellite type. */
|
|
222
|
-
'Satellite' |
|
|
223
|
-
/** Specifies the maps to render the Google static map with hybrid type. */
|
|
224
|
-
'Hybrid';
|
|
225
179
|
/**
|
|
226
180
|
* Defines the zooming tool bar orientation.
|
|
227
181
|
*/
|
package/src/maps/utils/helper.js
CHANGED
|
@@ -225,18 +225,20 @@ export function convertGeoToPoint(latitude, longitude, factor, layer, mapModel)
|
|
|
225
225
|
*/
|
|
226
226
|
export function calculatePolygonPath(maps, factor, currentLayer, markerData) {
|
|
227
227
|
var path = '';
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
228
|
+
if (!isNullOrUndefined(markerData) && markerData.length > 1) {
|
|
229
|
+
Array.prototype.forEach.call(markerData, function (data, dataIndex) {
|
|
230
|
+
var lat = data.latitude;
|
|
231
|
+
var lng = data.longitude;
|
|
232
|
+
var location = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
|
|
233
|
+
if (dataIndex === 0) {
|
|
234
|
+
path += 'M ' + location.x + ' ' + location.y;
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
path += ' L ' + location.x + ' ' + location.y;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
path += ' z ';
|
|
241
|
+
}
|
|
240
242
|
return path;
|
|
241
243
|
}
|
|
242
244
|
/**
|
|
@@ -1432,15 +1434,6 @@ export function markerTemplate(eventArgs, templateFn, markerID, data, markerInde
|
|
|
1432
1434
|
markerElement.style.left = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x - maps.mapAreaRect.x + 'px';
|
|
1433
1435
|
markerElement.style.top = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y - maps.mapAreaRect.y + 'px';
|
|
1434
1436
|
markerTemplate.appendChild(markerElement);
|
|
1435
|
-
if (maps.layers[maps.baseLayerIndex].layerType === 'GoogleStaticMap') {
|
|
1436
|
-
var staticMapOffset = getElementByID(maps.element.id + '_StaticGoogleMap').getBoundingClientRect();
|
|
1437
|
-
var markerElementOffset = markerElement.getBoundingClientRect();
|
|
1438
|
-
var staticMapOffsetWidth = 640;
|
|
1439
|
-
if ((staticMapOffset['x'] > markerElementOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < markerElementOffset['x'] + markerElementOffset['width'])
|
|
1440
|
-
&& (staticMapOffset['y'] > markerElementOffset['y'] || staticMapOffset['y'] + staticMapOffset['height'] < markerElementOffset['y'] + markerElementOffset['height'])) {
|
|
1441
|
-
markerElement.style.display = 'none';
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
1437
|
}
|
|
1445
1438
|
return markerTemplate;
|
|
1446
1439
|
}
|
|
@@ -1865,7 +1858,7 @@ export function getFieldData(dataSource, fields) {
|
|
|
1865
1858
|
export function checkShapeDataFields(dataSource, properties, dataPath, propertyPath,
|
|
1866
1859
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1867
1860
|
layer) {
|
|
1868
|
-
if (!(isNullOrUndefined(properties))) {
|
|
1861
|
+
if (!(isNullOrUndefined(properties)) && !isNullOrUndefined(dataSource)) {
|
|
1869
1862
|
for (var i = 0; i < dataSource.length; i++) {
|
|
1870
1863
|
var shapeDataPath = ((dataPath.indexOf('.') > -1) ? getValueFromObject(dataSource[i], dataPath) :
|
|
1871
1864
|
dataSource[i][dataPath]);
|
|
@@ -2489,8 +2482,7 @@ export function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2489
2482
|
*/
|
|
2490
2483
|
export function fixInitialScaleForTile(map) {
|
|
2491
2484
|
map.tileZoomScale = map.tileZoomLevel = Math.floor(map.availableSize.height / 512) + 1;
|
|
2492
|
-
var padding =
|
|
2493
|
-
20 : 0;
|
|
2485
|
+
var padding = 20;
|
|
2494
2486
|
var totalSize = Math.pow(2, map.tileZoomLevel) * 256;
|
|
2495
2487
|
map.tileTranslatePoint.x = (map.availableSize.width / 2) - (totalSize / 2);
|
|
2496
2488
|
map.tileTranslatePoint.y = (map.availableSize.height / 2) - (totalSize / 2) + padding;
|