@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/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -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';
|
|
@@ -828,7 +828,7 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
|
|
|
828
828
|
}
|
|
829
829
|
else if (shape === 'Image') {
|
|
830
830
|
x = location.x - (size.width / 2);
|
|
831
|
-
y = location.y - (size.height / 2);
|
|
831
|
+
y = location.y - (markerID.indexOf('cluster') > -1 ? (size.height / 2) : size.height);
|
|
832
832
|
merge(pathOptions, { 'href': imageUrl, 'height': size.height, 'width': size.width, x: x, y: y });
|
|
833
833
|
markerEle = maps.renderer.drawImage(pathOptions);
|
|
834
834
|
}
|
|
@@ -2375,13 +2375,16 @@ function getTemplateFunction(template, maps) {
|
|
|
2375
2375
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2376
2376
|
var templateFn = null;
|
|
2377
2377
|
try {
|
|
2378
|
-
if (document.querySelectorAll(template).length) {
|
|
2378
|
+
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
2379
2379
|
templateFn = compile(document.querySelector(template).innerHTML.trim());
|
|
2380
2380
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2381
2381
|
}
|
|
2382
2382
|
else if (maps.isVue || maps.isVue3) {
|
|
2383
2383
|
templateFn = compile(template);
|
|
2384
2384
|
}
|
|
2385
|
+
else if (typeof template === 'function') {
|
|
2386
|
+
templateFn = compile(template);
|
|
2387
|
+
}
|
|
2385
2388
|
}
|
|
2386
2389
|
catch (e) {
|
|
2387
2390
|
templateFn = compile(template);
|
|
@@ -3576,6 +3579,14 @@ function getShapeColor(theme) {
|
|
|
3576
3579
|
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
3577
3580
|
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
3578
3581
|
break;
|
|
3582
|
+
case 'material3':
|
|
3583
|
+
themePalette = ['#6200EE', '#E77A16', '#82C100', '#7107DC', '#05BB3D',
|
|
3584
|
+
'#D21020', '#FAD200', '#0085FF', '#9204EA', '#08EE9B'];
|
|
3585
|
+
break;
|
|
3586
|
+
case 'material3dark':
|
|
3587
|
+
themePalette = ['#4EAAFF', '#FA4EAB', '#FFF500', '#17EA58', '#38FFE7',
|
|
3588
|
+
'#FF9E45', '#B3F32F', '#B93CE4', '#FC5664', '#9B55FF'];
|
|
3589
|
+
break;
|
|
3579
3590
|
default:
|
|
3580
3591
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
3581
3592
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -3724,9 +3735,14 @@ function getThemeStyle(theme) {
|
|
|
3724
3735
|
zoomFillColor: '#FFFFFF',
|
|
3725
3736
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3726
3737
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3738
|
+
fontSize: '12px',
|
|
3739
|
+
fontWeight: 'Medium',
|
|
3727
3740
|
titleFontWeight: 'Medium',
|
|
3728
3741
|
zoomSelectionColor: '#e61576',
|
|
3729
|
-
shapeFill: '#A6A6A6'
|
|
3742
|
+
shapeFill: '#A6A6A6',
|
|
3743
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3744
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3745
|
+
rectangleZoomBorderColor: "#009900"
|
|
3730
3746
|
};
|
|
3731
3747
|
break;
|
|
3732
3748
|
case 'highcontrast':
|
|
@@ -3743,10 +3759,15 @@ function getThemeStyle(theme) {
|
|
|
3743
3759
|
tooltipFillColor: '#ffffff',
|
|
3744
3760
|
zoomFillColor: '#FFFFFF',
|
|
3745
3761
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3762
|
+
fontSize: '12px',
|
|
3763
|
+
fontWeight: 'Medium',
|
|
3746
3764
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3747
3765
|
titleFontWeight: 'Medium',
|
|
3748
3766
|
zoomSelectionColor: '#e61576',
|
|
3749
|
-
shapeFill: '#A6A6A6'
|
|
3767
|
+
shapeFill: '#A6A6A6',
|
|
3768
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3769
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3770
|
+
rectangleZoomBorderColor: "#009900"
|
|
3750
3771
|
};
|
|
3751
3772
|
break;
|
|
3752
3773
|
case 'bootstrap4':
|
|
@@ -3762,6 +3783,8 @@ function getThemeStyle(theme) {
|
|
|
3762
3783
|
tooltipFillColor: '#000000',
|
|
3763
3784
|
zoomFillColor: '#5B6269',
|
|
3764
3785
|
fontFamily: 'HelveticaNeue-Medium',
|
|
3786
|
+
fontSize: '12px',
|
|
3787
|
+
fontWeight: 'Medium',
|
|
3765
3788
|
titleFontSize: '16px',
|
|
3766
3789
|
legendFontSize: '14px',
|
|
3767
3790
|
tooltipFillOpacity: 1,
|
|
@@ -3769,7 +3792,10 @@ function getThemeStyle(theme) {
|
|
|
3769
3792
|
labelFontFamily: 'HelveticaNeue-Medium',
|
|
3770
3793
|
titleFontWeight: 'Medium',
|
|
3771
3794
|
zoomSelectionColor: '#e61576',
|
|
3772
|
-
shapeFill: '#A6A6A6'
|
|
3795
|
+
shapeFill: '#A6A6A6',
|
|
3796
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3797
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3798
|
+
rectangleZoomBorderColor: "#009900"
|
|
3773
3799
|
};
|
|
3774
3800
|
break;
|
|
3775
3801
|
case 'tailwind':
|
|
@@ -3785,6 +3811,8 @@ function getThemeStyle(theme) {
|
|
|
3785
3811
|
tooltipFillColor: '#111827',
|
|
3786
3812
|
zoomFillColor: '#6b7280',
|
|
3787
3813
|
fontFamily: 'Inter',
|
|
3814
|
+
fontSize: '12px',
|
|
3815
|
+
fontWeight: 'Medium',
|
|
3788
3816
|
titleFontSize: '14px',
|
|
3789
3817
|
legendFontSize: '12px',
|
|
3790
3818
|
tooltipFillOpacity: 1,
|
|
@@ -3792,7 +3820,10 @@ function getThemeStyle(theme) {
|
|
|
3792
3820
|
labelFontFamily: 'Inter',
|
|
3793
3821
|
titleFontWeight: '500',
|
|
3794
3822
|
zoomSelectionColor: '#374151',
|
|
3795
|
-
shapeFill: '#E5E7EB'
|
|
3823
|
+
shapeFill: '#E5E7EB',
|
|
3824
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3825
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3826
|
+
rectangleZoomBorderColor: "#009900"
|
|
3796
3827
|
};
|
|
3797
3828
|
break;
|
|
3798
3829
|
case 'tailwinddark':
|
|
@@ -3808,6 +3839,8 @@ function getThemeStyle(theme) {
|
|
|
3808
3839
|
tooltipFillColor: '#F9FAFB',
|
|
3809
3840
|
zoomFillColor: '#D1D5DB',
|
|
3810
3841
|
fontFamily: 'Inter',
|
|
3842
|
+
fontSize: '12px',
|
|
3843
|
+
fontWeight: 'Medium',
|
|
3811
3844
|
titleFontSize: '14px',
|
|
3812
3845
|
legendFontSize: '12px',
|
|
3813
3846
|
tooltipFillOpacity: 1,
|
|
@@ -3815,7 +3848,10 @@ function getThemeStyle(theme) {
|
|
|
3815
3848
|
labelFontFamily: 'Inter',
|
|
3816
3849
|
titleFontWeight: '500',
|
|
3817
3850
|
zoomSelectionColor: '#F3F4F6',
|
|
3818
|
-
shapeFill: '#374151'
|
|
3851
|
+
shapeFill: '#374151',
|
|
3852
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3853
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3854
|
+
rectangleZoomBorderColor: "#009900"
|
|
3819
3855
|
};
|
|
3820
3856
|
break;
|
|
3821
3857
|
case 'bootstrap5':
|
|
@@ -3831,6 +3867,8 @@ function getThemeStyle(theme) {
|
|
|
3831
3867
|
tooltipFillColor: '#212529',
|
|
3832
3868
|
zoomFillColor: '#6C757D',
|
|
3833
3869
|
fontFamily: 'Helvetica Neue',
|
|
3870
|
+
fontSize: '12px',
|
|
3871
|
+
fontWeight: 'Medium',
|
|
3834
3872
|
titleFontSize: '14px',
|
|
3835
3873
|
legendFontSize: '12px',
|
|
3836
3874
|
tooltipFillOpacity: 1,
|
|
@@ -3838,7 +3876,10 @@ function getThemeStyle(theme) {
|
|
|
3838
3876
|
labelFontFamily: 'Helvetica Neue',
|
|
3839
3877
|
titleFontWeight: 'normal',
|
|
3840
3878
|
zoomSelectionColor: '#343A40',
|
|
3841
|
-
shapeFill: '#E9ECEF'
|
|
3879
|
+
shapeFill: '#E9ECEF',
|
|
3880
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3881
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3882
|
+
rectangleZoomBorderColor: "#009900"
|
|
3842
3883
|
};
|
|
3843
3884
|
break;
|
|
3844
3885
|
case 'bootstrap5dark':
|
|
@@ -3854,6 +3895,8 @@ function getThemeStyle(theme) {
|
|
|
3854
3895
|
tooltipFillColor: '#E9ECEF',
|
|
3855
3896
|
zoomFillColor: '#B5BABE',
|
|
3856
3897
|
fontFamily: 'Helvetica Neue',
|
|
3898
|
+
fontSize: '12px',
|
|
3899
|
+
fontWeight: 'Medium',
|
|
3857
3900
|
titleFontSize: '14px',
|
|
3858
3901
|
legendFontSize: '12px',
|
|
3859
3902
|
tooltipFillOpacity: 1,
|
|
@@ -3861,7 +3904,10 @@ function getThemeStyle(theme) {
|
|
|
3861
3904
|
labelFontFamily: 'Helvetica Neue',
|
|
3862
3905
|
titleFontWeight: 'normal',
|
|
3863
3906
|
zoomSelectionColor: '#DEE2E6',
|
|
3864
|
-
shapeFill: '#495057'
|
|
3907
|
+
shapeFill: '#495057',
|
|
3908
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3909
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3910
|
+
rectangleZoomBorderColor: "#009900"
|
|
3865
3911
|
};
|
|
3866
3912
|
break;
|
|
3867
3913
|
case 'fluent':
|
|
@@ -3877,6 +3923,8 @@ function getThemeStyle(theme) {
|
|
|
3877
3923
|
tooltipFillColor: '#FFFFFF',
|
|
3878
3924
|
zoomFillColor: '#A19F9D',
|
|
3879
3925
|
fontFamily: 'Segoe UI',
|
|
3926
|
+
fontSize: '12px',
|
|
3927
|
+
fontWeight: 'Medium',
|
|
3880
3928
|
titleFontSize: '14px',
|
|
3881
3929
|
legendFontSize: '12px',
|
|
3882
3930
|
tooltipFillOpacity: 1,
|
|
@@ -3884,7 +3932,10 @@ function getThemeStyle(theme) {
|
|
|
3884
3932
|
labelFontFamily: 'Segoe UI',
|
|
3885
3933
|
titleFontWeight: '600',
|
|
3886
3934
|
zoomSelectionColor: '#323130',
|
|
3887
|
-
shapeFill: '#F3F2F1'
|
|
3935
|
+
shapeFill: '#F3F2F1',
|
|
3936
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3937
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3938
|
+
rectangleZoomBorderColor: "#009900"
|
|
3888
3939
|
};
|
|
3889
3940
|
break;
|
|
3890
3941
|
case 'fluentdark':
|
|
@@ -3900,6 +3951,8 @@ function getThemeStyle(theme) {
|
|
|
3900
3951
|
tooltipFillColor: '#252423',
|
|
3901
3952
|
zoomFillColor: '#484644',
|
|
3902
3953
|
fontFamily: 'Segoe UI',
|
|
3954
|
+
fontSize: '12px',
|
|
3955
|
+
fontWeight: 'Medium',
|
|
3903
3956
|
titleFontSize: '14px',
|
|
3904
3957
|
legendFontSize: '12px',
|
|
3905
3958
|
tooltipFillOpacity: 1,
|
|
@@ -3907,7 +3960,68 @@ function getThemeStyle(theme) {
|
|
|
3907
3960
|
labelFontFamily: 'Segoe UI',
|
|
3908
3961
|
titleFontWeight: '600',
|
|
3909
3962
|
zoomSelectionColor: '#F3F2F1',
|
|
3910
|
-
shapeFill: '#252423'
|
|
3963
|
+
shapeFill: '#252423',
|
|
3964
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
3965
|
+
rectangleZoomFillOpacity: 0.5,
|
|
3966
|
+
rectangleZoomBorderColor: "#009900"
|
|
3967
|
+
};
|
|
3968
|
+
break;
|
|
3969
|
+
case 'material3':
|
|
3970
|
+
style = {
|
|
3971
|
+
backgroundColor: 'transparent',
|
|
3972
|
+
areaBackgroundColor: 'transparent',
|
|
3973
|
+
titleFontColor: '#1C1B1F',
|
|
3974
|
+
subTitleFontColor: '#1C1B1F',
|
|
3975
|
+
legendTitleFontColor: '#1C1B1F',
|
|
3976
|
+
legendTextColor: '#49454E',
|
|
3977
|
+
dataLabelFontColor: '#1C1B1F',
|
|
3978
|
+
tooltipFontColor: '#F4EFF4',
|
|
3979
|
+
tooltipFillColor: '#313033',
|
|
3980
|
+
zoomFillColor: '#49454E',
|
|
3981
|
+
fontFamily: 'Roboto',
|
|
3982
|
+
fontSize: '14px',
|
|
3983
|
+
titleFontSize: '16px',
|
|
3984
|
+
subTitleFontSize: '14px',
|
|
3985
|
+
legendFontSize: '12px',
|
|
3986
|
+
tooltipFillOpacity: 1,
|
|
3987
|
+
tooltipTextOpacity: 1,
|
|
3988
|
+
labelFontFamily: 'Roboto',
|
|
3989
|
+
titleFontWeight: '500',
|
|
3990
|
+
fontWeight: '400',
|
|
3991
|
+
zoomSelectionColor: '#49454E',
|
|
3992
|
+
shapeFill: '#E7E0EC',
|
|
3993
|
+
rectangleZoomFillColor: '#6750A4',
|
|
3994
|
+
rectangleZoomFillOpacity: 0.24,
|
|
3995
|
+
rectangleZoomBorderColor: "#6750A4"
|
|
3996
|
+
};
|
|
3997
|
+
break;
|
|
3998
|
+
case 'material3dark':
|
|
3999
|
+
style = {
|
|
4000
|
+
backgroundColor: 'transparent',
|
|
4001
|
+
areaBackgroundColor: 'transparent',
|
|
4002
|
+
titleFontColor: '#E6E1E5',
|
|
4003
|
+
subTitleFontColor: '#E6E1E5',
|
|
4004
|
+
legendTitleFontColor: '#E6E1E5',
|
|
4005
|
+
legendTextColor: '#CAC4D0',
|
|
4006
|
+
dataLabelFontColor: '#E6E1E5',
|
|
4007
|
+
tooltipFontColor: '#313033',
|
|
4008
|
+
tooltipFillColor: '#E6E1E5',
|
|
4009
|
+
zoomFillColor: '#E6E1E5',
|
|
4010
|
+
fontFamily: 'Roboto',
|
|
4011
|
+
fontSize: '14px',
|
|
4012
|
+
titleFontSize: '16px',
|
|
4013
|
+
subTitleFontSize: '14px',
|
|
4014
|
+
legendFontSize: '12px',
|
|
4015
|
+
tooltipFillOpacity: 1,
|
|
4016
|
+
tooltipTextOpacity: 1,
|
|
4017
|
+
labelFontFamily: 'Roboto',
|
|
4018
|
+
titleFontWeight: '500',
|
|
4019
|
+
fontWeight: '400',
|
|
4020
|
+
zoomSelectionColor: '#E6E1E5',
|
|
4021
|
+
shapeFill: '#49454F',
|
|
4022
|
+
rectangleZoomFillColor: '#D0BCFF',
|
|
4023
|
+
rectangleZoomFillOpacity: 0.24,
|
|
4024
|
+
rectangleZoomBorderColor: "#D0BCFF"
|
|
3911
4025
|
};
|
|
3912
4026
|
break;
|
|
3913
4027
|
default:
|
|
@@ -3925,9 +4039,14 @@ function getThemeStyle(theme) {
|
|
|
3925
4039
|
zoomFillColor: '#737373',
|
|
3926
4040
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3927
4041
|
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
4042
|
+
fontSize: '12px',
|
|
4043
|
+
fontWeight: 'Medium',
|
|
3928
4044
|
titleFontWeight: 'Medium',
|
|
3929
4045
|
zoomSelectionColor: '#e61576',
|
|
3930
|
-
shapeFill: '#A6A6A6'
|
|
4046
|
+
shapeFill: '#A6A6A6',
|
|
4047
|
+
rectangleZoomFillColor: '#d3d3d3',
|
|
4048
|
+
rectangleZoomFillOpacity: 0.5,
|
|
4049
|
+
rectangleZoomBorderColor: "#009900"
|
|
3931
4050
|
};
|
|
3932
4051
|
break;
|
|
3933
4052
|
}
|
|
@@ -4217,7 +4336,7 @@ var TooltipSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4217
4336
|
Complex({ color: 'transparent', width: 1 }, Border)
|
|
4218
4337
|
], TooltipSettings.prototype, "border", void 0);
|
|
4219
4338
|
__decorate$1([
|
|
4220
|
-
Complex(
|
|
4339
|
+
Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
|
|
4221
4340
|
], TooltipSettings.prototype, "textStyle", void 0);
|
|
4222
4341
|
__decorate$1([
|
|
4223
4342
|
Property(null)
|
|
@@ -4731,7 +4850,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4731
4850
|
Property('')
|
|
4732
4851
|
], LegendSettings.prototype, "height", void 0);
|
|
4733
4852
|
__decorate$1([
|
|
4734
|
-
Complex({ fontFamily: null }, Font)
|
|
4853
|
+
Complex({ fontFamily: null, fontWeight: null }, Font)
|
|
4735
4854
|
], LegendSettings.prototype, "textStyle", void 0);
|
|
4736
4855
|
__decorate$1([
|
|
4737
4856
|
Property(15)
|
|
@@ -4752,7 +4871,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4752
4871
|
Complex({}, CommonTitleSettings)
|
|
4753
4872
|
], LegendSettings.prototype, "title", void 0);
|
|
4754
4873
|
__decorate$1([
|
|
4755
|
-
Complex({ size:
|
|
4874
|
+
Complex({ size: null, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: null, fontFamily: null }, Font)
|
|
4756
4875
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
4757
4876
|
__decorate$1([
|
|
4758
4877
|
Property('Bottom')
|
|
@@ -4816,7 +4935,7 @@ var DataLabelSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4816
4935
|
Property(5)
|
|
4817
4936
|
], DataLabelSettings.prototype, "ry", void 0);
|
|
4818
4937
|
__decorate$1([
|
|
4819
|
-
Complex({}, Font)
|
|
4938
|
+
Complex({ fontWeight: null }, Font)
|
|
4820
4939
|
], DataLabelSettings.prototype, "textStyle", void 0);
|
|
4821
4940
|
__decorate$1([
|
|
4822
4941
|
Property('')
|
|
@@ -6080,7 +6199,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6080
6199
|
this.horizontalPan = false;
|
|
6081
6200
|
this.horizontalPanXCount = 0;
|
|
6082
6201
|
this.mapObject = map;
|
|
6083
|
-
this.ajaxModule = new
|
|
6202
|
+
this.ajaxModule = new Fetch();
|
|
6084
6203
|
this.ajaxResponse = [];
|
|
6085
6204
|
}
|
|
6086
6205
|
LayerPanel.prototype.measureLayerPanel = function () {
|
|
@@ -6319,14 +6438,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6319
6438
|
var bing_1 = new BingMap(_this.mapObject);
|
|
6320
6439
|
var bingType = layer.bingMapType === 'AerialWithLabel' ? 'AerialWithLabelsOnDemand' : layer.bingMapType;
|
|
6321
6440
|
var url = 'https://dev.virtualearth.net/REST/V1/Imagery/Metadata/' + bingType;
|
|
6322
|
-
var ajax = new
|
|
6441
|
+
var ajax = new Fetch({
|
|
6323
6442
|
url: url + '?output=json&include=ImageryProviders&urischeme=https&key=' + layer.key
|
|
6324
6443
|
});
|
|
6444
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6325
6445
|
ajax.onSuccess = function (json) {
|
|
6326
6446
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6327
|
-
var
|
|
6328
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6329
|
-
var resource = jsonObject['resourceSets'][0]['resources'][0];
|
|
6447
|
+
var resource = json['resourceSets'][0]['resources'][0];
|
|
6330
6448
|
var imageUrl = resource['imageUrl'];
|
|
6331
6449
|
var subDomains = resource['imageUrlSubdomains'];
|
|
6332
6450
|
var maxZoom = resource['zoomMax'];
|
|
@@ -7362,8 +7480,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
7362
7480
|
imgElement.setAttribute('height', '256px');
|
|
7363
7481
|
imgElement.setAttribute('width', '256px');
|
|
7364
7482
|
imgElement.setAttribute('src', tile.src);
|
|
7365
|
-
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7366
7483
|
imgElement.style.setProperty('user-select', 'none');
|
|
7484
|
+
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7367
7485
|
var child = createElement('div', { id: mapId + '_tile_' + id });
|
|
7368
7486
|
child.style.position = 'absolute';
|
|
7369
7487
|
child.style.left = tile.left + 'px';
|
|
@@ -8007,11 +8125,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8007
8125
|
Maps.prototype.processAjaxRequest = function (layer, localAjax, type) {
|
|
8008
8126
|
var _this = this;
|
|
8009
8127
|
this.serverProcess['request']++;
|
|
8010
|
-
var
|
|
8011
|
-
|
|
8012
|
-
_this.processResponseJsonData('
|
|
8128
|
+
var fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
|
|
8129
|
+
fetchApiModule.onSuccess = function (args) {
|
|
8130
|
+
_this.processResponseJsonData('Fetch', args, layer, type);
|
|
8013
8131
|
};
|
|
8014
|
-
|
|
8132
|
+
fetchApiModule.send(localAjax.sendData);
|
|
8015
8133
|
};
|
|
8016
8134
|
/**
|
|
8017
8135
|
* This method is used to process the JSON data to render the maps.
|
|
@@ -8027,10 +8145,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8027
8145
|
this.serverProcess['response']++;
|
|
8028
8146
|
if (processType) {
|
|
8029
8147
|
if (dataType === 'ShapeData') {
|
|
8030
|
-
layer.shapeData = (processType === 'DataManager') ? processResult(data) :
|
|
8148
|
+
layer.shapeData = (processType === 'DataManager') ? processResult(data) : data;
|
|
8031
8149
|
}
|
|
8032
8150
|
else {
|
|
8033
|
-
layer.dataSource = (processType === 'DataManager') ? processResult(data) :
|
|
8151
|
+
layer.dataSource = (processType === 'DataManager') ? processResult(data) : data;
|
|
8034
8152
|
}
|
|
8035
8153
|
}
|
|
8036
8154
|
if (!isNullOrUndefined(processType) && this.serverProcess['request'] === this.serverProcess['response']) {
|
|
@@ -8262,8 +8380,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8262
8380
|
var element = getElementByID(this.element.id + '_Secondary_Element');
|
|
8263
8381
|
var rect = this.element.getBoundingClientRect();
|
|
8264
8382
|
var svgRect = getElementByID(this.element.id + '_svg').getBoundingClientRect();
|
|
8265
|
-
element.style.
|
|
8266
|
-
element.style.
|
|
8383
|
+
element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
|
|
8384
|
+
element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
|
|
8267
8385
|
};
|
|
8268
8386
|
Maps.prototype.zoomingChange = function () {
|
|
8269
8387
|
var left;
|
|
@@ -8486,8 +8604,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8486
8604
|
var height;
|
|
8487
8605
|
var width = Math.abs((this.margin.left + this.margin.right) - this.availableSize.width);
|
|
8488
8606
|
style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
|
|
8489
|
-
style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
|
|
8490
|
-
style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || Theme.mapsSubTitleFont.size);
|
|
8607
|
+
style.fontWeight = type === 'title' ? style.fontWeight || this.themeStyle.titleFontWeight : style.fontWeight || this.themeStyle.titleFontWeight;
|
|
8608
|
+
style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || this.themeStyle.subTitleFontSize || Theme.mapsSubTitleFont.size);
|
|
8491
8609
|
if (title.text) {
|
|
8492
8610
|
if (isNullOrUndefined(groupEle)) {
|
|
8493
8611
|
groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
|
|
@@ -9214,7 +9332,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9214
9332
|
*/
|
|
9215
9333
|
Maps.prototype.mapsOnResize = function (e) {
|
|
9216
9334
|
var _this = this;
|
|
9217
|
-
if (!this.isDestroyed) {
|
|
9335
|
+
if (!this.isDestroyed && !this.isExportInitialTileMap) {
|
|
9218
9336
|
this.isResize = this.isReset = true;
|
|
9219
9337
|
var args = {
|
|
9220
9338
|
cancel: false,
|
|
@@ -9956,17 +10074,15 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9956
10074
|
var promise;
|
|
9957
10075
|
if (!this.isDestroyed) {
|
|
9958
10076
|
promise = new Promise(function (resolve, reject) {
|
|
9959
|
-
var
|
|
10077
|
+
var fetchApi = new Fetch({
|
|
9960
10078
|
url: url
|
|
9961
10079
|
});
|
|
9962
|
-
|
|
9963
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9964
|
-
var jsonObject = JSON.parse(json);
|
|
10080
|
+
fetchApi.onSuccess = function (json) {
|
|
9965
10081
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9966
|
-
var resource =
|
|
10082
|
+
var resource = json['resourceSets'][0]['resources'][0];
|
|
9967
10083
|
resolve(resource['imageUrl']);
|
|
9968
10084
|
};
|
|
9969
|
-
|
|
10085
|
+
fetchApi.send();
|
|
9970
10086
|
});
|
|
9971
10087
|
}
|
|
9972
10088
|
return promise;
|
|
@@ -10645,6 +10761,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10645
10761
|
var locationX;
|
|
10646
10762
|
var locationY;
|
|
10647
10763
|
style.fontFamily = this.maps.theme.toLowerCase() !== 'material' ? this.maps.themeStyle.labelFontFamily : style.fontFamily;
|
|
10764
|
+
style.fontWeight = style.fontWeight || this.maps.themeStyle.fontWeight || Theme.dataLabelFont.fontWeight;
|
|
10648
10765
|
shape = shapes['property'];
|
|
10649
10766
|
var properties = (Object.prototype.toString.call(layer.shapePropertyPath) === '[object Array]' ?
|
|
10650
10767
|
layer.shapePropertyPath : [layer.shapePropertyPath]);
|
|
@@ -11635,6 +11752,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11635
11752
|
legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
|
|
11636
11753
|
this.maps.themeStyle.fontFamily;
|
|
11637
11754
|
legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
|
|
11755
|
+
legendTextStyle.fontWeight = legendTextStyle.fontWeight || map.themeStyle.fontWeight;
|
|
11638
11756
|
if (i === 0) {
|
|
11639
11757
|
this.renderLegendBorder();
|
|
11640
11758
|
}
|
|
@@ -12403,6 +12521,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12403
12521
|
if (legendTitle) {
|
|
12404
12522
|
textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
|
|
12405
12523
|
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
|
|
12524
|
+
textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size : this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
|
|
12525
|
+
textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight : this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
|
|
12406
12526
|
textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
|
|
12407
12527
|
renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
12408
12528
|
}
|
|
@@ -14030,7 +14150,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14030
14150
|
currentData = this.formatter(marker$$1.tooltipSettings.format, marker$$1.dataSource[dataIndex]);
|
|
14031
14151
|
}
|
|
14032
14152
|
else {
|
|
14033
|
-
if (marker$$1.template && !marker$$1.tooltipSettings.valuePath) {
|
|
14153
|
+
if (typeof marker$$1.template !== 'function' && marker$$1.template && !marker$$1.tooltipSettings.valuePath) {
|
|
14034
14154
|
currentData = marker$$1.template.split('>')[1].split('<')[0];
|
|
14035
14155
|
}
|
|
14036
14156
|
else {
|
|
@@ -14073,7 +14193,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14073
14193
|
tooltipEle.style.cssText = 'position: absolute;pointer-events:none;';
|
|
14074
14194
|
document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
|
|
14075
14195
|
}
|
|
14076
|
-
if (option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
|
|
14196
|
+
if (typeof option.template !== 'function' && option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
|
|
14077
14197
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
14078
14198
|
}
|
|
14079
14199
|
templateData = this.setTooltipContent(option, templateData);
|
|
@@ -14098,10 +14218,14 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14098
14218
|
if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
|
|
14099
14219
|
(targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
|
|
14100
14220
|
_this.maps['isProtectedOnChange'] = true;
|
|
14221
|
+
tooltipArgs.options['textStyle']['size'] = tooltipArgs.options['textStyle']['size']
|
|
14222
|
+
|| _this.maps.themeStyle.fontSize;
|
|
14101
14223
|
tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
|
|
14102
14224
|
|| _this.maps.themeStyle.tooltipFontColor;
|
|
14103
14225
|
tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
|
|
14104
14226
|
|| _this.maps.themeStyle.fontFamily;
|
|
14227
|
+
tooltipArgs.options['textStyle']['fontWeight'] = tooltipArgs.options['textStyle']['fontWeight']
|
|
14228
|
+
|| _this.maps.themeStyle.fontWeight;
|
|
14105
14229
|
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
14106
14230
|
|| _this.maps.themeStyle.tooltipTextOpacity;
|
|
14107
14231
|
if (tooltipArgs.cancel) {
|
|
@@ -14693,7 +14817,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14693
14817
|
var down = this.mouseDownPoints;
|
|
14694
14818
|
var move = this.mouseMovePoints;
|
|
14695
14819
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14696
|
-
var border = { width: 1, color:
|
|
14820
|
+
var border = { width: 1, color: this.maps.themeStyle.rectangleZoomBorderColor };
|
|
14697
14821
|
var width = Math.abs(move.x - down.x);
|
|
14698
14822
|
var height = Math.abs(move.y - down.y);
|
|
14699
14823
|
var x = ((move.x > down.x) ? down.x : down.x - width);
|
|
@@ -14708,7 +14832,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14708
14832
|
height: map.availableSize.height,
|
|
14709
14833
|
style: 'position: absolute;'
|
|
14710
14834
|
});
|
|
14711
|
-
var rectOption = new RectOption(map.element.id + '_ZoomRect',
|
|
14835
|
+
var rectOption = new RectOption(map.element.id + '_ZoomRect', this.maps.themeStyle.rectangleZoomFillColor, border, this.maps.themeStyle.rectangleZoomFillOpacity, this.zoomingRect, 0, 0, '', '3');
|
|
14712
14836
|
rectSVGObject.appendChild(map.renderer.drawRectangle(rectOption));
|
|
14713
14837
|
getElementByID(map.element.id + '_Secondary_Element').appendChild(rectSVGObject);
|
|
14714
14838
|
}
|
|
@@ -15096,6 +15220,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15096
15220
|
zoomtextSize = measureText(zoomtext, style);
|
|
15097
15221
|
var start = labelY - zoomtextSize['height'] / 4;
|
|
15098
15222
|
var end = labelY + zoomtextSize['height'] / 4;
|
|
15223
|
+
labelY = end;
|
|
15099
15224
|
var xpositionEnds = labelX + zoomtextSize['width'] / 2;
|
|
15100
15225
|
var xpositionStart = labelX - zoomtextSize['width'] / 2;
|
|
15101
15226
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -15745,7 +15870,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15745
15870
|
map.markerCenterLatitude = null;
|
|
15746
15871
|
map.markerCenterLongitude = null;
|
|
15747
15872
|
this.isZoomSelection = false;
|
|
15748
|
-
this.isPan =
|
|
15873
|
+
this.isPan = map.zoomSettings.enablePanning;
|
|
15749
15874
|
this.toolBarZooming(map.zoomSettings.minZoom, 'Reset');
|
|
15750
15875
|
if ((this.isPan && !this.isZoomSelection) || (!this.isPan && this.isZoomSelection)) {
|
|
15751
15876
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
@@ -16406,6 +16531,19 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
16406
16531
|
Print.prototype.getHTMLContent = function (maps, elements) {
|
|
16407
16532
|
var div = createElement('div');
|
|
16408
16533
|
var divElement = maps.element.cloneNode(true);
|
|
16534
|
+
var backgroundElement = (!maps.isTileMap ? divElement.getElementsByTagName('svg')[0] : divElement.getElementsByTagName('svg')[1]);
|
|
16535
|
+
if (!isNullOrUndefined(backgroundElement)) {
|
|
16536
|
+
backgroundElement = backgroundElement.childNodes[0];
|
|
16537
|
+
if (!isNullOrUndefined(backgroundElement)) {
|
|
16538
|
+
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
16539
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16540
|
+
backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
16541
|
+
}
|
|
16542
|
+
else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16543
|
+
backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
16544
|
+
}
|
|
16545
|
+
}
|
|
16546
|
+
}
|
|
16409
16547
|
if (maps.isTileMap) {
|
|
16410
16548
|
for (var i = 0; i < divElement.childElementCount; i++) {
|
|
16411
16549
|
if (divElement.children[i].id === maps.element.id + '_tile_parent') {
|
|
@@ -16502,9 +16640,17 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
16502
16640
|
var svgDataElement;
|
|
16503
16641
|
var tileSvg;
|
|
16504
16642
|
var svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
|
|
16643
|
+
var backgroundElement = svgObject.childNodes[0];
|
|
16644
|
+
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
16645
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16646
|
+
svgObject.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
16647
|
+
}
|
|
16648
|
+
else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16649
|
+
svgObject.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
16650
|
+
}
|
|
16505
16651
|
if (!maps.isTileMap) {
|
|
16506
16652
|
svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
|
|
16507
|
-
|
|
16653
|
+
svgObject.outerHTML + '</svg>';
|
|
16508
16654
|
}
|
|
16509
16655
|
else {
|
|
16510
16656
|
tileSvg = getElementByID(maps.element.id + '_Tile_SVG').cloneNode(true);
|
|
@@ -16543,6 +16689,7 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
16543
16689
|
image_1.src = url;
|
|
16544
16690
|
}
|
|
16545
16691
|
else {
|
|
16692
|
+
maps.isExportInitialTileMap = true;
|
|
16546
16693
|
var svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
|
|
16547
16694
|
var top_1 = parseFloat(svgParentElement.getAttribute('y'));
|
|
16548
16695
|
var left_1 = parseFloat(svgParentElement.getAttribute('x'));
|
|
@@ -16552,7 +16699,9 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
16552
16699
|
var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
|
|
16553
16700
|
var exportTileImg = new Image();
|
|
16554
16701
|
exportTileImg.crossOrigin = 'Anonymous';
|
|
16555
|
-
|
|
16702
|
+
var 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' :
|
|
16703
|
+
(maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
|
|
16704
|
+
ctxt_1.fillStyle = background;
|
|
16556
16705
|
ctxt_1.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
|
|
16557
16706
|
ctxt_1.font = maps.titleSettings.textStyle.size + ' Arial';
|
|
16558
16707
|
var titleElement = document.getElementById(maps.element.id + '_Map_title');
|
|
@@ -16582,8 +16731,10 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
16582
16731
|
if (allowDownload) {
|
|
16583
16732
|
triggerDownload(fileName, type, localBase64, isDownload);
|
|
16584
16733
|
localStorage.removeItem('local-canvasImage');
|
|
16734
|
+
maps.isExportInitialTileMap = false;
|
|
16585
16735
|
}
|
|
16586
16736
|
else {
|
|
16737
|
+
maps.isExportInitialTileMap = false;
|
|
16587
16738
|
if (type === 'PNG') {
|
|
16588
16739
|
resolve(localBase64);
|
|
16589
16740
|
}
|
|
@@ -16663,6 +16814,9 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
16663
16814
|
PdfExport.prototype.export = function (maps, type, fileName, allowDownload, orientation) {
|
|
16664
16815
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16665
16816
|
var promise = new Promise(function (resolve, reject) {
|
|
16817
|
+
if (maps.isTileMap) {
|
|
16818
|
+
maps.isExportInitialTileMap = true;
|
|
16819
|
+
}
|
|
16666
16820
|
var canvasElement = createElement('canvas', {
|
|
16667
16821
|
id: 'ej2-canvas',
|
|
16668
16822
|
attrs: {
|
|
@@ -16676,10 +16830,12 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
16676
16830
|
var exportElement = maps.svgObject.cloneNode(true);
|
|
16677
16831
|
var backgroundElement = exportElement.childNodes[0];
|
|
16678
16832
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
16679
|
-
if ((maps.theme === 'Tailwind' || maps.theme === '
|
|
16680
|
-
|| maps.theme === 'Fluent' || maps.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16833
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16681
16834
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
16682
16835
|
}
|
|
16836
|
+
else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
16837
|
+
exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
|
|
16838
|
+
}
|
|
16683
16839
|
var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
|
|
16684
16840
|
[(new XMLSerializer()).serializeToString(exportElement)], { type: 'image/svg+xml' }));
|
|
16685
16841
|
var pdfDocument = new PdfDocument();
|
|
@@ -16715,7 +16871,9 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
16715
16871
|
var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
|
|
16716
16872
|
var tileImg = new Image();
|
|
16717
16873
|
tileImg.crossOrigin = 'Anonymous';
|
|
16718
|
-
|
|
16874
|
+
var 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' :
|
|
16875
|
+
(maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
|
|
16876
|
+
ctx.fillStyle = background;
|
|
16719
16877
|
ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
|
|
16720
16878
|
ctx.font = maps.titleSettings.textStyle.size + ' Arial';
|
|
16721
16879
|
var titleElement = document.getElementById(maps.element.id + '_Map_title');
|
|
@@ -16745,6 +16903,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
16745
16903
|
pdfDocument.pageSettings.orientation = orientation;
|
|
16746
16904
|
x = x.slice(x.indexOf(',') + 1);
|
|
16747
16905
|
pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
|
|
16906
|
+
maps.isExportInitialTileMap = false;
|
|
16748
16907
|
if (allowDownload) {
|
|
16749
16908
|
pdfDocument.save(fileName + '.pdf');
|
|
16750
16909
|
pdfDocument.destroy();
|