@syncfusion/ej2-maps 21.2.10 → 22.1.39

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.
@@ -1,4 +1,4 @@
1
- import { Ajax, Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, compile, createElement, extend, isNullOrUndefined, merge, print, remove, setValue } from '@syncfusion/ej2-base';
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(Theme.tooltipLabelFont, Font)
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: Theme.legendTitleFont.size, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: Theme.legendTitleFont.fontWeight, fontFamily: null }, Font)
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 Ajax();
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 Ajax({
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 jsonObject = JSON.parse(json);
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 ajaxModule = new Ajax(localAjax.dataOptions, localAjax.type, localAjax.async, localAjax.contentType);
7721
- ajaxModule.onSuccess = (args) => {
7722
- this.processResponseJsonData('Ajax', args, layer, type);
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
- ajaxModule.send(localAjax.sendData);
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) : JSON.parse(data);
7858
+ layer.shapeData = (processType === 'DataManager') ? processResult(data) : data;
7741
7859
  }
7742
7860
  else {
7743
- layer.dataSource = (processType === 'DataManager') ? processResult(data) : JSON.parse('[' + data + ']')[0];
7861
+ layer.dataSource = (processType === 'DataManager') ? processResult(data) : data;
7744
7862
  }
7745
7863
  }
7746
7864
  if (!isNullOrUndefined(processType) && this.serverProcess['request'] === this.serverProcess['response']) {
@@ -7971,9 +8089,12 @@ let Maps = class Maps extends Component {
7971
8089
  setSecondaryElementPosition() {
7972
8090
  let element = getElementByID(this.element.id + '_Secondary_Element');
7973
8091
  let rect = this.element.getBoundingClientRect();
7974
- let svgRect = getElementByID(this.element.id + '_svg').getBoundingClientRect();
7975
- element.style.marginLeft = Math.max(svgRect.left - rect.left, 0) + 'px';
7976
- element.style.marginTop = Math.max(svgRect.top - rect.top, 0) + 'px';
8092
+ let svgElement = getElementByID(this.element.id + '_svg');
8093
+ if (!isNullOrUndefined(svgElement)) {
8094
+ let svgRect = svgElement.getBoundingClientRect();
8095
+ element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
8096
+ element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
8097
+ }
7977
8098
  }
7978
8099
  zoomingChange() {
7979
8100
  let left;
@@ -8195,8 +8316,8 @@ let Maps = class Maps extends Component {
8195
8316
  let height;
8196
8317
  const width = Math.abs((this.margin.left + this.margin.right) - this.availableSize.width);
8197
8318
  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);
8319
+ style.fontWeight = type === 'title' ? style.fontWeight || this.themeStyle.titleFontWeight : style.fontWeight || this.themeStyle.titleFontWeight;
8320
+ style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || this.themeStyle.subTitleFontSize || Theme.mapsSubTitleFont.size);
8200
8321
  if (title.text) {
8201
8322
  if (isNullOrUndefined(groupEle)) {
8202
8323
  groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
@@ -8921,7 +9042,7 @@ let Maps = class Maps extends Component {
8921
9042
  * @param e - Specifies the arguments of window resize event.
8922
9043
  */
8923
9044
  mapsOnResize(e) {
8924
- if (!this.isDestroyed) {
9045
+ if (!this.isDestroyed && !this.isExportInitialTileMap) {
8925
9046
  this.isResize = this.isReset = true;
8926
9047
  const args = {
8927
9048
  cancel: false,
@@ -9656,17 +9777,15 @@ let Maps = class Maps extends Component {
9656
9777
  let promise;
9657
9778
  if (!this.isDestroyed) {
9658
9779
  promise = new Promise((resolve, reject) => {
9659
- const ajax = new Ajax({
9780
+ const fetchApi = new Fetch({
9660
9781
  url: url
9661
9782
  });
9662
- ajax.onSuccess = (json) => {
9663
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9664
- const jsonObject = JSON.parse(json);
9783
+ fetchApi.onSuccess = (json) => {
9665
9784
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9666
- const resource = jsonObject['resourceSets'][0]['resources'][0];
9785
+ const resource = json['resourceSets'][0]['resources'][0];
9667
9786
  resolve(resource['imageUrl']);
9668
9787
  };
9669
- ajax.send();
9788
+ fetchApi.send();
9670
9789
  });
9671
9790
  }
9672
9791
  return promise;
@@ -10332,6 +10451,7 @@ class DataLabel {
10332
10451
  let locationX;
10333
10452
  let locationY;
10334
10453
  style.fontFamily = this.maps.theme.toLowerCase() !== 'material' ? this.maps.themeStyle.labelFontFamily : style.fontFamily;
10454
+ style.fontWeight = style.fontWeight || this.maps.themeStyle.fontWeight || Theme.dataLabelFont.fontWeight;
10335
10455
  shape = shapes['property'];
10336
10456
  const properties = (Object.prototype.toString.call(layer.shapePropertyPath) === '[object Array]' ?
10337
10457
  layer.shapePropertyPath : [layer.shapePropertyPath]);
@@ -11318,6 +11438,7 @@ class Legend {
11318
11438
  legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
11319
11439
  this.maps.themeStyle.fontFamily;
11320
11440
  legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
11441
+ legendTextStyle.fontWeight = legendTextStyle.fontWeight || map.themeStyle.fontWeight;
11321
11442
  if (i === 0) {
11322
11443
  this.renderLegendBorder();
11323
11444
  }
@@ -12086,6 +12207,8 @@ class Legend {
12086
12207
  if (legendTitle) {
12087
12208
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
12088
12209
  textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
12210
+ textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size : this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
12211
+ textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight : this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
12089
12212
  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
12213
  renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
12091
12214
  }
@@ -13692,7 +13815,7 @@ class MapsTooltip {
13692
13815
  currentData = this.formatter(marker$$1.tooltipSettings.format, marker$$1.dataSource[dataIndex]);
13693
13816
  }
13694
13817
  else {
13695
- if (marker$$1.template && !marker$$1.tooltipSettings.valuePath) {
13818
+ if (typeof marker$$1.template !== 'function' && marker$$1.template && !marker$$1.tooltipSettings.valuePath) {
13696
13819
  currentData = marker$$1.template.split('>')[1].split('<')[0];
13697
13820
  }
13698
13821
  else {
@@ -13735,7 +13858,7 @@ class MapsTooltip {
13735
13858
  tooltipEle.style.cssText = 'position: absolute;pointer-events:none;';
13736
13859
  document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
13737
13860
  }
13738
- if (option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
13861
+ if (typeof option.template !== 'function' && option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
13739
13862
  option.template = option.template[Object.keys(option.template)[0]];
13740
13863
  }
13741
13864
  templateData = this.setTooltipContent(option, templateData);
@@ -13760,10 +13883,14 @@ class MapsTooltip {
13760
13883
  if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
13761
13884
  (targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
13762
13885
  this.maps['isProtectedOnChange'] = true;
13886
+ tooltipArgs.options['textStyle']['size'] = tooltipArgs.options['textStyle']['size']
13887
+ || this.maps.themeStyle.fontSize;
13763
13888
  tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
13764
13889
  || this.maps.themeStyle.tooltipFontColor;
13765
13890
  tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
13766
13891
  || this.maps.themeStyle.fontFamily;
13892
+ tooltipArgs.options['textStyle']['fontWeight'] = tooltipArgs.options['textStyle']['fontWeight']
13893
+ || this.maps.themeStyle.fontWeight;
13767
13894
  tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
13768
13895
  || this.maps.themeStyle.tooltipTextOpacity;
13769
13896
  if (tooltipArgs.cancel) {
@@ -14351,7 +14478,7 @@ class Zoom {
14351
14478
  const down = this.mouseDownPoints;
14352
14479
  const move = this.mouseMovePoints;
14353
14480
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14354
- const border = { width: 1, color: '#009900' };
14481
+ const border = { width: 1, color: this.maps.themeStyle.rectangleZoomBorderColor };
14355
14482
  const width = Math.abs(move.x - down.x);
14356
14483
  const height = Math.abs(move.y - down.y);
14357
14484
  const x = ((move.x > down.x) ? down.x : down.x - width);
@@ -14366,7 +14493,7 @@ class Zoom {
14366
14493
  height: map.availableSize.height,
14367
14494
  style: 'position: absolute;'
14368
14495
  });
14369
- const rectOption = new RectOption(map.element.id + '_ZoomRect', '#d3d3d3', border, 0.5, this.zoomingRect, 0, 0, '', '3');
14496
+ const rectOption = new RectOption(map.element.id + '_ZoomRect', this.maps.themeStyle.rectangleZoomFillColor, border, this.maps.themeStyle.rectangleZoomFillOpacity, this.zoomingRect, 0, 0, '', '3');
14370
14497
  rectSVGObject.appendChild(map.renderer.drawRectangle(rectOption));
14371
14498
  getElementByID(map.element.id + '_Secondary_Element').appendChild(rectSVGObject);
14372
14499
  }
@@ -14751,6 +14878,7 @@ class Zoom {
14751
14878
  zoomtextSize = measureText(zoomtext, style);
14752
14879
  const start = labelY - zoomtextSize['height'] / 4;
14753
14880
  const end = labelY + zoomtextSize['height'] / 4;
14881
+ labelY = end;
14754
14882
  const xpositionEnds = labelX + zoomtextSize['width'] / 2;
14755
14883
  const xpositionStart = labelX - zoomtextSize['width'] / 2;
14756
14884
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -15398,7 +15526,7 @@ class Zoom {
15398
15526
  map.markerCenterLatitude = null;
15399
15527
  map.markerCenterLongitude = null;
15400
15528
  this.isZoomSelection = false;
15401
- this.isPan = this.isPanning = map.zoomSettings.enablePanning;
15529
+ this.isPan = map.zoomSettings.enablePanning;
15402
15530
  this.toolBarZooming(map.zoomSettings.minZoom, 'Reset');
15403
15531
  if ((this.isPan && !this.isZoomSelection) || (!this.isPan && this.isZoomSelection)) {
15404
15532
  if (!this.maps.zoomSettings.enablePanning) {
@@ -16057,6 +16185,19 @@ class Print {
16057
16185
  getHTMLContent(maps, elements) {
16058
16186
  const div = createElement('div');
16059
16187
  const divElement = maps.element.cloneNode(true);
16188
+ let backgroundElement = (!maps.isTileMap ? divElement.getElementsByTagName('svg')[0] : divElement.getElementsByTagName('svg')[1]);
16189
+ if (!isNullOrUndefined(backgroundElement)) {
16190
+ backgroundElement = backgroundElement.childNodes[0];
16191
+ if (!isNullOrUndefined(backgroundElement)) {
16192
+ const backgroundColor = backgroundElement.getAttribute('fill');
16193
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
16194
+ backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
16195
+ }
16196
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
16197
+ backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
16198
+ }
16199
+ }
16200
+ }
16060
16201
  if (maps.isTileMap) {
16061
16202
  for (let i = 0; i < divElement.childElementCount; i++) {
16062
16203
  if (divElement.children[i].id === maps.element.id + '_tile_parent') {
@@ -16151,10 +16292,18 @@ class ImageExport {
16151
16292
  const svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
16152
16293
  let svgDataElement;
16153
16294
  let tileSvg;
16154
- const svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
16295
+ let svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
16296
+ const backgroundElement = svgObject.childNodes[0];
16297
+ const backgroundColor = backgroundElement.getAttribute('fill');
16298
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
16299
+ svgObject.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
16300
+ }
16301
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
16302
+ svgObject.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
16303
+ }
16155
16304
  if (!maps.isTileMap) {
16156
16305
  svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
16157
- maps.svgObject.outerHTML + '</svg>';
16306
+ svgObject.outerHTML + '</svg>';
16158
16307
  }
16159
16308
  else {
16160
16309
  tileSvg = getElementByID(maps.element.id + '_Tile_SVG').cloneNode(true);
@@ -16193,6 +16342,7 @@ class ImageExport {
16193
16342
  image.src = url;
16194
16343
  }
16195
16344
  else {
16345
+ maps.isExportInitialTileMap = true;
16196
16346
  const svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
16197
16347
  const top = parseFloat(svgParentElement.getAttribute('y'));
16198
16348
  const left = parseFloat(svgParentElement.getAttribute('x'));
@@ -16202,7 +16352,9 @@ class ImageExport {
16202
16352
  const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
16203
16353
  const exportTileImg = new Image();
16204
16354
  exportTileImg.crossOrigin = 'Anonymous';
16205
- ctxt.fillStyle = maps.background ? maps.background : '#FFFFFF';
16355
+ 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' :
16356
+ (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
16357
+ ctxt.fillStyle = background;
16206
16358
  ctxt.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
16207
16359
  ctxt.font = maps.titleSettings.textStyle.size + ' Arial';
16208
16360
  const titleElement = document.getElementById(maps.element.id + '_Map_title');
@@ -16232,8 +16384,10 @@ class ImageExport {
16232
16384
  if (allowDownload) {
16233
16385
  triggerDownload(fileName, type, localBase64, isDownload);
16234
16386
  localStorage.removeItem('local-canvasImage');
16387
+ maps.isExportInitialTileMap = false;
16235
16388
  }
16236
16389
  else {
16390
+ maps.isExportInitialTileMap = false;
16237
16391
  if (type === 'PNG') {
16238
16392
  resolve(localBase64);
16239
16393
  }
@@ -16308,6 +16462,9 @@ class PdfExport {
16308
16462
  export(maps, type, fileName, allowDownload, orientation) {
16309
16463
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16310
16464
  const promise = new Promise((resolve, reject) => {
16465
+ if (maps.isTileMap) {
16466
+ maps.isExportInitialTileMap = true;
16467
+ }
16311
16468
  const canvasElement = createElement('canvas', {
16312
16469
  id: 'ej2-canvas',
16313
16470
  attrs: {
@@ -16321,10 +16478,12 @@ class PdfExport {
16321
16478
  const exportElement = maps.svgObject.cloneNode(true);
16322
16479
  const backgroundElement = exportElement.childNodes[0];
16323
16480
  const backgroundColor = backgroundElement.getAttribute('fill');
16324
- if ((maps.theme === 'Tailwind' || maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5' || maps.theme === 'Bootstrap5Dark'
16325
- || maps.theme === 'Fluent' || maps.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
16481
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
16326
16482
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
16327
16483
  }
16484
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
16485
+ exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
16486
+ }
16328
16487
  const url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
16329
16488
  [(new XMLSerializer()).serializeToString(exportElement)], { type: 'image/svg+xml' }));
16330
16489
  const pdfDocument = new PdfDocument();
@@ -16360,7 +16519,9 @@ class PdfExport {
16360
16519
  const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
16361
16520
  const tileImg = new Image();
16362
16521
  tileImg.crossOrigin = 'Anonymous';
16363
- ctx.fillStyle = maps.background ? maps.background : '#FFFFFF';
16522
+ 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' :
16523
+ (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
16524
+ ctx.fillStyle = background;
16364
16525
  ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
16365
16526
  ctx.font = maps.titleSettings.textStyle.size + ' Arial';
16366
16527
  const titleElement = document.getElementById(maps.element.id + '_Map_title');
@@ -16390,6 +16551,7 @@ class PdfExport {
16390
16551
  pdfDocument.pageSettings.orientation = orientation;
16391
16552
  x = x.slice(x.indexOf(',') + 1);
16392
16553
  pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
16554
+ maps.isExportInitialTileMap = false;
16393
16555
  if (allowDownload) {
16394
16556
  pdfDocument.save(fileName + '.pdf');
16395
16557
  pdfDocument.destroy();