@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Fetch, Internationalization, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, compile, createElement, extend, isNullOrUndefined, merge, print, remove, setValue } from '@syncfusion/ej2-base';
|
|
2
2
|
import { SvgRenderer, Tooltip } from '@syncfusion/ej2-svg-base';
|
|
3
3
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
4
4
|
import { PdfBitmap, PdfDocument, PdfPageOrientation } from '@syncfusion/ej2-pdf-export';
|
|
@@ -775,7 +775,7 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
|
|
|
775
775
|
}
|
|
776
776
|
else if (shape === 'Image') {
|
|
777
777
|
x = location.x - (size.width / 2);
|
|
778
|
-
y = location.y - (size.height / 2);
|
|
778
|
+
y = location.y - (markerID.indexOf('cluster') > -1 ? (size.height / 2) : size.height);
|
|
779
779
|
merge(pathOptions, { 'href': imageUrl, 'height': size.height, 'width': size.width, x: x, y: y });
|
|
780
780
|
markerEle = maps.renderer.drawImage(pathOptions);
|
|
781
781
|
}
|
|
@@ -2319,13 +2319,16 @@ function getTemplateFunction(template, maps) {
|
|
|
2319
2319
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2320
2320
|
let templateFn = null;
|
|
2321
2321
|
try {
|
|
2322
|
-
if (document.querySelectorAll(template).length) {
|
|
2322
|
+
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
2323
2323
|
templateFn = compile(document.querySelector(template).innerHTML.trim());
|
|
2324
2324
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2325
2325
|
}
|
|
2326
2326
|
else if (maps.isVue || maps.isVue3) {
|
|
2327
2327
|
templateFn = compile(template);
|
|
2328
2328
|
}
|
|
2329
|
+
else if (typeof template === 'function') {
|
|
2330
|
+
templateFn = compile(template);
|
|
2331
|
+
}
|
|
2329
2332
|
}
|
|
2330
2333
|
catch (e) {
|
|
2331
2334
|
templateFn = compile(template);
|
|
@@ -3517,6 +3520,14 @@ function getShapeColor(theme) {
|
|
|
3517
3520
|
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
3518
3521
|
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
3519
3522
|
break;
|
|
3523
|
+
case 'material3':
|
|
3524
|
+
themePalette = ['#6200EE', '#E77A16', '#82C100', '#7107DC', '#05BB3D',
|
|
3525
|
+
'#D21020', '#FAD200', '#0085FF', '#9204EA', '#08EE9B'];
|
|
3526
|
+
break;
|
|
3527
|
+
case 'material3dark':
|
|
3528
|
+
themePalette = ['#4EAAFF', '#FA4EAB', '#FFF500', '#17EA58', '#38FFE7',
|
|
3529
|
+
'#FF9E45', '#B3F32F', '#B93CE4', '#FC5664', '#9B55FF'];
|
|
3530
|
+
break;
|
|
3520
3531
|
default:
|
|
3521
3532
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
3522
3533
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -3665,9 +3676,14 @@ function getThemeStyle(theme) {
|
|
|
3665
3676
|
zoomFillColor: '#FFFFFF',
|
|
3666
3677
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3667
3678
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3679
|
+
fontSize: '12px',
|
|
3680
|
+
fontWeight: 'Medium',
|
|
3668
3681
|
titleFontWeight: 'Medium',
|
|
3669
3682
|
zoomSelectionColor: '#e61576',
|
|
3670
|
-
shapeFill: '#A6A6A6'
|
|
3683
|
+
shapeFill: '#A6A6A6',
|
|
3684
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3685
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3686
|
+
rectangleZoomBorderColor: "#009900"
|
|
3671
3687
|
};
|
|
3672
3688
|
break;
|
|
3673
3689
|
case 'highcontrast':
|
|
@@ -3684,10 +3700,15 @@ function getThemeStyle(theme) {
|
|
|
3684
3700
|
tooltipFillColor: '#ffffff',
|
|
3685
3701
|
zoomFillColor: '#FFFFFF',
|
|
3686
3702
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3703
|
+
fontSize: '12px',
|
|
3704
|
+
fontWeight: 'Medium',
|
|
3687
3705
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3688
3706
|
titleFontWeight: 'Medium',
|
|
3689
3707
|
zoomSelectionColor: '#e61576',
|
|
3690
|
-
shapeFill: '#A6A6A6'
|
|
3708
|
+
shapeFill: '#A6A6A6',
|
|
3709
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3710
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3711
|
+
rectangleZoomBorderColor: "#009900"
|
|
3691
3712
|
};
|
|
3692
3713
|
break;
|
|
3693
3714
|
case 'bootstrap4':
|
|
@@ -3703,6 +3724,8 @@ function getThemeStyle(theme) {
|
|
|
3703
3724
|
tooltipFillColor: '#000000',
|
|
3704
3725
|
zoomFillColor: '#5B6269',
|
|
3705
3726
|
fontFamily: 'HelveticaNeue-Medium',
|
|
3727
|
+
fontSize: '12px',
|
|
3728
|
+
fontWeight: 'Medium',
|
|
3706
3729
|
titleFontSize: '16px',
|
|
3707
3730
|
legendFontSize: '14px',
|
|
3708
3731
|
tooltipFillOpacity: 1,
|
|
@@ -3710,7 +3733,10 @@ function getThemeStyle(theme) {
|
|
|
3710
3733
|
labelFontFamily: 'HelveticaNeue-Medium',
|
|
3711
3734
|
titleFontWeight: 'Medium',
|
|
3712
3735
|
zoomSelectionColor: '#e61576',
|
|
3713
|
-
shapeFill: '#A6A6A6'
|
|
3736
|
+
shapeFill: '#A6A6A6',
|
|
3737
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3738
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3739
|
+
rectangleZoomBorderColor: "#009900"
|
|
3714
3740
|
};
|
|
3715
3741
|
break;
|
|
3716
3742
|
case 'tailwind':
|
|
@@ -3726,6 +3752,8 @@ function getThemeStyle(theme) {
|
|
|
3726
3752
|
tooltipFillColor: '#111827',
|
|
3727
3753
|
zoomFillColor: '#6b7280',
|
|
3728
3754
|
fontFamily: 'Inter',
|
|
3755
|
+
fontSize: '12px',
|
|
3756
|
+
fontWeight: 'Medium',
|
|
3729
3757
|
titleFontSize: '14px',
|
|
3730
3758
|
legendFontSize: '12px',
|
|
3731
3759
|
tooltipFillOpacity: 1,
|
|
@@ -3733,7 +3761,10 @@ function getThemeStyle(theme) {
|
|
|
3733
3761
|
labelFontFamily: 'Inter',
|
|
3734
3762
|
titleFontWeight: '500',
|
|
3735
3763
|
zoomSelectionColor: '#374151',
|
|
3736
|
-
shapeFill: '#E5E7EB'
|
|
3764
|
+
shapeFill: '#E5E7EB',
|
|
3765
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3766
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3767
|
+
rectangleZoomBorderColor: "#009900"
|
|
3737
3768
|
};
|
|
3738
3769
|
break;
|
|
3739
3770
|
case 'tailwinddark':
|
|
@@ -3749,6 +3780,8 @@ function getThemeStyle(theme) {
|
|
|
3749
3780
|
tooltipFillColor: '#F9FAFB',
|
|
3750
3781
|
zoomFillColor: '#D1D5DB',
|
|
3751
3782
|
fontFamily: 'Inter',
|
|
3783
|
+
fontSize: '12px',
|
|
3784
|
+
fontWeight: 'Medium',
|
|
3752
3785
|
titleFontSize: '14px',
|
|
3753
3786
|
legendFontSize: '12px',
|
|
3754
3787
|
tooltipFillOpacity: 1,
|
|
@@ -3756,7 +3789,10 @@ function getThemeStyle(theme) {
|
|
|
3756
3789
|
labelFontFamily: 'Inter',
|
|
3757
3790
|
titleFontWeight: '500',
|
|
3758
3791
|
zoomSelectionColor: '#F3F4F6',
|
|
3759
|
-
shapeFill: '#374151'
|
|
3792
|
+
shapeFill: '#374151',
|
|
3793
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3794
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3795
|
+
rectangleZoomBorderColor: "#009900"
|
|
3760
3796
|
};
|
|
3761
3797
|
break;
|
|
3762
3798
|
case 'bootstrap5':
|
|
@@ -3772,6 +3808,8 @@ function getThemeStyle(theme) {
|
|
|
3772
3808
|
tooltipFillColor: '#212529',
|
|
3773
3809
|
zoomFillColor: '#6C757D',
|
|
3774
3810
|
fontFamily: 'Helvetica Neue',
|
|
3811
|
+
fontSize: '12px',
|
|
3812
|
+
fontWeight: 'Medium',
|
|
3775
3813
|
titleFontSize: '14px',
|
|
3776
3814
|
legendFontSize: '12px',
|
|
3777
3815
|
tooltipFillOpacity: 1,
|
|
@@ -3779,7 +3817,10 @@ function getThemeStyle(theme) {
|
|
|
3779
3817
|
labelFontFamily: 'Helvetica Neue',
|
|
3780
3818
|
titleFontWeight: 'normal',
|
|
3781
3819
|
zoomSelectionColor: '#343A40',
|
|
3782
|
-
shapeFill: '#E9ECEF'
|
|
3820
|
+
shapeFill: '#E9ECEF',
|
|
3821
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3822
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3823
|
+
rectangleZoomBorderColor: "#009900"
|
|
3783
3824
|
};
|
|
3784
3825
|
break;
|
|
3785
3826
|
case 'bootstrap5dark':
|
|
@@ -3795,6 +3836,8 @@ function getThemeStyle(theme) {
|
|
|
3795
3836
|
tooltipFillColor: '#E9ECEF',
|
|
3796
3837
|
zoomFillColor: '#B5BABE',
|
|
3797
3838
|
fontFamily: 'Helvetica Neue',
|
|
3839
|
+
fontSize: '12px',
|
|
3840
|
+
fontWeight: 'Medium',
|
|
3798
3841
|
titleFontSize: '14px',
|
|
3799
3842
|
legendFontSize: '12px',
|
|
3800
3843
|
tooltipFillOpacity: 1,
|
|
@@ -3802,7 +3845,10 @@ function getThemeStyle(theme) {
|
|
|
3802
3845
|
labelFontFamily: 'Helvetica Neue',
|
|
3803
3846
|
titleFontWeight: 'normal',
|
|
3804
3847
|
zoomSelectionColor: '#DEE2E6',
|
|
3805
|
-
shapeFill: '#495057'
|
|
3848
|
+
shapeFill: '#495057',
|
|
3849
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3850
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3851
|
+
rectangleZoomBorderColor: "#009900"
|
|
3806
3852
|
};
|
|
3807
3853
|
break;
|
|
3808
3854
|
case 'fluent':
|
|
@@ -3818,6 +3864,8 @@ function getThemeStyle(theme) {
|
|
|
3818
3864
|
tooltipFillColor: '#FFFFFF',
|
|
3819
3865
|
zoomFillColor: '#A19F9D',
|
|
3820
3866
|
fontFamily: 'Segoe UI',
|
|
3867
|
+
fontSize: '12px',
|
|
3868
|
+
fontWeight: 'Medium',
|
|
3821
3869
|
titleFontSize: '14px',
|
|
3822
3870
|
legendFontSize: '12px',
|
|
3823
3871
|
tooltipFillOpacity: 1,
|
|
@@ -3825,7 +3873,10 @@ function getThemeStyle(theme) {
|
|
|
3825
3873
|
labelFontFamily: 'Segoe UI',
|
|
3826
3874
|
titleFontWeight: '600',
|
|
3827
3875
|
zoomSelectionColor: '#323130',
|
|
3828
|
-
shapeFill: '#F3F2F1'
|
|
3876
|
+
shapeFill: '#F3F2F1',
|
|
3877
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3878
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3879
|
+
rectangleZoomBorderColor: "#009900"
|
|
3829
3880
|
};
|
|
3830
3881
|
break;
|
|
3831
3882
|
case 'fluentdark':
|
|
@@ -3841,6 +3892,8 @@ function getThemeStyle(theme) {
|
|
|
3841
3892
|
tooltipFillColor: '#252423',
|
|
3842
3893
|
zoomFillColor: '#484644',
|
|
3843
3894
|
fontFamily: 'Segoe UI',
|
|
3895
|
+
fontSize: '12px',
|
|
3896
|
+
fontWeight: 'Medium',
|
|
3844
3897
|
titleFontSize: '14px',
|
|
3845
3898
|
legendFontSize: '12px',
|
|
3846
3899
|
tooltipFillOpacity: 1,
|
|
@@ -3848,7 +3901,68 @@ function getThemeStyle(theme) {
|
|
|
3848
3901
|
labelFontFamily: 'Segoe UI',
|
|
3849
3902
|
titleFontWeight: '600',
|
|
3850
3903
|
zoomSelectionColor: '#F3F2F1',
|
|
3851
|
-
shapeFill: '#252423'
|
|
3904
|
+
shapeFill: '#252423',
|
|
3905
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3906
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3907
|
+
rectangleZoomBorderColor: "#009900"
|
|
3908
|
+
};
|
|
3909
|
+
break;
|
|
3910
|
+
case 'material3':
|
|
3911
|
+
style = {
|
|
3912
|
+
backgroundColor: 'transparent',
|
|
3913
|
+
areaBackgroundColor: 'transparent',
|
|
3914
|
+
titleFontColor: '#1C1B1F',
|
|
3915
|
+
subTitleFontColor: '#1C1B1F',
|
|
3916
|
+
legendTitleFontColor: '#1C1B1F',
|
|
3917
|
+
legendTextColor: '#49454E',
|
|
3918
|
+
dataLabelFontColor: '#1C1B1F',
|
|
3919
|
+
tooltipFontColor: '#F4EFF4',
|
|
3920
|
+
tooltipFillColor: '#313033',
|
|
3921
|
+
zoomFillColor: '#49454E',
|
|
3922
|
+
fontFamily: 'Roboto',
|
|
3923
|
+
fontSize: '14px',
|
|
3924
|
+
titleFontSize: '16px',
|
|
3925
|
+
subTitleFontSize: '14px',
|
|
3926
|
+
legendFontSize: '12px',
|
|
3927
|
+
tooltipFillOpacity: 1,
|
|
3928
|
+
tooltipTextOpacity: 1,
|
|
3929
|
+
labelFontFamily: 'Roboto',
|
|
3930
|
+
titleFontWeight: '500',
|
|
3931
|
+
fontWeight: '400',
|
|
3932
|
+
zoomSelectionColor: '#49454E',
|
|
3933
|
+
shapeFill: '#E7E0EC',
|
|
3934
|
+
rectangleZoomFillColor: '#6750A4',
|
|
3935
|
+
rectangleZoomFillOpacity: 0.24,
|
|
3936
|
+
rectangleZoomBorderColor: "#6750A4"
|
|
3937
|
+
};
|
|
3938
|
+
break;
|
|
3939
|
+
case 'material3dark':
|
|
3940
|
+
style = {
|
|
3941
|
+
backgroundColor: 'transparent',
|
|
3942
|
+
areaBackgroundColor: 'transparent',
|
|
3943
|
+
titleFontColor: '#E6E1E5',
|
|
3944
|
+
subTitleFontColor: '#E6E1E5',
|
|
3945
|
+
legendTitleFontColor: '#E6E1E5',
|
|
3946
|
+
legendTextColor: '#CAC4D0',
|
|
3947
|
+
dataLabelFontColor: '#E6E1E5',
|
|
3948
|
+
tooltipFontColor: '#313033',
|
|
3949
|
+
tooltipFillColor: '#E6E1E5',
|
|
3950
|
+
zoomFillColor: '#E6E1E5',
|
|
3951
|
+
fontFamily: 'Roboto',
|
|
3952
|
+
fontSize: '14px',
|
|
3953
|
+
titleFontSize: '16px',
|
|
3954
|
+
subTitleFontSize: '14px',
|
|
3955
|
+
legendFontSize: '12px',
|
|
3956
|
+
tooltipFillOpacity: 1,
|
|
3957
|
+
tooltipTextOpacity: 1,
|
|
3958
|
+
labelFontFamily: 'Roboto',
|
|
3959
|
+
titleFontWeight: '500',
|
|
3960
|
+
fontWeight: '400',
|
|
3961
|
+
zoomSelectionColor: '#E6E1E5',
|
|
3962
|
+
shapeFill: '#49454F',
|
|
3963
|
+
rectangleZoomFillColor: '#D0BCFF',
|
|
3964
|
+
rectangleZoomFillOpacity: 0.24,
|
|
3965
|
+
rectangleZoomBorderColor: "#D0BCFF"
|
|
3852
3966
|
};
|
|
3853
3967
|
break;
|
|
3854
3968
|
default:
|
|
@@ -3866,9 +3980,14 @@ function getThemeStyle(theme) {
|
|
|
3866
3980
|
zoomFillColor: '#737373',
|
|
3867
3981
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3868
3982
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3983
|
+
fontSize: '12px',
|
|
3984
|
+
fontWeight: 'Medium',
|
|
3869
3985
|
titleFontWeight: 'Medium',
|
|
3870
3986
|
zoomSelectionColor: '#e61576',
|
|
3871
|
-
shapeFill: '#A6A6A6'
|
|
3987
|
+
shapeFill: '#A6A6A6',
|
|
3988
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3989
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3990
|
+
rectangleZoomBorderColor: "#009900"
|
|
3872
3991
|
};
|
|
3873
3992
|
break;
|
|
3874
3993
|
}
|
|
@@ -4102,7 +4221,7 @@ __decorate$1([
|
|
|
4102
4221
|
Complex({ color: 'transparent', width: 1 }, Border)
|
|
4103
4222
|
], TooltipSettings.prototype, "border", void 0);
|
|
4104
4223
|
__decorate$1([
|
|
4105
|
-
Complex(
|
|
4224
|
+
Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
|
|
4106
4225
|
], TooltipSettings.prototype, "textStyle", void 0);
|
|
4107
4226
|
__decorate$1([
|
|
4108
4227
|
Property(null)
|
|
@@ -4531,7 +4650,7 @@ __decorate$1([
|
|
|
4531
4650
|
Property('')
|
|
4532
4651
|
], LegendSettings.prototype, "height", void 0);
|
|
4533
4652
|
__decorate$1([
|
|
4534
|
-
Complex({ fontFamily: null }, Font)
|
|
4653
|
+
Complex({ fontFamily: null, fontWeight: null }, Font)
|
|
4535
4654
|
], LegendSettings.prototype, "textStyle", void 0);
|
|
4536
4655
|
__decorate$1([
|
|
4537
4656
|
Property(15)
|
|
@@ -4552,7 +4671,7 @@ __decorate$1([
|
|
|
4552
4671
|
Complex({}, CommonTitleSettings)
|
|
4553
4672
|
], LegendSettings.prototype, "title", void 0);
|
|
4554
4673
|
__decorate$1([
|
|
4555
|
-
Complex({ size:
|
|
4674
|
+
Complex({ size: null, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: null, fontFamily: null }, Font)
|
|
4556
4675
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
4557
4676
|
__decorate$1([
|
|
4558
4677
|
Property('Bottom')
|
|
@@ -4611,7 +4730,7 @@ __decorate$1([
|
|
|
4611
4730
|
Property(5)
|
|
4612
4731
|
], DataLabelSettings.prototype, "ry", void 0);
|
|
4613
4732
|
__decorate$1([
|
|
4614
|
-
Complex({}, Font)
|
|
4733
|
+
Complex({ fontWeight: null }, Font)
|
|
4615
4734
|
], DataLabelSettings.prototype, "textStyle", void 0);
|
|
4616
4735
|
__decorate$1([
|
|
4617
4736
|
Property('')
|
|
@@ -5841,7 +5960,7 @@ class LayerPanel {
|
|
|
5841
5960
|
this.horizontalPan = false;
|
|
5842
5961
|
this.horizontalPanXCount = 0;
|
|
5843
5962
|
this.mapObject = map;
|
|
5844
|
-
this.ajaxModule = new
|
|
5963
|
+
this.ajaxModule = new Fetch();
|
|
5845
5964
|
this.ajaxResponse = [];
|
|
5846
5965
|
}
|
|
5847
5966
|
measureLayerPanel() {
|
|
@@ -6078,14 +6197,13 @@ class LayerPanel {
|
|
|
6078
6197
|
const bing = new BingMap(this.mapObject);
|
|
6079
6198
|
const bingType = layer.bingMapType === 'AerialWithLabel' ? 'AerialWithLabelsOnDemand' : layer.bingMapType;
|
|
6080
6199
|
const url = 'https://dev.virtualearth.net/REST/V1/Imagery/Metadata/' + bingType;
|
|
6081
|
-
const ajax = new
|
|
6200
|
+
const ajax = new Fetch({
|
|
6082
6201
|
url: url + '?output=json&include=ImageryProviders&urischeme=https&key=' + layer.key
|
|
6083
6202
|
});
|
|
6203
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6084
6204
|
ajax.onSuccess = (json) => {
|
|
6085
6205
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6086
|
-
const
|
|
6087
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6088
|
-
const resource = jsonObject['resourceSets'][0]['resources'][0];
|
|
6206
|
+
const resource = json['resourceSets'][0]['resources'][0];
|
|
6089
6207
|
const imageUrl = resource['imageUrl'];
|
|
6090
6208
|
const subDomains = resource['imageUrlSubdomains'];
|
|
6091
6209
|
const maxZoom = resource['zoomMax'];
|
|
@@ -7104,8 +7222,8 @@ class LayerPanel {
|
|
|
7104
7222
|
imgElement.setAttribute('height', '256px');
|
|
7105
7223
|
imgElement.setAttribute('width', '256px');
|
|
7106
7224
|
imgElement.setAttribute('src', tile.src);
|
|
7107
|
-
imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7108
7225
|
imgElement.style.setProperty('user-select', 'none');
|
|
7226
|
+
imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7109
7227
|
const child = createElement('div', { id: mapId + '_tile_' + id });
|
|
7110
7228
|
child.style.position = 'absolute';
|
|
7111
7229
|
child.style.left = tile.left + 'px';
|
|
@@ -7717,11 +7835,11 @@ let Maps = class Maps extends Component {
|
|
|
7717
7835
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
7718
7836
|
processAjaxRequest(layer, localAjax, type) {
|
|
7719
7837
|
this.serverProcess['request']++;
|
|
7720
|
-
const
|
|
7721
|
-
|
|
7722
|
-
this.processResponseJsonData('
|
|
7838
|
+
const fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
|
|
7839
|
+
fetchApiModule.onSuccess = (args) => {
|
|
7840
|
+
this.processResponseJsonData('Fetch', args, layer, type);
|
|
7723
7841
|
};
|
|
7724
|
-
|
|
7842
|
+
fetchApiModule.send(localAjax.sendData);
|
|
7725
7843
|
}
|
|
7726
7844
|
/**
|
|
7727
7845
|
* This method is used to process the JSON data to render the maps.
|
|
@@ -7737,10 +7855,10 @@ let Maps = class Maps extends Component {
|
|
|
7737
7855
|
this.serverProcess['response']++;
|
|
7738
7856
|
if (processType) {
|
|
7739
7857
|
if (dataType === 'ShapeData') {
|
|
7740
|
-
layer.shapeData = (processType === 'DataManager') ? processResult(data) :
|
|
7858
|
+
layer.shapeData = (processType === 'DataManager') ? processResult(data) : data;
|
|
7741
7859
|
}
|
|
7742
7860
|
else {
|
|
7743
|
-
layer.dataSource = (processType === 'DataManager') ? processResult(data) :
|
|
7861
|
+
layer.dataSource = (processType === 'DataManager') ? processResult(data) : data;
|
|
7744
7862
|
}
|
|
7745
7863
|
}
|
|
7746
7864
|
if (!isNullOrUndefined(processType) && this.serverProcess['request'] === this.serverProcess['response']) {
|
|
@@ -7972,8 +8090,8 @@ let Maps = class Maps extends Component {
|
|
|
7972
8090
|
let element = getElementByID(this.element.id + '_Secondary_Element');
|
|
7973
8091
|
let rect = this.element.getBoundingClientRect();
|
|
7974
8092
|
let svgRect = getElementByID(this.element.id + '_svg').getBoundingClientRect();
|
|
7975
|
-
element.style.
|
|
7976
|
-
element.style.
|
|
8093
|
+
element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
|
|
8094
|
+
element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
|
|
7977
8095
|
}
|
|
7978
8096
|
zoomingChange() {
|
|
7979
8097
|
let left;
|
|
@@ -8195,8 +8313,8 @@ let Maps = class Maps extends Component {
|
|
|
8195
8313
|
let height;
|
|
8196
8314
|
const width = Math.abs((this.margin.left + this.margin.right) - this.availableSize.width);
|
|
8197
8315
|
style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
|
|
8198
|
-
style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
|
|
8199
|
-
style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || Theme.mapsSubTitleFont.size);
|
|
8316
|
+
style.fontWeight = type === 'title' ? style.fontWeight || this.themeStyle.titleFontWeight : style.fontWeight || this.themeStyle.titleFontWeight;
|
|
8317
|
+
style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || this.themeStyle.subTitleFontSize || Theme.mapsSubTitleFont.size);
|
|
8200
8318
|
if (title.text) {
|
|
8201
8319
|
if (isNullOrUndefined(groupEle)) {
|
|
8202
8320
|
groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
|
|
@@ -8921,7 +9039,7 @@ let Maps = class Maps extends Component {
|
|
|
8921
9039
|
* @param e - Specifies the arguments of window resize event.
|
|
8922
9040
|
*/
|
|
8923
9041
|
mapsOnResize(e) {
|
|
8924
|
-
if (!this.isDestroyed) {
|
|
9042
|
+
if (!this.isDestroyed && !this.isExportInitialTileMap) {
|
|
8925
9043
|
this.isResize = this.isReset = true;
|
|
8926
9044
|
const args = {
|
|
8927
9045
|
cancel: false,
|
|
@@ -9656,17 +9774,15 @@ let Maps = class Maps extends Component {
|
|
|
9656
9774
|
let promise;
|
|
9657
9775
|
if (!this.isDestroyed) {
|
|
9658
9776
|
promise = new Promise((resolve, reject) => {
|
|
9659
|
-
const
|
|
9777
|
+
const fetchApi = new Fetch({
|
|
9660
9778
|
url: url
|
|
9661
9779
|
});
|
|
9662
|
-
|
|
9663
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9664
|
-
const jsonObject = JSON.parse(json);
|
|
9780
|
+
fetchApi.onSuccess = (json) => {
|
|
9665
9781
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9666
|
-
const resource =
|
|
9782
|
+
const resource = json['resourceSets'][0]['resources'][0];
|
|
9667
9783
|
resolve(resource['imageUrl']);
|
|
9668
9784
|
};
|
|
9669
|
-
|
|
9785
|
+
fetchApi.send();
|
|
9670
9786
|
});
|
|
9671
9787
|
}
|
|
9672
9788
|
return promise;
|
|
@@ -10332,6 +10448,7 @@ class DataLabel {
|
|
|
10332
10448
|
let locationX;
|
|
10333
10449
|
let locationY;
|
|
10334
10450
|
style.fontFamily = this.maps.theme.toLowerCase() !== 'material' ? this.maps.themeStyle.labelFontFamily : style.fontFamily;
|
|
10451
|
+
style.fontWeight = style.fontWeight || this.maps.themeStyle.fontWeight || Theme.dataLabelFont.fontWeight;
|
|
10335
10452
|
shape = shapes['property'];
|
|
10336
10453
|
const properties = (Object.prototype.toString.call(layer.shapePropertyPath) === '[object Array]' ?
|
|
10337
10454
|
layer.shapePropertyPath : [layer.shapePropertyPath]);
|
|
@@ -11318,6 +11435,7 @@ class Legend {
|
|
|
11318
11435
|
legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
|
|
11319
11436
|
this.maps.themeStyle.fontFamily;
|
|
11320
11437
|
legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
|
|
11438
|
+
legendTextStyle.fontWeight = legendTextStyle.fontWeight || map.themeStyle.fontWeight;
|
|
11321
11439
|
if (i === 0) {
|
|
11322
11440
|
this.renderLegendBorder();
|
|
11323
11441
|
}
|
|
@@ -12086,6 +12204,8 @@ class Legend {
|
|
|
12086
12204
|
if (legendTitle) {
|
|
12087
12205
|
textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
|
|
12088
12206
|
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
|
|
12207
|
+
textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size : this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
|
|
12208
|
+
textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight : this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
|
|
12089
12209
|
textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
|
|
12090
12210
|
renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
12091
12211
|
}
|
|
@@ -13692,7 +13812,7 @@ class MapsTooltip {
|
|
|
13692
13812
|
currentData = this.formatter(marker$$1.tooltipSettings.format, marker$$1.dataSource[dataIndex]);
|
|
13693
13813
|
}
|
|
13694
13814
|
else {
|
|
13695
|
-
if (marker$$1.template && !marker$$1.tooltipSettings.valuePath) {
|
|
13815
|
+
if (typeof marker$$1.template !== 'function' && marker$$1.template && !marker$$1.tooltipSettings.valuePath) {
|
|
13696
13816
|
currentData = marker$$1.template.split('>')[1].split('<')[0];
|
|
13697
13817
|
}
|
|
13698
13818
|
else {
|
|
@@ -13735,7 +13855,7 @@ class MapsTooltip {
|
|
|
13735
13855
|
tooltipEle.style.cssText = 'position: absolute;pointer-events:none;';
|
|
13736
13856
|
document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
|
|
13737
13857
|
}
|
|
13738
|
-
if (option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
|
|
13858
|
+
if (typeof option.template !== 'function' && option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
|
|
13739
13859
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
13740
13860
|
}
|
|
13741
13861
|
templateData = this.setTooltipContent(option, templateData);
|
|
@@ -13760,10 +13880,14 @@ class MapsTooltip {
|
|
|
13760
13880
|
if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
|
|
13761
13881
|
(targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
|
|
13762
13882
|
this.maps['isProtectedOnChange'] = true;
|
|
13883
|
+
tooltipArgs.options['textStyle']['size'] = tooltipArgs.options['textStyle']['size']
|
|
13884
|
+
|| this.maps.themeStyle.fontSize;
|
|
13763
13885
|
tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
|
|
13764
13886
|
|| this.maps.themeStyle.tooltipFontColor;
|
|
13765
13887
|
tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
|
|
13766
13888
|
|| this.maps.themeStyle.fontFamily;
|
|
13889
|
+
tooltipArgs.options['textStyle']['fontWeight'] = tooltipArgs.options['textStyle']['fontWeight']
|
|
13890
|
+
|| this.maps.themeStyle.fontWeight;
|
|
13767
13891
|
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
13768
13892
|
|| this.maps.themeStyle.tooltipTextOpacity;
|
|
13769
13893
|
if (tooltipArgs.cancel) {
|
|
@@ -14351,7 +14475,7 @@ class Zoom {
|
|
|
14351
14475
|
const down = this.mouseDownPoints;
|
|
14352
14476
|
const move = this.mouseMovePoints;
|
|
14353
14477
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14354
|
-
const border = { width: 1, color:
|
|
14478
|
+
const border = { width: 1, color: this.maps.themeStyle.rectangleZoomBorderColor };
|
|
14355
14479
|
const width = Math.abs(move.x - down.x);
|
|
14356
14480
|
const height = Math.abs(move.y - down.y);
|
|
14357
14481
|
const x = ((move.x > down.x) ? down.x : down.x - width);
|
|
@@ -14366,7 +14490,7 @@ class Zoom {
|
|
|
14366
14490
|
height: map.availableSize.height,
|
|
14367
14491
|
style: 'position: absolute;'
|
|
14368
14492
|
});
|
|
14369
|
-
const rectOption = new RectOption(map.element.id + '_ZoomRect',
|
|
14493
|
+
const rectOption = new RectOption(map.element.id + '_ZoomRect', this.maps.themeStyle.rectangleZoomFillColor, border, this.maps.themeStyle.rectangleZoomFillOpacity, this.zoomingRect, 0, 0, '', '3');
|
|
14370
14494
|
rectSVGObject.appendChild(map.renderer.drawRectangle(rectOption));
|
|
14371
14495
|
getElementByID(map.element.id + '_Secondary_Element').appendChild(rectSVGObject);
|
|
14372
14496
|
}
|
|
@@ -14751,6 +14875,7 @@ class Zoom {
|
|
|
14751
14875
|
zoomtextSize = measureText(zoomtext, style);
|
|
14752
14876
|
const start = labelY - zoomtextSize['height'] / 4;
|
|
14753
14877
|
const end = labelY + zoomtextSize['height'] / 4;
|
|
14878
|
+
labelY = end;
|
|
14754
14879
|
const xpositionEnds = labelX + zoomtextSize['width'] / 2;
|
|
14755
14880
|
const xpositionStart = labelX - zoomtextSize['width'] / 2;
|
|
14756
14881
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -15398,7 +15523,7 @@ class Zoom {
|
|
|
15398
15523
|
map.markerCenterLatitude = null;
|
|
15399
15524
|
map.markerCenterLongitude = null;
|
|
15400
15525
|
this.isZoomSelection = false;
|
|
15401
|
-
this.isPan =
|
|
15526
|
+
this.isPan = map.zoomSettings.enablePanning;
|
|
15402
15527
|
this.toolBarZooming(map.zoomSettings.minZoom, 'Reset');
|
|
15403
15528
|
if ((this.isPan && !this.isZoomSelection) || (!this.isPan && this.isZoomSelection)) {
|
|
15404
15529
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
@@ -16057,6 +16182,19 @@ class Print {
|
|
|
16057
16182
|
getHTMLContent(maps, elements) {
|
|
16058
16183
|
const div = createElement('div');
|
|
16059
16184
|
const divElement = maps.element.cloneNode(true);
|
|
16185
|
+
let backgroundElement = (!maps.isTileMap ? divElement.getElementsByTagName('svg')[0] : divElement.getElementsByTagName('svg')[1]);
|
|
16186
|
+
if (!isNullOrUndefined(backgroundElement)) {
|
|
16187
|
+
backgroundElement = backgroundElement.childNodes[0];
|
|
16188
|
+
if (!isNullOrUndefined(backgroundElement)) {
|
|
16189
|
+
const backgroundColor = backgroundElement.getAttribute('fill');
|
|
16190
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16191
|
+
backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
16192
|
+
}
|
|
16193
|
+
else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16194
|
+
backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
16195
|
+
}
|
|
16196
|
+
}
|
|
16197
|
+
}
|
|
16060
16198
|
if (maps.isTileMap) {
|
|
16061
16199
|
for (let i = 0; i < divElement.childElementCount; i++) {
|
|
16062
16200
|
if (divElement.children[i].id === maps.element.id + '_tile_parent') {
|
|
@@ -16151,10 +16289,18 @@ class ImageExport {
|
|
|
16151
16289
|
const svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
|
|
16152
16290
|
let svgDataElement;
|
|
16153
16291
|
let tileSvg;
|
|
16154
|
-
|
|
16292
|
+
let svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
|
|
16293
|
+
const backgroundElement = svgObject.childNodes[0];
|
|
16294
|
+
const backgroundColor = backgroundElement.getAttribute('fill');
|
|
16295
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16296
|
+
svgObject.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
16297
|
+
}
|
|
16298
|
+
else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16299
|
+
svgObject.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
16300
|
+
}
|
|
16155
16301
|
if (!maps.isTileMap) {
|
|
16156
16302
|
svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
|
|
16157
|
-
|
|
16303
|
+
svgObject.outerHTML + '</svg>';
|
|
16158
16304
|
}
|
|
16159
16305
|
else {
|
|
16160
16306
|
tileSvg = getElementByID(maps.element.id + '_Tile_SVG').cloneNode(true);
|
|
@@ -16193,6 +16339,7 @@ class ImageExport {
|
|
|
16193
16339
|
image.src = url;
|
|
16194
16340
|
}
|
|
16195
16341
|
else {
|
|
16342
|
+
maps.isExportInitialTileMap = true;
|
|
16196
16343
|
const svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
|
|
16197
16344
|
const top = parseFloat(svgParentElement.getAttribute('y'));
|
|
16198
16345
|
const left = parseFloat(svgParentElement.getAttribute('x'));
|
|
@@ -16202,7 +16349,9 @@ class ImageExport {
|
|
|
16202
16349
|
const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
|
|
16203
16350
|
const exportTileImg = new Image();
|
|
16204
16351
|
exportTileImg.crossOrigin = 'Anonymous';
|
|
16205
|
-
|
|
16352
|
+
let background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
|
|
16353
|
+
(maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
|
|
16354
|
+
ctxt.fillStyle = background;
|
|
16206
16355
|
ctxt.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
|
|
16207
16356
|
ctxt.font = maps.titleSettings.textStyle.size + ' Arial';
|
|
16208
16357
|
const titleElement = document.getElementById(maps.element.id + '_Map_title');
|
|
@@ -16232,8 +16381,10 @@ class ImageExport {
|
|
|
16232
16381
|
if (allowDownload) {
|
|
16233
16382
|
triggerDownload(fileName, type, localBase64, isDownload);
|
|
16234
16383
|
localStorage.removeItem('local-canvasImage');
|
|
16384
|
+
maps.isExportInitialTileMap = false;
|
|
16235
16385
|
}
|
|
16236
16386
|
else {
|
|
16387
|
+
maps.isExportInitialTileMap = false;
|
|
16237
16388
|
if (type === 'PNG') {
|
|
16238
16389
|
resolve(localBase64);
|
|
16239
16390
|
}
|
|
@@ -16308,6 +16459,9 @@ class PdfExport {
|
|
|
16308
16459
|
export(maps, type, fileName, allowDownload, orientation) {
|
|
16309
16460
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16310
16461
|
const promise = new Promise((resolve, reject) => {
|
|
16462
|
+
if (maps.isTileMap) {
|
|
16463
|
+
maps.isExportInitialTileMap = true;
|
|
16464
|
+
}
|
|
16311
16465
|
const canvasElement = createElement('canvas', {
|
|
16312
16466
|
id: 'ej2-canvas',
|
|
16313
16467
|
attrs: {
|
|
@@ -16321,10 +16475,12 @@ class PdfExport {
|
|
|
16321
16475
|
const exportElement = maps.svgObject.cloneNode(true);
|
|
16322
16476
|
const backgroundElement = exportElement.childNodes[0];
|
|
16323
16477
|
const backgroundColor = backgroundElement.getAttribute('fill');
|
|
16324
|
-
if ((maps.theme === 'Tailwind' || maps.theme === '
|
|
16325
|
-
|| maps.theme === 'Fluent' || maps.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16478
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16326
16479
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
16327
16480
|
}
|
|
16481
|
+
else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16482
|
+
exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
16483
|
+
}
|
|
16328
16484
|
const url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
|
|
16329
16485
|
[(new XMLSerializer()).serializeToString(exportElement)], { type: 'image/svg+xml' }));
|
|
16330
16486
|
const pdfDocument = new PdfDocument();
|
|
@@ -16360,7 +16516,9 @@ class PdfExport {
|
|
|
16360
16516
|
const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
|
|
16361
16517
|
const tileImg = new Image();
|
|
16362
16518
|
tileImg.crossOrigin = 'Anonymous';
|
|
16363
|
-
|
|
16519
|
+
let background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
|
|
16520
|
+
(maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
|
|
16521
|
+
ctx.fillStyle = background;
|
|
16364
16522
|
ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
|
|
16365
16523
|
ctx.font = maps.titleSettings.textStyle.size + ' Arial';
|
|
16366
16524
|
const titleElement = document.getElementById(maps.element.id + '_Map_title');
|
|
@@ -16390,6 +16548,7 @@ class PdfExport {
|
|
|
16390
16548
|
pdfDocument.pageSettings.orientation = orientation;
|
|
16391
16549
|
x = x.slice(x.indexOf(',') + 1);
|
|
16392
16550
|
pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
|
|
16551
|
+
maps.isExportInitialTileMap = false;
|
|
16393
16552
|
if (allowDownload) {
|
|
16394
16553
|
pdfDocument.save(fileName + '.pdf');
|
|
16395
16554
|
pdfDocument.destroy();
|