@syncfusion/ej2-maps 21.2.5 → 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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.2.5
3
+ * version : 22.1.34
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-maps@*",
3
- "_id": "@syncfusion/ej2-maps@21.2.4",
3
+ "_id": "@syncfusion/ej2-maps@16.41.37",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-chFGr5RHKzsoD0m4uHhhzZ3VXh16ZKdd9/1B2U9+dlFU1fiQhS3X8tb+zlHpX436ajWxRfPdiH7F5y8HqNhBMQ==",
5
+ "_integrity": "sha512-ehyxI+rCAsJUHDgK7+kGHLJMclAYfs4lCX3KpwSylUkvJGxS3hcFCjc6mdYvAZk9Mw1KkRczvUIWg9IfnsYXuA==",
6
6
  "_location": "/@syncfusion/ej2-maps",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-maps",
24
24
  "/@syncfusion/ej2-vue-maps"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-21.2.4.tgz",
27
- "_shasum": "7cf07ae680629ddbb80aec3011aa1c7c7c3439b5",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-maps/-/ej2-maps-16.41.37.tgz",
27
+ "_shasum": "bebfe5cb6c48a1db118127f667bad801ee1dfd23",
28
28
  "_spec": "@syncfusion/ej2-maps@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
30
30
  "author": {
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "bundleDependencies": false,
37
37
  "dependencies": {
38
- "@syncfusion/ej2-base": "~21.2.3",
39
- "@syncfusion/ej2-buttons": "~21.2.5",
40
- "@syncfusion/ej2-compression": "~21.2.3",
41
- "@syncfusion/ej2-data": "~21.2.4",
42
- "@syncfusion/ej2-file-utils": "~21.2.3",
43
- "@syncfusion/ej2-pdf-export": "~21.2.3",
44
- "@syncfusion/ej2-svg-base": "~21.2.3"
38
+ "@syncfusion/ej2-base": "~22.1.34",
39
+ "@syncfusion/ej2-buttons": "~22.1.34",
40
+ "@syncfusion/ej2-compression": "~22.1.34",
41
+ "@syncfusion/ej2-data": "~22.1.34",
42
+ "@syncfusion/ej2-file-utils": "~22.1.34",
43
+ "@syncfusion/ej2-pdf-export": "~22.1.34",
44
+ "@syncfusion/ej2-svg-base": "~22.1.34"
45
45
  },
46
46
  "deprecated": false,
47
47
  "description": "The Maps component is used to visualize the geographical data and represent the statistical data of a particular geographical area on earth with user interactivity, and provides various customizing options",
@@ -93,6 +93,6 @@
93
93
  "url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
94
94
  },
95
95
  "typings": "index.d.ts",
96
- "version": "21.2.5",
96
+ "version": "22.1.34",
97
97
  "sideEffects": false
98
98
  }
@@ -1,6 +1,7 @@
1
1
  import { findMidPointOfPolygon, Rect, filter, getTemplateFunction, getZoomTranslate, getTranslate, RectOption, convertElementFromLabel, Point, TextOption, renderTextElement, textTrim, measureText, Internalize } from '../utils/helper';
2
2
  import { isNullOrUndefined } from '@syncfusion/ej2-base';
3
3
  import { dataLabelRendering } from '../model/constants';
4
+ import { Theme } from '../model/theme';
4
5
  /**
5
6
  * DataLabel Module used to render the maps datalabel
6
7
  */
@@ -80,6 +81,7 @@ var DataLabel = /** @class */ (function () {
80
81
  var locationX;
81
82
  var locationY;
82
83
  style.fontFamily = this.maps.theme.toLowerCase() !== 'material' ? this.maps.themeStyle.labelFontFamily : style.fontFamily;
84
+ style.fontWeight = style.fontWeight || this.maps.themeStyle.fontWeight || Theme.dataLabelFont.fontWeight;
83
85
  shape = shapes['property'];
84
86
  var properties = (Object.prototype.toString.call(layer.shapePropertyPath) === '[object Array]' ?
85
87
  layer.shapePropertyPath : [layer.shapePropertyPath]);
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-case-declarations */
2
- import { isNullOrUndefined, extend, createElement, Ajax } from '@syncfusion/ej2-base';
2
+ import { isNullOrUndefined, extend, createElement, Fetch } from '@syncfusion/ej2-base';
3
3
  import { getShapeColor } from '../model/theme';
4
4
  import { GeoLocation, isCustomPath, convertGeoToPoint, Point, PathOption, Size, removeElement } from '../utils/helper';
5
5
  import { getElementByID, maintainSelection, getValueFromObject } from '../utils/helper';
@@ -18,7 +18,7 @@ var LayerPanel = /** @class */ (function () {
18
18
  this.horizontalPan = false;
19
19
  this.horizontalPanXCount = 0;
20
20
  this.mapObject = map;
21
- this.ajaxModule = new Ajax();
21
+ this.ajaxModule = new Fetch();
22
22
  this.ajaxResponse = [];
23
23
  }
24
24
  LayerPanel.prototype.measureLayerPanel = function () {
@@ -257,14 +257,13 @@ var LayerPanel = /** @class */ (function () {
257
257
  var bing_1 = new BingMap(_this.mapObject);
258
258
  var bingType = layer.bingMapType === 'AerialWithLabel' ? 'AerialWithLabelsOnDemand' : layer.bingMapType;
259
259
  var url = 'https://dev.virtualearth.net/REST/V1/Imagery/Metadata/' + bingType;
260
- var ajax = new Ajax({
260
+ var ajax = new Fetch({
261
261
  url: url + '?output=json&include=ImageryProviders&urischeme=https&key=' + layer.key
262
262
  });
263
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
263
264
  ajax.onSuccess = function (json) {
264
265
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
265
- var jsonObject = JSON.parse(json);
266
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
267
- var resource = jsonObject['resourceSets'][0]['resources'][0];
266
+ var resource = json['resourceSets'][0]['resources'][0];
268
267
  var imageUrl = resource['imageUrl'];
269
268
  var subDomains = resource['imageUrlSubdomains'];
270
269
  var maxZoom = resource['zoomMax'];
@@ -1293,6 +1292,7 @@ var LayerPanel = /** @class */ (function () {
1293
1292
  imgElement.setAttribute('width', '256px');
1294
1293
  imgElement.setAttribute('src', tile.src);
1295
1294
  imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
1295
+ imgElement.style.setProperty('user-select', 'none');
1296
1296
  child.appendChild(imgElement);
1297
1297
  animateElement.appendChild(child);
1298
1298
  }
@@ -1302,6 +1302,7 @@ var LayerPanel = /** @class */ (function () {
1302
1302
  imgElement.setAttribute('height', '256px');
1303
1303
  imgElement.setAttribute('width', '256px');
1304
1304
  imgElement.setAttribute('src', tile.src);
1305
+ imgElement.style.setProperty('user-select', 'none');
1305
1306
  imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
1306
1307
  var child = createElement('div', { id: mapId + '_tile_' + id });
1307
1308
  child.style.position = 'absolute';
@@ -2,6 +2,7 @@ import { click, legendRendering } from '../index';
2
2
  import { Rect, measureText, PathOption, textTrim, drawBalloon, removeClass, querySelector, getTemplateFunction, maintainStyleClass, getValueFromObject } from '../utils/helper';
3
3
  import { RectOption, Size, TextOption, Point, renderTextElement, drawSymbol, checkPropertyPath, getElement } from '../utils/helper';
4
4
  import { isNullOrUndefined, Browser, EventHandler, remove, extend } from '@syncfusion/ej2-base';
5
+ import { Theme } from '../model/theme';
5
6
  /**
6
7
  * Legend module is used to render legend for the maps
7
8
  */
@@ -497,6 +498,7 @@ var Legend = /** @class */ (function () {
497
498
  legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
498
499
  this.maps.themeStyle.fontFamily;
499
500
  legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
501
+ legendTextStyle.fontWeight = legendTextStyle.fontWeight || map.themeStyle.fontWeight;
500
502
  if (i === 0) {
501
503
  this.renderLegendBorder();
502
504
  }
@@ -1265,6 +1267,8 @@ var Legend = /** @class */ (function () {
1265
1267
  if (legendTitle) {
1266
1268
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
1267
1269
  textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
1270
+ textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size : this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
1271
+ textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight : this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
1268
1272
  textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
1269
1273
  renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
1270
1274
  }
@@ -1,4 +1,4 @@
1
- import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Ajax } from '@syncfusion/ej2-base';import { EventHandler, Browser, EmitType, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';import { ModuleDeclaration } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { Size, createSvg, Point, removeElement, triggerShapeEvent, showTooltip, checkShapeDataFields, MapLocation, getMousePosition, calculateSize } from './utils/helper';import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, mergeSeparateCluster, customizeStyle, querySelector } from './utils/helper';import { createStyle } from './utils/helper';import { ZoomSettings, LegendSettings } from './model/base';import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';import { ZoomSettingsModel, LegendSettingsModel, LayerSettingsModel, BubbleSettingsModel } from './model/base-model';import { MarkerSettingsModel, SelectionSettingsModel, InitialMarkerSelectionSettingsModel } from './model/base-model';import { TitleSettingsModel, BorderModel, MarginModel, CenterPositionModel, InitialShapeSelectionSettingsModel } from './model/base-model';import { MapsAreaSettingsModel, AnnotationModel } from './model/base-model';import { Bubble } from './layers/bubble';import { Legend } from './layers/legend';import { Marker } from './layers/marker';import { Highlight } from './user-interaction/highlight';import { Selection } from './user-interaction/selection';import { MapsTooltip } from './user-interaction/tooltip';import { Zoom } from './user-interaction/zoom';import { load, click, onclick, rightClick, loaded, doubleClick, resize, shapeSelected, itemSelection, zoomIn } from './model/constants';import { ProjectionType, MapsTheme, PanDirection, TooltipGesture } from './utils/enum';import { getThemeStyle, Theme } from './model/theme';import { ILoadEventArgs, ILoadedEventArgs, IMouseEventArgs, IResizeEventArgs, ITooltipRenderEventArgs } from './model/interface';import { GeoPosition, ITooltipRenderCompleteEventArgs, ILegendRenderingEventArgs } from './model/interface';import { ILayerRenderingEventArgs, IShapeRenderingEventArgs, IMarkerRenderingEventArgs, IMarkerClickEventArgs } from './model/interface';import { IMarkerMoveEventArgs, ILabelRenderingEventArgs, IBubbleMoveEventArgs, IBubbleClickEventArgs } from './model/interface';import { IMarkerClusterClickEventArgs, IMarkerClusterMoveEventArgs, IMarkerClusterRenderingEventArgs } from './model/interface';import { ISelectionEventArgs, IShapeSelectedEventArgs, IMapPanEventArgs, IMapZoomEventArgs } from './model/interface';import { IBubbleRenderingEventArgs, IAnimationCompleteEventArgs, IPrintEventArgs, IThemeStyle } from './model/interface';import { LayerPanel } from './layers/layer-panel';import { GeoLocation, Rect, RectOption, measureText, getElementByID, MapAjax, processResult, getElementsByClassName } from '../maps/utils/helper';import { findPosition, textTrim, TextOption, renderTextElement, calculateZoomLevel, convertTileLatLongToPoint, convertGeoToPoint} from '../maps/utils/helper';import { Annotations } from '../maps/user-interaction/annotation';import { FontModel, DataLabel, MarkerSettings, IAnnotationRenderingEventArgs, IMarkerDragEventArgs } from './index';import { NavigationLineSettingsModel, changeBorderWidth } from './index';import { NavigationLine } from './layers/navigation-selected-line';import { DataManager, Query } from '@syncfusion/ej2-data';import { ExportType } from '../maps/utils/enum';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { Print } from './model/print';import { PdfExport } from './model/export-pdf';import { ImageExport } from './model/export-image';
1
+ import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, Fetch } from '@syncfusion/ej2-base';import { EventHandler, Browser, EmitType, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';import { ModuleDeclaration } from '@syncfusion/ej2-base';import { SvgRenderer } from '@syncfusion/ej2-svg-base';import { Size, createSvg, Point, removeElement, triggerShapeEvent, showTooltip, checkShapeDataFields, MapLocation, getMousePosition, calculateSize } from './utils/helper';import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, mergeSeparateCluster, customizeStyle, querySelector } from './utils/helper';import { createStyle } from './utils/helper';import { ZoomSettings, LegendSettings } from './model/base';import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';import { ZoomSettingsModel, LegendSettingsModel, LayerSettingsModel, BubbleSettingsModel } from './model/base-model';import { MarkerSettingsModel, SelectionSettingsModel, InitialMarkerSelectionSettingsModel } from './model/base-model';import { TitleSettingsModel, BorderModel, MarginModel, CenterPositionModel, InitialShapeSelectionSettingsModel } from './model/base-model';import { MapsAreaSettingsModel, AnnotationModel } from './model/base-model';import { Bubble } from './layers/bubble';import { Legend } from './layers/legend';import { Marker } from './layers/marker';import { Highlight } from './user-interaction/highlight';import { Selection } from './user-interaction/selection';import { MapsTooltip } from './user-interaction/tooltip';import { Zoom } from './user-interaction/zoom';import { load, click, onclick, rightClick, loaded, doubleClick, resize, shapeSelected, itemSelection, zoomIn } from './model/constants';import { ProjectionType, MapsTheme, PanDirection, TooltipGesture } from './utils/enum';import { getThemeStyle, Theme } from './model/theme';import { ILoadEventArgs, ILoadedEventArgs, IMouseEventArgs, IResizeEventArgs, ITooltipRenderEventArgs } from './model/interface';import { GeoPosition, ITooltipRenderCompleteEventArgs, ILegendRenderingEventArgs } from './model/interface';import { ILayerRenderingEventArgs, IShapeRenderingEventArgs, IMarkerRenderingEventArgs, IMarkerClickEventArgs } from './model/interface';import { IMarkerMoveEventArgs, ILabelRenderingEventArgs, IBubbleMoveEventArgs, IBubbleClickEventArgs } from './model/interface';import { IMarkerClusterClickEventArgs, IMarkerClusterMoveEventArgs, IMarkerClusterRenderingEventArgs } from './model/interface';import { ISelectionEventArgs, IShapeSelectedEventArgs, IMapPanEventArgs, IMapZoomEventArgs } from './model/interface';import { IBubbleRenderingEventArgs, IAnimationCompleteEventArgs, IPrintEventArgs, IThemeStyle } from './model/interface';import { LayerPanel } from './layers/layer-panel';import { GeoLocation, Rect, RectOption, measureText, getElementByID, MapAjax, processResult, getElementsByClassName } from '../maps/utils/helper';import { findPosition, textTrim, TextOption, renderTextElement, calculateZoomLevel, convertTileLatLongToPoint, convertGeoToPoint} from '../maps/utils/helper';import { Annotations } from '../maps/user-interaction/annotation';import { FontModel, DataLabel, MarkerSettings, IAnnotationRenderingEventArgs, IMarkerDragEventArgs } from './index';import { NavigationLineSettingsModel, changeBorderWidth } from './index';import { NavigationLine } from './layers/navigation-selected-line';import { DataManager, Query } from '@syncfusion/ej2-data';import { ExportType } from '../maps/utils/enum';import { PdfPageOrientation } from '@syncfusion/ej2-pdf-export';import { Print } from './model/print';import { PdfExport } from './model/export-pdf';import { ImageExport } from './model/export-image';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -521,6 +521,10 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
521
521
  * @private
522
522
  */
523
523
  layersCollection: LayerSettings[];
524
+ /**
525
+ * @private
526
+ */
527
+ isExportInitialTileMap: boolean;
524
528
  /**
525
529
  * @private
526
530
  * @hidden
package/src/maps/maps.js CHANGED
@@ -20,7 +20,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
20
20
  /**
21
21
  * Maps Component file
22
22
  */
23
- import { Component, NotifyPropertyChanges, Property, Ajax } from '@syncfusion/ej2-base';
23
+ import { Component, NotifyPropertyChanges, Property, Fetch } from '@syncfusion/ej2-base';
24
24
  import { EventHandler, Browser, isNullOrUndefined, createElement, setValue, extend } from '@syncfusion/ej2-base';
25
25
  import { Event, remove, L10n, Collection, Internationalization, Complex } from '@syncfusion/ej2-base';
26
26
  import { SvgRenderer } from '@syncfusion/ej2-svg-base';
@@ -338,11 +338,11 @@ var Maps = /** @class */ (function (_super) {
338
338
  Maps.prototype.processAjaxRequest = function (layer, localAjax, type) {
339
339
  var _this = this;
340
340
  this.serverProcess['request']++;
341
- var ajaxModule = new Ajax(localAjax.dataOptions, localAjax.type, localAjax.async, localAjax.contentType);
342
- ajaxModule.onSuccess = function (args) {
343
- _this.processResponseJsonData('Ajax', args, layer, type);
341
+ var fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
342
+ fetchApiModule.onSuccess = function (args) {
343
+ _this.processResponseJsonData('Fetch', args, layer, type);
344
344
  };
345
- ajaxModule.send(localAjax.sendData);
345
+ fetchApiModule.send(localAjax.sendData);
346
346
  };
347
347
  /**
348
348
  * This method is used to process the JSON data to render the maps.
@@ -358,10 +358,10 @@ var Maps = /** @class */ (function (_super) {
358
358
  this.serverProcess['response']++;
359
359
  if (processType) {
360
360
  if (dataType === 'ShapeData') {
361
- layer.shapeData = (processType === 'DataManager') ? processResult(data) : JSON.parse(data);
361
+ layer.shapeData = (processType === 'DataManager') ? processResult(data) : data;
362
362
  }
363
363
  else {
364
- layer.dataSource = (processType === 'DataManager') ? processResult(data) : JSON.parse('[' + data + ']')[0];
364
+ layer.dataSource = (processType === 'DataManager') ? processResult(data) : data;
365
365
  }
366
366
  }
367
367
  if (!isNullOrUndefined(processType) && this.serverProcess['request'] === this.serverProcess['response']) {
@@ -593,8 +593,8 @@ var Maps = /** @class */ (function (_super) {
593
593
  var element = getElementByID(this.element.id + '_Secondary_Element');
594
594
  var rect = this.element.getBoundingClientRect();
595
595
  var svgRect = getElementByID(this.element.id + '_svg').getBoundingClientRect();
596
- element.style.marginLeft = Math.max(svgRect.left - rect.left, 0) + 'px';
597
- element.style.marginTop = Math.max(svgRect.top - rect.top, 0) + 'px';
596
+ element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
597
+ element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
598
598
  };
599
599
  Maps.prototype.zoomingChange = function () {
600
600
  var left;
@@ -817,8 +817,8 @@ var Maps = /** @class */ (function (_super) {
817
817
  var height;
818
818
  var width = Math.abs((this.margin.left + this.margin.right) - this.availableSize.width);
819
819
  style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
820
- style.fontWeight = style.fontWeight || this.themeStyle.titleFontWeight;
821
- style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || Theme.mapsSubTitleFont.size);
820
+ style.fontWeight = type === 'title' ? style.fontWeight || this.themeStyle.titleFontWeight : style.fontWeight || this.themeStyle.titleFontWeight;
821
+ style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || this.themeStyle.subTitleFontSize || Theme.mapsSubTitleFont.size);
822
822
  if (title.text) {
823
823
  if (isNullOrUndefined(groupEle)) {
824
824
  groupEle = this.renderer.createGroup({ id: this.element.id + '_Title_Group' });
@@ -1555,7 +1555,7 @@ var Maps = /** @class */ (function (_super) {
1555
1555
  */
1556
1556
  Maps.prototype.mapsOnResize = function (e) {
1557
1557
  var _this = this;
1558
- if (!this.isDestroyed) {
1558
+ if (!this.isDestroyed && !this.isExportInitialTileMap) {
1559
1559
  this.isResize = this.isReset = true;
1560
1560
  var args = {
1561
1561
  cancel: false,
@@ -2297,17 +2297,15 @@ var Maps = /** @class */ (function (_super) {
2297
2297
  var promise;
2298
2298
  if (!this.isDestroyed) {
2299
2299
  promise = new Promise(function (resolve, reject) {
2300
- var ajax = new Ajax({
2300
+ var fetchApi = new Fetch({
2301
2301
  url: url
2302
2302
  });
2303
- ajax.onSuccess = function (json) {
2304
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2305
- var jsonObject = JSON.parse(json);
2303
+ fetchApi.onSuccess = function (json) {
2306
2304
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2307
- var resource = jsonObject['resourceSets'][0]['resources'][0];
2305
+ var resource = json['resourceSets'][0]['resources'][0];
2308
2306
  resolve(resource['imageUrl']);
2309
2307
  };
2310
- ajax.send();
2308
+ fetchApi.send();
2311
2309
  });
2312
2310
  }
2313
2311
  return promise;
@@ -9,8 +9,9 @@ export interface AnnotationModel {
9
9
  * Gets or sets the content for the annotation in maps.
10
10
  *
11
11
  * @default ''
12
+ * @aspType string
12
13
  */
13
- content?: string;
14
+ content?: string | Function;
14
15
 
15
16
  /**
16
17
  * Gets or sets the x position of the annotation in pixel or percentage format.
@@ -425,8 +426,9 @@ export interface TooltipSettingsModel {
425
426
  * Gets or sets the tooltip template of layers, markers, and bubbles in maps to display custom elements as tooltip.
426
427
  *
427
428
  * @default ''
429
+ * @aspType string
428
430
  */
429
- template?: string;
431
+ template?: string | Function;
430
432
 
431
433
  /**
432
434
  * Gets or sets the color of the tooltip in layers, markers, and bubbles of maps.
@@ -1529,8 +1531,9 @@ export interface DataLabelSettingsModel {
1529
1531
  * Gets or sets the template for the data labels to render custom elements.
1530
1532
  *
1531
1533
  * @default ''
1534
+ * @aspType string
1532
1535
  */
1533
- template?: string;
1536
+ template?: string | Function;
1534
1537
 
1535
1538
  }
1536
1539
 
@@ -1727,8 +1730,9 @@ export interface MarkerBaseModel {
1727
1730
  * Gets or sets the template for the marker to render custom elements.
1728
1731
  *
1729
1732
  * @default null
1733
+ * @aspType string
1730
1734
  */
1731
- template?: string;
1735
+ template?: string | Function;
1732
1736
 
1733
1737
  /**
1734
1738
  * Gets or sets the data source for the marker.
@@ -21,8 +21,9 @@ export declare class Annotation extends ChildProperty<Annotation> {
21
21
  * Gets or sets the content for the annotation in maps.
22
22
  *
23
23
  * @default ''
24
+ * @aspType string
24
25
  */
25
- content: string;
26
+ content: string | Function;
26
27
  /**
27
28
  * Gets or sets the x position of the annotation in pixel or percentage format.
28
29
  *
@@ -367,8 +368,9 @@ export declare class TooltipSettings extends ChildProperty<TooltipSettings> {
367
368
  * Gets or sets the tooltip template of layers, markers, and bubbles in maps to display custom elements as tooltip.
368
369
  *
369
370
  * @default ''
371
+ * @aspType string
370
372
  */
371
- template: string;
373
+ template: string | Function;
372
374
  /**
373
375
  * Gets or sets the color of the tooltip in layers, markers, and bubbles of maps.
374
376
  *
@@ -1327,8 +1329,9 @@ export declare class DataLabelSettings extends ChildProperty<DataLabelSettings>
1327
1329
  * Gets or sets the template for the data labels to render custom elements.
1328
1330
  *
1329
1331
  * @default ''
1332
+ * @aspType string
1330
1333
  */
1331
- template: string;
1334
+ template: string | Function;
1332
1335
  }
1333
1336
  /**
1334
1337
  * Gets or sets the options to customize the shapes in the maps.
@@ -1493,8 +1496,9 @@ export declare class MarkerBase extends ChildProperty<MarkerBase> {
1493
1496
  * Gets or sets the template for the marker to render custom elements.
1494
1497
  *
1495
1498
  * @default null
1499
+ * @aspType string
1496
1500
  */
1497
- template: string;
1501
+ template: string | Function;
1498
1502
  /**
1499
1503
  * Gets or sets the data source for the marker.
1500
1504
  * The data source for the marker will contain latitude and longitude values to specify the location
@@ -292,7 +292,7 @@ var TooltipSettings = /** @class */ (function (_super) {
292
292
  Complex({ color: 'transparent', width: 1 }, Border)
293
293
  ], TooltipSettings.prototype, "border", void 0);
294
294
  __decorate([
295
- Complex(Theme.tooltipLabelFont, Font)
295
+ Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
296
296
  ], TooltipSettings.prototype, "textStyle", void 0);
297
297
  __decorate([
298
298
  Property(null)
@@ -823,7 +823,7 @@ var LegendSettings = /** @class */ (function (_super) {
823
823
  Property('')
824
824
  ], LegendSettings.prototype, "height", void 0);
825
825
  __decorate([
826
- Complex({ fontFamily: null }, Font)
826
+ Complex({ fontFamily: null, fontWeight: null }, Font)
827
827
  ], LegendSettings.prototype, "textStyle", void 0);
828
828
  __decorate([
829
829
  Property(15)
@@ -844,7 +844,7 @@ var LegendSettings = /** @class */ (function (_super) {
844
844
  Complex({}, CommonTitleSettings)
845
845
  ], LegendSettings.prototype, "title", void 0);
846
846
  __decorate([
847
- Complex({ size: Theme.legendTitleFont.size, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: Theme.legendTitleFont.fontWeight, fontFamily: null }, Font)
847
+ Complex({ size: null, color: Theme.legendTitleFont.color, fontStyle: Theme.legendTitleFont.fontStyle, fontWeight: null, fontFamily: null }, Font)
848
848
  ], LegendSettings.prototype, "titleStyle", void 0);
849
849
  __decorate([
850
850
  Property('Bottom')
@@ -909,7 +909,7 @@ var DataLabelSettings = /** @class */ (function (_super) {
909
909
  Property(5)
910
910
  ], DataLabelSettings.prototype, "ry", void 0);
911
911
  __decorate([
912
- Complex({}, Font)
912
+ Complex({ fontWeight: null }, Font)
913
913
  ], DataLabelSettings.prototype, "textStyle", void 0);
914
914
  __decorate([
915
915
  Property('')
@@ -39,9 +39,17 @@ var ImageExport = /** @class */ (function () {
39
39
  var svgDataElement;
40
40
  var tileSvg;
41
41
  var svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
42
+ var backgroundElement = svgObject.childNodes[0];
43
+ var backgroundColor = backgroundElement.getAttribute('fill');
44
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
45
+ svgObject.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
46
+ }
47
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
48
+ svgObject.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
49
+ }
42
50
  if (!maps.isTileMap) {
43
51
  svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
44
- maps.svgObject.outerHTML + '</svg>';
52
+ svgObject.outerHTML + '</svg>';
45
53
  }
46
54
  else {
47
55
  tileSvg = getElementByID(maps.element.id + '_Tile_SVG').cloneNode(true);
@@ -80,6 +88,7 @@ var ImageExport = /** @class */ (function () {
80
88
  image_1.src = url;
81
89
  }
82
90
  else {
91
+ maps.isExportInitialTileMap = true;
83
92
  var svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
84
93
  var top_1 = parseFloat(svgParentElement.getAttribute('y'));
85
94
  var left_1 = parseFloat(svgParentElement.getAttribute('x'));
@@ -89,7 +98,9 @@ var ImageExport = /** @class */ (function () {
89
98
  var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
90
99
  var exportTileImg = new Image();
91
100
  exportTileImg.crossOrigin = 'Anonymous';
92
- ctxt_1.fillStyle = maps.background ? maps.background : '#FFFFFF';
101
+ 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' :
102
+ (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
103
+ ctxt_1.fillStyle = background;
93
104
  ctxt_1.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
94
105
  ctxt_1.font = maps.titleSettings.textStyle.size + ' Arial';
95
106
  var titleElement = document.getElementById(maps.element.id + '_Map_title');
@@ -119,8 +130,10 @@ var ImageExport = /** @class */ (function () {
119
130
  if (allowDownload) {
120
131
  triggerDownload(fileName, type, localBase64, isDownload);
121
132
  localStorage.removeItem('local-canvasImage');
133
+ maps.isExportInitialTileMap = false;
122
134
  }
123
135
  else {
136
+ maps.isExportInitialTileMap = false;
124
137
  if (type === 'PNG') {
125
138
  resolve(localBase64);
126
139
  }
@@ -27,6 +27,9 @@ var PdfExport = /** @class */ (function () {
27
27
  PdfExport.prototype.export = function (maps, type, fileName, allowDownload, orientation) {
28
28
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
29
  var promise = new Promise(function (resolve, reject) {
30
+ if (maps.isTileMap) {
31
+ maps.isExportInitialTileMap = true;
32
+ }
30
33
  var canvasElement = createElement('canvas', {
31
34
  id: 'ej2-canvas',
32
35
  attrs: {
@@ -40,10 +43,12 @@ var PdfExport = /** @class */ (function () {
40
43
  var exportElement = maps.svgObject.cloneNode(true);
41
44
  var backgroundElement = exportElement.childNodes[0];
42
45
  var backgroundColor = backgroundElement.getAttribute('fill');
43
- if ((maps.theme === 'Tailwind' || maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5' || maps.theme === 'Bootstrap5Dark'
44
- || maps.theme === 'Fluent' || maps.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
46
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
45
47
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
46
48
  }
49
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
50
+ exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
51
+ }
47
52
  var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
48
53
  [(new XMLSerializer()).serializeToString(exportElement)], { type: 'image/svg+xml' }));
49
54
  var pdfDocument = new PdfDocument();
@@ -79,7 +84,9 @@ var PdfExport = /** @class */ (function () {
79
84
  var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
80
85
  var tileImg = new Image();
81
86
  tileImg.crossOrigin = 'Anonymous';
82
- ctx.fillStyle = maps.background ? maps.background : '#FFFFFF';
87
+ 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' :
88
+ (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
89
+ ctx.fillStyle = background;
83
90
  ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
84
91
  ctx.font = maps.titleSettings.textStyle.size + ' Arial';
85
92
  var titleElement = document.getElementById(maps.element.id + '_Map_title');
@@ -109,6 +116,7 @@ var PdfExport = /** @class */ (function () {
109
116
  pdfDocument.pageSettings.orientation = orientation;
110
117
  x = x.slice(x.indexOf(',') + 1);
111
118
  pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
119
+ maps.isExportInitialTileMap = false;
112
120
  if (allowDownload) {
113
121
  pdfDocument.save(fileName + '.pdf');
114
122
  pdfDocument.destroy();
@@ -139,7 +139,7 @@ export interface MapsTooltipOption {
139
139
  text?: string[];
140
140
  data?: Object;
141
141
  textStyle?: TextStyleModel;
142
- template?: string;
142
+ template?: string | Function;
143
143
  }
144
144
  /**
145
145
  * Specifies the event arguments for tooltip render event in maps.
@@ -359,8 +359,10 @@ export interface IMarkerRenderingEventArgs extends IMapsEventArgs {
359
359
  imageUrl?: string;
360
360
  /**
361
361
  * Defines the template of the marker.
362
+ *
363
+ * @aspType string
362
364
  */
363
- template?: string;
365
+ template?: string | Function;
364
366
  /**
365
367
  * Defines the settings of the border for the marker.
366
368
  */
@@ -550,8 +552,10 @@ export interface ILabelRenderingEventArgs extends IMapsEventArgs {
550
552
  fill: string;
551
553
  /**
552
554
  * Defines the template for the data-label.
555
+ *
556
+ * @aspType string
553
557
  */
554
- template: string;
558
+ template: string | Function;
555
559
  /**
556
560
  * Defines the instance of the data-label.
557
561
  */
@@ -676,8 +680,10 @@ export interface IAnnotationRenderingEventArgs extends IMapsEventArgs {
676
680
  maps?: Maps;
677
681
  /**
678
682
  * Defines the content of the annotation which is being rendered.
683
+ *
684
+ * @aspType string
679
685
  */
680
- content?: string;
686
+ content?: string | Function;
681
687
  /**
682
688
  * Specifies the annotation instance.
683
689
  */
@@ -776,8 +782,14 @@ export interface IThemeStyle {
776
782
  zoomFillColor: string;
777
783
  /** Specifies the font-family for the maps. */
778
784
  fontFamily?: string;
785
+ /** Specifies the font-family for the maps. */
786
+ fontSize?: string;
779
787
  /** Specifies the font size for the title in maps. */
780
788
  titleFontSize?: string;
789
+ /** Specifies the font size for the sub title and legend title in maps. */
790
+ subTitleFontSize?: string;
791
+ /** Specifies the font weight for the sub title and legend title in maps. */
792
+ fontWeight?: string;
781
793
  /** Specifies the opacity for the tooltip in maps. */
782
794
  tooltipFillOpacity?: number;
783
795
  /** Specifies the text opacity for the tooltip in maps. */
@@ -792,6 +804,12 @@ export interface IThemeStyle {
792
804
  zoomSelectionColor?: string;
793
805
  /** Specifies the color for the shapes in the maps. */
794
806
  shapeFill?: string;
807
+ /** Specifies the color by using rectangle zoom fill color in maps. */
808
+ rectangleZoomFillColor?: string;
809
+ /** Specifies the color by using rectangle zoom fill color in maps. */
810
+ rectangleZoomFillOpacity?: number;
811
+ /** Specifies the color by using rectangle zoom fill color in maps. */
812
+ rectangleZoomBorderColor?: string;
795
813
  }
796
814
  /**
797
815
  * Defines the template for the marker.
@@ -1,4 +1,4 @@
1
- import { print as printFunction, createElement } from '@syncfusion/ej2-base';
1
+ import { print as printFunction, createElement, isNullOrUndefined } from '@syncfusion/ej2-base';
2
2
  import { getElement } from '../utils/helper';
3
3
  import { beforePrint } from '../model/constants';
4
4
  /**
@@ -47,6 +47,19 @@ var Print = /** @class */ (function () {
47
47
  Print.prototype.getHTMLContent = function (maps, elements) {
48
48
  var div = createElement('div');
49
49
  var divElement = maps.element.cloneNode(true);
50
+ var backgroundElement = (!maps.isTileMap ? divElement.getElementsByTagName('svg')[0] : divElement.getElementsByTagName('svg')[1]);
51
+ if (!isNullOrUndefined(backgroundElement)) {
52
+ backgroundElement = backgroundElement.childNodes[0];
53
+ if (!isNullOrUndefined(backgroundElement)) {
54
+ var backgroundColor = backgroundElement.getAttribute('fill');
55
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
56
+ backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
57
+ }
58
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
59
+ backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
60
+ }
61
+ }
62
+ }
50
63
  if (maps.isTileMap) {
51
64
  for (var i = 0; i < divElement.childElementCount; i++) {
52
65
  if (divElement.children[i].id === maps.element.id + '_tile_parent') {