@syncfusion/ej2-maps 20.2.45 → 20.3.47

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