@syncfusion/ej2-maps 20.2.45 → 20.3.49

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/dist/ej2-maps.min.js +10 -0
  3. package/dist/ej2-maps.umd.min.js +2 -2
  4. package/dist/ej2-maps.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-maps.es2015.js +329 -268
  6. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  7. package/dist/es6/ej2-maps.es5.js +333 -273
  8. package/dist/es6/ej2-maps.es5.js.map +1 -1
  9. package/dist/global/ej2-maps.min.js +2 -2
  10. package/dist/global/ej2-maps.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +13 -13
  13. package/src/maps/layers/bing-map.d.ts +4 -0
  14. package/src/maps/layers/bing-map.js +7 -0
  15. package/src/maps/layers/bubble.d.ts +1 -2
  16. package/src/maps/layers/bubble.js +4 -5
  17. package/src/maps/layers/data-label.d.ts +1 -4
  18. package/src/maps/layers/data-label.js +17 -19
  19. package/src/maps/layers/layer-panel.d.ts +5 -0
  20. package/src/maps/layers/layer-panel.js +28 -5
  21. package/src/maps/layers/legend.d.ts +1 -2
  22. package/src/maps/layers/legend.js +30 -8
  23. package/src/maps/layers/marker.d.ts +2 -4
  24. package/src/maps/layers/marker.js +44 -44
  25. package/src/maps/layers/navigation-selected-line.d.ts +1 -2
  26. package/src/maps/layers/navigation-selected-line.js +7 -13
  27. package/src/maps/maps.js +19 -10
  28. package/src/maps/model/export-image.d.ts +2 -4
  29. package/src/maps/model/export-image.js +19 -27
  30. package/src/maps/model/export-pdf.d.ts +4 -6
  31. package/src/maps/model/export-pdf.js +22 -30
  32. package/src/maps/model/interface.d.ts +8 -0
  33. package/src/maps/model/print.d.ts +2 -5
  34. package/src/maps/model/print.js +15 -23
  35. package/src/maps/user-interaction/annotation.d.ts +1 -2
  36. package/src/maps/user-interaction/annotation.js +2 -3
  37. package/src/maps/user-interaction/highlight.d.ts +1 -2
  38. package/src/maps/user-interaction/highlight.js +3 -5
  39. package/src/maps/user-interaction/selection.d.ts +1 -2
  40. package/src/maps/user-interaction/selection.js +3 -5
  41. package/src/maps/user-interaction/tooltip.d.ts +1 -4
  42. package/src/maps/user-interaction/tooltip.js +7 -2
  43. package/src/maps/user-interaction/zoom.d.ts +2 -7
  44. package/src/maps/user-interaction/zoom.js +83 -66
  45. package/src/maps/utils/helper.js +25 -13
@@ -1092,7 +1092,10 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1092
1092
  markerCluster.remove();
1093
1093
  }
1094
1094
  if (zoomCheck) {
1095
- document.getElementById(maps.element.id + '_Layer_Collections').appendChild(layerElement);
1095
+ var layerGroupElement = document.getElementById(maps.element.id + '_Layer_Collections');
1096
+ if (!isNullOrUndefined(layerGroupElement)) {
1097
+ layerGroupElement.appendChild(layerElement);
1098
+ }
1096
1099
  }
1097
1100
  });
1098
1101
  }
@@ -1109,15 +1112,16 @@ function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
1109
1112
  var markerIndex = sameMarkerData[0].markerIndex;
1110
1113
  var dataIndex = sameMarkerData[0].dataIndex;
1111
1114
  var markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
1115
+ var marker = maps.layers[layerIndex].markerSettings[markerIndex];
1112
1116
  var clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
1113
- var clusterEle = getElement(clusterId);
1117
+ var clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElement(clusterId + '_Group') : getElement(clusterId);
1114
1118
  var clusterEleLabel = getElement(clusterId + '_datalabel_' + clusterIndex);
1115
1119
  clusterEle.setAttribute('visibility', 'visible');
1116
1120
  clusterEleLabel.setAttribute('visibility', 'visible');
1117
1121
  var markerEle;
1118
1122
  var markerDataLength = sameMarkerData[0].data.length;
1119
1123
  for (var i = 0; i < markerDataLength; i++) {
1120
- markerEle = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1124
+ markerEle = marker.shape === 'Balloon' ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1121
1125
  markerEle['style']['visibility'] = 'hidden';
1122
1126
  }
1123
1127
  removeElement(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine');
@@ -1139,13 +1143,13 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1139
1143
  var getElementFunction = isDom ? getElement : markerElement.querySelector.bind(markerElement);
1140
1144
  var getQueryConnect = isDom ? '' : '#';
1141
1145
  var markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
1146
+ var marker = maps.layers[layerIndex].markerSettings[markerIndex];
1142
1147
  var clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
1143
- var clusterEle = getElementFunction(getQueryConnect + '' + clusterId);
1148
+ var clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + clusterId + '_Group') : getElementFunction(getQueryConnect + '' + clusterId);
1144
1149
  var clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
1145
1150
  clusterEle.setAttribute('visibility', 'hidden');
1146
1151
  clusterEleLabel.setAttribute('visibility', 'hidden');
1147
- var marker = maps.layers[layerIndex].markerSettings[markerIndex];
1148
- var markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1152
+ var markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1149
1153
  var height = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().height : marker.height;
1150
1154
  var width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
1151
1155
  var centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
@@ -1181,7 +1185,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1181
1185
  var x1 = centerX + radius * Math.sin((Math.PI * 2 * newAngle) / 360);
1182
1186
  var y1 = centerY + radius * Math.cos((Math.PI * 2 * newAngle) / 360);
1183
1187
  path += start + 'L ' + (x1) + ' ' + y1 + ' ';
1184
- markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1188
+ markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1185
1189
  if (markerEle.parentElement.id.indexOf('Template_Group') > -1) {
1186
1190
  markerEle['style']['transform'] = '';
1187
1191
  markerEle['style']['left'] = maps.isTileMap ? x1 - (width / 2) + 'px' : (x1 - (width / 2) - 10) + 'px';
@@ -1202,7 +1206,12 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1202
1206
  markerElement = isDom ? getElementFunction(maps.element.id + '_Markers_Group') : markerElement;
1203
1207
  var groupEle = maps.renderer.createGroup({ id: maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine' });
1204
1208
  groupEle.appendChild(maps.renderer.drawPath(options));
1205
- markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0'));
1209
+ if (marker.shape === 'Balloon') {
1210
+ markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0_Group'));
1211
+ }
1212
+ else {
1213
+ markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0'));
1214
+ }
1206
1215
  }
1207
1216
  /**
1208
1217
  *
@@ -1229,6 +1238,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
1229
1238
  dashArray: markerSettings.dashArray, borderOpacity: isNullOrUndefined(eventArgs.border.opacity) ? markerSettings.opacity :
1230
1239
  eventArgs.border.opacity
1231
1240
  };
1241
+ removeElement(markerID);
1232
1242
  var ele = drawSymbols(eventArgs.shape, eventArgs.imageUrl, { x: 0, y: 0 }, markerID, shapeCustom, markerCollection, maps);
1233
1243
  var x = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x;
1234
1244
  var y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y;
@@ -1606,7 +1616,7 @@ function drawBalloon(maps, options, size, location, type, element) {
1606
1616
  var y = size.height / 30;
1607
1617
  balloon.setAttribute('transform', 'translate(' + location.x + ', ' + location.y + ') scale(' + x + ', ' + y + ')');
1608
1618
  if (type === 'Marker') {
1609
- var g = maps.renderer.createGroup({ id: options.id });
1619
+ var g = maps.renderer.createGroup({ id: options.id + '_Group' });
1610
1620
  appendShape(balloon, g);
1611
1621
  pathElement = appendShape(g, element);
1612
1622
  }
@@ -1680,7 +1690,7 @@ function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, la
1680
1690
  dataSource[i][dataPath]);
1681
1691
  var shapePath = checkPropertyPath(shapeDataPath, propertyPath, properties);
1682
1692
  var shapeDataPathValue = !isNullOrUndefined(shapeDataPath) && isNaN(properties[shapePath])
1683
- ? shapeDataPath.toLowerCase() : shapeDataPath;
1693
+ ? (typeof shapeDataPath === 'string' ? shapeDataPath.toLowerCase() : shapeDataPath) : shapeDataPath;
1684
1694
  var propertiesShapePathValue = !isNullOrUndefined(properties[shapePath]) && isNaN(properties[shapePath])
1685
1695
  ? properties[shapePath].toLowerCase() : properties[shapePath];
1686
1696
  if (shapeDataPathValue === propertiesShapePathValue) {
@@ -1704,7 +1714,8 @@ function checkPropertyPath(shapeData, shapePropertyPath, shape) {
1704
1714
  var properties = (Object.prototype.toString.call(shapePropertyPath) === '[object Array]' ?
1705
1715
  shapePropertyPath : [shapePropertyPath]);
1706
1716
  for (var i = 0; i < properties.length; i++) {
1707
- var shapeDataValue = !isNullOrUndefined(shapeData) ? shapeData.toLowerCase() : shapeData;
1717
+ var shapeDataValue = !isNullOrUndefined(shapeData) && typeof shapeData === 'string' ?
1718
+ shapeData.toLowerCase() : shapeData;
1708
1719
  var shapePropertiesValue = !isNullOrUndefined(shape[properties[i]])
1709
1720
  && isNaN(shape[properties[i]])
1710
1721
  ? shape[properties[i]].toLowerCase() : shape[properties[i]];
@@ -2029,6 +2040,7 @@ function getTranslate(mapObject, layer, animate) {
2029
2040
  mapHeight = size.height;
2030
2041
  }
2031
2042
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2043
+ scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
2032
2044
  mapWidth *= scaleFactor;
2033
2045
  mapHeight *= scaleFactor;
2034
2046
  var widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
@@ -2079,6 +2091,7 @@ function getTranslate(mapObject, layer, animate) {
2079
2091
  else {
2080
2092
  if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1 || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
2081
2093
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2094
+ scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
2082
2095
  mapWidth *= scaleFactor;
2083
2096
  x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2084
2097
  mapHeight *= scaleFactor;
@@ -3120,8 +3133,7 @@ function animate(element, delay, duration, process, end) {
3120
3133
  window.cancelAnimationFrame(clearAnimation);
3121
3134
  end.call(_this, { element: element });
3122
3135
  if (element.id.indexOf('Marker') > -1) {
3123
- console.log(element);
3124
- var markerElement = getElementByID(element.id.split('_')[0] + '_Markers_Group');
3136
+ var markerElement = getElementByID(element.id.split('_Layer')[0] + '_Markers_Group');
3125
3137
  markerElement.setAttribute('style', markerStyle);
3126
3138
  }
3127
3139
  }
@@ -4858,43 +4870,43 @@ var Marker = /** @__PURE__ @class */ (function () {
4858
4870
  this.trackElements = [];
4859
4871
  this.sameMarkerData = [];
4860
4872
  }
4861
- Marker.prototype.markerRender = function (layerElement, layerIndex, factor, type) {
4873
+ Marker.prototype.markerRender = function (maps, layerElement, layerIndex, factor, type) {
4862
4874
  var _this = this;
4863
4875
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4864
4876
  var templateFn;
4865
4877
  var markerCount = 0;
4866
4878
  var nullCount = 0;
4867
4879
  var markerTemplateCount = 0;
4868
- this.maps.translateType = 'marker';
4869
- var currentLayer = this.maps.layersCollection[layerIndex];
4870
- this.markerSVGObject = this.maps.renderer.createGroup({
4871
- id: this.maps.element.id + '_Markers_Group',
4880
+ maps.translateType = 'marker';
4881
+ var currentLayer = maps.layersCollection[layerIndex];
4882
+ this.markerSVGObject = maps.renderer.createGroup({
4883
+ id: maps.element.id + '_Markers_Group',
4872
4884
  class: 'GroupElement',
4873
4885
  style: 'pointer-events: auto;'
4874
4886
  });
4875
4887
  var markerTemplateEle = createElement('div', {
4876
- id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
4877
- className: this.maps.element.id + '_template',
4888
+ id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
4889
+ className: maps.element.id + '_template',
4878
4890
  styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
4879
- 'top:' + this.maps.mapAreaRect.y + 'px;' +
4880
- 'left:' + this.maps.mapAreaRect.x + 'px;' +
4881
- 'height:' + this.maps.mapAreaRect.height + 'px;' +
4882
- 'width:' + this.maps.mapAreaRect.width + 'px;'
4891
+ 'top:' + maps.mapAreaRect.y + 'px;' +
4892
+ 'left:' + maps.mapAreaRect.x + 'px;' +
4893
+ 'height:' + maps.mapAreaRect.height + 'px;' +
4894
+ 'width:' + maps.mapAreaRect.width + 'px;'
4883
4895
  });
4884
4896
  currentLayer.markerSettings.map(function (markerSettings, markerIndex) {
4885
4897
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4886
4898
  var markerData = markerSettings.dataSource;
4887
4899
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4888
4900
  Array.prototype.forEach.call(markerData, function (data, dataIndex) {
4889
- _this.maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : _this.maps.markerNullCount;
4901
+ maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
4890
4902
  var eventArgs = {
4891
4903
  cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
4892
4904
  width: markerSettings.width, imageUrl: markerSettings.imageUrl, shape: markerSettings.shape,
4893
- template: markerSettings.template, data: data, maps: _this.maps, marker: markerSettings,
4905
+ template: markerSettings.template, data: data, maps: maps, marker: markerSettings,
4894
4906
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
4895
4907
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
4896
4908
  };
4897
- _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
4909
+ maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
4898
4910
  eventArgs = markerColorChoose(eventArgs, data);
4899
4911
  eventArgs = markerShapeChoose(eventArgs, data);
4900
4912
  var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
@@ -4905,56 +4917,56 @@ var Marker = /** @__PURE__ @class */ (function () {
4905
4917
  parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
4906
4918
  var offset = markerSettings.offset;
4907
4919
  if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(lng) && !isNullOrUndefined(lat)) {
4908
- var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
4920
+ var markerID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
4909
4921
  + markerIndex + '_dataIndex_' + dataIndex;
4910
- var location_1 = (_this.maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, _this.maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, _this.maps);
4911
- var animate$$1 = currentLayer.animationDuration !== 0 || isNullOrUndefined(_this.maps.zoomModule);
4922
+ var location_1 = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
4923
+ var animate$$1 = currentLayer.animationDuration !== 0 || isNullOrUndefined(maps.zoomModule);
4912
4924
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4913
- var translate = (_this.maps.isTileMap) ? (currentLayer.type === 'SubLayer' && isNullOrUndefined(_this.maps.zoomModule)) ? location_1 = convertTileLatLongToPoint(new MapLocation(lng, lat), _this.maps.tileZoomLevel, _this.maps.tileTranslatePoint, true) : new Object() :
4914
- !isNullOrUndefined(_this.maps.zoomModule) && _this.maps.zoomSettings.zoomFactor > 1 ?
4915
- getZoomTranslate(_this.maps, currentLayer, animate$$1) :
4916
- getTranslate(_this.maps, currentLayer, animate$$1);
4917
- var scale = type === 'AddMarker' ? _this.maps.scale : translate['scale'];
4918
- var transPoint = type === 'AddMarker' ? _this.maps.translatePoint : translate['location'];
4925
+ var translate = (maps.isTileMap) ? (currentLayer.type === 'SubLayer' && isNullOrUndefined(maps.zoomModule)) ? location_1 = convertTileLatLongToPoint(new MapLocation(lng, lat), maps.tileZoomLevel, maps.tileTranslatePoint, true) : new Object() :
4926
+ !isNullOrUndefined(maps.zoomModule) && maps.zoomSettings.zoomFactor > 1 ?
4927
+ getZoomTranslate(maps, currentLayer, animate$$1) :
4928
+ getTranslate(maps, currentLayer, animate$$1);
4929
+ var scale = type === 'AddMarker' ? maps.scale : translate['scale'];
4930
+ var transPoint = type === 'AddMarker' ? maps.translatePoint : translate['location'];
4919
4931
  if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
4920
4932
  markerTemplateCount++;
4921
- markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location_1, transPoint, scale, offset, _this.maps);
4933
+ markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location_1, transPoint, scale, offset, maps);
4922
4934
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4923
- _this.maps.renderReactTemplates();
4935
+ maps.renderReactTemplates();
4924
4936
  }
4925
4937
  else if (!eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
4926
4938
  markerCount++;
4927
- marker(eventArgs, markerSettings, markerData, dataIndex, location_1, transPoint, markerID, offset, scale, _this.maps, _this.markerSVGObject);
4939
+ marker(eventArgs, markerSettings, markerData, dataIndex, location_1, transPoint, markerID, offset, scale, maps, _this.markerSVGObject);
4928
4940
  }
4929
4941
  }
4930
4942
  nullCount += (!isNaN(lat) && !isNaN(lng)) ? 0 : 1;
4931
4943
  markerTemplateCount += (eventArgs.cancel) ? 1 : 0;
4932
4944
  markerCount += (eventArgs.cancel) ? 1 : 0;
4933
- _this.maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
4934
- var markerDataLength = markerData.length - _this.maps.markerNullCount;
4945
+ maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? maps.markerNullCount + 1 : maps.markerNullCount;
4946
+ var markerDataLength = markerData.length - maps.markerNullCount;
4935
4947
  if (_this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
4936
4948
  layerElement.appendChild(_this.markerSVGObject);
4937
4949
  if (currentLayer.markerClusterSettings.allowClustering) {
4938
- _this.maps.svgObject.appendChild(_this.markerSVGObject);
4939
- _this.maps.element.appendChild(_this.maps.svgObject);
4950
+ maps.svgObject.appendChild(_this.markerSVGObject);
4951
+ maps.element.appendChild(maps.svgObject);
4940
4952
  if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
4941
- && _this.maps.zoomSettings.enable) {
4953
+ && maps.zoomSettings.enable) {
4942
4954
  layerElement.appendChild(_this.markerSVGObject);
4943
4955
  }
4944
4956
  else {
4945
- clusterTemplate(currentLayer, _this.markerSVGObject, _this.maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
4957
+ clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
4946
4958
  }
4947
4959
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4948
- _this.maps.renderReactTemplates();
4960
+ maps.renderReactTemplates();
4949
4961
  }
4950
4962
  }
4951
- if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
4952
- getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
4953
- if (_this.maps.checkInitialRender) {
4963
+ if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
4964
+ getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
4965
+ if (maps.checkInitialRender) {
4954
4966
  if (currentLayer.markerClusterSettings.allowClustering) {
4955
- clusterTemplate(currentLayer, markerTemplateEle, _this.maps, layerIndex, _this.markerSVGObject, layerElement, false, false);
4967
+ clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, _this.markerSVGObject, layerElement, false, false);
4956
4968
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4957
- _this.maps.renderReactTemplates();
4969
+ maps.renderReactTemplates();
4958
4970
  }
4959
4971
  }
4960
4972
  }
@@ -5197,7 +5209,7 @@ var Marker = /** @__PURE__ @class */ (function () {
5197
5209
  }
5198
5210
  if ((target.indexOf('_cluster_') > -1)) {
5199
5211
  var isClusterSame = false;
5200
- var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? target.split('_datalabel_')[0] : target);
5212
+ var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? layer.markerClusterSettings.shape === 'Balloon' ? target.split('_datalabel_')[0] + '_Group' : target.split('_datalabel_')[0] : layer.markerClusterSettings.shape === 'Balloon' ? target + '_Group' : target);
5201
5213
  var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerHTML.split(',').map(Number) : clusterElement.innerHTML.split(',').map(Number);
5202
5214
  collection_1 = [];
5203
5215
  for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
@@ -5267,14 +5279,14 @@ var Marker = /** @__PURE__ @class */ (function () {
5267
5279
  /**
5268
5280
  * To destroy the layers.
5269
5281
  *
5270
- * @param {Maps} maps - Specifies the instance of the map
5271
5282
  * @returns {void}
5272
5283
  * @private
5273
5284
  */
5274
- Marker.prototype.destroy = function (maps) {
5275
- /**
5276
- * Destroy method performed here
5277
- */
5285
+ Marker.prototype.destroy = function () {
5286
+ this.maps = null;
5287
+ this.trackElements = [];
5288
+ this.markerSVGObject = null;
5289
+ this.sameMarkerData = [];
5278
5290
  };
5279
5291
  return Marker;
5280
5292
  }());
@@ -5509,6 +5521,13 @@ var BingMap = /** @__PURE__ @class */ (function () {
5509
5521
  return '';
5510
5522
  }
5511
5523
  };
5524
+ /**
5525
+ * @private
5526
+ */
5527
+ BingMap.prototype.destroy = function () {
5528
+ this.maps = null;
5529
+ this.subDomains = [];
5530
+ };
5512
5531
  return BingMap;
5513
5532
  }());
5514
5533
 
@@ -5926,7 +5945,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5926
5945
  panel.layerObject.appendChild(panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex));
5927
5946
  }
5928
5947
  if (panel.mapObject.markerModule) {
5929
- panel.mapObject.markerModule.markerRender(panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
5948
+ panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
5930
5949
  }
5931
5950
  panel.translateLayerElements(panel.layerObject, layerIndex);
5932
5951
  panel.layerGroup.appendChild(panel.layerObject);
@@ -6005,7 +6024,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6005
6024
  proxy_1.renderTileLayer(proxy_1, layer, layerIndex, bing_1);
6006
6025
  _this.mapObject.arrangeTemplate();
6007
6026
  if (_this.mapObject.zoomModule && (_this.mapObject.previousScale !== _this.mapObject.scale)) {
6008
- _this.mapObject.zoomModule.applyTransform(true);
6027
+ _this.mapObject.zoomModule.applyTransform(_this.mapObject, true);
6009
6028
  }
6010
6029
  };
6011
6030
  ajax.send();
@@ -6049,7 +6068,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6049
6068
  proxy.renderTileLayer(proxy, layer, layerIndex, bing);
6050
6069
  this.mapObject.arrangeTemplate();
6051
6070
  if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
6052
- this.mapObject.zoomModule.applyTransform(true);
6071
+ this.mapObject.zoomModule.applyTransform(this.mapObject, true);
6053
6072
  }
6054
6073
  };
6055
6074
  LayerPanel.prototype.bubbleCalculation = function (bubbleSettings, range) {
@@ -6345,6 +6364,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6345
6364
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6346
6365
  (currentShapeData['property'][properties]) : ''));
6347
6366
  pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + index + 3).toString());
6367
+ pathEle.setAttribute('role', '');
6348
6368
  if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
6349
6369
  pathEle.setAttribute('style', 'outline:none');
6350
6370
  }
@@ -6424,7 +6444,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6424
6444
  _this.layerObject.appendChild(element);
6425
6445
  });
6426
6446
  if (this.mapObject.markerModule) {
6427
- this.mapObject.markerModule.markerRender(this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
6447
+ this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
6428
6448
  : this.currentFactor), null);
6429
6449
  }
6430
6450
  this.translateLayerElements(this.layerObject, layerIndex);
@@ -6981,6 +7001,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6981
7001
  imgElement.setAttribute('height', '256px');
6982
7002
  imgElement.setAttribute('width', '256px');
6983
7003
  imgElement.setAttribute('src', tile.src);
7004
+ imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
6984
7005
  var mapId = _this.mapObject.element.id;
6985
7006
  imgElement.onload = function () {
6986
7007
  if (document.getElementById(mapId + '_tile_' + id) && type === 'Pan') {
@@ -7092,7 +7113,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
7092
7113
  '&zoom=' + zoom + '&center=' + center + '&maptype=' + mapType + '&key=' + apikey;
7093
7114
  document.getElementById(this.mapObject.element.id + '_tile_parent').innerHTML
7094
7115
  = '<div id="' + this.mapObject.element.id + '_StaticGoogleMap"' + 'style="position:absolute; left:' + eleWidth + 'px; top:'
7095
- + eleHeight + 'px"><img src="' + staticMapString + '"></div>';
7116
+ + eleHeight + 'px"><img src="' + staticMapString + '"' + 'alt="' + this.mapObject.getLocalizedLabel('ImageNotFound') + '"></div>';
7096
7117
  };
7097
7118
  /**
7098
7119
  * To find the tile translate point
@@ -7150,6 +7171,27 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
7150
7171
  this.mapObject.previousTileHeight = factorY;
7151
7172
  return new Point(x, y);
7152
7173
  };
7174
+ /**
7175
+ * @returns {void}
7176
+ * @private
7177
+ */
7178
+ LayerPanel.prototype.destroy = function () {
7179
+ this.mapObject = null;
7180
+ this.groupElements = [];
7181
+ this.layerObject = null;
7182
+ this.currentLayer = null;
7183
+ this.rectBounds = null;
7184
+ this.tiles = [];
7185
+ this.clipRectElement = null;
7186
+ this.tileSvgObject = null;
7187
+ this.ajaxModule = null;
7188
+ this.ajaxResponse = [];
7189
+ this.layerGroup = null;
7190
+ if (!isNullOrUndefined(this.bing)) {
7191
+ this.bing.destroy();
7192
+ }
7193
+ this.bing = null;
7194
+ };
7153
7195
  return LayerPanel;
7154
7196
  }());
7155
7197
 
@@ -7265,12 +7307,11 @@ var Annotations = /** @__PURE__ @class */ (function () {
7265
7307
  /**
7266
7308
  * To destroy the annotation.
7267
7309
  *
7268
- * @param {Maps} map - Specifies the instance of the maps
7269
7310
  * @returns {void}
7270
7311
  * @private
7271
7312
  */
7272
- Annotations.prototype.destroy = function (map) {
7273
- // Destroy method performed here
7313
+ Annotations.prototype.destroy = function () {
7314
+ this.map = null;
7274
7315
  };
7275
7316
  return Annotations;
7276
7317
  }());
@@ -7645,7 +7686,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7645
7686
  this.dataLabelShape = [];
7646
7687
  }
7647
7688
  this.mapLayerPanel.measureLayerPanel();
7648
- this.element.appendChild(this.svgObject);
7689
+ if (!isNullOrUndefined(this.svgObject)) {
7690
+ this.element.appendChild(this.svgObject);
7691
+ }
7649
7692
  var position = this.getExtraPosition();
7650
7693
  for (var i = 0; i < this.layers.length; i++) {
7651
7694
  if (position.x !== 0 || position.y !== 0) {
@@ -7834,6 +7877,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7834
7877
  */
7835
7878
  Maps.prototype.addTabIndex = function () {
7836
7879
  this.element.setAttribute('aria-label', this.description || 'Maps Element');
7880
+ this.element.setAttribute('role', '');
7837
7881
  this.element.setAttribute('tabindex', this.tabIndex.toString());
7838
7882
  };
7839
7883
  // private setSecondaryElementPosition(): void {
@@ -7898,7 +7942,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7898
7942
  }
7899
7943
  }
7900
7944
  if (this.zoomModule && (this.previousScale !== this.scale)) {
7901
- this.zoomModule.applyTransform(true);
7945
+ this.zoomModule.applyTransform(this, true);
7902
7946
  }
7903
7947
  }
7904
7948
  };
@@ -8076,6 +8120,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8076
8120
  var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
8077
8121
  var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
8078
8122
  element.setAttribute('aria-label', this.description || title.text);
8123
+ element.setAttribute('role', '');
8079
8124
  if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
8080
8125
  height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
8081
8126
  this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
@@ -8653,7 +8698,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8653
8698
  this.scale = zoomFactor;
8654
8699
  this.translatePoint.x = ((mapRect.left < svgRect.left ? x : 0) + (size.width / 2) - (position.x * zoomFactor)) / zoomFactor;
8655
8700
  this.translatePoint.y = ((mapRect.top < svgRect.top ? y : 0) + (size.height / 2) - (position.y * zoomFactor)) / zoomFactor;
8656
- this.zoomModule.applyTransform();
8701
+ this.zoomModule.applyTransform(this);
8657
8702
  }
8658
8703
  else {
8659
8704
  position = { x: size.width / 2, y: size.height / 2 };
@@ -8732,7 +8777,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8732
8777
  this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
8733
8778
  }
8734
8779
  var markerModule = new Marker(this);
8735
- markerModule.markerRender(layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
8780
+ markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
8736
8781
  this.arrangeTemplate();
8737
8782
  }
8738
8783
  };
@@ -8777,7 +8822,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8777
8822
  var propertyName_1 = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
8778
8823
  && isNaN(shapeData[i]['properties'][popertyNameArray[j]]) ?
8779
8824
  shapeData[i]['properties'][popertyNameArray[j]].toLowerCase() : shapeData[i]['properties'][popertyNameArray[j]];
8780
- var shapeName = !isNullOrUndefined(name) ? name.toLowerCase() : name;
8825
+ var shapeName = !isNullOrUndefined(name) && typeof name === 'string' ? name.toLowerCase() : name;
8781
8826
  var k = void 0;
8782
8827
  if (propertyName_1 === shapeName) {
8783
8828
  if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
@@ -8939,7 +8984,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8939
8984
  Zoom: 'Zoom',
8940
8985
  ZoomOut: 'Zoom out',
8941
8986
  Pan: 'Pan',
8942
- Reset: 'Reset'
8987
+ Reset: 'Reset',
8988
+ ImageNotFound: 'Image Not Found'
8943
8989
  };
8944
8990
  };
8945
8991
  /**
@@ -8947,6 +8993,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8947
8993
  */
8948
8994
  Maps.prototype.destroy = function () {
8949
8995
  this.unWireEVents();
8996
+ _super.prototype.destroy.call(this);
8950
8997
  this.shapeSelectionItem = [];
8951
8998
  this.toggledShapeElementId = [];
8952
8999
  this.toggledLegendId = [];
@@ -8961,11 +9008,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8961
9008
  this.zoomLabelPositions = [];
8962
9009
  this.mouseDownEvent = { x: null, y: null };
8963
9010
  this.mouseClickEvent = { x: null, y: null };
9011
+ this.formatFunction = null;
9012
+ //TODO: Calling the below code throws spec issue.
9013
+ //this.renderer = null;
9014
+ this.availableSize = new Size(0, 0);
8964
9015
  if (document.getElementById('mapsmeasuretext')) {
8965
9016
  document.getElementById('mapsmeasuretext').remove();
8966
9017
  }
8967
9018
  this.removeSvg();
8968
- _super.prototype.destroy.call(this);
8969
9019
  };
8970
9020
  /**
8971
9021
  * Gets component name
@@ -9281,7 +9331,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9281
9331
  */
9282
9332
  Maps.prototype.print = function (id) {
9283
9333
  if ((this.allowPrint) && (this.printModule)) {
9284
- this.printModule.print(id);
9334
+ this.printModule.print(this, id);
9285
9335
  }
9286
9336
  };
9287
9337
  /**
@@ -9300,12 +9350,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9300
9350
  }
9301
9351
  if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
9302
9352
  return new Promise(function (resolve, reject) {
9303
- resolve(_this.imageExportModule.export(type, fileName, allowDownload));
9353
+ resolve(_this.imageExportModule.export(_this, type, fileName, allowDownload));
9304
9354
  });
9305
9355
  }
9306
9356
  else if ((this.allowPdfExport) && (this.pdfExportModule)) {
9307
9357
  return new Promise(function (resolve, reject) {
9308
- resolve(_this.pdfExportModule.export(type, fileName, allowDownload, orientation));
9358
+ resolve(_this.pdfExportModule.export(_this, type, fileName, allowDownload, orientation));
9309
9359
  });
9310
9360
  }
9311
9361
  return null;
@@ -9891,14 +9941,13 @@ var Bubble = /** @__PURE__ @class */ (function () {
9891
9941
  /**
9892
9942
  * To destroy the bubble.
9893
9943
  *
9894
- * @param {Maps} maps - Specifies the instance of the maps.
9895
9944
  * @returns {void}
9896
9945
  * @private
9897
9946
  */
9898
- Bubble.prototype.destroy = function (maps) {
9899
- /**
9900
- * Destroy method performed here
9901
- */
9947
+ Bubble.prototype.destroy = function () {
9948
+ this.bubbleCollection = [];
9949
+ //TODO: Calling the below code throws spec issue.
9950
+ //this.maps = null;
9902
9951
  };
9903
9952
  return Bubble;
9904
9953
  }());
@@ -9921,10 +9970,10 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9921
9970
  for (var i = 0; i < dataSource.length; i++) {
9922
9971
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9923
9972
  var data = dataSource[i];
9924
- var dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) ?
9925
- data[shapeDataPath].toLowerCase() : data[shapeDataPath];
9926
- shapeName = !isNullOrUndefined(shapeName) ? shapeName.toString() : shapeName;
9927
- shapeNameValue = !isNullOrUndefined(shapeName) ? shapeName.toLowerCase() : shapeName;
9973
+ var dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) &&
9974
+ typeof data[shapeDataPath] === 'string' ? data[shapeDataPath].toLowerCase() : data[shapeDataPath];
9975
+ shapeName = !isNullOrUndefined(shapeName) && typeof shapeName === 'string' ? shapeName.toString() : shapeName;
9976
+ shapeNameValue = !isNullOrUndefined(shapeName) && typeof shapeName === 'string' ? shapeName.toLowerCase() : shapeName;
9928
9977
  if ((dataShapePathValue) === shapeNameValue) {
9929
9978
  text = data;
9930
9979
  break;
@@ -10096,7 +10145,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10096
10145
  var eventargs_1 = {
10097
10146
  name: dataLabelRendering, maps: this.maps, cancel: false, border: { color: dataLabel.border.color,
10098
10147
  width: dataLabel.border.width, opacity: dataLabel.border.opacity }, datalabel: dataLabel,
10099
- fill: dataLabel.fill, template: dataLabel.template, text: text
10148
+ fill: dataLabel.fill, template: dataLabel.template, text: text, offsetX: 0, offsetY: 0
10100
10149
  };
10101
10150
  this.maps.trigger('dataLabelRendering', eventargs_1, function (labelArgs) {
10102
10151
  if (eventargs_1.cancel) {
@@ -10146,8 +10195,8 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10146
10195
  datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
10147
10196
  templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
10148
10197
  labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties'], index, _this.maps);
10149
- labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + 'px';
10150
- labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + 'px';
10198
+ labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
10199
+ labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
10151
10200
  labelTemplateElement.appendChild(labelElement);
10152
10201
  }
10153
10202
  else {
@@ -10235,26 +10284,26 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10235
10284
  y = ((location['y'] + transPoint['y']) * scale) - textSize['height'] / 2;
10236
10285
  }
10237
10286
  border_1.opacity = isNullOrUndefined(border_1.opacity) ? opacity : border_1.opacity;
10238
- var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border_1, opacity, new Rect(x, y, textSize['width'], textSize['height']), rx, ry);
10287
+ var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border_1, opacity, new Rect((x + labelArgs.offsetX), (y + labelArgs.offsetY), textSize['width'], textSize['height']), rx, ry);
10239
10288
  var rect = _this.maps.renderer.drawRectangle(rectOptions);
10240
10289
  group.appendChild(rect);
10241
10290
  }
10242
10291
  }
10243
10292
  element = renderTextElement(options, style, style.color || _this.maps.themeStyle.dataLabelFontColor, group);
10244
10293
  if (zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied) {
10245
- element.setAttribute('transform', 'translate( ' + ((location['x'])) + ' '
10246
- + (((location['y']))) + ' )');
10294
+ element.setAttribute('transform', 'translate( ' + ((location['x'] + labelArgs.offsetX)) + ' '
10295
+ + (((location['y'] + labelArgs.offsetY))) + ' )');
10247
10296
  location['x'] = locationX;
10248
10297
  location['y'] = locationY;
10249
10298
  }
10250
10299
  else {
10251
- element.setAttribute('transform', 'translate( ' + ((location['x'] + transPoint.x) * scale) + ' '
10252
- + (((location['y'] + transPoint.y) * scale) + (elementSize.height / 4)) + ' )');
10300
+ element.setAttribute('transform', 'translate( ' + (((location['x'] + transPoint.x) * scale) + labelArgs.offsetX) + ' '
10301
+ + ((((location['y'] + transPoint.y) * scale) + (elementSize.height / 4)) + labelArgs.offsetY) + ' )');
10253
10302
  }
10254
10303
  group.appendChild(element);
10255
10304
  }
10256
10305
  _this.dataLabelCollections.push({
10257
- location: { x: location['x'], y: location['y'] },
10306
+ location: { x: location['x'] + labelArgs.offsetX, y: location['y'] + labelArgs.offsetY },
10258
10307
  element: isNullOrUndefined(labelElement) ? element : labelElement,
10259
10308
  layerIndex: layerIndex,
10260
10309
  shapeIndex: sublayerIndexLabel ? oldIndex : index,
@@ -10297,16 +10346,14 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10297
10346
  return 'DataLabel';
10298
10347
  };
10299
10348
  /**
10300
- * To destroy the layers.
10301
10349
  *
10302
- * @param {Maps} maps - Specifies the instance of the maps.
10303
10350
  * @returns {void}
10304
10351
  * @private
10305
10352
  */
10306
- DataLabel.prototype.destroy = function (maps) {
10307
- /**
10308
- * Destroy method performed here
10309
- */
10353
+ DataLabel.prototype.destroy = function () {
10354
+ this.dataLabelCollections = [];
10355
+ this.value = null;
10356
+ this.maps = null;
10310
10357
  };
10311
10358
  return DataLabel;
10312
10359
  }());
@@ -10376,8 +10423,8 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10376
10423
  for (var j = 0; j < point['length'] - 1; j++) {
10377
10424
  angle = (-1 > angle) ? -1 : angle;
10378
10425
  angle = (1 < angle) ? 1 : angle;
10379
- var arcId_1 = this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationIndex_' + i + '_Line' + j + '';
10380
- var radius_1 = this.convertRadius(point[j], point[j + 1]);
10426
+ var arcId = this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationIndex_' + i + '_Line' + j + '';
10427
+ var radius = this.convertRadius(point[j], point[j + 1]);
10381
10428
  if (angle <= 1 && angle > 0) {
10382
10429
  direction = 0;
10383
10430
  if (point[j]['x'] > point[j + 1]['x']) {
@@ -10422,10 +10469,10 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10422
10469
  angle = Math.abs(angle);
10423
10470
  d = (angle === 0) ? 'M ' + point[j]['x'] + ',' + point[j]['y'] + 'L ' + point[j + 1]['x']
10424
10471
  + ',' + point[j + 1]['y'] + ' ' :
10425
- 'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius_1 / 2 + (1 - angle) * radius_1 / (angle * 10)) +
10426
- ' ' + (radius_1 / 2 + (1 - angle) * radius_1 / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
10472
+ 'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) +
10473
+ ' ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
10427
10474
  + direction + ' , ' + point[j + 1]['x'] + ',' + point[j + 1]['y'] + ' ';
10428
- pathOption = new PathOption(arcId_1, 'none', width, color, 1, 1, dashArray, d);
10475
+ pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
10429
10476
  navigationEle = this.maps.renderer.drawPath(pathOption);
10430
10477
  if (!isNullOrUndefined(arrowPosition)) {
10431
10478
  var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
@@ -10458,14 +10505,11 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10458
10505
  /**
10459
10506
  * To destroy the layers.
10460
10507
  *
10461
- * @param {Maps} maps - Specifies the instance of the map
10462
10508
  * @returns {void}
10463
10509
  * @private
10464
10510
  */
10465
- NavigationLine.prototype.destroy = function (maps) {
10466
- /**
10467
- * Destroy method performed here
10468
- */
10511
+ NavigationLine.prototype.destroy = function () {
10512
+ this.maps = null;
10469
10513
  };
10470
10514
  return NavigationLine;
10471
10515
  }());
@@ -12240,6 +12284,9 @@ var Legend = /** @__PURE__ @class */ (function () {
12240
12284
  '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
12241
12285
  '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
12242
12286
  if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
12287
+ mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
12288
+ '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'] + '_Group', this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
12289
+ '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'] + '_Group', this.maps.element.id);
12243
12290
  mapElement = mapElement.children[0];
12244
12291
  }
12245
12292
  if (isVisible && mapElement !== null) {
@@ -12381,6 +12428,9 @@ var Legend = /** @__PURE__ @class */ (function () {
12381
12428
  '_BubbleIndex_' + j + '_dataIndex_' + mapdata['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12382
12429
  '_MarkerIndex_' + j + '_dataIndex_' + mapdata['dataIndex'], this.maps.element.id);
12383
12430
  if (!isNullOrUndefined(mapdata['shape']) && mapdata['shape'] === 'Balloon') {
12431
+ LegendInteractive = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12432
+ '_BubbleIndex_' + j + '_dataIndex_' + mapdata['dataIndex'] + '_Group', this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12433
+ '_MarkerIndex_' + j + '_dataIndex_' + mapdata['dataIndex'] + '_Group', this.maps.element.id);
12384
12434
  LegendInteractive = LegendInteractive.children[0];
12385
12435
  }
12386
12436
  if (isVisible && LegendInteractive !== null) {
@@ -12539,10 +12589,11 @@ var Legend = /** @__PURE__ @class */ (function () {
12539
12589
  var shapeData = layerData[i];
12540
12590
  var dataPathValue = (dataPath.indexOf('.') > -1) ? getValueFromObject(data, dataPath) : data[dataPath];
12541
12591
  var shapePath = checkPropertyPath(data[dataPath], shapePropertyPath, shapeData['properties']);
12542
- var dataPathValueCase = !isNullOrUndefined(dataPathValue)
12543
- ? dataPathValue.toLowerCase() : dataPathValue;
12592
+ var dataPathValueCase = !isNullOrUndefined(dataPathValue) &&
12593
+ typeof dataPathValue === 'string' ? dataPathValue.toLowerCase() : dataPathValue;
12544
12594
  var shapeDataValueCase = !isNullOrUndefined(shapeData['properties'][shapePath])
12545
- && isNaN(shapeData['properties'][shapePath]) ? shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12595
+ && isNaN(shapeData['properties'][shapePath]) ?
12596
+ shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12546
12597
  if (shapeDataValueCase === dataPathValueCase) {
12547
12598
  if (shapeData['geometry']['type'] != 'MultiPoint') {
12548
12599
  legendData.push({
@@ -12603,15 +12654,30 @@ var Legend = /** @__PURE__ @class */ (function () {
12603
12654
  /**
12604
12655
  * To destroy the legend.
12605
12656
  *
12606
- * @param {Maps} maps - Specifies the instance of the maps
12607
12657
  * @returns {void}
12608
12658
  * @private
12609
12659
  */
12610
- Legend.prototype.destroy = function (maps) {
12611
- /**
12612
- * Destroy method performed here
12613
- */
12660
+ Legend.prototype.destroy = function () {
12661
+ this.legendCollection = [];
12662
+ this.legendRenderingCollections = [];
12663
+ this.translate = null;
12664
+ this.legendBorderRect = null;
12665
+ this.initialMapAreaRect = null;
12666
+ this.legendTotalRect = null;
12667
+ this.totalPages = [];
12668
+ this.legendItemRect = null;
12669
+ this.legendGroup = null;
12670
+ this.shapeHighlightCollection = [];
12671
+ this.legendHighlightCollection = [];
12672
+ this.shapePreviousColor = [];
12673
+ this.selectedNonLegendShapes = [];
12674
+ this.legendLinearGradient = null;
12675
+ this.currentLayer = null;
12676
+ this.defsElement = null;
12677
+ this.legendElement = [];
12678
+ this.oldShapeElement = null;
12614
12679
  this.removeEventListener();
12680
+ this.maps = null;
12615
12681
  };
12616
12682
  return Legend;
12617
12683
  }());
@@ -12830,15 +12896,13 @@ var Highlight = /** @__PURE__ @class */ (function () {
12830
12896
  /**
12831
12897
  * To destroy the highlight.
12832
12898
  *
12833
- * @param {Maps} maps - Specifies the maps instance
12834
12899
  * @returns {void}
12835
12900
  * @private
12836
12901
  */
12837
- Highlight.prototype.destroy = function (maps) {
12838
- /**
12839
- * Destroy method performed here
12840
- */
12902
+ Highlight.prototype.destroy = function () {
12903
+ this.highlightSettings = null;
12841
12904
  this.removeEventListener();
12905
+ this.maps = null;
12842
12906
  };
12843
12907
  return Highlight;
12844
12908
  }());
@@ -13136,15 +13200,13 @@ var Selection = /** @__PURE__ @class */ (function () {
13136
13200
  /**
13137
13201
  * To destroy the selection.
13138
13202
  *
13139
- * @param {Maps} maps - Specifies the maps instance.
13140
13203
  * @returns {void}
13141
13204
  * @private
13142
13205
  */
13143
- Selection.prototype.destroy = function (maps) {
13144
- /**
13145
- * Destroy method performed here
13146
- */
13206
+ Selection.prototype.destroy = function () {
13207
+ this.selectionsettings = null;
13147
13208
  this.removeEventListener();
13209
+ this.maps = null;
13148
13210
  };
13149
13211
  return Selection;
13150
13212
  }());
@@ -13521,12 +13583,17 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13521
13583
  /**
13522
13584
  * To destroy the tooltip.
13523
13585
  *
13524
- * @param {Maps} maps Specifies the maps instance
13525
13586
  * @returns {void}
13526
13587
  * @private
13527
13588
  */
13528
- MapsTooltip.prototype.destroy = function (maps) {
13589
+ MapsTooltip.prototype.destroy = function () {
13590
+ if (!isNullOrUndefined(this.svgTooltip)) {
13591
+ this.svgTooltip.destroy();
13592
+ }
13593
+ this.svgTooltip = null;
13529
13594
  this.removeEventListener();
13595
+ //TODO: Calling the below code throws spec issue.
13596
+ //this.maps = null;
13530
13597
  };
13531
13598
  return MapsTooltip;
13532
13599
  }());
@@ -13540,7 +13607,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
13540
13607
  this.mouseEnter = false;
13541
13608
  this.isTouch = false;
13542
13609
  this.rectZoomingStart = false;
13543
- this.pinchRect = new Rect(0, 0, 0, 0);
13544
13610
  this.browserName = Browser.info.name;
13545
13611
  // eslint-disable-next-line @typescript-eslint/ban-types
13546
13612
  this.isPointer = Browser.isPointer;
@@ -13564,7 +13630,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
13564
13630
  this.selectionColor = this.maps.zoomSettings.selectionColor;
13565
13631
  this.fillColor = this.maps.zoomSettings.color;
13566
13632
  this.addEventListener();
13567
- this.groupElements = [];
13568
13633
  }
13569
13634
  /**
13570
13635
  * To perform zooming for maps
@@ -13605,6 +13670,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13605
13670
  mapTotalHeight = availSize.height;
13606
13671
  }
13607
13672
  newZoomFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13673
+ newZoomFactor = newZoomFactor > 1.05 ? 1 : newZoomFactor;
13608
13674
  map.translatePoint = this.calculateInitalZoomTranslatePoint(newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13609
13675
  }
13610
13676
  else {
@@ -13622,7 +13688,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13622
13688
  map.scale = map.mapScaleValue = map.previousScale;
13623
13689
  }
13624
13690
  else {
13625
- this.applyTransform();
13691
+ this.applyTransform(map);
13626
13692
  }
13627
13693
  }
13628
13694
  else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
@@ -13666,7 +13732,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13666
13732
  // element1 = element1;
13667
13733
  // }
13668
13734
  // }
13669
- _this.applyTransform();
13735
+ _this.applyTransform(_this.maps);
13670
13736
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
13671
13737
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13672
13738
  }
@@ -13768,7 +13834,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13768
13834
  }
13769
13835
  if (!isZoomCancelled) {
13770
13836
  map.mapScaleValue = zoomCalculationFactor;
13771
- this.applyTransform(true);
13837
+ this.applyTransform(map, true);
13772
13838
  this.maps.zoomNotApplied = false;
13773
13839
  this.zoomingRect = null;
13774
13840
  }
@@ -13817,6 +13883,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13817
13883
  mapTotalHeight = availSize.height;
13818
13884
  }
13819
13885
  zoomCalculationFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13886
+ zoomCalculationFactor = zoomCalculationFactor > 1.05 ? 1 : zoomCalculationFactor;
13820
13887
  map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomCalculationFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13821
13888
  }
13822
13889
  else {
@@ -13855,7 +13922,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13855
13922
  }
13856
13923
  }
13857
13924
  if (!isZoomCancelled) {
13858
- this.applyTransform();
13925
+ this.applyTransform(map);
13859
13926
  }
13860
13927
  };
13861
13928
  Zoom.prototype.drawZoomRectangle = function () {
@@ -13902,17 +13969,17 @@ var Zoom = /** @__PURE__ @class */ (function () {
13902
13969
  zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13903
13970
  }
13904
13971
  };
13905
- Zoom.prototype.applyTransform = function (animate$$1) {
13972
+ Zoom.prototype.applyTransform = function (maps, animate$$1) {
13906
13973
  var layerIndex;
13907
13974
  this.templateCount = 0;
13908
13975
  var markerStyle;
13909
- var scale = this.maps.scale;
13910
- var x = this.maps.translatePoint.x;
13911
- var y = this.maps.translatePoint.y;
13976
+ var scale = maps.scale;
13977
+ var x = maps.translatePoint.x;
13978
+ var y = maps.translatePoint.y;
13912
13979
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13913
- this.maps.zoomShapeCollection = [];
13914
- if (document.getElementById(this.maps.element.id + '_mapsTooltip')) {
13915
- removeElement(this.maps.element.id + '_mapsTooltip');
13980
+ maps.zoomShapeCollection = [];
13981
+ if (document.getElementById(maps.element.id + '_mapsTooltip')) {
13982
+ removeElement(maps.element.id + '_mapsTooltip');
13916
13983
  }
13917
13984
  if (this.layerCollectionEle) {
13918
13985
  for (var i_1 = 0; i_1 < this.layerCollectionEle.childElementCount; i_1++) {
@@ -13920,29 +13987,29 @@ var Zoom = /** @__PURE__ @class */ (function () {
13920
13987
  if (layerElement.tagName === 'g') {
13921
13988
  this.templateCount++;
13922
13989
  this.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
13923
- this.currentLayer = this.maps.layersCollection[this.index];
13924
- var factor = this.maps.mapLayerPanel.calculateFactor(this.currentLayer);
13990
+ this.currentLayer = maps.layersCollection[this.index];
13991
+ var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
13925
13992
  for (var j = 0; j < layerElement.childElementCount; j++) {
13926
13993
  var currentEle = layerElement.childNodes[j];
13927
13994
  if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
13928
13995
  && (!(currentEle.id.indexOf('_dataLableIndex_Group') > -1))) {
13929
- if (this.maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
13996
+ if (maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
13930
13997
  currentEle.remove();
13931
13998
  if (layerElement.children.length > 0 && layerElement.children[0]) {
13932
- layerElement.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index), layerElement.children[1]);
13999
+ layerElement.insertBefore(maps.navigationLineModule.renderNavigation(this.currentLayer, maps.tileZoomLevel, this.index), layerElement.children[1]);
13933
14000
  }
13934
14001
  else {
13935
- layerElement.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index));
14002
+ layerElement.appendChild(maps.navigationLineModule.renderNavigation(this.currentLayer, maps.tileZoomLevel, this.index));
13936
14003
  }
13937
14004
  }
13938
14005
  else if (currentEle.id.indexOf('Legend') == -1) {
13939
- changeBorderWidth(currentEle, this.index, scale, this.maps);
13940
- this.maps.zoomTranslatePoint = this.maps.translatePoint;
14006
+ changeBorderWidth(currentEle, this.index, scale, maps);
14007
+ maps.zoomTranslatePoint = maps.translatePoint;
13941
14008
  this.animateTransform(currentEle, animate$$1, x, y, scale);
13942
14009
  }
13943
14010
  }
13944
14011
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
13945
- if (!this.isPanning) {
14012
+ if (!this.isPanning && !isNullOrUndefined(currentEle.childNodes[0])) {
13946
14013
  this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
13947
14014
  }
13948
14015
  currentEle = layerElement.childNodes[j];
@@ -13961,11 +14028,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
13961
14028
  markerSelectionValues['latitude'] ||
13962
14029
  this.currentLayer.markerSettings[markerIndex].initialMarkerSelection[x_1]['longitude'] ===
13963
14030
  markerSelectionValues['longitude']) {
13964
- this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
14031
+ maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
13965
14032
  }
13966
14033
  }
13967
- if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
13968
- if (this.maps.isTileMap) {
14034
+ if ((this.currentLayer.animationDuration > 0 || (maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
14035
+ if (maps.isTileMap) {
13969
14036
  var groupElement = document.querySelector('.GroupElement');
13970
14037
  if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
13971
14038
  groupElement.style.display = 'none';
@@ -13977,29 +14044,29 @@ var Zoom = /** @__PURE__ @class */ (function () {
13977
14044
  }
13978
14045
  }
13979
14046
  }
13980
- if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
13981
- clusterSeparate(this.maps.markerModule.sameMarkerData, this.maps, currentEle, true);
14047
+ if (this.isPanning && maps.markerModule.sameMarkerData.length > 0) {
14048
+ clusterSeparate(maps.markerModule.sameMarkerData, maps, currentEle, true);
13982
14049
  }
13983
- else if (this.maps.markerModule.sameMarkerData.length > 0) {
13984
- this.maps.markerModule.sameMarkerData = [];
13985
- if (document.getElementById(this.maps.element.id + '_mapsTooltip')) {
13986
- removeElement(this.maps.element.id + '_mapsTooltip');
14050
+ else if (maps.markerModule.sameMarkerData.length > 0) {
14051
+ maps.markerModule.sameMarkerData = [];
14052
+ if (document.getElementById(maps.element.id + '_mapsTooltip')) {
14053
+ removeElement(maps.element.id + '_mapsTooltip');
13987
14054
  }
13988
14055
  }
13989
- if (document.getElementById(this.maps.element.id + '_mapsTooltip') && this.maps.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_')
14056
+ if (document.getElementById(maps.element.id + '_mapsTooltip') && maps.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_')
13990
14057
  && !this.isPanning) {
13991
- var mapsTooltip = this.maps.mapsTooltipModule;
14058
+ var mapsTooltip = maps.mapsTooltipModule;
13992
14059
  var tooltipElement = currentEle.querySelector('#' + mapsTooltip.tooltipTargetID);
13993
14060
  if (!isNullOrUndefined(tooltipElement)) {
13994
14061
  if (tooltipElement['style']['visibility'] === 'hidden') {
13995
- removeElement(this.maps.element.id + '_mapsTooltip');
14062
+ removeElement(maps.element.id + '_mapsTooltip');
13996
14063
  }
13997
14064
  else {
13998
14065
  var x_2 = parseFloat(tooltipElement.getAttribute('transform').split('(')[1].split(')')[0].split(' ')[1]);
13999
14066
  var y_1 = parseFloat(tooltipElement.getAttribute('transform').split('(')[1].split(')')[0].split(' ')[2]);
14000
- if (this.maps.isTileMap) {
14001
- x_2 += +getElement(this.maps.element.id + '_tile_parent')['style']['left'].split('px')[0];
14002
- y_1 += +getElement(this.maps.element.id + '_tile_parent')['style']['top'].split('px')[0];
14067
+ if (maps.isTileMap) {
14068
+ x_2 += +getElement(maps.element.id + '_tile_parent')['style']['left'].split('px')[0];
14069
+ y_1 += +getElement(maps.element.id + '_tile_parent')['style']['top'].split('px')[0];
14003
14070
  }
14004
14071
  mapsTooltip.svgTooltip.location.x = x_2;
14005
14072
  mapsTooltip.svgTooltip.location.y = y_1;
@@ -14017,9 +14084,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
14017
14084
  layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
14018
14085
  var bubleIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[0]);
14019
14086
  var dataIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[2]);
14020
- for (var l = 0; l < this.maps.bubbleModule.bubbleCollection.length; l++) {
14087
+ for (var l = 0; l < maps.bubbleModule.bubbleCollection.length; l++) {
14021
14088
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14022
- var bubbleCollection = this.maps.bubbleModule.bubbleCollection[l];
14089
+ var bubbleCollection = maps.bubbleModule.bubbleCollection[l];
14023
14090
  if (bubbleCollection['LayerIndex'] === layerIndex && bubbleCollection['BubbleIndex'] === bubleIndex &&
14024
14091
  bubbleCollection['DataIndex'] === dataIndex) {
14025
14092
  var centerX = bubbleCollection['center']['x'];
@@ -14038,25 +14105,25 @@ var Zoom = /** @__PURE__ @class */ (function () {
14038
14105
  }
14039
14106
  }
14040
14107
  }
14041
- else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(this.maps.layers[this.index])) {
14108
+ else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(maps.layers[this.index])) {
14042
14109
  this.intersect = [];
14043
- this.maps.zoomLabelPositions = [];
14044
- this.maps.zoomLabelPositions = this.maps.dataLabelModule.dataLabelCollections;
14045
- var labelAnimate = !this.maps.isTileMap && animate$$1;
14110
+ maps.zoomLabelPositions = [];
14111
+ maps.zoomLabelPositions = maps.dataLabelModule.dataLabelCollections;
14112
+ var labelAnimate = !maps.isTileMap && animate$$1;
14046
14113
  for (var k = 0; k < currentEle.childElementCount; k++) {
14047
14114
  if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
14048
14115
  var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
14049
14116
  this.zoomshapewidth = currentEle.childNodes[k].getBoundingClientRect();
14050
- this.maps.zoomShapeCollection.push(this.zoomshapewidth);
14117
+ maps.zoomShapeCollection.push(this.zoomshapewidth);
14051
14118
  this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', labelAnimate);
14052
- var dataLabel = this.maps.layers[this.index].dataLabelSettings;
14119
+ var dataLabel = maps.layers[this.index].dataLabelSettings;
14053
14120
  var border = dataLabel.border;
14054
14121
  if (k > 0 && border['width'] > 1) {
14055
- if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1) {
14056
- var labelX = ((this.maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
14057
- var labelY = ((this.maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
14122
+ if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1 && !isNullOrUndefined(maps.zoomLabelPositions[labelIndex])) {
14123
+ var labelX = ((maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
14124
+ var labelY = ((maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
14058
14125
  var zoomtext = currentEle.childNodes[k]['innerHTML'];
14059
- var style = this.maps.layers[this.index].dataLabelSettings.textStyle;
14126
+ var style = maps.layers[this.index].dataLabelSettings.textStyle;
14060
14127
  var zoomtextSize = measureText(zoomtext, style);
14061
14128
  var padding = 5;
14062
14129
  var rectElement = currentEle.childNodes[k - 1];
@@ -14071,11 +14138,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
14071
14138
  }
14072
14139
  }
14073
14140
  }
14074
- this.maps.arrangeTemplate();
14141
+ maps.arrangeTemplate();
14075
14142
  }
14076
14143
  if (!isNullOrUndefined(this.currentLayer)) {
14077
- if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
14078
- this.processTemplate(x, y, scale, this.maps);
14144
+ if (!animate$$1 || this.currentLayer.animationDuration === 0 || maps.isTileMap) {
14145
+ this.processTemplate(x, y, scale, maps);
14079
14146
  }
14080
14147
  }
14081
14148
  }
@@ -14479,15 +14546,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
14479
14546
  if (!panArgs.cancel) {
14480
14547
  if (panningXDirection && panningYDirection) {
14481
14548
  map.translatePoint = new Point(x, y);
14482
- this.applyTransform();
14549
+ this.applyTransform(map);
14483
14550
  }
14484
14551
  else if (panningXDirection) {
14485
14552
  map.translatePoint = new Point(x, map.translatePoint.y);
14486
- this.applyTransform();
14553
+ this.applyTransform(map);
14487
14554
  }
14488
14555
  else if (panningYDirection) {
14489
14556
  map.translatePoint = new Point(map.translatePoint.x, y);
14490
- this.applyTransform();
14557
+ this.applyTransform(map);
14491
14558
  }
14492
14559
  }
14493
14560
  this.maps.zoomNotApplied = false;
@@ -14515,7 +14582,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14515
14582
  };
14516
14583
  map.trigger(pan, panArgs);
14517
14584
  map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint, 'Pan');
14518
- this.applyTransform();
14585
+ this.applyTransform(map);
14519
14586
  }
14520
14587
  map.zoomTranslatePoint = map.translatePoint;
14521
14588
  this.mouseDownPoints = this.mouseMovePoints;
@@ -14527,7 +14594,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14527
14594
  (this.distanceX / this.maps.scale)) : this.maps.translatePoint.x;
14528
14595
  this.maps.translatePoint.y = !isNullOrUndefined(this.distanceY) ? this.maps.translatePoint.y -
14529
14596
  (this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
14530
- this.applyTransform(false);
14597
+ this.applyTransform(this.maps, false);
14531
14598
  };
14532
14599
  Zoom.prototype.toolBarZooming = function (zoomFactor, type) {
14533
14600
  var _this = this;
@@ -14565,6 +14632,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14565
14632
  mapHeight = size.height;
14566
14633
  }
14567
14634
  zoomFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
14635
+ zoomFactor = zoomFactor > 1.05 ? 1 : zoomFactor;
14568
14636
  map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomFactor, mapWidth, mapHeight, size, min, map);
14569
14637
  }
14570
14638
  else {
@@ -14584,7 +14652,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14584
14652
  map.scale = map.previousScale;
14585
14653
  }
14586
14654
  else {
14587
- this.applyTransform(true);
14655
+ this.applyTransform(map, true);
14588
14656
  }
14589
14657
  }
14590
14658
  else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
@@ -14622,7 +14690,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14622
14690
  var element1 = document.getElementById(this.maps.element.id + '_tiles');
14623
14691
  var animationDuration = this.maps.layersCollection[0].animationDuration;
14624
14692
  setTimeout(function () {
14625
- _this.applyTransform(true);
14693
+ _this.applyTransform(_this.maps, true);
14626
14694
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
14627
14695
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
14628
14696
  }
@@ -14635,6 +14703,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
14635
14703
  };
14636
14704
  Zoom.prototype.createZoomingToolbars = function () {
14637
14705
  var map = this.maps;
14706
+ var zoomInElements;
14707
+ var zoomOutElements;
14638
14708
  this.toolBarGroup = map.renderer.createGroup({
14639
14709
  id: map.element.id + '_Zooming_KitCollection',
14640
14710
  opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
@@ -14652,7 +14722,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
14652
14722
  var toolBarLength = map.zoomSettings.toolbars.length;
14653
14723
  var toolWidth = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (toolBarLength * kitWidth) + (toolBarLength * padding) : (kitWidth * 2);
14654
14724
  var toolHeight = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (kitHeight * 2) : (toolBarLength * kitHeight) + (toolBarLength * padding);
14655
- this.toolBarGroup.appendChild(map.renderer.drawRectangle(new RectOption(map.element.id + '_Zooming_Rect', 'transparent', { color: 'transparent', width: 1 }, 1, new Rect(0, 0, toolWidth, toolHeight), 0, 0)));
14656
14725
  var defElement = map.renderer.createDefs();
14657
14726
  defElement.innerHTML = shadowElement;
14658
14727
  this.toolBarGroup.appendChild(defElement);
@@ -14701,13 +14770,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
14701
14770
  case 'zoomin':
14702
14771
  direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
14703
14772
  this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Path', fill, 3, this.maps.themeStyle.zoomFillColor, 1, 1, null, direction)));
14704
- this.zoomInElements = this.currentToolbarEle;
14773
+ zoomInElements = this.currentToolbarEle;
14705
14774
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14706
14775
  break;
14707
14776
  case 'zoomout':
14708
14777
  direction = 'M 0, 8 L 16, 8';
14709
14778
  this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fill, 3, this.maps.themeStyle.zoomFillColor, 1, 1, null, direction)));
14710
- this.zoomOutElements = this.currentToolbarEle;
14779
+ zoomOutElements = this.currentToolbarEle;
14711
14780
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14712
14781
  break;
14713
14782
  case 'pan': {
@@ -15204,15 +15273,30 @@ var Zoom = /** @__PURE__ @class */ (function () {
15204
15273
  /**
15205
15274
  * To destroy the zoom.
15206
15275
  *
15207
- * @param {Maps} maps - Specifies the instance of the maps.
15208
15276
  * @returns {void}
15209
15277
  * @private
15210
15278
  */
15211
- Zoom.prototype.destroy = function (maps) {
15279
+ Zoom.prototype.destroy = function () {
15280
+ this.toolBarGroup = null;
15281
+ this.currentToolbarEle = null;
15282
+ this.zoomingRect = null;
15283
+ this.zoomElements = null;
15284
+ this.panElements = null;
15285
+ this.baseTranslatePoint = null;
15286
+ this.touchStartList = null;
15287
+ this.touchMoveList = null;
15288
+ this.previousTouchMoveList = null;
15289
+ this.mouseDownPoints = null;
15290
+ this.mouseMovePoints = null;
15291
+ this.startTouches = [];
15292
+ this.zoomshapewidth = null;
15293
+ this.intersect = [];
15294
+ this.mouseDownLatLong = null;
15295
+ this.mouseMoveLatLong = null;
15212
15296
  this.removeEventListener();
15213
- /**
15214
- * Destroy method performed here
15215
- */
15297
+ //TODO: Calling the below code throws spec issue.
15298
+ //this.maps = null;
15299
+ this.currentLayer = null;
15216
15300
  };
15217
15301
  return Zoom;
15218
15302
  }());
@@ -15230,7 +15314,6 @@ var Print = /** @__PURE__ @class */ (function () {
15230
15314
  * @param {Maps} control - Specifies the instance of the map
15231
15315
  */
15232
15316
  function Print(control) {
15233
- this.control = control;
15234
15317
  }
15235
15318
  /**
15236
15319
  * To print the Maps
@@ -15239,17 +15322,16 @@ var Print = /** @__PURE__ @class */ (function () {
15239
15322
  * @returns {void}
15240
15323
  * @private
15241
15324
  */
15242
- Print.prototype.print = function (elements) {
15243
- var _this = this;
15244
- this.printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
15245
- this.printWindow.moveTo(0, 0);
15246
- this.printWindow.resizeTo(screen.availWidth, screen.availHeight);
15325
+ Print.prototype.print = function (maps, elements) {
15326
+ var printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
15327
+ printWindow.moveTo(0, 0);
15328
+ printWindow.resizeTo(screen.availWidth, screen.availHeight);
15247
15329
  var argsData = {
15248
- cancel: false, htmlContent: this.getHTMLContent(elements), name: beforePrint
15330
+ cancel: false, htmlContent: this.getHTMLContent(maps, elements), name: beforePrint
15249
15331
  };
15250
- this.control.trigger('beforePrint', argsData, function (beforePrintArgs) {
15332
+ maps.trigger('beforePrint', argsData, function (beforePrintArgs) {
15251
15333
  if (!argsData.cancel) {
15252
- print(argsData.htmlContent, _this.printWindow);
15334
+ print(argsData.htmlContent, printWindow);
15253
15335
  }
15254
15336
  });
15255
15337
  };
@@ -15260,20 +15342,19 @@ var Print = /** @__PURE__ @class */ (function () {
15260
15342
  * @returns {Element} - Returns the div element
15261
15343
  * @private
15262
15344
  */
15263
- Print.prototype.getHTMLContent = function (elements) {
15264
- var elementRect = getClientElement(this.control.element.id);
15345
+ Print.prototype.getHTMLContent = function (maps, elements) {
15265
15346
  var div = createElement('div');
15266
- var divElement = this.control.element.cloneNode(true);
15267
- if (this.control.isTileMap) {
15347
+ var divElement = maps.element.cloneNode(true);
15348
+ if (maps.isTileMap) {
15268
15349
  for (var i = 0; i < divElement.childElementCount; i++) {
15269
- if (divElement.children[i].id === this.control.element.id + '_tile_parent') {
15350
+ if (divElement.children[i].id === maps.element.id + '_tile_parent') {
15270
15351
  divElement.children[i].style.removeProperty('height');
15271
15352
  divElement.children[i].style.removeProperty('width');
15272
15353
  divElement.children[i].style.removeProperty('top');
15273
15354
  divElement.children[i].style.removeProperty('left');
15274
15355
  divElement.children[i].style.removeProperty('right');
15275
15356
  divElement.children[i].style.removeProperty('overflow');
15276
- var svgElement = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
15357
+ var svgElement = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
15277
15358
  divElement.children[i].children[0].style.overflow = 'hidden';
15278
15359
  divElement.children[i].children[0].style.position = 'absolute';
15279
15360
  divElement.children[i].children[0].style.height = svgElement.style.height;
@@ -15313,15 +15394,10 @@ var Print = /** @__PURE__ @class */ (function () {
15313
15394
  /**
15314
15395
  * To destroy the print.
15315
15396
  *
15316
- * @param {Maps} maps - Specifies the instance of the maps
15317
15397
  * @returns {void}
15318
15398
  * @private
15319
15399
  */
15320
- Print.prototype.destroy = function (maps) {
15321
- /**
15322
- * Destroy method performed here
15323
- */
15324
- };
15400
+ Print.prototype.destroy = function () { };
15325
15401
  return Print;
15326
15402
  }());
15327
15403
 
@@ -15338,7 +15414,6 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15338
15414
  * @param {Maps} control - Specifies the instance of the map
15339
15415
  */
15340
15416
  function ImageExport(control) {
15341
- this.control = control;
15342
15417
  }
15343
15418
  /**
15344
15419
  * To export the file as image/svg format
@@ -15349,29 +15424,28 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15349
15424
  * @returns {Promise<string>} - Returns the promise string.
15350
15425
  * @private
15351
15426
  */
15352
- ImageExport.prototype.export = function (type, fileName, allowDownload) {
15353
- var _this = this;
15427
+ ImageExport.prototype.export = function (maps, type, fileName, allowDownload) {
15354
15428
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15355
15429
  var promise = new Promise(function (resolve, reject) {
15356
15430
  var imageCanvasElement = createElement('canvas', {
15357
15431
  id: 'ej2-canvas',
15358
15432
  attrs: {
15359
- 'width': _this.control.availableSize.width.toString(),
15360
- 'height': _this.control.availableSize.height.toString()
15433
+ 'width': maps.availableSize.width.toString(),
15434
+ 'height': maps.availableSize.height.toString()
15361
15435
  }
15362
15436
  });
15363
15437
  var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
15364
- var toolbarEle = document.getElementById(_this.control.element.id + '_ToolBar');
15365
- var svgParent = document.getElementById(_this.control.element.id + '_Tile_SVG_Parent');
15438
+ var toolbarEle = document.getElementById(maps.element.id + '_ToolBar');
15439
+ var svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
15366
15440
  var svgDataElement;
15367
15441
  var tileSvg;
15368
- var svgObject = getElementByID(_this.control.element.id + '_svg').cloneNode(true);
15369
- if (!_this.control.isTileMap) {
15442
+ var svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
15443
+ if (!maps.isTileMap) {
15370
15444
  svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
15371
- _this.control.svgObject.outerHTML + '</svg>';
15445
+ maps.svgObject.outerHTML + '</svg>';
15372
15446
  }
15373
15447
  else {
15374
- tileSvg = getElementByID(_this.control.element.id + '_Tile_SVG').cloneNode(true);
15448
+ tileSvg = getElementByID(maps.element.id + '_Tile_SVG').cloneNode(true);
15375
15449
  svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
15376
15450
  svgObject.outerHTML + tileSvg.outerHTML + '</svg>';
15377
15451
  }
@@ -15388,7 +15462,7 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15388
15462
  else {
15389
15463
  var image_1 = new Image();
15390
15464
  var ctxt_1 = imageCanvasElement.getContext('2d');
15391
- if (!_this.control.isTileMap) {
15465
+ if (!maps.isTileMap) {
15392
15466
  image_1.onload = (function () {
15393
15467
  ctxt_1.drawImage(image_1, 0, 0);
15394
15468
  window.URL.revokeObjectURL(url);
@@ -15407,22 +15481,22 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15407
15481
  image_1.src = url;
15408
15482
  }
15409
15483
  else {
15410
- var svgParentElement = document.getElementById(_this.control.element.id + '_MapAreaBorder');
15484
+ var svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
15411
15485
  var top_1 = parseFloat(svgParentElement.getAttribute('y'));
15412
15486
  var left_1 = parseFloat(svgParentElement.getAttribute('x'));
15413
15487
  var imgxHttp = new XMLHttpRequest();
15414
- var imgTileLength_1 = _this.control.mapLayerPanel.tiles.length;
15488
+ var imgTileLength_1 = maps.mapLayerPanel.tiles.length;
15415
15489
  var _loop_1 = function (i) {
15416
- var tile = document.getElementById(_this.control.element.id + '_tile_' + (i - 1));
15490
+ var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
15417
15491
  var exportTileImg = new Image();
15418
15492
  exportTileImg.crossOrigin = 'Anonymous';
15419
- ctxt_1.fillStyle = _this.control.background ? _this.control.background : '#FFFFFF';
15420
- ctxt_1.fillRect(0, 0, _this.control.availableSize.width, _this.control.availableSize.height);
15421
- ctxt_1.font = _this.control.titleSettings.textStyle.size + ' Arial';
15422
- var titleElement = document.getElementById(_this.control.element.id + '_Map_title');
15493
+ ctxt_1.fillStyle = maps.background ? maps.background : '#FFFFFF';
15494
+ ctxt_1.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
15495
+ ctxt_1.font = maps.titleSettings.textStyle.size + ' Arial';
15496
+ var titleElement = document.getElementById(maps.element.id + '_Map_title');
15423
15497
  if (!isNullOrUndefined(titleElement)) {
15424
15498
  ctxt_1.fillStyle = titleElement.getAttribute('fill');
15425
- ctxt_1.fillText(_this.control.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15499
+ ctxt_1.fillText(maps.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15426
15500
  }
15427
15501
  exportTileImg.onload = (function () {
15428
15502
  if (i === 0 || i === imgTileLength_1 + 1) {
@@ -15436,7 +15510,6 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15436
15510
  }
15437
15511
  }
15438
15512
  else {
15439
- var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
15440
15513
  ctxt_1.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) +
15441
15514
  top_1);
15442
15515
  }
@@ -15493,15 +15566,10 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15493
15566
  /**
15494
15567
  * To destroy the ImageExport.
15495
15568
  *
15496
- * @param {Maps} maps - Specifies the instance of the maps.
15497
15569
  * @returns {void}
15498
15570
  * @private
15499
15571
  */
15500
- ImageExport.prototype.destroy = function (maps) {
15501
- /**
15502
- * Destroy method performed here
15503
- */
15504
- };
15572
+ ImageExport.prototype.destroy = function () { };
15505
15573
  return ImageExport;
15506
15574
  }());
15507
15575
 
@@ -15517,8 +15585,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15517
15585
  *
15518
15586
  * @param {Maps} control Specifies the instance of the map
15519
15587
  */
15520
- function PdfExport(control) {
15521
- this.control = control;
15588
+ function PdfExport() {
15522
15589
  }
15523
15590
  /**
15524
15591
  * To export the file as image/svg format
@@ -15530,25 +15597,24 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15530
15597
  * @returns {Promise<string>} - Returns the promise string
15531
15598
  * @private
15532
15599
  */
15533
- PdfExport.prototype.export = function (type, fileName, allowDownload, orientation) {
15534
- var _this = this;
15600
+ PdfExport.prototype.export = function (maps, type, fileName, allowDownload, orientation) {
15535
15601
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15536
15602
  var promise = new Promise(function (resolve, reject) {
15537
15603
  var canvasElement = createElement('canvas', {
15538
15604
  id: 'ej2-canvas',
15539
15605
  attrs: {
15540
- 'width': _this.control.availableSize.width.toString(),
15541
- 'height': _this.control.availableSize.height.toString()
15606
+ 'width': maps.availableSize.width.toString(),
15607
+ 'height': maps.availableSize.height.toString()
15542
15608
  }
15543
15609
  });
15544
15610
  orientation = isNullOrUndefined(orientation) ? PdfPageOrientation.Landscape : orientation;
15545
- var svgParent = document.getElementById(_this.control.element.id + '_Tile_SVG_Parent');
15611
+ var svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
15546
15612
  var svgData;
15547
- var exportElement = _this.control.svgObject.cloneNode(true);
15613
+ var exportElement = maps.svgObject.cloneNode(true);
15548
15614
  var backgroundElement = exportElement.childNodes[0];
15549
15615
  var backgroundColor = backgroundElement.getAttribute('fill');
15550
- if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
15551
- || _this.control.theme === 'Fluent' || _this.control.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
15616
+ if ((maps.theme === 'Tailwind' || maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5' || maps.theme === 'Bootstrap5Dark'
15617
+ || maps.theme === 'Fluent' || maps.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
15552
15618
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
15553
15619
  }
15554
15620
  var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
@@ -15556,7 +15622,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15556
15622
  var pdfDocument = new PdfDocument();
15557
15623
  var image = new Image();
15558
15624
  var ctx = canvasElement.getContext('2d');
15559
- if (!_this.control.isTileMap) {
15625
+ if (!maps.isTileMap) {
15560
15626
  image.onload = (function () {
15561
15627
  ctx.drawImage(image, 0, 0);
15562
15628
  window.URL.revokeObjectURL(url);
@@ -15564,7 +15630,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15564
15630
  var imageString = canvasElement.toDataURL('image/jpeg').replace('image/jpeg', 'image/octet-stream');
15565
15631
  pdfDocument.pageSettings.orientation = orientation;
15566
15632
  imageString = imageString.slice(imageString.indexOf(',') + 1);
15567
- pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, (_this.control.availableSize.width - 60), _this.control.availableSize.height);
15633
+ pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
15568
15634
  if (allowDownload) {
15569
15635
  pdfDocument.save(fileName + '.pdf');
15570
15636
  pdfDocument.destroy();
@@ -15577,22 +15643,22 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15577
15643
  image.src = url;
15578
15644
  }
15579
15645
  else {
15580
- var svgParentElement = document.getElementById(_this.control.element.id + '_MapAreaBorder');
15646
+ var svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
15581
15647
  var top_1 = parseFloat(svgParentElement.getAttribute('y'));
15582
15648
  var left_1 = parseFloat(svgParentElement.getAttribute('x'));
15583
15649
  var xHttp = new XMLHttpRequest();
15584
- var tileLength_1 = _this.control.mapLayerPanel.tiles.length;
15650
+ var tileLength_1 = maps.mapLayerPanel.tiles.length;
15585
15651
  var _loop_1 = function (i) {
15586
- var tile = document.getElementById(_this.control.element.id + '_tile_' + (i - 1));
15652
+ var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
15587
15653
  var tileImg = new Image();
15588
15654
  tileImg.crossOrigin = 'Anonymous';
15589
- ctx.fillStyle = _this.control.background ? _this.control.background : '#FFFFFF';
15590
- ctx.fillRect(0, 0, _this.control.availableSize.width, _this.control.availableSize.height);
15591
- ctx.font = _this.control.titleSettings.textStyle.size + ' Arial';
15592
- var titleElement = document.getElementById(_this.control.element.id + '_Map_title');
15655
+ ctx.fillStyle = maps.background ? maps.background : '#FFFFFF';
15656
+ ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
15657
+ ctx.font = maps.titleSettings.textStyle.size + ' Arial';
15658
+ var titleElement = document.getElementById(maps.element.id + '_Map_title');
15593
15659
  if (!isNullOrUndefined(titleElement)) {
15594
15660
  ctx.fillStyle = titleElement.getAttribute('fill');
15595
- ctx.fillText(_this.control.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15661
+ ctx.fillText(maps.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15596
15662
  }
15597
15663
  tileImg.onload = (function () {
15598
15664
  if (i === 0 || i === tileLength_1 + 1) {
@@ -15606,7 +15672,6 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15606
15672
  }
15607
15673
  }
15608
15674
  else {
15609
- var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
15610
15675
  ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) + top_1);
15611
15676
  }
15612
15677
  ctx.drawImage(tileImg, 0, 0);
@@ -15616,7 +15681,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15616
15681
  var x = localStorage.getItem('saved-image-example');
15617
15682
  pdfDocument.pageSettings.orientation = orientation;
15618
15683
  x = x.slice(x.indexOf(',') + 1);
15619
- pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (_this.control.availableSize.width - 60), _this.control.availableSize.height);
15684
+ pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
15620
15685
  if (allowDownload) {
15621
15686
  pdfDocument.save(fileName + '.pdf');
15622
15687
  pdfDocument.destroy();
@@ -15633,7 +15698,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15633
15698
  }
15634
15699
  else {
15635
15700
  setTimeout(function () {
15636
- var tileSvg = document.getElementById(_this.control.element.id + '_Tile_SVG');
15701
+ var tileSvg = document.getElementById(maps.element.id + '_Tile_SVG');
15637
15702
  tileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(tileSvg)], { type: 'image/svg+xml' }));
15638
15703
  }, 300);
15639
15704
  }
@@ -15660,17 +15725,12 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15660
15725
  return 'PdfExport';
15661
15726
  };
15662
15727
  /**
15663
- * To destroy the PdfExports.
15728
+ * To destroy the PdfExport.
15664
15729
  *
15665
- * @param {Maps} maps - Specifies the instance of the maps.
15666
15730
  * @returns {void}
15667
15731
  * @private
15668
15732
  */
15669
- PdfExport.prototype.destroy = function (maps) {
15670
- /**
15671
- * Destroy method performed here
15672
- */
15673
- };
15733
+ PdfExport.prototype.destroy = function () { };
15674
15734
  return PdfExport;
15675
15735
  }());
15676
15736