@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
@@ -1039,7 +1039,10 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1039
1039
  markerCluster.remove();
1040
1040
  }
1041
1041
  if (zoomCheck) {
1042
- document.getElementById(maps.element.id + '_Layer_Collections').appendChild(layerElement);
1042
+ let layerGroupElement = document.getElementById(maps.element.id + '_Layer_Collections');
1043
+ if (!isNullOrUndefined(layerGroupElement)) {
1044
+ layerGroupElement.appendChild(layerElement);
1045
+ }
1043
1046
  }
1044
1047
  });
1045
1048
  }
@@ -1056,15 +1059,16 @@ function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
1056
1059
  const markerIndex = sameMarkerData[0].markerIndex;
1057
1060
  const dataIndex = sameMarkerData[0].dataIndex;
1058
1061
  const markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
1062
+ const marker = maps.layers[layerIndex].markerSettings[markerIndex];
1059
1063
  const clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
1060
- const clusterEle = getElement(clusterId);
1064
+ const clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElement(clusterId + '_Group') : getElement(clusterId);
1061
1065
  const clusterEleLabel = getElement(clusterId + '_datalabel_' + clusterIndex);
1062
1066
  clusterEle.setAttribute('visibility', 'visible');
1063
1067
  clusterEleLabel.setAttribute('visibility', 'visible');
1064
1068
  let markerEle;
1065
1069
  const markerDataLength = sameMarkerData[0].data.length;
1066
1070
  for (let i = 0; i < markerDataLength; i++) {
1067
- markerEle = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1071
+ markerEle = marker.shape === 'Balloon' ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1068
1072
  markerEle['style']['visibility'] = 'hidden';
1069
1073
  }
1070
1074
  removeElement(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine');
@@ -1086,13 +1090,13 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1086
1090
  const getElementFunction = isDom ? getElement : markerElement.querySelector.bind(markerElement);
1087
1091
  const getQueryConnect = isDom ? '' : '#';
1088
1092
  const markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
1093
+ const marker = maps.layers[layerIndex].markerSettings[markerIndex];
1089
1094
  const clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
1090
- const clusterEle = getElementFunction(getQueryConnect + '' + clusterId);
1095
+ const clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + clusterId + '_Group') : getElementFunction(getQueryConnect + '' + clusterId);
1091
1096
  const clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
1092
1097
  clusterEle.setAttribute('visibility', 'hidden');
1093
1098
  clusterEleLabel.setAttribute('visibility', 'hidden');
1094
- const marker = maps.layers[layerIndex].markerSettings[markerIndex];
1095
- let markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1099
+ let markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1096
1100
  const height = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().height : marker.height;
1097
1101
  const width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
1098
1102
  const centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
@@ -1128,7 +1132,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1128
1132
  const x1 = centerX + radius * Math.sin((Math.PI * 2 * newAngle) / 360);
1129
1133
  const y1 = centerY + radius * Math.cos((Math.PI * 2 * newAngle) / 360);
1130
1134
  path += start + 'L ' + (x1) + ' ' + y1 + ' ';
1131
- markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1135
+ markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1132
1136
  if (markerEle.parentElement.id.indexOf('Template_Group') > -1) {
1133
1137
  markerEle['style']['transform'] = '';
1134
1138
  markerEle['style']['left'] = maps.isTileMap ? x1 - (width / 2) + 'px' : (x1 - (width / 2) - 10) + 'px';
@@ -1149,7 +1153,12 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1149
1153
  markerElement = isDom ? getElementFunction(maps.element.id + '_Markers_Group') : markerElement;
1150
1154
  const groupEle = maps.renderer.createGroup({ id: maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine' });
1151
1155
  groupEle.appendChild(maps.renderer.drawPath(options));
1152
- markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0'));
1156
+ if (marker.shape === 'Balloon') {
1157
+ markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0_Group'));
1158
+ }
1159
+ else {
1160
+ markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0'));
1161
+ }
1153
1162
  }
1154
1163
  /**
1155
1164
  *
@@ -1176,6 +1185,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
1176
1185
  dashArray: markerSettings.dashArray, borderOpacity: isNullOrUndefined(eventArgs.border.opacity) ? markerSettings.opacity :
1177
1186
  eventArgs.border.opacity
1178
1187
  };
1188
+ removeElement(markerID);
1179
1189
  const ele = drawSymbols(eventArgs.shape, eventArgs.imageUrl, { x: 0, y: 0 }, markerID, shapeCustom, markerCollection, maps);
1180
1190
  const x = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x;
1181
1191
  const y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y;
@@ -1553,7 +1563,7 @@ function drawBalloon(maps, options, size, location, type, element) {
1553
1563
  const y = size.height / 30;
1554
1564
  balloon.setAttribute('transform', 'translate(' + location.x + ', ' + location.y + ') scale(' + x + ', ' + y + ')');
1555
1565
  if (type === 'Marker') {
1556
- const g = maps.renderer.createGroup({ id: options.id });
1566
+ const g = maps.renderer.createGroup({ id: options.id + '_Group' });
1557
1567
  appendShape(balloon, g);
1558
1568
  pathElement = appendShape(g, element);
1559
1569
  }
@@ -1624,7 +1634,7 @@ function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, la
1624
1634
  dataSource[i][dataPath]);
1625
1635
  const shapePath = checkPropertyPath(shapeDataPath, propertyPath, properties);
1626
1636
  const shapeDataPathValue = !isNullOrUndefined(shapeDataPath) && isNaN(properties[shapePath])
1627
- ? shapeDataPath.toLowerCase() : shapeDataPath;
1637
+ ? (typeof shapeDataPath === 'string' ? shapeDataPath.toLowerCase() : shapeDataPath) : shapeDataPath;
1628
1638
  const propertiesShapePathValue = !isNullOrUndefined(properties[shapePath]) && isNaN(properties[shapePath])
1629
1639
  ? properties[shapePath].toLowerCase() : properties[shapePath];
1630
1640
  if (shapeDataPathValue === propertiesShapePathValue) {
@@ -1648,7 +1658,8 @@ function checkPropertyPath(shapeData, shapePropertyPath, shape) {
1648
1658
  const properties = (Object.prototype.toString.call(shapePropertyPath) === '[object Array]' ?
1649
1659
  shapePropertyPath : [shapePropertyPath]);
1650
1660
  for (let i = 0; i < properties.length; i++) {
1651
- const shapeDataValue = !isNullOrUndefined(shapeData) ? shapeData.toLowerCase() : shapeData;
1661
+ const shapeDataValue = !isNullOrUndefined(shapeData) && typeof shapeData === 'string' ?
1662
+ shapeData.toLowerCase() : shapeData;
1652
1663
  const shapePropertiesValue = !isNullOrUndefined(shape[properties[i]])
1653
1664
  && isNaN(shape[properties[i]])
1654
1665
  ? shape[properties[i]].toLowerCase() : shape[properties[i]];
@@ -1973,6 +1984,7 @@ function getTranslate(mapObject, layer, animate) {
1973
1984
  mapHeight = size.height;
1974
1985
  }
1975
1986
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
1987
+ scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
1976
1988
  mapWidth *= scaleFactor;
1977
1989
  mapHeight *= scaleFactor;
1978
1990
  const widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
@@ -2023,6 +2035,7 @@ function getTranslate(mapObject, layer, animate) {
2023
2035
  else {
2024
2036
  if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1 || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
2025
2037
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2038
+ scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
2026
2039
  mapWidth *= scaleFactor;
2027
2040
  x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2028
2041
  mapHeight *= scaleFactor;
@@ -3062,8 +3075,7 @@ function animate(element, delay, duration, process, end) {
3062
3075
  window.cancelAnimationFrame(clearAnimation);
3063
3076
  end.call(this, { element: element });
3064
3077
  if (element.id.indexOf('Marker') > -1) {
3065
- console.log(element);
3066
- let markerElement = getElementByID(element.id.split('_')[0] + '_Markers_Group');
3078
+ let markerElement = getElementByID(element.id.split('_Layer')[0] + '_Markers_Group');
3067
3079
  markerElement.setAttribute('style', markerStyle);
3068
3080
  }
3069
3081
  }
@@ -4640,42 +4652,42 @@ class Marker {
4640
4652
  this.trackElements = [];
4641
4653
  this.sameMarkerData = [];
4642
4654
  }
4643
- markerRender(layerElement, layerIndex, factor, type) {
4655
+ markerRender(maps, layerElement, layerIndex, factor, type) {
4644
4656
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4645
4657
  let templateFn;
4646
4658
  let markerCount = 0;
4647
4659
  let nullCount = 0;
4648
4660
  let markerTemplateCount = 0;
4649
- this.maps.translateType = 'marker';
4650
- const currentLayer = this.maps.layersCollection[layerIndex];
4651
- this.markerSVGObject = this.maps.renderer.createGroup({
4652
- id: this.maps.element.id + '_Markers_Group',
4661
+ maps.translateType = 'marker';
4662
+ const currentLayer = maps.layersCollection[layerIndex];
4663
+ this.markerSVGObject = maps.renderer.createGroup({
4664
+ id: maps.element.id + '_Markers_Group',
4653
4665
  class: 'GroupElement',
4654
4666
  style: 'pointer-events: auto;'
4655
4667
  });
4656
4668
  const markerTemplateEle = createElement('div', {
4657
- id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
4658
- className: this.maps.element.id + '_template',
4669
+ id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
4670
+ className: maps.element.id + '_template',
4659
4671
  styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
4660
- 'top:' + this.maps.mapAreaRect.y + 'px;' +
4661
- 'left:' + this.maps.mapAreaRect.x + 'px;' +
4662
- 'height:' + this.maps.mapAreaRect.height + 'px;' +
4663
- 'width:' + this.maps.mapAreaRect.width + 'px;'
4672
+ 'top:' + maps.mapAreaRect.y + 'px;' +
4673
+ 'left:' + maps.mapAreaRect.x + 'px;' +
4674
+ 'height:' + maps.mapAreaRect.height + 'px;' +
4675
+ 'width:' + maps.mapAreaRect.width + 'px;'
4664
4676
  });
4665
4677
  currentLayer.markerSettings.map((markerSettings, markerIndex) => {
4666
4678
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4667
4679
  const markerData = markerSettings.dataSource;
4668
4680
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4669
4681
  Array.prototype.forEach.call(markerData, (data, dataIndex) => {
4670
- this.maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : this.maps.markerNullCount;
4682
+ maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
4671
4683
  let eventArgs = {
4672
4684
  cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
4673
4685
  width: markerSettings.width, imageUrl: markerSettings.imageUrl, shape: markerSettings.shape,
4674
- template: markerSettings.template, data: data, maps: this.maps, marker: markerSettings,
4686
+ template: markerSettings.template, data: data, maps: maps, marker: markerSettings,
4675
4687
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
4676
4688
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
4677
4689
  };
4678
- this.maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
4690
+ maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
4679
4691
  eventArgs = markerColorChoose(eventArgs, data);
4680
4692
  eventArgs = markerShapeChoose(eventArgs, data);
4681
4693
  const lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
@@ -4686,56 +4698,56 @@ class Marker {
4686
4698
  parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
4687
4699
  const offset = markerSettings.offset;
4688
4700
  if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(lng) && !isNullOrUndefined(lat)) {
4689
- const markerID = this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
4701
+ const markerID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
4690
4702
  + markerIndex + '_dataIndex_' + dataIndex;
4691
- let location = (this.maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, this.maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, this.maps);
4692
- const animate$$1 = currentLayer.animationDuration !== 0 || isNullOrUndefined(this.maps.zoomModule);
4703
+ let location = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
4704
+ const animate$$1 = currentLayer.animationDuration !== 0 || isNullOrUndefined(maps.zoomModule);
4693
4705
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4694
- const translate = (this.maps.isTileMap) ? (currentLayer.type === 'SubLayer' && isNullOrUndefined(this.maps.zoomModule)) ? location = convertTileLatLongToPoint(new MapLocation(lng, lat), this.maps.tileZoomLevel, this.maps.tileTranslatePoint, true) : new Object() :
4695
- !isNullOrUndefined(this.maps.zoomModule) && this.maps.zoomSettings.zoomFactor > 1 ?
4696
- getZoomTranslate(this.maps, currentLayer, animate$$1) :
4697
- getTranslate(this.maps, currentLayer, animate$$1);
4698
- const scale = type === 'AddMarker' ? this.maps.scale : translate['scale'];
4699
- const transPoint = type === 'AddMarker' ? this.maps.translatePoint : translate['location'];
4706
+ const translate = (maps.isTileMap) ? (currentLayer.type === 'SubLayer' && isNullOrUndefined(maps.zoomModule)) ? location = convertTileLatLongToPoint(new MapLocation(lng, lat), maps.tileZoomLevel, maps.tileTranslatePoint, true) : new Object() :
4707
+ !isNullOrUndefined(maps.zoomModule) && maps.zoomSettings.zoomFactor > 1 ?
4708
+ getZoomTranslate(maps, currentLayer, animate$$1) :
4709
+ getTranslate(maps, currentLayer, animate$$1);
4710
+ const scale = type === 'AddMarker' ? maps.scale : translate['scale'];
4711
+ const transPoint = type === 'AddMarker' ? maps.translatePoint : translate['location'];
4700
4712
  if (eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
4701
4713
  markerTemplateCount++;
4702
- markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location, transPoint, scale, offset, this.maps);
4714
+ markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location, transPoint, scale, offset, maps);
4703
4715
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4704
- this.maps.renderReactTemplates();
4716
+ maps.renderReactTemplates();
4705
4717
  }
4706
4718
  else if (!eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
4707
4719
  markerCount++;
4708
- marker(eventArgs, markerSettings, markerData, dataIndex, location, transPoint, markerID, offset, scale, this.maps, this.markerSVGObject);
4720
+ marker(eventArgs, markerSettings, markerData, dataIndex, location, transPoint, markerID, offset, scale, maps, this.markerSVGObject);
4709
4721
  }
4710
4722
  }
4711
4723
  nullCount += (!isNaN(lat) && !isNaN(lng)) ? 0 : 1;
4712
4724
  markerTemplateCount += (eventArgs.cancel) ? 1 : 0;
4713
4725
  markerCount += (eventArgs.cancel) ? 1 : 0;
4714
- this.maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? this.maps.markerNullCount + 1 : this.maps.markerNullCount;
4715
- const markerDataLength = markerData.length - this.maps.markerNullCount;
4726
+ maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? maps.markerNullCount + 1 : maps.markerNullCount;
4727
+ const markerDataLength = markerData.length - maps.markerNullCount;
4716
4728
  if (this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
4717
4729
  layerElement.appendChild(this.markerSVGObject);
4718
4730
  if (currentLayer.markerClusterSettings.allowClustering) {
4719
- this.maps.svgObject.appendChild(this.markerSVGObject);
4720
- this.maps.element.appendChild(this.maps.svgObject);
4731
+ maps.svgObject.appendChild(this.markerSVGObject);
4732
+ maps.element.appendChild(maps.svgObject);
4721
4733
  if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
4722
- && this.maps.zoomSettings.enable) {
4734
+ && maps.zoomSettings.enable) {
4723
4735
  layerElement.appendChild(this.markerSVGObject);
4724
4736
  }
4725
4737
  else {
4726
- clusterTemplate(currentLayer, this.markerSVGObject, this.maps, layerIndex, this.markerSVGObject, layerElement, true, false);
4738
+ clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, this.markerSVGObject, layerElement, true, false);
4727
4739
  }
4728
4740
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4729
- this.maps.renderReactTemplates();
4741
+ maps.renderReactTemplates();
4730
4742
  }
4731
4743
  }
4732
- if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(this.maps.element.id + '_Secondary_Element')) {
4733
- getElementByID(this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
4734
- if (this.maps.checkInitialRender) {
4744
+ if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
4745
+ getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
4746
+ if (maps.checkInitialRender) {
4735
4747
  if (currentLayer.markerClusterSettings.allowClustering) {
4736
- clusterTemplate(currentLayer, markerTemplateEle, this.maps, layerIndex, this.markerSVGObject, layerElement, false, false);
4748
+ clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, this.markerSVGObject, layerElement, false, false);
4737
4749
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4738
- this.maps.renderReactTemplates();
4750
+ maps.renderReactTemplates();
4739
4751
  }
4740
4752
  }
4741
4753
  }
@@ -4978,7 +4990,7 @@ class Marker {
4978
4990
  }
4979
4991
  if ((target.indexOf('_cluster_') > -1)) {
4980
4992
  let isClusterSame = false;
4981
- const clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? target.split('_datalabel_')[0] : target);
4993
+ const 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);
4982
4994
  const indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerHTML.split(',').map(Number) : clusterElement.innerHTML.split(',').map(Number);
4983
4995
  collection = [];
4984
4996
  for (const i of indexes) {
@@ -5047,14 +5059,14 @@ class Marker {
5047
5059
  /**
5048
5060
  * To destroy the layers.
5049
5061
  *
5050
- * @param {Maps} maps - Specifies the instance of the map
5051
5062
  * @returns {void}
5052
5063
  * @private
5053
5064
  */
5054
- destroy(maps) {
5055
- /**
5056
- * Destroy method performed here
5057
- */
5065
+ destroy() {
5066
+ this.maps = null;
5067
+ this.trackElements = [];
5068
+ this.markerSVGObject = null;
5069
+ this.sameMarkerData = [];
5058
5070
  }
5059
5071
  }
5060
5072
 
@@ -5288,6 +5300,13 @@ class BingMap {
5288
5300
  return '';
5289
5301
  }
5290
5302
  }
5303
+ /**
5304
+ * @private
5305
+ */
5306
+ destroy() {
5307
+ this.maps = null;
5308
+ this.subDomains = [];
5309
+ }
5291
5310
  }
5292
5311
 
5293
5312
  /**
@@ -5701,7 +5720,7 @@ class LayerPanel {
5701
5720
  panel.layerObject.appendChild(panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex));
5702
5721
  }
5703
5722
  if (panel.mapObject.markerModule) {
5704
- panel.mapObject.markerModule.markerRender(panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
5723
+ panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
5705
5724
  }
5706
5725
  panel.translateLayerElements(panel.layerObject, layerIndex);
5707
5726
  panel.layerGroup.appendChild(panel.layerObject);
@@ -5779,7 +5798,7 @@ class LayerPanel {
5779
5798
  proxy.renderTileLayer(proxy, layer, layerIndex, bing);
5780
5799
  this.mapObject.arrangeTemplate();
5781
5800
  if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
5782
- this.mapObject.zoomModule.applyTransform(true);
5801
+ this.mapObject.zoomModule.applyTransform(this.mapObject, true);
5783
5802
  }
5784
5803
  };
5785
5804
  ajax.send();
@@ -5823,7 +5842,7 @@ class LayerPanel {
5823
5842
  proxy.renderTileLayer(proxy, layer, layerIndex, bing);
5824
5843
  this.mapObject.arrangeTemplate();
5825
5844
  if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
5826
- this.mapObject.zoomModule.applyTransform(true);
5845
+ this.mapObject.zoomModule.applyTransform(this.mapObject, true);
5827
5846
  }
5828
5847
  }
5829
5848
  bubbleCalculation(bubbleSettings, range) {
@@ -6114,6 +6133,7 @@ class LayerPanel {
6114
6133
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6115
6134
  (currentShapeData['property'][properties]) : ''));
6116
6135
  pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + index + 3).toString());
6136
+ pathEle.setAttribute('role', '');
6117
6137
  if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
6118
6138
  pathEle.setAttribute('style', 'outline:none');
6119
6139
  }
@@ -6188,7 +6208,7 @@ class LayerPanel {
6188
6208
  this.layerObject.appendChild(element);
6189
6209
  });
6190
6210
  if (this.mapObject.markerModule) {
6191
- this.mapObject.markerModule.markerRender(this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
6211
+ this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
6192
6212
  : this.currentFactor), null);
6193
6213
  }
6194
6214
  this.translateLayerElements(this.layerObject, layerIndex);
@@ -6738,6 +6758,7 @@ class LayerPanel {
6738
6758
  imgElement.setAttribute('height', '256px');
6739
6759
  imgElement.setAttribute('width', '256px');
6740
6760
  imgElement.setAttribute('src', tile.src);
6761
+ imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
6741
6762
  const mapId = this.mapObject.element.id;
6742
6763
  imgElement.onload = () => {
6743
6764
  if (document.getElementById(mapId + '_tile_' + id) && type === 'Pan') {
@@ -6845,7 +6866,7 @@ class LayerPanel {
6845
6866
  '&zoom=' + zoom + '&center=' + center + '&maptype=' + mapType + '&key=' + apikey;
6846
6867
  document.getElementById(this.mapObject.element.id + '_tile_parent').innerHTML
6847
6868
  = '<div id="' + this.mapObject.element.id + '_StaticGoogleMap"' + 'style="position:absolute; left:' + eleWidth + 'px; top:'
6848
- + eleHeight + 'px"><img src="' + staticMapString + '"></div>';
6869
+ + eleHeight + 'px"><img src="' + staticMapString + '"' + 'alt="' + this.mapObject.getLocalizedLabel('ImageNotFound') + '"></div>';
6849
6870
  }
6850
6871
  /**
6851
6872
  * To find the tile translate point
@@ -6903,6 +6924,27 @@ class LayerPanel {
6903
6924
  this.mapObject.previousTileHeight = factorY;
6904
6925
  return new Point(x, y);
6905
6926
  }
6927
+ /**
6928
+ * @returns {void}
6929
+ * @private
6930
+ */
6931
+ destroy() {
6932
+ this.mapObject = null;
6933
+ this.groupElements = [];
6934
+ this.layerObject = null;
6935
+ this.currentLayer = null;
6936
+ this.rectBounds = null;
6937
+ this.tiles = [];
6938
+ this.clipRectElement = null;
6939
+ this.tileSvgObject = null;
6940
+ this.ajaxModule = null;
6941
+ this.ajaxResponse = [];
6942
+ this.layerGroup = null;
6943
+ if (!isNullOrUndefined(this.bing)) {
6944
+ this.bing.destroy();
6945
+ }
6946
+ this.bing = null;
6947
+ }
6906
6948
  }
6907
6949
 
6908
6950
  /* eslint-disable @typescript-eslint/no-unused-vars */
@@ -7015,12 +7057,11 @@ class Annotations {
7015
7057
  /**
7016
7058
  * To destroy the annotation.
7017
7059
  *
7018
- * @param {Maps} map - Specifies the instance of the maps
7019
7060
  * @returns {void}
7020
7061
  * @private
7021
7062
  */
7022
- destroy(map) {
7023
- // Destroy method performed here
7063
+ destroy() {
7064
+ this.map = null;
7024
7065
  }
7025
7066
  }
7026
7067
 
@@ -7366,7 +7407,9 @@ let Maps = class Maps extends Component {
7366
7407
  this.dataLabelShape = [];
7367
7408
  }
7368
7409
  this.mapLayerPanel.measureLayerPanel();
7369
- this.element.appendChild(this.svgObject);
7410
+ if (!isNullOrUndefined(this.svgObject)) {
7411
+ this.element.appendChild(this.svgObject);
7412
+ }
7370
7413
  const position = this.getExtraPosition();
7371
7414
  for (let i = 0; i < this.layers.length; i++) {
7372
7415
  if (position.x !== 0 || position.y !== 0) {
@@ -7555,6 +7598,7 @@ let Maps = class Maps extends Component {
7555
7598
  */
7556
7599
  addTabIndex() {
7557
7600
  this.element.setAttribute('aria-label', this.description || 'Maps Element');
7601
+ this.element.setAttribute('role', '');
7558
7602
  this.element.setAttribute('tabindex', this.tabIndex.toString());
7559
7603
  }
7560
7604
  // private setSecondaryElementPosition(): void {
@@ -7619,7 +7663,7 @@ let Maps = class Maps extends Component {
7619
7663
  }
7620
7664
  }
7621
7665
  if (this.zoomModule && (this.previousScale !== this.scale)) {
7622
- this.zoomModule.applyTransform(true);
7666
+ this.zoomModule.applyTransform(this, true);
7623
7667
  }
7624
7668
  }
7625
7669
  }
@@ -7796,6 +7840,7 @@ let Maps = class Maps extends Component {
7796
7840
  const titleBounds = new Rect(location.x, location.y, elementSize.width, elementSize.height);
7797
7841
  const element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
7798
7842
  element.setAttribute('aria-label', this.description || title.text);
7843
+ element.setAttribute('role', '');
7799
7844
  if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
7800
7845
  height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
7801
7846
  this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
@@ -8371,7 +8416,7 @@ let Maps = class Maps extends Component {
8371
8416
  this.scale = zoomFactor;
8372
8417
  this.translatePoint.x = ((mapRect.left < svgRect.left ? x : 0) + (size.width / 2) - (position.x * zoomFactor)) / zoomFactor;
8373
8418
  this.translatePoint.y = ((mapRect.top < svgRect.top ? y : 0) + (size.height / 2) - (position.y * zoomFactor)) / zoomFactor;
8374
- this.zoomModule.applyTransform();
8419
+ this.zoomModule.applyTransform(this);
8375
8420
  }
8376
8421
  else {
8377
8422
  position = { x: size.width / 2, y: size.height / 2 };
@@ -8449,7 +8494,7 @@ let Maps = class Maps extends Component {
8449
8494
  this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
8450
8495
  }
8451
8496
  const markerModule = new Marker(this);
8452
- markerModule.markerRender(layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
8497
+ markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
8453
8498
  this.arrangeTemplate();
8454
8499
  }
8455
8500
  }
@@ -8494,7 +8539,7 @@ let Maps = class Maps extends Component {
8494
8539
  const propertyName = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
8495
8540
  && isNaN(shapeData[i]['properties'][popertyNameArray[j]]) ?
8496
8541
  shapeData[i]['properties'][popertyNameArray[j]].toLowerCase() : shapeData[i]['properties'][popertyNameArray[j]];
8497
- const shapeName = !isNullOrUndefined(name) ? name.toLowerCase() : name;
8542
+ const shapeName = !isNullOrUndefined(name) && typeof name === 'string' ? name.toLowerCase() : name;
8498
8543
  let k;
8499
8544
  if (propertyName === shapeName) {
8500
8545
  if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
@@ -8655,7 +8700,8 @@ let Maps = class Maps extends Component {
8655
8700
  Zoom: 'Zoom',
8656
8701
  ZoomOut: 'Zoom out',
8657
8702
  Pan: 'Pan',
8658
- Reset: 'Reset'
8703
+ Reset: 'Reset',
8704
+ ImageNotFound: 'Image Not Found'
8659
8705
  };
8660
8706
  }
8661
8707
  /**
@@ -8663,6 +8709,7 @@ let Maps = class Maps extends Component {
8663
8709
  */
8664
8710
  destroy() {
8665
8711
  this.unWireEVents();
8712
+ super.destroy();
8666
8713
  this.shapeSelectionItem = [];
8667
8714
  this.toggledShapeElementId = [];
8668
8715
  this.toggledLegendId = [];
@@ -8677,11 +8724,14 @@ let Maps = class Maps extends Component {
8677
8724
  this.zoomLabelPositions = [];
8678
8725
  this.mouseDownEvent = { x: null, y: null };
8679
8726
  this.mouseClickEvent = { x: null, y: null };
8727
+ this.formatFunction = null;
8728
+ //TODO: Calling the below code throws spec issue.
8729
+ //this.renderer = null;
8730
+ this.availableSize = new Size(0, 0);
8680
8731
  if (document.getElementById('mapsmeasuretext')) {
8681
8732
  document.getElementById('mapsmeasuretext').remove();
8682
8733
  }
8683
8734
  this.removeSvg();
8684
- super.destroy();
8685
8735
  }
8686
8736
  /**
8687
8737
  * Gets component name
@@ -8993,7 +9043,7 @@ let Maps = class Maps extends Component {
8993
9043
  */
8994
9044
  print(id) {
8995
9045
  if ((this.allowPrint) && (this.printModule)) {
8996
- this.printModule.print(id);
9046
+ this.printModule.print(this, id);
8997
9047
  }
8998
9048
  }
8999
9049
  /**
@@ -9011,12 +9061,12 @@ let Maps = class Maps extends Component {
9011
9061
  }
9012
9062
  if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
9013
9063
  return new Promise((resolve, reject) => {
9014
- resolve(this.imageExportModule.export(type, fileName, allowDownload));
9064
+ resolve(this.imageExportModule.export(this, type, fileName, allowDownload));
9015
9065
  });
9016
9066
  }
9017
9067
  else if ((this.allowPdfExport) && (this.pdfExportModule)) {
9018
9068
  return new Promise((resolve, reject) => {
9019
- resolve(this.pdfExportModule.export(type, fileName, allowDownload, orientation));
9069
+ resolve(this.pdfExportModule.export(this, type, fileName, allowDownload, orientation));
9020
9070
  });
9021
9071
  }
9022
9072
  return null;
@@ -9591,14 +9641,13 @@ class Bubble {
9591
9641
  /**
9592
9642
  * To destroy the bubble.
9593
9643
  *
9594
- * @param {Maps} maps - Specifies the instance of the maps.
9595
9644
  * @returns {void}
9596
9645
  * @private
9597
9646
  */
9598
- destroy(maps) {
9599
- /**
9600
- * Destroy method performed here
9601
- */
9647
+ destroy() {
9648
+ this.bubbleCollection = [];
9649
+ //TODO: Calling the below code throws spec issue.
9650
+ //this.maps = null;
9602
9651
  }
9603
9652
  }
9604
9653
 
@@ -9620,10 +9669,10 @@ class DataLabel {
9620
9669
  for (let i = 0; i < dataSource.length; i++) {
9621
9670
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9622
9671
  const data = dataSource[i];
9623
- const dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) ?
9624
- data[shapeDataPath].toLowerCase() : data[shapeDataPath];
9625
- shapeName = !isNullOrUndefined(shapeName) ? shapeName.toString() : shapeName;
9626
- shapeNameValue = !isNullOrUndefined(shapeName) ? shapeName.toLowerCase() : shapeName;
9672
+ const dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) &&
9673
+ typeof data[shapeDataPath] === 'string' ? data[shapeDataPath].toLowerCase() : data[shapeDataPath];
9674
+ shapeName = !isNullOrUndefined(shapeName) && typeof shapeName === 'string' ? shapeName.toString() : shapeName;
9675
+ shapeNameValue = !isNullOrUndefined(shapeName) && typeof shapeName === 'string' ? shapeName.toLowerCase() : shapeName;
9627
9676
  if ((dataShapePathValue) === shapeNameValue) {
9628
9677
  text = data;
9629
9678
  break;
@@ -9794,7 +9843,7 @@ class DataLabel {
9794
9843
  const eventargs = {
9795
9844
  name: dataLabelRendering, maps: this.maps, cancel: false, border: { color: dataLabel.border.color,
9796
9845
  width: dataLabel.border.width, opacity: dataLabel.border.opacity }, datalabel: dataLabel,
9797
- fill: dataLabel.fill, template: dataLabel.template, text: text
9846
+ fill: dataLabel.fill, template: dataLabel.template, text: text, offsetX: 0, offsetY: 0
9798
9847
  };
9799
9848
  this.maps.trigger('dataLabelRendering', eventargs, (labelArgs) => {
9800
9849
  if (eventargs.cancel) {
@@ -9844,8 +9893,8 @@ class DataLabel {
9844
9893
  datasrcObj : shapeData['properties'], this.maps, eventargs.template, this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
9845
9894
  templateElement.innerHTML = !templateFn ? eventargs.template : '';
9846
9895
  labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties'], index, this.maps);
9847
- labelElement.style.left = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + 'px';
9848
- labelElement.style.top = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + 'px';
9896
+ labelElement.style.left = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
9897
+ labelElement.style.top = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
9849
9898
  labelTemplateElement.appendChild(labelElement);
9850
9899
  }
9851
9900
  else {
@@ -9933,26 +9982,26 @@ class DataLabel {
9933
9982
  y = ((location['y'] + transPoint['y']) * scale) - textSize['height'] / 2;
9934
9983
  }
9935
9984
  border.opacity = isNullOrUndefined(border.opacity) ? opacity : border.opacity;
9936
- const rectOptions = new RectOption(this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border, opacity, new Rect(x, y, textSize['width'], textSize['height']), rx, ry);
9985
+ const rectOptions = new RectOption(this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border, opacity, new Rect((x + labelArgs.offsetX), (y + labelArgs.offsetY), textSize['width'], textSize['height']), rx, ry);
9937
9986
  const rect = this.maps.renderer.drawRectangle(rectOptions);
9938
9987
  group.appendChild(rect);
9939
9988
  }
9940
9989
  }
9941
9990
  element = renderTextElement(options, style, style.color || this.maps.themeStyle.dataLabelFontColor, group);
9942
9991
  if (zoomLabelsPosition && scaleZoomValue > 1 && !this.maps.zoomNotApplied) {
9943
- element.setAttribute('transform', 'translate( ' + ((location['x'])) + ' '
9944
- + (((location['y']))) + ' )');
9992
+ element.setAttribute('transform', 'translate( ' + ((location['x'] + labelArgs.offsetX)) + ' '
9993
+ + (((location['y'] + labelArgs.offsetY))) + ' )');
9945
9994
  location['x'] = locationX;
9946
9995
  location['y'] = locationY;
9947
9996
  }
9948
9997
  else {
9949
- element.setAttribute('transform', 'translate( ' + ((location['x'] + transPoint.x) * scale) + ' '
9950
- + (((location['y'] + transPoint.y) * scale) + (elementSize.height / 4)) + ' )');
9998
+ element.setAttribute('transform', 'translate( ' + (((location['x'] + transPoint.x) * scale) + labelArgs.offsetX) + ' '
9999
+ + ((((location['y'] + transPoint.y) * scale) + (elementSize.height / 4)) + labelArgs.offsetY) + ' )');
9951
10000
  }
9952
10001
  group.appendChild(element);
9953
10002
  }
9954
10003
  this.dataLabelCollections.push({
9955
- location: { x: location['x'], y: location['y'] },
10004
+ location: { x: location['x'] + labelArgs.offsetX, y: location['y'] + labelArgs.offsetY },
9956
10005
  element: isNullOrUndefined(labelElement) ? element : labelElement,
9957
10006
  layerIndex: layerIndex,
9958
10007
  shapeIndex: sublayerIndexLabel ? oldIndex : index,
@@ -9995,16 +10044,14 @@ class DataLabel {
9995
10044
  return 'DataLabel';
9996
10045
  }
9997
10046
  /**
9998
- * To destroy the layers.
9999
10047
  *
10000
- * @param {Maps} maps - Specifies the instance of the maps.
10001
10048
  * @returns {void}
10002
10049
  * @private
10003
10050
  */
10004
- destroy(maps) {
10005
- /**
10006
- * Destroy method performed here
10007
- */
10051
+ destroy() {
10052
+ this.dataLabelCollections = [];
10053
+ this.value = null;
10054
+ this.maps = null;
10008
10055
  }
10009
10056
  }
10010
10057
 
@@ -10155,14 +10202,11 @@ class NavigationLine {
10155
10202
  /**
10156
10203
  * To destroy the layers.
10157
10204
  *
10158
- * @param {Maps} maps - Specifies the instance of the map
10159
10205
  * @returns {void}
10160
10206
  * @private
10161
10207
  */
10162
- destroy(maps) {
10163
- /**
10164
- * Destroy method performed here
10165
- */
10208
+ destroy() {
10209
+ this.maps = null;
10166
10210
  }
10167
10211
  }
10168
10212
 
@@ -11919,6 +11963,9 @@ class Legend {
11919
11963
  '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11920
11964
  '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11921
11965
  if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
11966
+ mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11967
+ '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'] + '_Group', this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11968
+ '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'] + '_Group', this.maps.element.id);
11922
11969
  mapElement = mapElement.children[0];
11923
11970
  }
11924
11971
  if (isVisible && mapElement !== null) {
@@ -12060,6 +12107,9 @@ class Legend {
12060
12107
  '_BubbleIndex_' + j + '_dataIndex_' + mapdata['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12061
12108
  '_MarkerIndex_' + j + '_dataIndex_' + mapdata['dataIndex'], this.maps.element.id);
12062
12109
  if (!isNullOrUndefined(mapdata['shape']) && mapdata['shape'] === 'Balloon') {
12110
+ LegendInteractive = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12111
+ '_BubbleIndex_' + j + '_dataIndex_' + mapdata['dataIndex'] + '_Group', this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + mapdata['layerIndex'] +
12112
+ '_MarkerIndex_' + j + '_dataIndex_' + mapdata['dataIndex'] + '_Group', this.maps.element.id);
12063
12113
  LegendInteractive = LegendInteractive.children[0];
12064
12114
  }
12065
12115
  if (isVisible && LegendInteractive !== null) {
@@ -12218,10 +12268,11 @@ class Legend {
12218
12268
  const shapeData = layerData[i];
12219
12269
  const dataPathValue = (dataPath.indexOf('.') > -1) ? getValueFromObject(data, dataPath) : data[dataPath];
12220
12270
  const shapePath = checkPropertyPath(data[dataPath], shapePropertyPath, shapeData['properties']);
12221
- const dataPathValueCase = !isNullOrUndefined(dataPathValue)
12222
- ? dataPathValue.toLowerCase() : dataPathValue;
12271
+ const dataPathValueCase = !isNullOrUndefined(dataPathValue) &&
12272
+ typeof dataPathValue === 'string' ? dataPathValue.toLowerCase() : dataPathValue;
12223
12273
  const shapeDataValueCase = !isNullOrUndefined(shapeData['properties'][shapePath])
12224
- && isNaN(shapeData['properties'][shapePath]) ? shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12274
+ && isNaN(shapeData['properties'][shapePath]) ?
12275
+ shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12225
12276
  if (shapeDataValueCase === dataPathValueCase) {
12226
12277
  if (shapeData['geometry']['type'] != 'MultiPoint') {
12227
12278
  legendData.push({
@@ -12282,15 +12333,30 @@ class Legend {
12282
12333
  /**
12283
12334
  * To destroy the legend.
12284
12335
  *
12285
- * @param {Maps} maps - Specifies the instance of the maps
12286
12336
  * @returns {void}
12287
12337
  * @private
12288
12338
  */
12289
- destroy(maps) {
12290
- /**
12291
- * Destroy method performed here
12292
- */
12339
+ destroy() {
12340
+ this.legendCollection = [];
12341
+ this.legendRenderingCollections = [];
12342
+ this.translate = null;
12343
+ this.legendBorderRect = null;
12344
+ this.initialMapAreaRect = null;
12345
+ this.legendTotalRect = null;
12346
+ this.totalPages = [];
12347
+ this.legendItemRect = null;
12348
+ this.legendGroup = null;
12349
+ this.shapeHighlightCollection = [];
12350
+ this.legendHighlightCollection = [];
12351
+ this.shapePreviousColor = [];
12352
+ this.selectedNonLegendShapes = [];
12353
+ this.legendLinearGradient = null;
12354
+ this.currentLayer = null;
12355
+ this.defsElement = null;
12356
+ this.legendElement = [];
12357
+ this.oldShapeElement = null;
12293
12358
  this.removeEventListener();
12359
+ this.maps = null;
12294
12360
  }
12295
12361
  }
12296
12362
 
@@ -12507,15 +12573,13 @@ class Highlight {
12507
12573
  /**
12508
12574
  * To destroy the highlight.
12509
12575
  *
12510
- * @param {Maps} maps - Specifies the maps instance
12511
12576
  * @returns {void}
12512
12577
  * @private
12513
12578
  */
12514
- destroy(maps) {
12515
- /**
12516
- * Destroy method performed here
12517
- */
12579
+ destroy() {
12580
+ this.highlightSettings = null;
12518
12581
  this.removeEventListener();
12582
+ this.maps = null;
12519
12583
  }
12520
12584
  }
12521
12585
 
@@ -12811,15 +12875,13 @@ class Selection {
12811
12875
  /**
12812
12876
  * To destroy the selection.
12813
12877
  *
12814
- * @param {Maps} maps - Specifies the maps instance.
12815
12878
  * @returns {void}
12816
12879
  * @private
12817
12880
  */
12818
- destroy(maps) {
12819
- /**
12820
- * Destroy method performed here
12821
- */
12881
+ destroy() {
12882
+ this.selectionsettings = null;
12822
12883
  this.removeEventListener();
12884
+ this.maps = null;
12823
12885
  }
12824
12886
  }
12825
12887
 
@@ -13192,12 +13254,17 @@ class MapsTooltip {
13192
13254
  /**
13193
13255
  * To destroy the tooltip.
13194
13256
  *
13195
- * @param {Maps} maps Specifies the maps instance
13196
13257
  * @returns {void}
13197
13258
  * @private
13198
13259
  */
13199
- destroy(maps) {
13260
+ destroy() {
13261
+ if (!isNullOrUndefined(this.svgTooltip)) {
13262
+ this.svgTooltip.destroy();
13263
+ }
13264
+ this.svgTooltip = null;
13200
13265
  this.removeEventListener();
13266
+ //TODO: Calling the below code throws spec issue.
13267
+ //this.maps = null;
13201
13268
  }
13202
13269
  }
13203
13270
 
@@ -13210,7 +13277,6 @@ class Zoom {
13210
13277
  this.mouseEnter = false;
13211
13278
  this.isTouch = false;
13212
13279
  this.rectZoomingStart = false;
13213
- this.pinchRect = new Rect(0, 0, 0, 0);
13214
13280
  this.browserName = Browser.info.name;
13215
13281
  // eslint-disable-next-line @typescript-eslint/ban-types
13216
13282
  this.isPointer = Browser.isPointer;
@@ -13234,7 +13300,6 @@ class Zoom {
13234
13300
  this.selectionColor = this.maps.zoomSettings.selectionColor;
13235
13301
  this.fillColor = this.maps.zoomSettings.color;
13236
13302
  this.addEventListener();
13237
- this.groupElements = [];
13238
13303
  }
13239
13304
  /**
13240
13305
  * To perform zooming for maps
@@ -13274,6 +13339,7 @@ class Zoom {
13274
13339
  mapTotalHeight = availSize.height;
13275
13340
  }
13276
13341
  newZoomFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13342
+ newZoomFactor = newZoomFactor > 1.05 ? 1 : newZoomFactor;
13277
13343
  map.translatePoint = this.calculateInitalZoomTranslatePoint(newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13278
13344
  }
13279
13345
  else {
@@ -13291,7 +13357,7 @@ class Zoom {
13291
13357
  map.scale = map.mapScaleValue = map.previousScale;
13292
13358
  }
13293
13359
  else {
13294
- this.applyTransform();
13360
+ this.applyTransform(map);
13295
13361
  }
13296
13362
  }
13297
13363
  else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
@@ -13335,7 +13401,7 @@ class Zoom {
13335
13401
  // element1 = element1;
13336
13402
  // }
13337
13403
  // }
13338
- this.applyTransform();
13404
+ this.applyTransform(this.maps);
13339
13405
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13340
13406
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13341
13407
  }
@@ -13437,7 +13503,7 @@ class Zoom {
13437
13503
  }
13438
13504
  if (!isZoomCancelled) {
13439
13505
  map.mapScaleValue = zoomCalculationFactor;
13440
- this.applyTransform(true);
13506
+ this.applyTransform(map, true);
13441
13507
  this.maps.zoomNotApplied = false;
13442
13508
  this.zoomingRect = null;
13443
13509
  }
@@ -13486,6 +13552,7 @@ class Zoom {
13486
13552
  mapTotalHeight = availSize.height;
13487
13553
  }
13488
13554
  zoomCalculationFactor = parseFloat(Math.min(availSize.width / mapTotalWidth, availSize.height / mapTotalHeight).toFixed(2));
13555
+ zoomCalculationFactor = zoomCalculationFactor > 1.05 ? 1 : zoomCalculationFactor;
13489
13556
  map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomCalculationFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map);
13490
13557
  }
13491
13558
  else {
@@ -13524,7 +13591,7 @@ class Zoom {
13524
13591
  }
13525
13592
  }
13526
13593
  if (!isZoomCancelled) {
13527
- this.applyTransform();
13594
+ this.applyTransform(map);
13528
13595
  }
13529
13596
  }
13530
13597
  drawZoomRectangle() {
@@ -13571,17 +13638,17 @@ class Zoom {
13571
13638
  zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13572
13639
  }
13573
13640
  }
13574
- applyTransform(animate$$1) {
13641
+ applyTransform(maps, animate$$1) {
13575
13642
  let layerIndex;
13576
13643
  this.templateCount = 0;
13577
13644
  let markerStyle;
13578
- const scale = this.maps.scale;
13579
- const x = this.maps.translatePoint.x;
13580
- const y = this.maps.translatePoint.y;
13645
+ const scale = maps.scale;
13646
+ const x = maps.translatePoint.x;
13647
+ const y = maps.translatePoint.y;
13581
13648
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13582
- this.maps.zoomShapeCollection = [];
13583
- if (document.getElementById(this.maps.element.id + '_mapsTooltip')) {
13584
- removeElement(this.maps.element.id + '_mapsTooltip');
13649
+ maps.zoomShapeCollection = [];
13650
+ if (document.getElementById(maps.element.id + '_mapsTooltip')) {
13651
+ removeElement(maps.element.id + '_mapsTooltip');
13585
13652
  }
13586
13653
  if (this.layerCollectionEle) {
13587
13654
  for (let i = 0; i < this.layerCollectionEle.childElementCount; i++) {
@@ -13589,29 +13656,29 @@ class Zoom {
13589
13656
  if (layerElement.tagName === 'g') {
13590
13657
  this.templateCount++;
13591
13658
  this.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
13592
- this.currentLayer = this.maps.layersCollection[this.index];
13593
- const factor = this.maps.mapLayerPanel.calculateFactor(this.currentLayer);
13659
+ this.currentLayer = maps.layersCollection[this.index];
13660
+ const factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
13594
13661
  for (let j = 0; j < layerElement.childElementCount; j++) {
13595
13662
  let currentEle = layerElement.childNodes[j];
13596
13663
  if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
13597
13664
  && (!(currentEle.id.indexOf('_dataLableIndex_Group') > -1))) {
13598
- if (this.maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
13665
+ if (maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
13599
13666
  currentEle.remove();
13600
13667
  if (layerElement.children.length > 0 && layerElement.children[0]) {
13601
- layerElement.insertBefore(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index), layerElement.children[1]);
13668
+ layerElement.insertBefore(maps.navigationLineModule.renderNavigation(this.currentLayer, maps.tileZoomLevel, this.index), layerElement.children[1]);
13602
13669
  }
13603
13670
  else {
13604
- layerElement.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, this.index));
13671
+ layerElement.appendChild(maps.navigationLineModule.renderNavigation(this.currentLayer, maps.tileZoomLevel, this.index));
13605
13672
  }
13606
13673
  }
13607
13674
  else if (currentEle.id.indexOf('Legend') == -1) {
13608
- changeBorderWidth(currentEle, this.index, scale, this.maps);
13609
- this.maps.zoomTranslatePoint = this.maps.translatePoint;
13675
+ changeBorderWidth(currentEle, this.index, scale, maps);
13676
+ maps.zoomTranslatePoint = maps.translatePoint;
13610
13677
  this.animateTransform(currentEle, animate$$1, x, y, scale);
13611
13678
  }
13612
13679
  }
13613
13680
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
13614
- if (!this.isPanning) {
13681
+ if (!this.isPanning && !isNullOrUndefined(currentEle.childNodes[0])) {
13615
13682
  this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
13616
13683
  }
13617
13684
  currentEle = layerElement.childNodes[j];
@@ -13630,11 +13697,11 @@ class Zoom {
13630
13697
  markerSelectionValues['latitude'] ||
13631
13698
  this.currentLayer.markerSettings[markerIndex].initialMarkerSelection[x]['longitude'] ===
13632
13699
  markerSelectionValues['longitude']) {
13633
- this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
13700
+ maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
13634
13701
  }
13635
13702
  }
13636
- if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
13637
- if (this.maps.isTileMap) {
13703
+ if ((this.currentLayer.animationDuration > 0 || (maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
13704
+ if (maps.isTileMap) {
13638
13705
  const groupElement = document.querySelector('.GroupElement');
13639
13706
  if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
13640
13707
  groupElement.style.display = 'none';
@@ -13646,29 +13713,29 @@ class Zoom {
13646
13713
  }
13647
13714
  }
13648
13715
  }
13649
- if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
13650
- clusterSeparate(this.maps.markerModule.sameMarkerData, this.maps, currentEle, true);
13716
+ if (this.isPanning && maps.markerModule.sameMarkerData.length > 0) {
13717
+ clusterSeparate(maps.markerModule.sameMarkerData, maps, currentEle, true);
13651
13718
  }
13652
- else if (this.maps.markerModule.sameMarkerData.length > 0) {
13653
- this.maps.markerModule.sameMarkerData = [];
13654
- if (document.getElementById(this.maps.element.id + '_mapsTooltip')) {
13655
- removeElement(this.maps.element.id + '_mapsTooltip');
13719
+ else if (maps.markerModule.sameMarkerData.length > 0) {
13720
+ maps.markerModule.sameMarkerData = [];
13721
+ if (document.getElementById(maps.element.id + '_mapsTooltip')) {
13722
+ removeElement(maps.element.id + '_mapsTooltip');
13656
13723
  }
13657
13724
  }
13658
- if (document.getElementById(this.maps.element.id + '_mapsTooltip') && this.maps.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_')
13725
+ if (document.getElementById(maps.element.id + '_mapsTooltip') && maps.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_')
13659
13726
  && !this.isPanning) {
13660
- const mapsTooltip = this.maps.mapsTooltipModule;
13727
+ const mapsTooltip = maps.mapsTooltipModule;
13661
13728
  const tooltipElement = currentEle.querySelector('#' + mapsTooltip.tooltipTargetID);
13662
13729
  if (!isNullOrUndefined(tooltipElement)) {
13663
13730
  if (tooltipElement['style']['visibility'] === 'hidden') {
13664
- removeElement(this.maps.element.id + '_mapsTooltip');
13731
+ removeElement(maps.element.id + '_mapsTooltip');
13665
13732
  }
13666
13733
  else {
13667
13734
  let x = parseFloat(tooltipElement.getAttribute('transform').split('(')[1].split(')')[0].split(' ')[1]);
13668
13735
  let y = parseFloat(tooltipElement.getAttribute('transform').split('(')[1].split(')')[0].split(' ')[2]);
13669
- if (this.maps.isTileMap) {
13670
- x += +getElement(this.maps.element.id + '_tile_parent')['style']['left'].split('px')[0];
13671
- y += +getElement(this.maps.element.id + '_tile_parent')['style']['top'].split('px')[0];
13736
+ if (maps.isTileMap) {
13737
+ x += +getElement(maps.element.id + '_tile_parent')['style']['left'].split('px')[0];
13738
+ y += +getElement(maps.element.id + '_tile_parent')['style']['top'].split('px')[0];
13672
13739
  }
13673
13740
  mapsTooltip.svgTooltip.location.x = x;
13674
13741
  mapsTooltip.svgTooltip.location.y = y;
@@ -13686,9 +13753,9 @@ class Zoom {
13686
13753
  layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
13687
13754
  const bubleIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[0]);
13688
13755
  const dataIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[2]);
13689
- for (let l = 0; l < this.maps.bubbleModule.bubbleCollection.length; l++) {
13756
+ for (let l = 0; l < maps.bubbleModule.bubbleCollection.length; l++) {
13690
13757
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13691
- const bubbleCollection = this.maps.bubbleModule.bubbleCollection[l];
13758
+ const bubbleCollection = maps.bubbleModule.bubbleCollection[l];
13692
13759
  if (bubbleCollection['LayerIndex'] === layerIndex && bubbleCollection['BubbleIndex'] === bubleIndex &&
13693
13760
  bubbleCollection['DataIndex'] === dataIndex) {
13694
13761
  const centerX = bubbleCollection['center']['x'];
@@ -13707,25 +13774,25 @@ class Zoom {
13707
13774
  }
13708
13775
  }
13709
13776
  }
13710
- else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(this.maps.layers[this.index])) {
13777
+ else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(maps.layers[this.index])) {
13711
13778
  this.intersect = [];
13712
- this.maps.zoomLabelPositions = [];
13713
- this.maps.zoomLabelPositions = this.maps.dataLabelModule.dataLabelCollections;
13714
- let labelAnimate = !this.maps.isTileMap && animate$$1;
13779
+ maps.zoomLabelPositions = [];
13780
+ maps.zoomLabelPositions = maps.dataLabelModule.dataLabelCollections;
13781
+ let labelAnimate = !maps.isTileMap && animate$$1;
13715
13782
  for (let k = 0; k < currentEle.childElementCount; k++) {
13716
13783
  if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
13717
13784
  const labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
13718
13785
  this.zoomshapewidth = currentEle.childNodes[k].getBoundingClientRect();
13719
- this.maps.zoomShapeCollection.push(this.zoomshapewidth);
13786
+ maps.zoomShapeCollection.push(this.zoomshapewidth);
13720
13787
  this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', labelAnimate);
13721
- const dataLabel = this.maps.layers[this.index].dataLabelSettings;
13788
+ const dataLabel = maps.layers[this.index].dataLabelSettings;
13722
13789
  const border = dataLabel.border;
13723
13790
  if (k > 0 && border['width'] > 1) {
13724
- if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1) {
13725
- const labelX = ((this.maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
13726
- const labelY = ((this.maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
13791
+ if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1 && !isNullOrUndefined(maps.zoomLabelPositions[labelIndex])) {
13792
+ const labelX = ((maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
13793
+ const labelY = ((maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
13727
13794
  const zoomtext = currentEle.childNodes[k]['innerHTML'];
13728
- const style = this.maps.layers[this.index].dataLabelSettings.textStyle;
13795
+ const style = maps.layers[this.index].dataLabelSettings.textStyle;
13729
13796
  const zoomtextSize = measureText(zoomtext, style);
13730
13797
  const padding = 5;
13731
13798
  const rectElement = currentEle.childNodes[k - 1];
@@ -13740,11 +13807,11 @@ class Zoom {
13740
13807
  }
13741
13808
  }
13742
13809
  }
13743
- this.maps.arrangeTemplate();
13810
+ maps.arrangeTemplate();
13744
13811
  }
13745
13812
  if (!isNullOrUndefined(this.currentLayer)) {
13746
- if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
13747
- this.processTemplate(x, y, scale, this.maps);
13813
+ if (!animate$$1 || this.currentLayer.animationDuration === 0 || maps.isTileMap) {
13814
+ this.processTemplate(x, y, scale, maps);
13748
13815
  }
13749
13816
  }
13750
13817
  }
@@ -14144,15 +14211,15 @@ class Zoom {
14144
14211
  if (!panArgs.cancel) {
14145
14212
  if (panningXDirection && panningYDirection) {
14146
14213
  map.translatePoint = new Point(x, y);
14147
- this.applyTransform();
14214
+ this.applyTransform(map);
14148
14215
  }
14149
14216
  else if (panningXDirection) {
14150
14217
  map.translatePoint = new Point(x, map.translatePoint.y);
14151
- this.applyTransform();
14218
+ this.applyTransform(map);
14152
14219
  }
14153
14220
  else if (panningYDirection) {
14154
14221
  map.translatePoint = new Point(map.translatePoint.x, y);
14155
- this.applyTransform();
14222
+ this.applyTransform(map);
14156
14223
  }
14157
14224
  }
14158
14225
  this.maps.zoomNotApplied = false;
@@ -14180,7 +14247,7 @@ class Zoom {
14180
14247
  };
14181
14248
  map.trigger(pan, panArgs);
14182
14249
  map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint, 'Pan');
14183
- this.applyTransform();
14250
+ this.applyTransform(map);
14184
14251
  }
14185
14252
  map.zoomTranslatePoint = map.translatePoint;
14186
14253
  this.mouseDownPoints = this.mouseMovePoints;
@@ -14192,7 +14259,7 @@ class Zoom {
14192
14259
  (this.distanceX / this.maps.scale)) : this.maps.translatePoint.x;
14193
14260
  this.maps.translatePoint.y = !isNullOrUndefined(this.distanceY) ? this.maps.translatePoint.y -
14194
14261
  (this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
14195
- this.applyTransform(false);
14262
+ this.applyTransform(this.maps, false);
14196
14263
  }
14197
14264
  toolBarZooming(zoomFactor, type) {
14198
14265
  const map = this.maps;
@@ -14229,6 +14296,7 @@ class Zoom {
14229
14296
  mapHeight = size.height;
14230
14297
  }
14231
14298
  zoomFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
14299
+ zoomFactor = zoomFactor > 1.05 ? 1 : zoomFactor;
14232
14300
  map.translatePoint = this.calculateInitalZoomTranslatePoint(zoomFactor, mapWidth, mapHeight, size, min, map);
14233
14301
  }
14234
14302
  else {
@@ -14248,7 +14316,7 @@ class Zoom {
14248
14316
  map.scale = map.previousScale;
14249
14317
  }
14250
14318
  else {
14251
- this.applyTransform(true);
14319
+ this.applyTransform(map, true);
14252
14320
  }
14253
14321
  }
14254
14322
  else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
@@ -14286,7 +14354,7 @@ class Zoom {
14286
14354
  const element1 = document.getElementById(this.maps.element.id + '_tiles');
14287
14355
  const animationDuration = this.maps.layersCollection[0].animationDuration;
14288
14356
  setTimeout(() => {
14289
- this.applyTransform(true);
14357
+ this.applyTransform(this.maps, true);
14290
14358
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
14291
14359
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
14292
14360
  }
@@ -14299,6 +14367,8 @@ class Zoom {
14299
14367
  }
14300
14368
  createZoomingToolbars() {
14301
14369
  const map = this.maps;
14370
+ let zoomInElements;
14371
+ let zoomOutElements;
14302
14372
  this.toolBarGroup = map.renderer.createGroup({
14303
14373
  id: map.element.id + '_Zooming_KitCollection',
14304
14374
  opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
@@ -14316,7 +14386,6 @@ class Zoom {
14316
14386
  const toolBarLength = map.zoomSettings.toolbars.length;
14317
14387
  const toolWidth = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (toolBarLength * kitWidth) + (toolBarLength * padding) : (kitWidth * 2);
14318
14388
  const toolHeight = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (kitHeight * 2) : (toolBarLength * kitHeight) + (toolBarLength * padding);
14319
- 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)));
14320
14389
  const defElement = map.renderer.createDefs();
14321
14390
  defElement.innerHTML = shadowElement;
14322
14391
  this.toolBarGroup.appendChild(defElement);
@@ -14365,13 +14434,13 @@ class Zoom {
14365
14434
  case 'zoomin':
14366
14435
  direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
14367
14436
  this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar + '_Path', fill, 3, this.maps.themeStyle.zoomFillColor, 1, 1, null, direction)));
14368
- this.zoomInElements = this.currentToolbarEle;
14437
+ zoomInElements = this.currentToolbarEle;
14369
14438
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14370
14439
  break;
14371
14440
  case 'zoomout':
14372
14441
  direction = 'M 0, 8 L 16, 8';
14373
14442
  this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, fill, 3, this.maps.themeStyle.zoomFillColor, 1, 1, null, direction)));
14374
- this.zoomOutElements = this.currentToolbarEle;
14443
+ zoomOutElements = this.currentToolbarEle;
14375
14444
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14376
14445
  break;
14377
14446
  case 'pan': {
@@ -14868,15 +14937,30 @@ class Zoom {
14868
14937
  /**
14869
14938
  * To destroy the zoom.
14870
14939
  *
14871
- * @param {Maps} maps - Specifies the instance of the maps.
14872
14940
  * @returns {void}
14873
14941
  * @private
14874
14942
  */
14875
- destroy(maps) {
14943
+ destroy() {
14944
+ this.toolBarGroup = null;
14945
+ this.currentToolbarEle = null;
14946
+ this.zoomingRect = null;
14947
+ this.zoomElements = null;
14948
+ this.panElements = null;
14949
+ this.baseTranslatePoint = null;
14950
+ this.touchStartList = null;
14951
+ this.touchMoveList = null;
14952
+ this.previousTouchMoveList = null;
14953
+ this.mouseDownPoints = null;
14954
+ this.mouseMovePoints = null;
14955
+ this.startTouches = [];
14956
+ this.zoomshapewidth = null;
14957
+ this.intersect = [];
14958
+ this.mouseDownLatLong = null;
14959
+ this.mouseMoveLatLong = null;
14876
14960
  this.removeEventListener();
14877
- /**
14878
- * Destroy method performed here
14879
- */
14961
+ //TODO: Calling the below code throws spec issue.
14962
+ //this.maps = null;
14963
+ this.currentLayer = null;
14880
14964
  }
14881
14965
  }
14882
14966
 
@@ -14892,9 +14976,7 @@ class Print {
14892
14976
  *
14893
14977
  * @param {Maps} control - Specifies the instance of the map
14894
14978
  */
14895
- constructor(control) {
14896
- this.control = control;
14897
- }
14979
+ constructor(control) { }
14898
14980
  /**
14899
14981
  * To print the Maps
14900
14982
  *
@@ -14902,16 +14984,16 @@ class Print {
14902
14984
  * @returns {void}
14903
14985
  * @private
14904
14986
  */
14905
- print(elements) {
14906
- this.printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
14907
- this.printWindow.moveTo(0, 0);
14908
- this.printWindow.resizeTo(screen.availWidth, screen.availHeight);
14987
+ print(maps, elements) {
14988
+ let printWindow = window.open('', 'print', 'height=' + window.outerHeight + ',width=' + window.outerWidth + ',tabbar=no');
14989
+ printWindow.moveTo(0, 0);
14990
+ printWindow.resizeTo(screen.availWidth, screen.availHeight);
14909
14991
  const argsData = {
14910
- cancel: false, htmlContent: this.getHTMLContent(elements), name: beforePrint
14992
+ cancel: false, htmlContent: this.getHTMLContent(maps, elements), name: beforePrint
14911
14993
  };
14912
- this.control.trigger('beforePrint', argsData, (beforePrintArgs) => {
14994
+ maps.trigger('beforePrint', argsData, (beforePrintArgs) => {
14913
14995
  if (!argsData.cancel) {
14914
- print(argsData.htmlContent, this.printWindow);
14996
+ print(argsData.htmlContent, printWindow);
14915
14997
  }
14916
14998
  });
14917
14999
  }
@@ -14922,20 +15004,19 @@ class Print {
14922
15004
  * @returns {Element} - Returns the div element
14923
15005
  * @private
14924
15006
  */
14925
- getHTMLContent(elements) {
14926
- const elementRect = getClientElement(this.control.element.id);
15007
+ getHTMLContent(maps, elements) {
14927
15008
  let div = createElement('div');
14928
- let divElement = this.control.element.cloneNode(true);
14929
- if (this.control.isTileMap) {
15009
+ let divElement = maps.element.cloneNode(true);
15010
+ if (maps.isTileMap) {
14930
15011
  for (let i = 0; i < divElement.childElementCount; i++) {
14931
- if (divElement.children[i].id === this.control.element.id + '_tile_parent') {
15012
+ if (divElement.children[i].id === maps.element.id + '_tile_parent') {
14932
15013
  divElement.children[i].style.removeProperty('height');
14933
15014
  divElement.children[i].style.removeProperty('width');
14934
15015
  divElement.children[i].style.removeProperty('top');
14935
15016
  divElement.children[i].style.removeProperty('left');
14936
15017
  divElement.children[i].style.removeProperty('right');
14937
15018
  divElement.children[i].style.removeProperty('overflow');
14938
- const svgElement = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
15019
+ const svgElement = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
14939
15020
  divElement.children[i].children[0].style.overflow = 'hidden';
14940
15021
  divElement.children[i].children[0].style.position = 'absolute';
14941
15022
  divElement.children[i].children[0].style.height = svgElement.style.height;
@@ -14975,15 +15056,10 @@ class Print {
14975
15056
  /**
14976
15057
  * To destroy the print.
14977
15058
  *
14978
- * @param {Maps} maps - Specifies the instance of the maps
14979
15059
  * @returns {void}
14980
15060
  * @private
14981
15061
  */
14982
- destroy(maps) {
14983
- /**
14984
- * Destroy method performed here
14985
- */
14986
- }
15062
+ destroy() { }
14987
15063
  }
14988
15064
 
14989
15065
  /* eslint-disable @typescript-eslint/no-unused-vars */
@@ -14999,7 +15075,6 @@ class ImageExport {
14999
15075
  * @param {Maps} control - Specifies the instance of the map
15000
15076
  */
15001
15077
  constructor(control) {
15002
- this.control = control;
15003
15078
  }
15004
15079
  /**
15005
15080
  * To export the file as image/svg format
@@ -15010,28 +15085,28 @@ class ImageExport {
15010
15085
  * @returns {Promise<string>} - Returns the promise string.
15011
15086
  * @private
15012
15087
  */
15013
- export(type, fileName, allowDownload) {
15088
+ export(maps, type, fileName, allowDownload) {
15014
15089
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15015
15090
  const promise = new Promise((resolve, reject) => {
15016
15091
  const imageCanvasElement = createElement('canvas', {
15017
15092
  id: 'ej2-canvas',
15018
15093
  attrs: {
15019
- 'width': this.control.availableSize.width.toString(),
15020
- 'height': this.control.availableSize.height.toString()
15094
+ 'width': maps.availableSize.width.toString(),
15095
+ 'height': maps.availableSize.height.toString()
15021
15096
  }
15022
15097
  });
15023
15098
  const isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
15024
- const toolbarEle = document.getElementById(this.control.element.id + '_ToolBar');
15025
- const svgParent = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
15099
+ const toolbarEle = document.getElementById(maps.element.id + '_ToolBar');
15100
+ const svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
15026
15101
  let svgDataElement;
15027
15102
  let tileSvg;
15028
- let svgObject = getElementByID(this.control.element.id + '_svg').cloneNode(true);
15029
- if (!this.control.isTileMap) {
15103
+ let svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
15104
+ if (!maps.isTileMap) {
15030
15105
  svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
15031
- this.control.svgObject.outerHTML + '</svg>';
15106
+ maps.svgObject.outerHTML + '</svg>';
15032
15107
  }
15033
15108
  else {
15034
- tileSvg = getElementByID(this.control.element.id + '_Tile_SVG').cloneNode(true);
15109
+ tileSvg = getElementByID(maps.element.id + '_Tile_SVG').cloneNode(true);
15035
15110
  svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
15036
15111
  svgObject.outerHTML + tileSvg.outerHTML + '</svg>';
15037
15112
  }
@@ -15048,7 +15123,7 @@ class ImageExport {
15048
15123
  else {
15049
15124
  const image = new Image();
15050
15125
  const ctxt = imageCanvasElement.getContext('2d');
15051
- if (!this.control.isTileMap) {
15126
+ if (!maps.isTileMap) {
15052
15127
  image.onload = (() => {
15053
15128
  ctxt.drawImage(image, 0, 0);
15054
15129
  window.URL.revokeObjectURL(url);
@@ -15067,22 +15142,22 @@ class ImageExport {
15067
15142
  image.src = url;
15068
15143
  }
15069
15144
  else {
15070
- const svgParentElement = document.getElementById(this.control.element.id + '_MapAreaBorder');
15145
+ const svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
15071
15146
  let top = parseFloat(svgParentElement.getAttribute('y'));
15072
15147
  let left = parseFloat(svgParentElement.getAttribute('x'));
15073
15148
  const imgxHttp = new XMLHttpRequest();
15074
- const imgTileLength = this.control.mapLayerPanel.tiles.length;
15149
+ const imgTileLength = maps.mapLayerPanel.tiles.length;
15075
15150
  for (let i = 0; i <= imgTileLength + 1; i++) {
15076
- const tile = document.getElementById(this.control.element.id + '_tile_' + (i - 1));
15151
+ const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
15077
15152
  const exportTileImg = new Image();
15078
15153
  exportTileImg.crossOrigin = 'Anonymous';
15079
- ctxt.fillStyle = this.control.background ? this.control.background : '#FFFFFF';
15080
- ctxt.fillRect(0, 0, this.control.availableSize.width, this.control.availableSize.height);
15081
- ctxt.font = this.control.titleSettings.textStyle.size + ' Arial';
15082
- let titleElement = document.getElementById(this.control.element.id + '_Map_title');
15154
+ ctxt.fillStyle = maps.background ? maps.background : '#FFFFFF';
15155
+ ctxt.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
15156
+ ctxt.font = maps.titleSettings.textStyle.size + ' Arial';
15157
+ let titleElement = document.getElementById(maps.element.id + '_Map_title');
15083
15158
  if (!isNullOrUndefined(titleElement)) {
15084
15159
  ctxt.fillStyle = titleElement.getAttribute('fill');
15085
- ctxt.fillText(this.control.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15160
+ ctxt.fillText(maps.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15086
15161
  }
15087
15162
  exportTileImg.onload = (() => {
15088
15163
  if (i === 0 || i === imgTileLength + 1) {
@@ -15096,7 +15171,6 @@ class ImageExport {
15096
15171
  }
15097
15172
  }
15098
15173
  else {
15099
- const tileParent = document.getElementById(this.control.element.id + '_tile_parent');
15100
15174
  ctxt.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left, parseFloat(tile.style.top) +
15101
15175
  top);
15102
15176
  }
@@ -15150,15 +15224,10 @@ class ImageExport {
15150
15224
  /**
15151
15225
  * To destroy the ImageExport.
15152
15226
  *
15153
- * @param {Maps} maps - Specifies the instance of the maps.
15154
15227
  * @returns {void}
15155
15228
  * @private
15156
15229
  */
15157
- destroy(maps) {
15158
- /**
15159
- * Destroy method performed here
15160
- */
15161
- }
15230
+ destroy() { }
15162
15231
  }
15163
15232
 
15164
15233
  /* eslint-disable @typescript-eslint/no-unused-vars */
@@ -15173,9 +15242,7 @@ class PdfExport {
15173
15242
  *
15174
15243
  * @param {Maps} control Specifies the instance of the map
15175
15244
  */
15176
- constructor(control) {
15177
- this.control = control;
15178
- }
15245
+ constructor() { }
15179
15246
  /**
15180
15247
  * To export the file as image/svg format
15181
15248
  *
@@ -15186,24 +15253,24 @@ class PdfExport {
15186
15253
  * @returns {Promise<string>} - Returns the promise string
15187
15254
  * @private
15188
15255
  */
15189
- export(type, fileName, allowDownload, orientation) {
15256
+ export(maps, type, fileName, allowDownload, orientation) {
15190
15257
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15191
15258
  const promise = new Promise((resolve, reject) => {
15192
15259
  const canvasElement = createElement('canvas', {
15193
15260
  id: 'ej2-canvas',
15194
15261
  attrs: {
15195
- 'width': this.control.availableSize.width.toString(),
15196
- 'height': this.control.availableSize.height.toString()
15262
+ 'width': maps.availableSize.width.toString(),
15263
+ 'height': maps.availableSize.height.toString()
15197
15264
  }
15198
15265
  });
15199
15266
  orientation = isNullOrUndefined(orientation) ? PdfPageOrientation.Landscape : orientation;
15200
- const svgParent = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
15267
+ const svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
15201
15268
  let svgData;
15202
- const exportElement = this.control.svgObject.cloneNode(true);
15269
+ const exportElement = maps.svgObject.cloneNode(true);
15203
15270
  const backgroundElement = exportElement.childNodes[0];
15204
15271
  const backgroundColor = backgroundElement.getAttribute('fill');
15205
- if ((this.control.theme === 'Tailwind' || this.control.theme === 'TailwindDark' || this.control.theme === 'Bootstrap5' || this.control.theme === 'Bootstrap5Dark'
15206
- || this.control.theme === 'Fluent' || this.control.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
15272
+ if ((maps.theme === 'Tailwind' || maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5' || maps.theme === 'Bootstrap5Dark'
15273
+ || maps.theme === 'Fluent' || maps.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
15207
15274
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
15208
15275
  }
15209
15276
  const url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
@@ -15211,7 +15278,7 @@ class PdfExport {
15211
15278
  const pdfDocument = new PdfDocument();
15212
15279
  const image = new Image();
15213
15280
  const ctx = canvasElement.getContext('2d');
15214
- if (!this.control.isTileMap) {
15281
+ if (!maps.isTileMap) {
15215
15282
  image.onload = (() => {
15216
15283
  ctx.drawImage(image, 0, 0);
15217
15284
  window.URL.revokeObjectURL(url);
@@ -15219,7 +15286,7 @@ class PdfExport {
15219
15286
  let imageString = canvasElement.toDataURL('image/jpeg').replace('image/jpeg', 'image/octet-stream');
15220
15287
  pdfDocument.pageSettings.orientation = orientation;
15221
15288
  imageString = imageString.slice(imageString.indexOf(',') + 1);
15222
- pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, (this.control.availableSize.width - 60), this.control.availableSize.height);
15289
+ pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
15223
15290
  if (allowDownload) {
15224
15291
  pdfDocument.save(fileName + '.pdf');
15225
15292
  pdfDocument.destroy();
@@ -15232,22 +15299,22 @@ class PdfExport {
15232
15299
  image.src = url;
15233
15300
  }
15234
15301
  else {
15235
- const svgParentElement = document.getElementById(this.control.element.id + '_MapAreaBorder');
15302
+ const svgParentElement = document.getElementById(maps.element.id + '_MapAreaBorder');
15236
15303
  let top = parseFloat(svgParentElement.getAttribute('y'));
15237
15304
  let left = parseFloat(svgParentElement.getAttribute('x'));
15238
15305
  const xHttp = new XMLHttpRequest();
15239
- const tileLength = this.control.mapLayerPanel.tiles.length;
15306
+ const tileLength = maps.mapLayerPanel.tiles.length;
15240
15307
  for (let i = 0; i <= tileLength + 1; i++) {
15241
- const tile = document.getElementById(this.control.element.id + '_tile_' + (i - 1));
15308
+ const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
15242
15309
  const tileImg = new Image();
15243
15310
  tileImg.crossOrigin = 'Anonymous';
15244
- ctx.fillStyle = this.control.background ? this.control.background : '#FFFFFF';
15245
- ctx.fillRect(0, 0, this.control.availableSize.width, this.control.availableSize.height);
15246
- ctx.font = this.control.titleSettings.textStyle.size + ' Arial';
15247
- let titleElement = document.getElementById(this.control.element.id + '_Map_title');
15311
+ ctx.fillStyle = maps.background ? maps.background : '#FFFFFF';
15312
+ ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
15313
+ ctx.font = maps.titleSettings.textStyle.size + ' Arial';
15314
+ let titleElement = document.getElementById(maps.element.id + '_Map_title');
15248
15315
  if (!isNullOrUndefined(titleElement)) {
15249
15316
  ctx.fillStyle = titleElement.getAttribute('fill');
15250
- ctx.fillText(this.control.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15317
+ ctx.fillText(maps.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
15251
15318
  }
15252
15319
  tileImg.onload = (() => {
15253
15320
  if (i === 0 || i === tileLength + 1) {
@@ -15261,7 +15328,6 @@ class PdfExport {
15261
15328
  }
15262
15329
  }
15263
15330
  else {
15264
- const tileParent = document.getElementById(this.control.element.id + '_tile_parent');
15265
15331
  ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left, parseFloat(tile.style.top) + top);
15266
15332
  }
15267
15333
  ctx.drawImage(tileImg, 0, 0);
@@ -15271,7 +15337,7 @@ class PdfExport {
15271
15337
  let x = localStorage.getItem('saved-image-example');
15272
15338
  pdfDocument.pageSettings.orientation = orientation;
15273
15339
  x = x.slice(x.indexOf(',') + 1);
15274
- pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (this.control.availableSize.width - 60), this.control.availableSize.height);
15340
+ pdfDocument.pages.add().graphics.drawImage(new PdfBitmap(x), 0, 0, (maps.availableSize.width - 60), maps.availableSize.height);
15275
15341
  if (allowDownload) {
15276
15342
  pdfDocument.save(fileName + '.pdf');
15277
15343
  pdfDocument.destroy();
@@ -15288,7 +15354,7 @@ class PdfExport {
15288
15354
  }
15289
15355
  else {
15290
15356
  setTimeout(() => {
15291
- let tileSvg = document.getElementById(this.control.element.id + '_Tile_SVG');
15357
+ let tileSvg = document.getElementById(maps.element.id + '_Tile_SVG');
15292
15358
  tileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(tileSvg)], { type: 'image/svg+xml' }));
15293
15359
  }, 300);
15294
15360
  }
@@ -15312,17 +15378,12 @@ class PdfExport {
15312
15378
  return 'PdfExport';
15313
15379
  }
15314
15380
  /**
15315
- * To destroy the PdfExports.
15381
+ * To destroy the PdfExport.
15316
15382
  *
15317
- * @param {Maps} maps - Specifies the instance of the maps.
15318
15383
  * @returns {void}
15319
15384
  * @private
15320
15385
  */
15321
- destroy(maps) {
15322
- /**
15323
- * Destroy method performed here
15324
- */
15325
- }
15386
+ destroy() { }
15326
15387
  }
15327
15388
 
15328
15389
  /**