@syncfusion/ej2-maps 25.1.35 → 25.1.40

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 (49) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/ej2-maps.min.js +2 -2
  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 +624 -398
  6. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  7. package/dist/es6/ej2-maps.es5.js +605 -380
  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 +8 -8
  13. package/src/maps/layers/bubble.d.ts +17 -2
  14. package/src/maps/layers/bubble.js +20 -5
  15. package/src/maps/layers/color-mapping.d.ts +1 -1
  16. package/src/maps/layers/color-mapping.js +4 -0
  17. package/src/maps/layers/data-label.d.ts +2 -2
  18. package/src/maps/layers/data-label.js +4 -6
  19. package/src/maps/layers/layer-panel.d.ts +9 -7
  20. package/src/maps/layers/layer-panel.js +124 -121
  21. package/src/maps/layers/legend.d.ts +7 -6
  22. package/src/maps/layers/legend.js +41 -24
  23. package/src/maps/layers/marker.d.ts +7 -2
  24. package/src/maps/layers/marker.js +14 -10
  25. package/src/maps/layers/navigation-selected-line.js +1 -0
  26. package/src/maps/layers/polygon.js +5 -1
  27. package/src/maps/maps-model.d.ts +9 -9
  28. package/src/maps/maps.d.ts +30 -12
  29. package/src/maps/maps.js +88 -59
  30. package/src/maps/model/base-model.d.ts +3 -2
  31. package/src/maps/model/base.d.ts +10 -9
  32. package/src/maps/model/base.js +1 -1
  33. package/src/maps/model/export-image.js +1 -1
  34. package/src/maps/model/export-pdf.js +3 -3
  35. package/src/maps/model/interface.d.ts +1 -0
  36. package/src/maps/model/print.js +2 -0
  37. package/src/maps/model/theme.js +12 -12
  38. package/src/maps/user-interaction/annotation.d.ts +5 -0
  39. package/src/maps/user-interaction/annotation.js +6 -2
  40. package/src/maps/user-interaction/highlight.d.ts +13 -1
  41. package/src/maps/user-interaction/highlight.js +12 -2
  42. package/src/maps/user-interaction/selection.d.ts +13 -1
  43. package/src/maps/user-interaction/selection.js +19 -13
  44. package/src/maps/user-interaction/tooltip.d.ts +14 -0
  45. package/src/maps/user-interaction/tooltip.js +16 -1
  46. package/src/maps/user-interaction/zoom.d.ts +55 -10
  47. package/src/maps/user-interaction/zoom.js +150 -106
  48. package/src/maps/utils/helper.d.ts +64 -36
  49. package/src/maps/utils/helper.js +82 -52
@@ -40,7 +40,7 @@ function stringToNumber(value, containerSize) {
40
40
  function calculateSize(maps) {
41
41
  maps.element.style.height = !isNullOrUndefined(maps.height) ? maps.height : 'auto';
42
42
  maps.element.style.width = !isNullOrUndefined(maps.width) ? maps.width : 'auto';
43
- maps.element.style.setProperty("display", "block");
43
+ maps.element.style.setProperty('display', 'block');
44
44
  const containerWidth = maps.element.clientWidth;
45
45
  const containerHeight = maps.element.clientHeight;
46
46
  const containerElementWidth = stringToNumber(maps.element.style.width, containerWidth);
@@ -200,14 +200,19 @@ function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
200
200
  return new Point(x, y);
201
201
  }
202
202
  /**
203
+ * @param {Maps} maps - Specifies the map control.
204
+ * @param {number} factor - Specifies the factor.
205
+ * @param {LayerSettings} currentLayer - Specifies the current layer.
206
+ * @param {Coordinate} markerData - Specifies the marker data.
207
+ * @returns {string} - Returns the path.
203
208
  * @private
204
209
  */
205
210
  function calculatePolygonPath(maps, factor, currentLayer, markerData) {
206
211
  let path = '';
207
212
  Array.prototype.forEach.call(markerData, (data, dataIndex) => {
208
- let lat = data.latitude;
209
- let lng = data.longitude;
210
- let location = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
213
+ const lat = data.latitude;
214
+ const lng = data.longitude;
215
+ const location = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
211
216
  if (dataIndex === 0) {
212
217
  path += 'M ' + location.x + ' ' + location.y;
213
218
  }
@@ -408,9 +413,14 @@ function measureText(text, font) {
408
413
  '; visibility: hidden; top: -100; left: 0; whiteSpace: nowrap; lineHeight: normal';
409
414
  return new Size(measureObject.clientWidth, measureObject.clientHeight);
410
415
  }
411
- /** @private */
416
+ /**
417
+ * @param {string} text - Specifies the text.
418
+ * @param {FontModel} font - Specifies the font.
419
+ * @returns {Size} - Returns the size of text.
420
+ * @private */
412
421
  function measureTextElement(text, font) {
413
422
  const canvas = document.createElement('canvas');
423
+ // eslint-disable-next-line @typescript-eslint/tslint/config
414
424
  const context = canvas.getContext('2d');
415
425
  context.font = `${font.fontStyle} ${font.fontWeight} ${typeof font.size === 'number' ? font.size + 'px' : font.size} ${font.fontFamily}`;
416
426
  const metrics = context.measureText(text);
@@ -646,15 +656,15 @@ function renderTextElement(option, style, color, parent, isMinus = false) {
646
656
  return htmlObject;
647
657
  }
648
658
  /**
649
- * @param {HTMLCollection} element Specifies the html collection
650
- * @param {string} markerId Specifies the marker id
651
- * @param {any} data Specifies the data
652
- * @param {number} index Specifies the index
653
- * @param {Maps} mapObj Specifies the map object
654
- * @returns {HTMLCollection} Returns the html collection
659
+ * @param {HTMLCollection} element - Specifies the html collection
660
+ * @param {string} markerId - Specifies the marker id
661
+ * @param {object} data - Specifies the data
662
+ * @param {number} index - Specifies the index
663
+ * @param {Maps} mapObj - Specifies the map object
664
+ * @param {string} templateType - Specifies the template type
665
+ * @returns {HTMLElement} - Returns the html element
655
666
  * @private
656
667
  */
657
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
658
668
  function convertElement(element, markerId, data, index, mapObj, templateType) {
659
669
  const childElement = createElement('div', {
660
670
  id: markerId, className: mapObj.element.id + '_marker_template_element'
@@ -665,6 +675,7 @@ function convertElement(element, markerId, data, index, mapObj, templateType) {
665
675
  childElement.appendChild(element[0]);
666
676
  elementLength--;
667
677
  }
678
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
668
679
  if (!mapObj.isReact || templateType !== 'function') {
669
680
  let templateHtml = childElement.innerHTML;
670
681
  const properties = Object.keys(data);
@@ -706,12 +717,11 @@ function formatValue(value, maps) {
706
717
  *
707
718
  * @param {string} stringTemplate - Specifies the template
708
719
  * @param {string} format - Specifies the format
709
- * @param {any} data - Specifies the data
720
+ * @param {object} data - Specifies the data
710
721
  * @param {Maps} maps - Specifies the instance of the maps
711
722
  * @returns {string} - Returns the string value
712
723
  * @private
713
724
  */
714
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
715
725
  function convertStringToValue(stringTemplate, format, data, maps) {
716
726
  let templateHtml = (stringTemplate === '') ? format : stringTemplate;
717
727
  const templateValue = (stringTemplate === '') ? templateHtml.split('${') : templateHtml.split('{{:');
@@ -736,14 +746,11 @@ function convertStringToValue(stringTemplate, format, data, maps) {
736
746
  *
737
747
  * @param {Element} element - Specifies the element
738
748
  * @param {string} labelId - Specifies the label id
739
- * @param {any} data - Specifies the data
740
- * @param {number} index - Specifies the index
741
- * @param {Maps} mapObj - Specifies the map object
749
+ * @param {object} data - Specifies the data
742
750
  * @returns {HTMLElement} - Returns the html element
743
751
  * @private
744
752
  */
745
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
746
- function convertElementFromLabel(element, labelId, data, index, mapObj) {
753
+ function convertElementFromLabel(element, labelId, data) {
747
754
  const labelEle = isNullOrUndefined(element.childElementCount) ? element[0] : element;
748
755
  let templateHtml = labelEle.outerHTML;
749
756
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -772,7 +779,7 @@ function convertElementFromLabel(element, labelId, data, index, mapObj) {
772
779
  * @returns {Element} - Returns the element
773
780
  * @private
774
781
  */
775
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
782
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
776
783
  function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCollection, maps) {
777
784
  let markerEle;
778
785
  let x;
@@ -814,7 +821,7 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
814
821
  }
815
822
  /**
816
823
  *
817
- * @param {any} data - Specifies the data
824
+ * @param {object} data - Specifies the data
818
825
  * @param {string} value - Specifies the value
819
826
  * @returns {any} - Returns the data
820
827
  * @private
@@ -837,11 +844,10 @@ function getValueFromObject(data, value) {
837
844
  /**
838
845
  *
839
846
  * @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
840
- * @param {any} data - Specifies the data
847
+ * @param {object} data - Specifies the data
841
848
  * @returns {IMarkerRenderingEventArgs} - Returns the arguments
842
849
  * @private
843
850
  */
844
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
845
851
  function markerColorChoose(eventArgs, data) {
846
852
  const color = (!isNullOrUndefined(eventArgs.colorValuePath)) ? ((eventArgs.colorValuePath.indexOf('.') > -1) ? (getValueFromObject(data, eventArgs.colorValuePath)).toString() :
847
853
  data[eventArgs.colorValuePath]) : data[eventArgs.colorValuePath];
@@ -854,11 +860,10 @@ function markerColorChoose(eventArgs, data) {
854
860
  /**
855
861
  *
856
862
  * @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
857
- * @param {any} data - Specifies the data
863
+ * @param {object} data - Specifies the data
858
864
  * @returns {IMarkerRenderingEventArgs} - Returns the arguments
859
865
  * @private
860
866
  */
861
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
862
867
  function markerShapeChoose(eventArgs, data) {
863
868
  if (!isNullOrUndefined(eventArgs.shapeValuePath) && !isNullOrUndefined(data[eventArgs.shapeValuePath])) {
864
869
  const shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
@@ -891,7 +896,7 @@ function markerShapeChoose(eventArgs, data) {
891
896
  * @param {Element} layerElement - Specifies the layer element
892
897
  * @param {boolean} check - Specifies the boolean value
893
898
  * @param {boolean} zoomCheck - Specifies the boolean value
894
- * @returns {void}
899
+ * @returns {boolean} -Returns boolean for cluster completion
895
900
  * @private
896
901
  */
897
902
  function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerCollection, layerElement, check, zoomCheck) {
@@ -921,14 +926,15 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
921
926
  data: data, maps: maps, cluster: clusters, border: clusters.border
922
927
  };
923
928
  const containerRect = maps.element.getBoundingClientRect();
924
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
925
- const translatePoint = (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
929
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
930
+ (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
926
931
  let factor;
927
932
  if (!maps.isTileMap) {
928
933
  factor = maps.mapLayerPanel.calculateFactor(currentLayer);
929
934
  }
930
935
  let isClusteringCompleted = false;
931
936
  const currentZoomFactor = !maps.isTileMap ? maps.mapScaleValue : maps.tileZoomLevel;
937
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
932
938
  maps.trigger('markerClusterRendering', eventArg, (clusterargs) => {
933
939
  Array.prototype.forEach.call(markerTemplate.childNodes, (markerElement, o) => {
934
940
  indexCollection = [];
@@ -941,9 +947,9 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
941
947
  || (maps.markerModule.initialMarkerCluster.length > 0 && maps.markerModule.initialMarkerCluster[layerIndex] && maps.markerModule.initialMarkerCluster[layerIndex][o] && maps.markerModule.initialMarkerCluster[layerIndex][o].length > 0) ?
942
948
  (maps.previousScale < currentZoomFactor ? maps.markerModule.zoomedMarkerCluster[layerIndex][o] : maps.markerModule.initialMarkerCluster[layerIndex][o]) : null;
943
949
  if (!isNullOrUndefined(list) && list.length !== 0) {
944
- Array.prototype.forEach.call(list, (currentIndex, p) => {
950
+ Array.prototype.forEach.call(list, (currentIndex) => {
945
951
  if (o !== currentIndex) {
946
- let otherMarkerElement = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
952
+ const otherMarkerElement = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
947
953
  + 0 + '_dataIndex_' + currentIndex);
948
954
  if (otherMarkerElement['style']['visibility'] !== 'hidden') {
949
955
  markerBoundsComparer(otherMarkerElement, bounds1, colloideBounds, indexCollection, currentIndex);
@@ -1124,9 +1130,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1124
1130
  });
1125
1131
  return isClusteringCompleted;
1126
1132
  }
1127
- /** @private */
1133
+ /**
1134
+ * @param {Maps} maps - Specifies the map control.
1135
+ * @param {number} currentZoomFactor - Specifies the current zoom factor.
1136
+ * @param {number} layerIndex - Specifies the layer index.
1137
+ * @param {number} index - Specifies the index.
1138
+ * @param {number} indexCollection - Specifies the index Collection.
1139
+ * @returns {void}
1140
+ * @private */
1128
1141
  function markerClusterListHandler(maps, currentZoomFactor, layerIndex, index, indexCollection) {
1129
- if (currentZoomFactor == 1) {
1142
+ if (currentZoomFactor === 1) {
1130
1143
  const initialMarkerClusterList = isNullOrUndefined(maps.markerModule.initialMarkerCluster[layerIndex][index]) ? [] : indexCollection.length > 1 ? indexCollection : [];
1131
1144
  maps.markerModule.initialMarkerCluster[layerIndex][index] = initialMarkerClusterList;
1132
1145
  const zoomedMarkerClusterList = isNullOrUndefined(maps.markerModule.zoomedMarkerCluster[layerIndex][index]) ? [] : indexCollection.length > 1 ? indexCollection : [];
@@ -1136,9 +1149,17 @@ function markerClusterListHandler(maps, currentZoomFactor, layerIndex, index, in
1136
1149
  maps.markerModule.zoomedMarkerCluster[layerIndex][index] = indexCollection.length > 1 ? indexCollection : [];
1137
1150
  }
1138
1151
  }
1139
- /** @private */
1152
+ /**
1153
+ * @param {Element} tempElement - Specifies the temp element.
1154
+ * @param {ClientRect} markerBounds - Specifies the marker bounds.
1155
+ * @param {ClientRect} colloideBounds - Specifies the colloide Bounds.
1156
+ * @param {number[]} indexCollection - Specifies the index collection.
1157
+ * @param {number} p - Specifies the p.
1158
+ * @returns {void}
1159
+ * @private */
1140
1160
  function markerBoundsComparer(tempElement, markerBounds, colloideBounds, indexCollection, p) {
1141
- let currentMarkerBound = tempElement.getBoundingClientRect();
1161
+ // eslint-disable-next-line @typescript-eslint/tslint/config
1162
+ const currentMarkerBound = tempElement.getBoundingClientRect();
1142
1163
  if (!isNullOrUndefined(currentMarkerBound)) {
1143
1164
  if (!(markerBounds.left > currentMarkerBound.right || markerBounds.right < currentMarkerBound.left
1144
1165
  || markerBounds.top > currentMarkerBound.bottom || markerBounds.bottom < currentMarkerBound.top)) {
@@ -1152,11 +1173,10 @@ function markerBoundsComparer(tempElement, markerBounds, colloideBounds, indexCo
1152
1173
  *
1153
1174
  * @param {MarkerClusterData[]} sameMarkerData - Specifies the marker data
1154
1175
  * @param {Maps} maps - Specifies the instance of the maps
1155
- * @param {Element | HTMLElement} markerElement - Specifies the marker element
1156
1176
  * @returns {void}
1157
1177
  * @private
1158
1178
  */
1159
- function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
1179
+ function mergeSeparateCluster(sameMarkerData, maps) {
1160
1180
  const layerIndex = sameMarkerData[0].layerIndex;
1161
1181
  const clusterIndex = sameMarkerData[0].targetClusterIndex;
1162
1182
  const markerIndex = sameMarkerData[0].markerIndex;
@@ -1320,7 +1340,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
1320
1340
  * @returns {HTMLElement} - Returns the html element
1321
1341
  * @private
1322
1342
  */
1323
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1343
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
1324
1344
  function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
1325
1345
  templateFn = getTemplateFunction(eventArgs.template, maps);
1326
1346
  if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
@@ -1735,8 +1755,10 @@ function getFieldData(dataSource, fields) {
1735
1755
  * @returns {number} - Returns the number
1736
1756
  * @private
1737
1757
  */
1738
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1739
- function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, layer) {
1758
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
1759
+ function checkShapeDataFields(dataSource, properties, dataPath, propertyPath,
1760
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1761
+ layer) {
1740
1762
  if (!(isNullOrUndefined(properties))) {
1741
1763
  for (let i = 0; i < dataSource.length; i++) {
1742
1764
  const shapeDataPath = ((dataPath.indexOf('.') > -1) ? getValueFromObject(dataSource[i], dataPath) :
@@ -1757,10 +1779,9 @@ function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, la
1757
1779
  *
1758
1780
  * @param {string} shapeData - Specifies the shape data
1759
1781
  * @param {string | string[]} shapePropertyPath - Specifies the shape property path
1760
- * @param {any} shape - Specifies the shape
1782
+ * @param {object} shape - Specifies the shape
1761
1783
  * @returns {string} - Returns the string value
1762
1784
  */
1763
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1764
1785
  function checkPropertyPath(shapeData, shapePropertyPath, shape) {
1765
1786
  if (!isNullOrUndefined(shapeData) && !isNullOrUndefined(shape)) {
1766
1787
  if (!isNullOrUndefined(shapePropertyPath)) {
@@ -1855,6 +1876,7 @@ function findMidPointOfPolygon(points, type, geometryType) {
1855
1876
  ySum = ySum + Math.abs(((startY + startY1) * (((startX * startY1) - (startX1 * startY)))));
1856
1877
  }
1857
1878
  sum = 0.5 * sum;
1879
+ // eslint-disable-next-line @typescript-eslint/tslint/config
1858
1880
  const pointValue = points.some(point => point.x < 5 && point.y < 5) && geometryType === 'Normal' ? 6 : 4;
1859
1881
  xSum = (1 / (pointValue * sum)) * xSum;
1860
1882
  ySum = (1 / (pointValue * sum)) * ySum;
@@ -1922,7 +1944,7 @@ function findMidPointOfPolygon(points, type, geometryType) {
1922
1944
  function isCustomPath(layerData) {
1923
1945
  let customPath = false;
1924
1946
  if (Object.prototype.toString.call(layerData) === '[object Array]') {
1925
- Array.prototype.forEach.call(layerData, (layer, index) => {
1947
+ Array.prototype.forEach.call(layerData, (layer) => {
1926
1948
  if (!isNullOrUndefined(layer['geometry']) && layer['geometry']['type'] === 'Path') {
1927
1949
  customPath = true;
1928
1950
  }
@@ -1936,6 +1958,9 @@ function isCustomPath(layerData) {
1936
1958
  * @param {number} maxWidth - Specifies the maximum width
1937
1959
  * @param {string} text - Specifies the text
1938
1960
  * @param {FontModel} font - Specifies the font
1961
+ * @param {number} width - Specifies the width of text
1962
+ * @param {boolean} isCanvasMeasure - checks the canvas measure
1963
+ * @param {number[]} widthList - Specifies the width list
1939
1964
  * @returns {string} - Returns the string
1940
1965
  * @private
1941
1966
  */
@@ -2050,6 +2075,7 @@ function getTranslate(mapObject, layer, animate) {
2050
2075
  }
2051
2076
  if (mapObject.zoomSettings.shouldZoomInitially && mapObject.zoomSettings.enable) {
2052
2077
  mapObject.mapScaleValue = scaleFactor = zoomFactorValue = ((mapObject.zoomSettings.shouldZoomInitially || mapObject.enablePersistence) && mapObject.scale === 1)
2078
+ // eslint-disable-next-line radix
2053
2079
  ? mapObject.scale : (isNullOrUndefined(mapObject.markerZoomFactor)) ? 1 : (mapObject.markerZoomedState ? mapObject.markerZoomFactor : parseInt(mapObject.scale.toString()));
2054
2080
  if (mapObject.markerZoomedState && mapObject.mapScaleValue !== mapObject.markerZoomFactor && !mapObject.enablePersistence) {
2055
2081
  mapObject.mapScaleValue = zoomFactorValue = mapObject.markerZoomFactor;
@@ -2407,9 +2433,9 @@ function Internalize(maps, value) {
2407
2433
  /**
2408
2434
  * Function to compile the template function for maps.
2409
2435
  *
2410
- * @param {string} template - Specifies the template
2436
+ * @param {string | Function} template - Specifies the template
2411
2437
  * @param {Maps} maps - Specifies the Maps instance.
2412
- * @returns {Function} - Returns the function
2438
+ * @returns {any} - Returns the template function
2413
2439
  * @private
2414
2440
  */
2415
2441
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2448,7 +2474,7 @@ function getElement(id) {
2448
2474
  *
2449
2475
  * @param {string} targetId - Specifies the target id
2450
2476
  * @param {Maps} map - Specifies the instance of the maps
2451
- * @returns {any} - Returns the object
2477
+ * @returns {object} - Returns the object
2452
2478
  * @private
2453
2479
  */
2454
2480
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2575,7 +2601,7 @@ function getTargetElement(layerIndex, name, enable, map) {
2575
2601
  */
2576
2602
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2577
2603
  function createStyle(id, className, eventArgs) {
2578
- let styleEle = createElement('style', {
2604
+ const styleEle = createElement('style', {
2579
2605
  id: id
2580
2606
  });
2581
2607
  styleEle.innerText = '.' + className + '{fill:'
@@ -2611,14 +2637,12 @@ function customizeStyle(id, className, eventArgs) {
2611
2637
  * @param {SelectionSettingsModel} selectionSettings - Specifies the selection settings
2612
2638
  * @param {Maps} map - Specifies the instance of the maps
2613
2639
  * @param {Element} targetElement - Specifies the target element
2614
- * @param {any} shapeData - Specifies the shape data
2615
- * @param {any} data - Specifies the data
2640
+ * @param {object} shapeData - Specifies the shape data
2641
+ * @param {object} data - Specifies the data
2616
2642
  * @returns {void}
2617
2643
  * @private
2618
2644
  */
2619
- function triggerItemSelectionEvent(selectionSettings, map, targetElement,
2620
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2621
- shapeData, data) {
2645
+ function triggerItemSelectionEvent(selectionSettings, map, targetElement, shapeData, data) {
2622
2646
  const border = {
2623
2647
  color: selectionSettings.border.color,
2624
2648
  width: selectionSettings.border.width / map.scale,
@@ -2635,6 +2659,7 @@ shapeData, data) {
2635
2659
  data: data,
2636
2660
  maps: map
2637
2661
  };
2662
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2638
2663
  map.trigger('itemSelection', eventArgs, (observedArgs) => {
2639
2664
  eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity :
2640
2665
  selectionSettings.border.opacity;
@@ -2691,6 +2716,7 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius = 0)
2691
2716
  ' ) scale(' + height + ')');
2692
2717
  }
2693
2718
  },
2719
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2694
2720
  end: (model) => {
2695
2721
  element.setAttribute('transform', transform);
2696
2722
  if (!ele) {
@@ -2831,15 +2857,17 @@ function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
2831
2857
  /**
2832
2858
  * @param {string} id - Specifies the id
2833
2859
  * @param {string} text - Specifies the text
2834
- * @param {string} top - Specifies the top
2835
- * @param {string} left - Specifies the left
2860
+ * @param {number} top - Specifies the top
2861
+ * @param {number} left - Specifies the left
2836
2862
  * @param {ZoomToolbarTooltipSettingsModel} settings - Specifies the tooltip settings.
2837
2863
  * @returns {void}
2838
2864
  * @private
2839
2865
  */
2840
2866
  function createTooltip(id, text, top, left, settings) {
2841
2867
  let tooltip = getElement(id);
2868
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2842
2869
  const borderColor = getHexColor(settings.borderColor);
2870
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2843
2871
  const fontColor = getHexColor(settings.fontColor);
2844
2872
  const style = 'top:' + top.toString() + 'px;' +
2845
2873
  'left:' + left.toString() + 'px;' +
@@ -2866,11 +2894,15 @@ function createTooltip(id, text, top, left, settings) {
2866
2894
  }
2867
2895
  }
2868
2896
  /**
2897
+ * @param {string} color - Specifies the color
2898
+ * @returns {any} - Returns the color in rgb
2869
2899
  * @private
2870
2900
  */
2901
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2871
2902
  function getHexColor(color) {
2872
2903
  if (color.indexOf('#') !== -1 && color.toLowerCase().indexOf('rgb') === -1) {
2873
- let colorArray = (/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i).exec(color);
2904
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2905
+ const colorArray = (/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i).exec(color);
2874
2906
  return colorArray ? { r: parseInt(colorArray[1], 16), g: parseInt(colorArray[2], 16), b: parseInt(colorArray[3], 16) } : null;
2875
2907
  }
2876
2908
  else if (color.toLowerCase().indexOf('rgb') !== -1) {
@@ -3057,7 +3089,7 @@ function changeBorderWidth(element, index, scale, maps) {
3057
3089
  changeNavaigationLineWidth(childNode, index, scale, maps);
3058
3090
  }
3059
3091
  else if (childNode.id.indexOf('_Polygons_Group') > -1) {
3060
- for (var i = 0; i < childNode.childElementCount; i++) {
3092
+ for (let i = 0; i < childNode.childElementCount; i++) {
3061
3093
  // eslint-disable-next-line
3062
3094
  const width = maps.layersCollection[index].polygonSettings.polygons[parseInt(childNode.children[i].id.split('_PolygonIndex_')[1])].borderWidth;
3063
3095
  childNode.children[i].setAttribute('stroke-width', (width / scale).toString());
@@ -3066,7 +3098,6 @@ function changeBorderWidth(element, index, scale, maps) {
3066
3098
  else {
3067
3099
  let currentStroke;
3068
3100
  let value = 0;
3069
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3070
3101
  const borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
3071
3102
  const borderWidth = maps.layersCollection[index].shapeSettings.border.width;
3072
3103
  const circleRadius = maps.layersCollection[index].shapeSettings.circleRadius;
@@ -3267,13 +3298,12 @@ function zoomAnimate(element, delay, duration, point, scale, size, maps) {
3267
3298
  * @returns {void}
3268
3299
  * @private
3269
3300
  */
3270
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3271
3301
  function animate(element, delay, duration, process, end) {
3272
3302
  let start = null;
3273
3303
  // eslint-disable-next-line prefer-const
3274
3304
  let clearAnimation;
3275
3305
  const markerStyle = 'visibility:visible';
3276
- duration = animationMode === "Disable" ? 0 : duration;
3306
+ duration = animationMode === 'Disable' ? 0 : duration;
3277
3307
  const startAnimation = (timestamp) => {
3278
3308
  if (!start) {
3279
3309
  start = timestamp;
@@ -3375,6 +3405,7 @@ function compareZoomFactor(scaleFactor, maps) {
3375
3405
  * @param {number} mapWidth - Specifies the width of the maps
3376
3406
  * @param {number} mapHeight - Specifies the height of the maps
3377
3407
  * @param {Maps} maps - Specifies the instance of the maps
3408
+ * @param {boolean} isZoomToCoordinates - Checks for the zoom to coordinates
3378
3409
  * @returns {number} - Returns the scale factor
3379
3410
  * @private
3380
3411
  */
@@ -3416,7 +3447,7 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
3416
3447
  * @returns {any} - Returns the data value
3417
3448
  * @private
3418
3449
  */
3419
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3450
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
3420
3451
  function processResult(e) {
3421
3452
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3422
3453
  let dataValue;
@@ -3789,7 +3820,7 @@ function getThemeStyle(theme) {
3789
3820
  shapeFill: '#A6A6A6',
3790
3821
  rectangleZoomFillColor: '#d3d3d3',
3791
3822
  rectangleZoomFillOpacity: 0.5,
3792
- rectangleZoomBorderColor: "#009900"
3823
+ rectangleZoomBorderColor: '#009900'
3793
3824
  };
3794
3825
  break;
3795
3826
  case 'highcontrast':
@@ -3814,7 +3845,7 @@ function getThemeStyle(theme) {
3814
3845
  shapeFill: '#A6A6A6',
3815
3846
  rectangleZoomFillColor: '#d3d3d3',
3816
3847
  rectangleZoomFillOpacity: 0.5,
3817
- rectangleZoomBorderColor: "#009900"
3848
+ rectangleZoomBorderColor: '#009900'
3818
3849
  };
3819
3850
  break;
3820
3851
  case 'bootstrap4':
@@ -3842,7 +3873,7 @@ function getThemeStyle(theme) {
3842
3873
  shapeFill: '#A6A6A6',
3843
3874
  rectangleZoomFillColor: '#d3d3d3',
3844
3875
  rectangleZoomFillOpacity: 0.5,
3845
- rectangleZoomBorderColor: "#009900"
3876
+ rectangleZoomBorderColor: '#009900'
3846
3877
  };
3847
3878
  break;
3848
3879
  case 'tailwind':
@@ -3870,7 +3901,7 @@ function getThemeStyle(theme) {
3870
3901
  shapeFill: '#E5E7EB',
3871
3902
  rectangleZoomFillColor: '#d3d3d3',
3872
3903
  rectangleZoomFillOpacity: 0.5,
3873
- rectangleZoomBorderColor: "#009900"
3904
+ rectangleZoomBorderColor: '#009900'
3874
3905
  };
3875
3906
  break;
3876
3907
  case 'tailwinddark':
@@ -3898,7 +3929,7 @@ function getThemeStyle(theme) {
3898
3929
  shapeFill: '#374151',
3899
3930
  rectangleZoomFillColor: '#d3d3d3',
3900
3931
  rectangleZoomFillOpacity: 0.5,
3901
- rectangleZoomBorderColor: "#009900"
3932
+ rectangleZoomBorderColor: '#009900'
3902
3933
  };
3903
3934
  break;
3904
3935
  case 'bootstrap5':
@@ -3926,7 +3957,7 @@ function getThemeStyle(theme) {
3926
3957
  shapeFill: '#E9ECEF',
3927
3958
  rectangleZoomFillColor: '#d3d3d3',
3928
3959
  rectangleZoomFillOpacity: 0.5,
3929
- rectangleZoomBorderColor: "#009900"
3960
+ rectangleZoomBorderColor: '#009900'
3930
3961
  };
3931
3962
  break;
3932
3963
  case 'bootstrap5dark':
@@ -3954,7 +3985,7 @@ function getThemeStyle(theme) {
3954
3985
  shapeFill: '#495057',
3955
3986
  rectangleZoomFillColor: '#d3d3d3',
3956
3987
  rectangleZoomFillOpacity: 0.5,
3957
- rectangleZoomBorderColor: "#009900"
3988
+ rectangleZoomBorderColor: '#009900'
3958
3989
  };
3959
3990
  break;
3960
3991
  case 'fluent':
@@ -3982,7 +4013,7 @@ function getThemeStyle(theme) {
3982
4013
  shapeFill: '#F3F2F1',
3983
4014
  rectangleZoomFillColor: '#d3d3d3',
3984
4015
  rectangleZoomFillOpacity: 0.5,
3985
- rectangleZoomBorderColor: "#009900"
4016
+ rectangleZoomBorderColor: '#009900'
3986
4017
  };
3987
4018
  break;
3988
4019
  case 'fluentdark':
@@ -4010,7 +4041,7 @@ function getThemeStyle(theme) {
4010
4041
  shapeFill: '#252423',
4011
4042
  rectangleZoomFillColor: '#d3d3d3',
4012
4043
  rectangleZoomFillOpacity: 0.5,
4013
- rectangleZoomBorderColor: "#009900"
4044
+ rectangleZoomBorderColor: '#009900'
4014
4045
  };
4015
4046
  break;
4016
4047
  case 'material3':
@@ -4039,7 +4070,7 @@ function getThemeStyle(theme) {
4039
4070
  shapeFill: '#E7E0EC',
4040
4071
  rectangleZoomFillColor: '#6750A4',
4041
4072
  rectangleZoomFillOpacity: 0.24,
4042
- rectangleZoomBorderColor: "#6750A4"
4073
+ rectangleZoomBorderColor: '#6750A4'
4043
4074
  };
4044
4075
  break;
4045
4076
  case 'material3dark':
@@ -4068,7 +4099,7 @@ function getThemeStyle(theme) {
4068
4099
  shapeFill: '#49454F',
4069
4100
  rectangleZoomFillColor: '#D0BCFF',
4070
4101
  rectangleZoomFillOpacity: 0.24,
4071
- rectangleZoomBorderColor: "#D0BCFF"
4102
+ rectangleZoomBorderColor: '#D0BCFF'
4072
4103
  };
4073
4104
  break;
4074
4105
  default:
@@ -4093,7 +4124,7 @@ function getThemeStyle(theme) {
4093
4124
  shapeFill: '#A6A6A6',
4094
4125
  rectangleZoomFillColor: '#d3d3d3',
4095
4126
  rectangleZoomFillOpacity: 0.5,
4096
- rectangleZoomBorderColor: "#009900"
4127
+ rectangleZoomBorderColor: '#009900'
4097
4128
  };
4098
4129
  break;
4099
4130
  }
@@ -5048,7 +5079,7 @@ __decorate$1([
5048
5079
  * Gets or sets the options to customize the markers in the maps.
5049
5080
  */
5050
5081
  class MarkerSettings extends MarkerBase {
5051
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5082
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
5052
5083
  constructor(parent, propName, defaultValue, isArray) {
5053
5084
  super(parent, propName, defaultValue, isArray);
5054
5085
  }
@@ -5437,8 +5468,12 @@ class BingMap {
5437
5468
  * ColorMapping class
5438
5469
  */
5439
5470
  class ColorMapping {
5471
+ /* eslint-disable @typescript-eslint/no-unused-vars */
5472
+ /* eslint-disable @typescript-eslint/no-empty-function */
5440
5473
  constructor(maps) {
5441
5474
  }
5475
+ /* eslint-enable @typescript-eslint/no-unused-vars */
5476
+ /* eslint-enable @typescript-eslint/no-empty-function */
5442
5477
  /**
5443
5478
  * To get color based on shape settings.
5444
5479
  *
@@ -5864,7 +5899,7 @@ class LayerPanel {
5864
5899
  if (panel.mapObject.markerModule) {
5865
5900
  panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
5866
5901
  }
5867
- panel.translateLayerElements(panel.layerObject, layerIndex);
5902
+ panel.translateLayerElements(panel.layerObject);
5868
5903
  panel.layerGroup.appendChild(panel.layerObject);
5869
5904
  }
5870
5905
  processLayers(layer, layerIndex) {
@@ -5891,6 +5926,7 @@ class LayerPanel {
5891
5926
  cancel: false, name: layerRendering, index: layerIndex,
5892
5927
  layer: layer, maps: this.mapObject, visible: layer.visible
5893
5928
  };
5929
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5894
5930
  this.mapObject.trigger('layerRendering', eventArgs, (observedArgs) => {
5895
5931
  if (!eventArgs.cancel && eventArgs.visible) {
5896
5932
  if (layer.layerType === 'OSM') {
@@ -6016,9 +6052,8 @@ class LayerPanel {
6016
6052
  }
6017
6053
  this.rectBounds = null;
6018
6054
  const shapeSettings = this.currentLayer.shapeSettings;
6019
- const bubbleSettings = this.currentLayer.bubbleSettings;
6020
6055
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6021
- Array.prototype.forEach.call(renderData, (geometryData, index) => {
6056
+ Array.prototype.forEach.call(renderData, (geometryData) => {
6022
6057
  if (!isNullOrUndefined(geometryData['geometry']) || !isNullOrUndefined(geometryData['coordinates'])) {
6023
6058
  const type = !isNullOrUndefined(geometryData['geometry']) ? geometryData['geometry']['type'] : geometryData['type'];
6024
6059
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6225,7 +6260,7 @@ class LayerPanel {
6225
6260
  const circleRadius = (this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (this.mapObject.isTileMap ? this.mapObject.scale : this.currentFactor);
6226
6261
  circleOptions = new CircleOption((shapeID + '_multiLine_' + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6227
6262
  pathEle = this.mapObject.renderer.drawCircle(circleOptions);
6228
- this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6263
+ this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData);
6229
6264
  });
6230
6265
  break;
6231
6266
  case 'Path':
@@ -6235,7 +6270,7 @@ class LayerPanel {
6235
6270
  break;
6236
6271
  }
6237
6272
  if (!isNullOrUndefined(pathEle) && drawingType !== 'MultiPoint') {
6238
- this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6273
+ this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData);
6239
6274
  }
6240
6275
  if (i === this.currentLayer.layerData.length - 1) {
6241
6276
  this.layerFeatures(layerIndex, colors, renderData, labelTemplateEle);
@@ -6256,12 +6291,11 @@ class LayerPanel {
6256
6291
  * @param {Element} pathEle - Specifies the svg element.
6257
6292
  * @param {string} drawingType - Specifies the data type.
6258
6293
  * @param {any} currentShapeData - Specifies the layer of shapedata.
6259
- * @param {number} index - Specifies the tab index.
6260
6294
  * @returns {void}
6261
6295
  */
6262
6296
  pathAttributeCalculate(groupElement, pathEle, drawingType,
6263
6297
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6264
- currentShapeData, index) {
6298
+ currentShapeData) {
6265
6299
  const property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
6266
6300
  this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
6267
6301
  let properties;
@@ -6305,7 +6339,7 @@ class LayerPanel {
6305
6339
  *
6306
6340
  * @param {number} layerIndex - Specifies the layer index
6307
6341
  * @param {string[]} colors - Specifies the colors
6308
- * @param {Object[]} renderData - Specifies the render data
6342
+ * @param {any[]} renderData - Specifies the render data
6309
6343
  * @param {HTMLElement} labelTemplateEle - Specifies the label template element
6310
6344
  * @returns {void}
6311
6345
  */
@@ -6314,7 +6348,8 @@ class LayerPanel {
6314
6348
  layerIndex, colors, renderData, labelTemplateEle) {
6315
6349
  let bubbleG;
6316
6350
  if (this.mapObject.polygonModule) {
6317
- this.groupElements.push(this.mapObject.polygonModule.polygonRender(this.mapObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor) : this.currentFactor)));
6351
+ this.groupElements.push(this.mapObject.polygonModule.polygonRender(this.mapObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
6352
+ : this.currentFactor)));
6318
6353
  }
6319
6354
  if (this.currentLayer.bubbleSettings.length && this.mapObject.bubbleModule) {
6320
6355
  const length = this.currentLayer.bubbleSettings.length;
@@ -6328,7 +6363,6 @@ class LayerPanel {
6328
6363
  this.bubbleCalculation(bubble, range);
6329
6364
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6330
6365
  const bubbleDataSource = bubble.dataSource;
6331
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6332
6366
  this.mapObject.bubbleModule.bubbleCollection = [];
6333
6367
  bubbleDataSource.map((bubbleData, i) => {
6334
6368
  this.renderBubble(this.currentLayer, bubbleData, colors[i % colors.length], range, j, i, bubbleG, layerIndex, bubble);
@@ -6362,7 +6396,7 @@ class LayerPanel {
6362
6396
  this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor) :
6363
6397
  this.currentFactor), null);
6364
6398
  }
6365
- this.translateLayerElements(this.layerObject, layerIndex);
6399
+ this.translateLayerElements(this.layerObject);
6366
6400
  this.layerGroup.appendChild(this.layerObject);
6367
6401
  }
6368
6402
  /**
@@ -6411,6 +6445,8 @@ class LayerPanel {
6411
6445
  * @param {object} bubbleData - Specifies the bubble data
6412
6446
  * @param {string} color - Specifies the color
6413
6447
  * @param {number} range - Specifies the range
6448
+ * @param {number} range.min - Specifies the minimum range
6449
+ * @param {number} range.max - Specifies the maximum range
6414
6450
  * @param {number} bubbleIndex - Specifies the bubble index
6415
6451
  * @param {number} dataIndex - Specifies the data index
6416
6452
  * @param {number} group - Specifies the group
@@ -6433,9 +6469,9 @@ class LayerPanel {
6433
6469
  * To get the shape color from color mapping module
6434
6470
  *
6435
6471
  * @param {LayerSettingsModel} layer - Specifies the layer
6436
- * @param {object} shape - Specifies the shape
6472
+ * @param {any} shape - Specifies the shape
6437
6473
  * @param {string} color - Specifies the color
6438
- * @returns {Object} - Returns the object
6474
+ * @returns {any} - Returns the object
6439
6475
  */
6440
6476
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6441
6477
  getShapeColorMapping(layer, shape, color) {
@@ -6460,7 +6496,7 @@ class LayerPanel {
6460
6496
  switch (type.toLowerCase()) {
6461
6497
  case 'polygon':
6462
6498
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6463
- newData = this.calculatePolygonBox(coordinates[0], data, properties);
6499
+ newData = this.calculatePolygonBox(coordinates[0]);
6464
6500
  if (newData.length > 0) {
6465
6501
  newData['property'] = properties;
6466
6502
  newData['type'] = type;
@@ -6474,7 +6510,7 @@ class LayerPanel {
6474
6510
  for (let i = 0; i < coordinates.length; i++) {
6475
6511
  for (let j = 0; j < coordinates[i].length; j++) {
6476
6512
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6477
- newData = this.calculatePolygonBox(coordinates[i][j], data, properties);
6513
+ newData = this.calculatePolygonBox(coordinates[i][j]);
6478
6514
  if (newData.length > 0) {
6479
6515
  multiPolygonDatas.push(newData);
6480
6516
  }
@@ -6618,7 +6654,7 @@ class LayerPanel {
6618
6654
  }
6619
6655
  return (Math.min(verFactor, horFactor));
6620
6656
  }
6621
- translateLayerElements(layerElement, index) {
6657
+ translateLayerElements(layerElement) {
6622
6658
  let childNode;
6623
6659
  this.mapObject.translateType = 'layer';
6624
6660
  if (!isNullOrUndefined(this.mapObject.baseMapRectBounds)) {
@@ -6678,7 +6714,7 @@ class LayerPanel {
6678
6714
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6679
6715
  calculateRectBounds(layerData) {
6680
6716
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6681
- Array.prototype.forEach.call(layerData, (obj, index) => {
6717
+ Array.prototype.forEach.call(layerData, (obj) => {
6682
6718
  if (!isNullOrUndefined(obj['geometry']) || !isNullOrUndefined(obj['coordinates'])) {
6683
6719
  const type = !isNullOrUndefined(obj['geometry']) ? obj['geometry']['type'] : obj['type'];
6684
6720
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6690,13 +6726,13 @@ class LayerPanel {
6690
6726
  break;
6691
6727
  case 'multipolygon':
6692
6728
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6693
- coordinates.map((point, index) => {
6729
+ coordinates.map((point) => {
6694
6730
  this.calculateRectBox(point[0]);
6695
6731
  });
6696
6732
  break;
6697
6733
  case 'multilinestring':
6698
6734
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6699
- coordinates.map((multiPoint, index) => {
6735
+ coordinates.map((multiPoint) => {
6700
6736
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6701
6737
  multiPoint.map((point, index) => {
6702
6738
  this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
@@ -6723,7 +6759,7 @@ class LayerPanel {
6723
6759
  });
6724
6760
  }
6725
6761
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6726
- calculatePolygonBox(coordinates, data, properties) {
6762
+ calculatePolygonBox(coordinates) {
6727
6763
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6728
6764
  const newData = [];
6729
6765
  const bounds = this.mapObject.baseMapBounds;
@@ -6873,121 +6909,126 @@ class LayerPanel {
6873
6909
  }
6874
6910
  }
6875
6911
  arrangeTiles(type, x, y) {
6876
- const element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6877
- const element1 = document.getElementById(this.mapObject.element.id + '_tiles');
6878
6912
  let timeOut;
6879
6913
  if (!isNullOrUndefined(type) && type !== 'Pan') {
6880
6914
  this.tileAnimation(type, x, y);
6881
6915
  timeOut = animationMode === 'Disable' ? 0 : (this.mapObject.layersCollection[0].animationDuration === 0 &&
6882
6916
  animationMode === 'Enable') ? 1000 : this.mapObject.layersCollection[0].animationDuration;
6883
6917
  }
6884
- else {
6885
- timeOut = 0;
6886
- }
6887
6918
  if (this.mapObject.layers[this.mapObject.baseLayerIndex].layerType === 'GoogleStaticMap') {
6888
6919
  this.renderGoogleMap(this.mapObject.layers[0].key, this.mapObject.staticMapZoom);
6889
6920
  }
6890
6921
  else {
6891
- setTimeout(() => {
6892
- if (element) {
6893
- element.style.zIndex = '1';
6894
- }
6895
- if (element1) {
6896
- element1.style.zIndex = '0';
6922
+ if (type === 'Pan') {
6923
+ this.arrangeTilesLayer(type);
6924
+ }
6925
+ else {
6926
+ setTimeout(() => {
6927
+ this.arrangeTilesLayer(type);
6928
+ }, timeOut);
6929
+ }
6930
+ }
6931
+ }
6932
+ arrangeTilesLayer(type) {
6933
+ const element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6934
+ const element1 = document.getElementById(this.mapObject.element.id + '_tiles');
6935
+ if (element) {
6936
+ element.style.zIndex = '1';
6937
+ }
6938
+ if (element1) {
6939
+ element1.style.zIndex = '0';
6940
+ }
6941
+ let animateElement;
6942
+ if (!document.getElementById(this.mapObject.element.id + '_animated_tiles') && element) {
6943
+ animateElement = createElement('div', { id: this.mapObject.element.id + '_animated_tiles' });
6944
+ element.appendChild(animateElement);
6945
+ }
6946
+ else {
6947
+ if (type !== 'Pan' && element1 && element) {
6948
+ element1.appendChild(element.children[0]);
6949
+ if (!this.mapObject.isAddLayer && !isNullOrUndefined(document.getElementById(this.mapObject.element.id + '_animated_tiles'))) {
6950
+ document.getElementById(this.mapObject.element.id + '_animated_tiles').id =
6951
+ this.mapObject.element.id + '_animated_tiles_old';
6897
6952
  }
6898
- let animateElement;
6899
- if (!document.getElementById(this.mapObject.element.id + '_animated_tiles') && element) {
6900
- animateElement = createElement('div', { id: this.mapObject.element.id + '_animated_tiles' });
6901
- element.appendChild(animateElement);
6953
+ animateElement = createElement('div', { id: this.mapObject.element.id + '_animated_tiles' });
6954
+ element.appendChild(animateElement);
6955
+ }
6956
+ else {
6957
+ animateElement = element ? element.children[0] : null;
6958
+ }
6959
+ }
6960
+ for (let id = 0; id < this.tiles.length; id++) {
6961
+ const tile = this.tiles[id];
6962
+ let imgElement = null;
6963
+ const mapId = this.mapObject.element.id;
6964
+ if (type === 'Pan') {
6965
+ let child = document.getElementById(mapId + '_tile_' + id);
6966
+ let isNewTile = false;
6967
+ if (isNullOrUndefined(child)) {
6968
+ isNewTile = true;
6969
+ child = createElement('div', { id: mapId + '_tile_' + id });
6970
+ imgElement = createElement('img');
6902
6971
  }
6903
6972
  else {
6904
- if (type !== 'Pan' && element1 && element) {
6905
- element1.appendChild(element.children[0]);
6906
- if (!this.mapObject.isAddLayer && !isNullOrUndefined(document.getElementById(this.mapObject.element.id + '_animated_tiles'))) {
6907
- document.getElementById(this.mapObject.element.id + '_animated_tiles').id =
6908
- this.mapObject.element.id + '_animated_tiles_old';
6909
- }
6910
- animateElement = createElement('div', { id: this.mapObject.element.id + '_animated_tiles' });
6911
- element.appendChild(animateElement);
6912
- }
6913
- else {
6914
- animateElement = element ? element.children[0] : null;
6915
- }
6973
+ child.style.removeProperty('display');
6974
+ imgElement = child.children[0];
6975
+ }
6976
+ if (!isNewTile && imgElement && imgElement.src !== tile.src) {
6977
+ imgElement.src = tile.src;
6978
+ }
6979
+ child.style.position = 'absolute';
6980
+ child.style.left = tile.left + 'px';
6981
+ child.style.top = tile.top + 'px';
6982
+ child.style.height = tile.height + 'px';
6983
+ child.style.width = tile.width + 'px';
6984
+ if (isNewTile) {
6985
+ imgElement.setAttribute('height', '256px');
6986
+ imgElement.setAttribute('width', '256px');
6987
+ imgElement.setAttribute('src', tile.src);
6988
+ imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
6989
+ imgElement.style.setProperty('user-select', 'none');
6990
+ child.appendChild(imgElement);
6991
+ animateElement.appendChild(child);
6916
6992
  }
6917
- for (let id = 0; id < this.tiles.length; id++) {
6918
- const tile = this.tiles[id];
6919
- let imgElement = null;
6920
- const mapId = this.mapObject.element.id;
6921
- if (type === 'Pan') {
6922
- let child = document.getElementById(mapId + '_tile_' + id);
6923
- let isNewTile = false;
6924
- if (isNullOrUndefined(child)) {
6925
- isNewTile = true;
6926
- child = createElement('div', { id: mapId + '_tile_' + id });
6927
- imgElement = createElement('img');
6928
- }
6929
- else {
6930
- child.style.removeProperty('display');
6931
- imgElement = child.children[0];
6932
- }
6933
- if (!isNewTile && imgElement && imgElement.src !== tile.src) {
6934
- imgElement.src = tile.src;
6935
- }
6936
- child.style.position = 'absolute';
6937
- child.style.left = tile.left + 'px';
6938
- child.style.top = tile.top + 'px';
6939
- child.style.height = tile.height + 'px';
6940
- child.style.width = tile.width + 'px';
6941
- if (isNewTile) {
6942
- imgElement.setAttribute('height', '256px');
6943
- imgElement.setAttribute('width', '256px');
6944
- imgElement.setAttribute('src', tile.src);
6945
- imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
6946
- imgElement.style.setProperty('user-select', 'none');
6947
- child.appendChild(imgElement);
6948
- animateElement.appendChild(child);
6949
- }
6950
- }
6951
- else {
6952
- imgElement = createElement('img');
6953
- imgElement.setAttribute('height', '256px');
6954
- imgElement.setAttribute('width', '256px');
6955
- imgElement.setAttribute('src', tile.src);
6956
- imgElement.style.setProperty('user-select', 'none');
6957
- imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
6958
- const child = createElement('div', { id: mapId + '_tile_' + id });
6959
- child.style.position = 'absolute';
6960
- child.style.left = tile.left + 'px';
6961
- child.style.top = tile.top + 'px';
6962
- child.style.height = tile.height + 'px';
6963
- child.style.width = tile.width + 'px';
6964
- child.appendChild(imgElement);
6965
- if (animateElement) {
6966
- animateElement.appendChild(child);
6967
- }
6968
- }
6969
- if (id === (this.tiles.length - 1) && document.getElementById(this.mapObject.element.id + '_animated_tiles_old')) {
6970
- removeElement(this.mapObject.element.id + '_animated_tiles_old');
6993
+ }
6994
+ else {
6995
+ imgElement = createElement('img');
6996
+ imgElement.setAttribute('height', '256px');
6997
+ imgElement.setAttribute('width', '256px');
6998
+ imgElement.setAttribute('src', tile.src);
6999
+ imgElement.style.setProperty('user-select', 'none');
7000
+ imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
7001
+ const child = createElement('div', { id: mapId + '_tile_' + id });
7002
+ child.style.position = 'absolute';
7003
+ child.style.left = tile.left + 'px';
7004
+ child.style.top = tile.top + 'px';
7005
+ child.style.height = tile.height + 'px';
7006
+ child.style.width = tile.width + 'px';
7007
+ child.appendChild(imgElement);
7008
+ if (animateElement) {
7009
+ animateElement.appendChild(child);
7010
+ }
7011
+ }
7012
+ if (id === (this.tiles.length - 1) && document.getElementById(this.mapObject.element.id + '_animated_tiles_old')) {
7013
+ removeElement(this.mapObject.element.id + '_animated_tiles_old');
7014
+ }
7015
+ }
7016
+ if (!isNullOrUndefined(this.mapObject.currentTiles)) {
7017
+ for (let l = this.tiles.length; l < animateElement.childElementCount; l++) {
7018
+ let isExistingElement = false;
7019
+ for (let a = 0; a < this.mapObject.currentTiles.childElementCount; a++) {
7020
+ if (!isExistingElement &&
7021
+ this.mapObject.currentTiles.children[a].id === animateElement.children[l].id) {
7022
+ isExistingElement = true;
6971
7023
  }
6972
7024
  }
6973
- if (!isNullOrUndefined(this.mapObject.currentTiles)) {
6974
- for (let l = this.tiles.length; l < animateElement.childElementCount; l++) {
6975
- let isExistingElement = false;
6976
- for (let a = 0; a < this.mapObject.currentTiles.childElementCount; a++) {
6977
- if (!isExistingElement &&
6978
- this.mapObject.currentTiles.children[a].id === animateElement.children[l].id) {
6979
- isExistingElement = true;
6980
- }
6981
- }
6982
- if (isExistingElement) {
6983
- animateElement.children[l].style.display = 'none';
6984
- }
6985
- else {
6986
- animateElement.removeChild(animateElement.children[l]);
6987
- }
6988
- }
7025
+ if (isExistingElement) {
7026
+ animateElement.children[l].style.display = 'none';
7027
+ }
7028
+ else {
7029
+ animateElement.removeChild(animateElement.children[l]);
6989
7030
  }
6990
- }, timeOut);
7031
+ }
6991
7032
  }
6992
7033
  }
6993
7034
  /**
@@ -7179,10 +7220,14 @@ class Annotations {
7179
7220
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7180
7221
  this.map.renderReactTemplates();
7181
7222
  }
7182
- // eslint-disable-next-line valid-jsdoc
7183
7223
  /**
7184
7224
  * To create annotation elements
7185
7225
  *
7226
+ * @param {HTMLElement} parentElement - Specifies the parent element in the map.
7227
+ * @param {Annotation} annotation - Specifies the options for customizing the annotation element in maps.
7228
+ * @param {number} annotationIndex - Specifies the index of the annotation.
7229
+ * @returns {void}
7230
+ *
7186
7231
  * @private
7187
7232
  */
7188
7233
  createAnnotationTemplate(parentElement, annotation, annotationIndex) {
@@ -7193,7 +7238,6 @@ class Annotations {
7193
7238
  const map = this.map;
7194
7239
  let templateElement;
7195
7240
  const availSize = map.availableSize;
7196
- const id = map.element.id + '_Annotation_' + annotationIndex;
7197
7241
  const childElement = createElement('div', {
7198
7242
  id: map.element.id + '_Annotation_' + annotationIndex
7199
7243
  });
@@ -7202,6 +7246,7 @@ class Annotations {
7202
7246
  cancel: false, name: annotationRendering, content: annotation.content,
7203
7247
  annotation: annotation
7204
7248
  };
7249
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
7205
7250
  this.map.trigger(annotationRendering, argsData, (annotationArgs) => {
7206
7251
  if (argsData.cancel) {
7207
7252
  return;
@@ -7571,15 +7616,18 @@ let Maps = class Maps extends Component {
7571
7616
  }
7572
7617
  });
7573
7618
  }
7574
- /* eslint-disable @typescript-eslint/no-explicit-any */
7619
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7575
7620
  processAjaxRequest(layer, localAjax, type) {
7576
7621
  this.serverProcess['request']++;
7577
7622
  const fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
7623
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7578
7624
  fetchApiModule.onSuccess = (args) => {
7579
7625
  if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
7580
7626
  const reader = new FileReader();
7627
+ //eslint-disable-next-line @typescript-eslint/no-this-alias
7581
7628
  const map = this;
7582
- reader.onload = function (data) {
7629
+ // eslint-disable-next-line @typescript-eslint/tslint/config
7630
+ reader.onload = function () {
7583
7631
  args = JSON.parse(reader.result.toString());
7584
7632
  map.processResponseJsonData('Fetch', args, layer, type);
7585
7633
  };
@@ -7601,13 +7649,17 @@ let Maps = class Maps extends Component {
7601
7649
  * @returns {void}
7602
7650
  * @private
7603
7651
  */
7604
- processResponseJsonData(processType, data, layer, dataType) {
7652
+ processResponseJsonData(processType,
7653
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7654
+ data, layer, dataType) {
7605
7655
  this.serverProcess['response']++;
7606
7656
  if (processType) {
7607
7657
  if (dataType === 'ShapeData') {
7658
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7608
7659
  layer.shapeData = (processType === 'DataManager') ? processResult(data) : data;
7609
7660
  }
7610
7661
  else {
7662
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7611
7663
  layer.dataSource = (processType === 'DataManager') ? processResult(data) : data;
7612
7664
  }
7613
7665
  }
@@ -7746,12 +7798,14 @@ let Maps = class Maps extends Component {
7746
7798
  triggerZoomEvent() {
7747
7799
  let loadedArgs;
7748
7800
  const minMaxLatitudeLongitude = this.getMinMaxLatitudeLongitude();
7801
+ // eslint-disable-next-line prefer-const
7749
7802
  loadedArgs = {
7750
7803
  maps: this, isResized: this.isResize, minLatitude: minMaxLatitudeLongitude.minLatitude,
7751
7804
  maxLatitude: minMaxLatitudeLongitude.maxLatitude, minLongitude: minMaxLatitudeLongitude.minLongitude,
7752
7805
  maxLongitude: minMaxLatitudeLongitude.maxLongitude, cancel: false, name: 'Loaded'
7753
7806
  };
7754
7807
  this.trigger('loaded', loadedArgs);
7808
+ //eslint-enable @typescript-eslint/prefer-const
7755
7809
  }
7756
7810
  /**
7757
7811
  * To apply color to the initial selected marker
@@ -7759,7 +7813,7 @@ let Maps = class Maps extends Component {
7759
7813
  * @param {SelectionSettingsModel} selectionSettings - Specifies the selection settings
7760
7814
  * @param {Maps} map - Specifies the instance of the maps
7761
7815
  * @param {Element} targetElement - Specifies the target element
7762
- * @param {any} data - Specifies the data
7816
+ * @param {object} data - Specifies the data
7763
7817
  * @returns {void}
7764
7818
  * @private
7765
7819
  */
@@ -7810,6 +7864,7 @@ let Maps = class Maps extends Component {
7810
7864
  const selectionSettings = markerSettings.selectionSettings;
7811
7865
  if (selectionSettings.enable) {
7812
7866
  for (let i = 0; i < markerSettings.dataSource['length']; i++) {
7867
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7813
7868
  const data = markerSettings.dataSource[i];
7814
7869
  if (data['latitude'] === latitude && data['longitude'] === longitude) {
7815
7870
  const targetId = this.element.id + '_' + 'LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex +
@@ -7847,11 +7902,11 @@ let Maps = class Maps extends Component {
7847
7902
  this.element.tabIndex = this.tabIndex;
7848
7903
  }
7849
7904
  setSecondaryElementPosition() {
7850
- let element = getElementByID(this.element.id + '_Secondary_Element');
7851
- let rect = this.element.getBoundingClientRect();
7852
- let svgElement = getElementByID(this.element.id + '_svg');
7905
+ const element = getElementByID(this.element.id + '_Secondary_Element');
7906
+ const rect = this.element.getBoundingClientRect();
7907
+ const svgElement = getElementByID(this.element.id + '_svg');
7853
7908
  if (!isNullOrUndefined(svgElement)) {
7854
- let svgRect = svgElement.getBoundingClientRect();
7909
+ const svgRect = svgElement.getBoundingClientRect();
7855
7910
  element.style.left = Math.max(svgRect.left - rect.left, 0) + 'px';
7856
7911
  element.style.top = Math.max(svgRect.top - rect.top, 0) + 'px';
7857
7912
  }
@@ -7931,8 +7986,10 @@ let Maps = class Maps extends Component {
7931
7986
  const mapsElement = document.getElementById(this.element.id);
7932
7987
  if (!isNullOrUndefined(mapsElement)) {
7933
7988
  const element = mapsElement.getBoundingClientRect();
7934
- let minPosition = this.isTileMap ? this.pointToLatLong((this.mapAreaRect.x - this.margin.left), -this.mapAreaRect.y) : this.getGeoLocation(0, (this.mapAreaRect.x + element.left), this.mapAreaRect.y);
7935
- let maxPosition = this.isTileMap ? this.pointToLatLong(this.mapAreaRect.width, (this.mapAreaRect.height - this.mapAreaRect.y)) :
7989
+ const minPosition = this.isTileMap ?
7990
+ this.pointToLatLong((this.mapAreaRect.x - this.margin.left), -this.mapAreaRect.y) :
7991
+ this.getGeoLocation(0, (this.mapAreaRect.x + element.left), this.mapAreaRect.y);
7992
+ const maxPosition = this.isTileMap ? this.pointToLatLong(this.mapAreaRect.width, (this.mapAreaRect.height - this.mapAreaRect.y)) :
7936
7993
  this.getGeoLocation(0, (this.mapAreaRect.x + element.left + this.mapAreaRect.width), (this.mapAreaRect.y + this.mapAreaRect.height));
7937
7994
  const MinMaxLatitudeLongitude = {
7938
7995
  minLatitude: minPosition.latitude, maxLatitude: maxPosition.latitude, minLongitude: minPosition.longitude,
@@ -7956,7 +8013,7 @@ let Maps = class Maps extends Component {
7956
8013
  const templateElements = document.getElementsByClassName(this.element.id + '_template');
7957
8014
  if (!isNullOrUndefined(templateElements) && templateElements.length > 0 &&
7958
8015
  getElementByID(this.element.id + '_Layer_Collections') && !this.isTileMap) {
7959
- Array.prototype.forEach.call(templateElements, (templateGroupEle, i) => {
8016
+ Array.prototype.forEach.call(templateElements, (templateGroupEle) => {
7960
8017
  let offSetLetValue = 0;
7961
8018
  let offSetTopValue = 0;
7962
8019
  if (!isNullOrUndefined(templateGroupEle) && templateGroupEle.childElementCount > 0) {
@@ -7968,9 +8025,9 @@ let Maps = class Maps extends Component {
7968
8025
  offSetTopValue = this.isTileMap ? 0 : (layerOffset.top < elementOffset.top) ?
7969
8026
  -(Math.abs(elementOffset.top - layerOffset.top)) : Math.abs(elementOffset.top - layerOffset.top);
7970
8027
  }
7971
- Array.prototype.forEach.call(templateGroupEle.childNodes, (currentTemplate, j) => {
8028
+ Array.prototype.forEach.call(templateGroupEle.childNodes, (currentTemplate) => {
7972
8029
  if (currentTemplate.id.indexOf('Marker') !== -1) {
7973
- if (currentTemplate.style.visibility != "hidden") {
8030
+ if (currentTemplate.style.visibility !== 'hidden') {
7974
8031
  const elementOffset = getElementByID(currentTemplate.id).getBoundingClientRect();
7975
8032
  currentTemplate.style.left = parseFloat(currentTemplate.style.left) - (this.isTileMap ? 0 : elementOffset.width / 2) + 'px';
7976
8033
  currentTemplate.style.top = parseFloat(currentTemplate.style.top) - (this.isTileMap ? 0 : elementOffset.height / 2) + 'px';
@@ -8028,6 +8085,7 @@ let Maps = class Maps extends Component {
8028
8085
  }
8029
8086
  findBaseAndSubLayers() {
8030
8087
  const baseIndex = this.baseLayerIndex;
8088
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8031
8089
  const mainLayers = [];
8032
8090
  const subLayers = [];
8033
8091
  this.layersCollection = [];
@@ -8202,6 +8260,7 @@ let Maps = class Maps extends Component {
8202
8260
  * @returns {void}
8203
8261
  * @private
8204
8262
  */
8263
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
8205
8264
  mouseLeaveOnMap(e) {
8206
8265
  if (document.getElementsByClassName('highlightMapStyle').length > 0 && this.legendModule) {
8207
8266
  this.legendModule.removeShapeHighlightCollection();
@@ -8227,7 +8286,7 @@ let Maps = class Maps extends Component {
8227
8286
  keyboardHighlightSelection(id, key) {
8228
8287
  const layerIndex = parseInt(id.split('_LayerIndex_')[1].split('_')[0], 10);
8229
8288
  const shapeIndex = parseInt(id.split('_shapeIndex_')[1].split('_')[0], 10);
8230
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8289
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
8231
8290
  const shapeData = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
8232
8291
  this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
8233
8292
  const dataIndex = parseInt(id.split('_dataIndex_')[1].split('_')[0], 10);
@@ -8356,11 +8415,13 @@ let Maps = class Maps extends Component {
8356
8415
  };
8357
8416
  if (this.onclick) {
8358
8417
  eventArgs.name = onclick;
8418
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8359
8419
  this.trigger('onclick', eventArgs, (mouseArgs) => {
8360
8420
  this.clickHandler(e, eventArgs, targetEle);
8361
8421
  });
8362
8422
  }
8363
8423
  else {
8424
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8364
8425
  this.trigger('click', eventArgs, (mouseArgs) => {
8365
8426
  this.clickHandler(e, eventArgs, targetEle);
8366
8427
  });
@@ -8405,7 +8466,7 @@ let Maps = class Maps extends Component {
8405
8466
  }
8406
8467
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8407
8468
  getMarkerClickLocation(pageX, pageY, x, y, marker$$1, isDragEnd) {
8408
- document.getElementById(this.element.id + "_svg").style.cursor = 'grabbing';
8469
+ document.getElementById(this.element.id + '_svg').style.cursor = 'grabbing';
8409
8470
  const targetElement = getElement(marker$$1.targetId);
8410
8471
  let latLongValue = this.getClickLocation(marker$$1.targetId, pageX, pageY, targetElement, x, y);
8411
8472
  const location = (this.isTileMap) ? convertTileLatLongToPoint(new MapLocation(latLongValue.longitude, latLongValue.latitude), this.tileZoomLevel, this.tileTranslatePoint, true) : convertGeoToPoint(latLongValue.latitude, latLongValue.longitude, this.mapLayerPanel.currentFactor, this.layersCollection[marker$$1.layerIndex], this);
@@ -8424,9 +8485,24 @@ let Maps = class Maps extends Component {
8424
8485
  }
8425
8486
  return latLongValue;
8426
8487
  }
8427
- /** @private */
8488
+ /**
8489
+ * Gets the location of the mouse click
8490
+ *
8491
+ * @param {string} targetId - Specifies the ID for the target.
8492
+ * @param {number} pageX - Defines the page X position.
8493
+ * @param {number} pageY - Defines the page Y position.
8494
+ * @param {HTMLElement} targetElement - Specifies the target element on the event.
8495
+ * @param {number} x - Defines the x position in pixel.
8496
+ * @param {number} y - Defines the y position in pixel.
8497
+ * @param {string} type - Specifies the type.
8498
+ * @returns {GeoPosition} - Returns the position of the event
8499
+ *
8500
+ * @private
8501
+ *
8502
+ */
8428
8503
  getClickLocation(targetId, pageX, pageY, targetElement, x, y, type) {
8429
8504
  let layerIndex = 0;
8505
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8430
8506
  let latLongValue;
8431
8507
  if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap && (!isNullOrUndefined(type) ||
8432
8508
  ((parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
@@ -8434,6 +8510,7 @@ let Maps = class Maps extends Component {
8434
8510
  layerIndex = parseFloat(targetId.split('_LayerIndex_')[1].split('_')[0]);
8435
8511
  if (this.layers[layerIndex].geometryType === 'Normal') {
8436
8512
  if (targetId.indexOf('_shapeIndex_') > -1) {
8513
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8437
8514
  const immediateParent = targetElement.parentElement;
8438
8515
  const parentElement = immediateParent.id.indexOf('_Point_Group') > -1 || immediateParent.id.indexOf('_LineString_Group') > -1
8439
8516
  || immediateParent.id.indexOf('_MultiLineString_Group') > -1 || immediateParent.id.indexOf('_Polygon_Group') > -1 ?
@@ -8447,9 +8524,11 @@ let Maps = class Maps extends Component {
8447
8524
  longitude: Math.abs((location.x / zoomScaleValue) + this.baseMapBounds.longitude.min)
8448
8525
  };
8449
8526
  if (this.baseMapBounds.longitude.min < 0 && minLongitude > location.x) {
8527
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8450
8528
  latLongValue.longitude = -latLongValue.longitude;
8451
8529
  }
8452
8530
  if (this.baseMapBounds.latitude.min < 0 && minLatitude > location.y) {
8531
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8453
8532
  latLongValue.latitude = -latLongValue.latitude;
8454
8533
  }
8455
8534
  }
@@ -8457,6 +8536,7 @@ let Maps = class Maps extends Component {
8457
8536
  const markerIndex = parseInt(targetId.split('_MarkerIndex_')[1].split('_')[0], 10);
8458
8537
  const dataIndex = parseInt(targetId.split('_dataIndex_')[1].split('_')[0], 10);
8459
8538
  if (!isNaN(markerIndex) && !isNaN(dataIndex)) {
8539
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8460
8540
  const dataObject = this.layers[layerIndex].markerSettings[markerIndex].dataSource[dataIndex];
8461
8541
  latLongValue = { latitude: dataObject['latitude'], longitude: dataObject.longitude };
8462
8542
  }
@@ -8471,13 +8551,17 @@ let Maps = class Maps extends Component {
8471
8551
  const minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * this.mapLayerPanel.currentFactor);
8472
8552
  const minLatitude = Math.abs(this.baseMapBounds.latitude.max * this.mapLayerPanel.currentFactor);
8473
8553
  latLongValue = {
8474
- latitude: Math.abs(this.baseMapBounds.latitude.max - (location.y / (this.mapLayerPanel.currentFactor * this.scale))),
8475
- longitude: Math.abs((location.x / (this.mapLayerPanel.currentFactor * this.scale)) + this.baseMapBounds.longitude.min)
8554
+ latitude: Math.abs(this.baseMapBounds.latitude.max
8555
+ - (location.y / (this.mapLayerPanel.currentFactor * this.scale))),
8556
+ longitude: Math.abs((location.x / (this.mapLayerPanel.currentFactor * this.scale))
8557
+ + this.baseMapBounds.longitude.min)
8476
8558
  };
8477
8559
  if (this.baseMapBounds.longitude.min < 0 && minLongitude > location.x) {
8560
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8478
8561
  latLongValue.longitude = -latLongValue.longitude;
8479
8562
  }
8480
8563
  if (this.baseMapBounds.latitude.min < 0 && minLatitude > location.y) {
8564
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8481
8565
  latLongValue.latitude = -latLongValue.latitude;
8482
8566
  }
8483
8567
  }
@@ -8513,25 +8597,17 @@ let Maps = class Maps extends Component {
8513
8597
  * @private
8514
8598
  */
8515
8599
  mouseEndOnMap(e) {
8516
- const targetEle = e.target;
8517
- const targetId = targetEle.id;
8518
8600
  let pageX;
8519
- let latitude = null;
8520
- let longitude = null;
8521
8601
  let pageY;
8522
- let target;
8523
8602
  let touchArg;
8524
8603
  let layerX = 0;
8525
8604
  let layerY = 0;
8526
- const rect = this.element.getBoundingClientRect();
8527
- const element = e.target;
8528
8605
  if (e.type.indexOf('touch') !== -1) {
8529
8606
  this.isTouch = true;
8530
8607
  touchArg = e;
8531
8608
  layerX = pageX = touchArg.changedTouches[0].pageX;
8532
8609
  pageY = touchArg.changedTouches[0].pageY;
8533
8610
  layerY = pageY - (this.isTileMap ? 10 : 0);
8534
- target = touchArg.target;
8535
8611
  this.mouseClickEvent = { x: pageX, y: pageY };
8536
8612
  }
8537
8613
  else {
@@ -8540,19 +8616,11 @@ let Maps = class Maps extends Component {
8540
8616
  pageY = e.pageY;
8541
8617
  layerX = e['layerX'];
8542
8618
  layerY = e['layerY'] - (this.isTileMap ? 10 : 0);
8543
- target = e.target;
8544
8619
  }
8545
8620
  if (this.isTileMap) {
8546
8621
  this.removeTileMap();
8547
8622
  }
8548
8623
  if (this.isTouch) {
8549
- if (targetEle.id.indexOf('_ToolBar') === -1) {
8550
- const latLongValue = this.getClickLocation(targetId, pageX, pageY, targetEle, pageX, pageY);
8551
- if (!isNullOrUndefined(latLongValue)) {
8552
- latitude = latLongValue.latitude;
8553
- longitude = latLongValue.longitude;
8554
- }
8555
- }
8556
8624
  this.titleTooltip(e, pageX, pageY, true);
8557
8625
  if (!isNullOrUndefined(this.legendModule)) {
8558
8626
  this.legendTooltip(e, e.pageX, e.pageY, true);
@@ -8563,12 +8631,13 @@ let Maps = class Maps extends Component {
8563
8631
  e.preventDefault();
8564
8632
  }
8565
8633
  if (!isNullOrUndefined(this.markerDragArgument)) {
8634
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8566
8635
  const marker$$1 = this.markerDragArgument;
8567
8636
  this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
8568
8637
  this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
8569
8638
  const latLongValue = this.getMarkerClickLocation(pageX, pageY, layerX, layerY, this.markerDragArgument, true);
8570
8639
  const markerObject = this.layers[marker$$1.layerIndex].markerSettings[marker$$1.markerIndex];
8571
- document.getElementById(this.element.id + "_svg").style.cursor = markerObject.enableDrag ? 'pointer' : 'grabbing';
8640
+ document.getElementById(this.element.id + '_svg').style.cursor = markerObject.enableDrag ? 'pointer' : 'grabbing';
8572
8641
  const dragEventArgs = {
8573
8642
  name: 'markerDragEnd', x: pageX, y: pageY,
8574
8643
  latitude: latLongValue.latitude, longitude: latLongValue.longitude,
@@ -8595,7 +8664,7 @@ let Maps = class Maps extends Component {
8595
8664
  this.trigger('markerDragEnd', dragEventArgs);
8596
8665
  }
8597
8666
  else {
8598
- document.getElementById(this.element.id + "_svg").style.cursor = 'auto';
8667
+ document.getElementById(this.element.id + '_svg').style.cursor = 'auto';
8599
8668
  }
8600
8669
  if (this.zoomModule && this.isDevice) {
8601
8670
  this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.scale, this.element.id + '_Zooming_');
@@ -8612,13 +8681,14 @@ let Maps = class Maps extends Component {
8612
8681
  */
8613
8682
  mouseDownOnMap(e) {
8614
8683
  this.mouseDownEvent = { x: e.x, y: e.y };
8684
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8615
8685
  if (e.type.indexOf('touch') !== -1 && e.changedTouches) {
8686
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8616
8687
  this.mouseDownEvent = { x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY };
8617
8688
  }
8618
8689
  if (this.isDevice && !isNullOrUndefined(this.mapsTooltipModule)) {
8619
8690
  this.mapsTooltipModule.renderTooltip(e);
8620
8691
  }
8621
- const rect = this.element.getBoundingClientRect();
8622
8692
  const element = e.target;
8623
8693
  this.markerDragId = element.id;
8624
8694
  const animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
@@ -8649,7 +8719,7 @@ let Maps = class Maps extends Component {
8649
8719
  mergeCluster() {
8650
8720
  if (this.markerModule && (this.markerModule.sameMarkerData.length > 0) &&
8651
8721
  (this.zoomModule ? this.zoomModule.isSingleClick : true)) {
8652
- mergeSeparateCluster(this.markerModule.sameMarkerData, this, getElement(this.element.id + '_Markers_Group'));
8722
+ mergeSeparateCluster(this.markerModule.sameMarkerData, this);
8653
8723
  this.markerModule.sameMarkerData = [];
8654
8724
  }
8655
8725
  }
@@ -8690,6 +8760,7 @@ let Maps = class Maps extends Component {
8690
8760
  const targetElement = e.target;
8691
8761
  const targetId = targetElement.id;
8692
8762
  let layerIndex = 0;
8763
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8693
8764
  let latLongValue;
8694
8765
  let latitude = null;
8695
8766
  let longitude = null;
@@ -8735,8 +8806,8 @@ let Maps = class Maps extends Component {
8735
8806
  if (this.bubbleModule) {
8736
8807
  this.bubbleModule.bubbleMove(e);
8737
8808
  }
8738
- if (target.id.indexOf('MarkerIndex') == -1) {
8739
- document.getElementById(this.element.id + "_svg").style.cursor = 'auto';
8809
+ if (target.id.indexOf('MarkerIndex') === -1) {
8810
+ document.getElementById(this.element.id + '_svg').style.cursor = 'auto';
8740
8811
  }
8741
8812
  this.onMouseMove(e);
8742
8813
  this.notify(Browser.touchMoveEvent, e);
@@ -8756,7 +8827,7 @@ let Maps = class Maps extends Component {
8756
8827
  let touches = null;
8757
8828
  let layerX = 0;
8758
8829
  let layerY = 0;
8759
- if (e.type.indexOf('touch') == -1) {
8830
+ if (e.type.indexOf('touch') === -1) {
8760
8831
  pageX = e.pageX;
8761
8832
  pageY = e.pageY;
8762
8833
  layerX = e['layerX'];
@@ -8772,6 +8843,7 @@ let Maps = class Maps extends Component {
8772
8843
  layerY = pageY = touches[0].clientY - (this.isTileMap ? 10 : 0);
8773
8844
  }
8774
8845
  if (!isNullOrUndefined(this.markerDragArgument)) {
8846
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8775
8847
  const marker$$1 = this.markerDragArgument;
8776
8848
  this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
8777
8849
  this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
@@ -8787,6 +8859,7 @@ let Maps = class Maps extends Component {
8787
8859
  let legendText;
8788
8860
  let page = this.legendModule.currentPage;
8789
8861
  let legendIndex = event.target.id.split('_Index_')[1];
8862
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8790
8863
  let collection;
8791
8864
  page = this.legendModule.totalPages.length <= this.legendModule.currentPage
8792
8865
  ? this.legendModule.totalPages.length - 1 : this.legendModule.currentPage < 0 ?
@@ -8829,6 +8902,7 @@ let Maps = class Maps extends Component {
8829
8902
  *
8830
8903
  * @param e - Specifies the arguments of window resize event.
8831
8904
  */
8905
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
8832
8906
  mapsOnResize(e) {
8833
8907
  if (!this.isDestroyed && !this.isExportInitialTileMap) {
8834
8908
  this.isResize = this.isReset = true;
@@ -8862,6 +8936,8 @@ let Maps = class Maps extends Component {
8862
8936
  * This method is used to zoom the map by specifying the center position.
8863
8937
  *
8864
8938
  * @param {number} centerPosition - Specifies the location of the maps to be zoomed as geographical coordinates.
8939
+ * @param {number} centerPosition.longitude - Specifies the longitude of the location to be zoomed.
8940
+ * @param {number} centerPosition.latitude - Specifies the latitude of the location to be zoomed.
8865
8941
  * @param {number} zoomFactor - Specifies the zoom factor for the maps.
8866
8942
  * @returns {void}
8867
8943
  */
@@ -9009,9 +9085,11 @@ let Maps = class Maps extends Component {
9009
9085
  let dataIndex;
9010
9086
  let shapeIndex;
9011
9087
  let indexValue;
9088
+ /* eslint-disable @typescript-eslint/no-explicit-any */
9012
9089
  let shapeDataValue;
9013
9090
  let data;
9014
9091
  const shapeData = this.layers[layerIndex].shapeData['features'];
9092
+ /* eslint-enable @typescript-eslint/no-explicit-any */
9015
9093
  for (let i = 0; i < shapeData.length; i++) {
9016
9094
  for (let j = 0; j < popertyNameArray.length; j++) {
9017
9095
  const propertyName = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
@@ -9021,7 +9099,9 @@ let Maps = class Maps extends Component {
9021
9099
  let k;
9022
9100
  if (propertyName === shapeName) {
9023
9101
  if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
9024
- k = checkShapeDataFields(this.layers[layerIndex].dataSource, shapeData[i]['properties'], this.layers[layerIndex].shapeDataPath, this.layers[layerIndex].shapePropertyPath, this.layers[layerIndex]);
9102
+ k = checkShapeDataFields(
9103
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9104
+ this.layers[layerIndex].dataSource, shapeData[i]['properties'], this.layers[layerIndex].shapeDataPath, this.layers[layerIndex].shapePropertyPath, this.layers[layerIndex]);
9025
9105
  }
9026
9106
  const baseLayer = this.layers[layerIndex];
9027
9107
  if (this.baseLayerIndex >= 0 && baseLayer.isBaseLayer) {
@@ -9302,11 +9382,6 @@ let Maps = class Maps extends Component {
9302
9382
  let isMarker = false;
9303
9383
  let isLayer = false;
9304
9384
  let isStaticMapType = false;
9305
- let layerEle;
9306
- if (newProp['layers']) {
9307
- const newLayerLength = Object.keys(newProp['layers']).length;
9308
- layerEle = document.getElementById(this.element.id + '_LayerIndex_' + (newLayerLength - 1));
9309
- }
9310
9385
  for (const prop of Object.keys(newProp)) {
9311
9386
  switch (prop) {
9312
9387
  case 'background':
@@ -9571,6 +9646,8 @@ let Maps = class Maps extends Component {
9571
9646
  }
9572
9647
  /**
9573
9648
  * To find marker visibility
9649
+ *
9650
+ * @returns {boolean} - Returns whether the bubble is visible or not.
9574
9651
  */
9575
9652
  isBubbleVisible() {
9576
9653
  let isVisible = false;
@@ -9625,12 +9702,14 @@ let Maps = class Maps extends Component {
9625
9702
  allowDownload = true;
9626
9703
  }
9627
9704
  if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
9628
- return new Promise((resolve, reject) => {
9705
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9706
+ return new Promise((resolve) => {
9629
9707
  resolve(this.imageExportModule.export(this, type, fileName, allowDownload));
9630
9708
  });
9631
9709
  }
9632
9710
  else if ((this.allowPdfExport) && (this.pdfExportModule)) {
9633
- return new Promise((resolve, reject) => {
9711
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9712
+ return new Promise((resolve) => {
9634
9713
  resolve(this.pdfExportModule.export(this, type, fileName, allowDownload, orientation));
9635
9714
  });
9636
9715
  }
@@ -9646,10 +9725,11 @@ let Maps = class Maps extends Component {
9646
9725
  getBingUrlTemplate(url) {
9647
9726
  let promise;
9648
9727
  if (!this.isDestroyed) {
9649
- promise = new Promise((resolve, reject) => {
9728
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9729
+ promise = new Promise((resolve) => {
9650
9730
  const fetchApi = new Fetch({
9651
9731
  url: url
9652
- });
9732
+ }); // eslint-disable-next-line @typescript-eslint/no-explicit-any
9653
9733
  fetchApi.onSuccess = (json) => {
9654
9734
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9655
9735
  const resource = json['resourceSets'][0]['resources'][0];
@@ -9669,7 +9749,7 @@ let Maps = class Maps extends Component {
9669
9749
  * @param {boolean} istooltipVisible - Specifies whether the tooltip is visible or not.
9670
9750
  * @param {boolean} isSelection - Specifies whether the shape is selectd or not.
9671
9751
  * @param {boolean} isHighlight - Specfies whether the shape is highlighted or not.
9672
- * @returns {boolean} - Returns the boolean value
9752
+ * @returns {object} - Returns the boolean values in object.
9673
9753
  */
9674
9754
  findVisibleLayers(layers, isLayerVisible = false, isBubblevisible = false, istooltipVisible = false, isSelection = false, isHighlight = false) {
9675
9755
  let bubbles;
@@ -9681,11 +9761,13 @@ let Maps = class Maps extends Component {
9681
9761
  bubbles = layer.bubbleSettings;
9682
9762
  markers = layer.markerSettings;
9683
9763
  polygonSetting = layer.polygonSettings;
9684
- let navigationLine = layer.navigationLineSettings;
9764
+ const navigationLine = layer.navigationLineSettings;
9685
9765
  for (const navigation of navigationLine) {
9686
9766
  if (navigation.visible) {
9687
- isSelection = (!isNullOrUndefined(navigation.highlightSettings) && navigation.highlightSettings.enable) || isSelection;
9688
- isHighlight = (!isNullOrUndefined(navigation.selectionSettings) && navigation.selectionSettings.enable) || isHighlight;
9767
+ isSelection = (!isNullOrUndefined(navigation.highlightSettings) &&
9768
+ navigation.highlightSettings.enable) || isSelection;
9769
+ isHighlight = (!isNullOrUndefined(navigation.selectionSettings) &&
9770
+ navigation.selectionSettings.enable) || isHighlight;
9689
9771
  }
9690
9772
  }
9691
9773
  for (const polygon of polygonSetting.polygons) {
@@ -9744,6 +9826,7 @@ let Maps = class Maps extends Component {
9744
9826
  const pageX = x - (isNullOrUndefined(this.markerDragArgument) ? container.offsetLeft : 0);
9745
9827
  const pageY = y - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop : 0);
9746
9828
  const currentLayer = this.layersCollection[layerIndex];
9829
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9747
9830
  const translate = getTranslate(this, currentLayer, false);
9748
9831
  const translatePoint = translate['location'];
9749
9832
  const translatePointX = translatePoint.x * this.scale;
@@ -9773,6 +9856,7 @@ let Maps = class Maps extends Component {
9773
9856
  if (!this.isDestroyed) {
9774
9857
  const container = document.getElementById(this.element.id);
9775
9858
  const ele = document.getElementById(this.element.id + '_tile_parent');
9859
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9776
9860
  const latLong = this.pointToLatLong(x + this.mapAreaRect.x - (ele.offsetLeft - (isNullOrUndefined(this.markerDragArgument) ? container.offsetLeft : 0)), y + this.mapAreaRect.y - (ele.offsetTop - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop : 0)));
9777
9861
  latitude = latLong['latitude'];
9778
9862
  longitude = latLong['longitude'];
@@ -9986,21 +10070,33 @@ class Bubble {
9986
10070
  constructor(maps) {
9987
10071
  /**
9988
10072
  * Bubble Id for current layer
10073
+ *
9989
10074
  * @private
9990
10075
  */
9991
10076
  this.id = '';
9992
10077
  this.maps = maps;
9993
10078
  this.bubbleCollection = [];
9994
10079
  }
9995
- // eslint-disable-next-line valid-jsdoc
9996
10080
  /**
9997
10081
  * To render bubble
9998
10082
  *
10083
+ * @param {BubbleSettingsModel} bubbleSettings - Specifies the bubble data to be rendered
10084
+ * @param {object} shapeData - Specifies the data about the shape
10085
+ * @param {string} color - Specifies the color of the bubble
10086
+ * @param {number} range - Specifies the range of the bubble
10087
+ * @param {number} range.min - Specifies the minimum range of the bubble
10088
+ * @param {number} range.max - Specifies the maximum range of the bubble
10089
+ * @param {number} bubbleIndex - Specifies the index of the bubble
10090
+ * @param {number} dataIndex - Specifies the index of the data
10091
+ * @param {number} layerIndex - Specifies the index of the layer
10092
+ * @param {LayerSettings} layer - Specifies the layer data
10093
+ * @param {Element} group - Specifies the element group
10094
+ * @param {string} bubbleID - Specifies the ID of the bubble
10095
+ * @returns {void}
10096
+ *
9999
10097
  * @private
10000
10098
  */
10001
- renderBubble(
10002
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10003
- bubbleSettings, shapeData, color, range, bubbleIndex, dataIndex, layerIndex, layer, group, bubbleID) {
10099
+ renderBubble(bubbleSettings, shapeData, color, range, bubbleIndex, dataIndex, layerIndex, layer, group, bubbleID) {
10004
10100
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10005
10101
  const layerData = layer.layerData;
10006
10102
  const colorValuePath = bubbleSettings.colorValuePath;
@@ -10099,6 +10195,7 @@ class Bubble {
10099
10195
  return;
10100
10196
  }
10101
10197
  }
10198
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
10102
10199
  this.maps.trigger('bubbleRendering', eventArgs, (bubbleArgs) => {
10103
10200
  if (eventArgs.cancel) {
10104
10201
  return;
@@ -10137,7 +10234,9 @@ class Bubble {
10137
10234
  const bubbleDataSource = bubbleSettings.dataSource;
10138
10235
  const scale = translate['scale'];
10139
10236
  const transPoint = translate['location'];
10140
- const position = new MapLocation((this.maps.isTileMap ? ((eventArgs.cx + this.maps.translatePoint.x) * this.maps.tileZoomLevel) : ((eventArgs.cx + transPoint.x) * scale)), (this.maps.isTileMap ? ((eventArgs.cy + this.maps.translatePoint.y) * this.maps.tileZoomLevel) : ((eventArgs.cy + transPoint.y) * scale)));
10237
+ const position = new MapLocation((this.maps.isTileMap ? ((eventArgs.cx + this.maps.translatePoint.x) * this.maps.tileZoomLevel)
10238
+ : ((eventArgs.cx + transPoint.x) * scale)), (this.maps.isTileMap ? ((eventArgs.cy + this.maps.translatePoint.y) * this.maps.tileZoomLevel)
10239
+ : ((eventArgs.cy + transPoint.y) * scale)));
10141
10240
  bubbleElement.setAttribute('transform', 'translate( ' + (position.x) + ' ' + (position.y) + ' )');
10142
10241
  const bubble = (bubbleDataSource.length - 1) === dataIndex ? 'bubble' : null;
10143
10242
  if (bubbleSettings.bubbleType === 'Square') {
@@ -10310,6 +10409,7 @@ class Marker {
10310
10409
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
10311
10410
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
10312
10411
  };
10412
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
10313
10413
  maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
10314
10414
  eventArgs = markerColorChoose(eventArgs, data);
10315
10415
  eventArgs = markerShapeChoose(eventArgs, data);
@@ -10533,6 +10633,7 @@ class Marker {
10533
10633
  }
10534
10634
  /**
10535
10635
  * To check and trigger marker click event
10636
+ *
10536
10637
  * @param {PointerEvent} e - Specifies the pointer event argument.
10537
10638
  * @returns {void}
10538
10639
  * @private
@@ -10553,7 +10654,7 @@ class Marker {
10553
10654
  return;
10554
10655
  }
10555
10656
  if (options.marker.enableDrag) {
10556
- document.getElementById(this.maps.element.id + "_svg").style.cursor = 'grabbing';
10657
+ document.getElementById(this.maps.element.id + '_svg').style.cursor = 'grabbing';
10557
10658
  }
10558
10659
  const eventArgs = {
10559
10660
  cancel: false, name: markerClick, data: options.data, maps: this.maps,
@@ -10570,7 +10671,7 @@ class Marker {
10570
10671
  const dataIndex = parseInt(target.split('_dataIndex_')[1].split('_')[0], 10);
10571
10672
  const marker$$1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
10572
10673
  if (this.sameMarkerData.length > 0) {
10573
- isCluster = (this.sameMarkerData[0].data.filter((el) => { return (el['index'] == dataIndex); })).length > 0 &&
10674
+ isCluster = (this.sameMarkerData[0].data.filter((el) => { return (el['index'] === dataIndex); })).length > 0 &&
10574
10675
  this.sameMarkerData[0].layerIndex === layerIndex && this.sameMarkerData[0].markerIndex === markerIndex;
10575
10676
  }
10576
10677
  if (!isCluster) {
@@ -10585,7 +10686,8 @@ class Marker {
10585
10686
  targetId: target, x: e.clientX, y: e.clientY,
10586
10687
  latitude: options.data['latitude'] || options.data['Latitude'],
10587
10688
  longitude: options.data['longitude'] || options.data['Longitude'],
10588
- shape: isNullOrUndefined(marker$$1.shapeValuePath) ? marker$$1.shape : marker$$1.dataSource[dataIndex][marker$$1.shapeValuePath],
10689
+ shape: isNullOrUndefined(marker$$1.shapeValuePath) ? marker$$1.shape
10690
+ : marker$$1.dataSource[dataIndex][marker$$1.shapeValuePath],
10589
10691
  layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex
10590
10692
  };
10591
10693
  }
@@ -10593,6 +10695,7 @@ class Marker {
10593
10695
  }
10594
10696
  /**
10595
10697
  * To check and trigger Cluster click event
10698
+ *
10596
10699
  * @param {PointerEvent} e - Specifies the pointer event argument.
10597
10700
  * @returns {void}
10598
10701
  * @private
@@ -10613,7 +10716,7 @@ class Marker {
10613
10716
  }
10614
10717
  if (this.sameMarkerData.length > 0 && !this.maps.markerClusterExpandCheck) {
10615
10718
  this.maps.markerClusterExpandCheck = true;
10616
- mergeSeparateCluster(this.sameMarkerData, this.maps, this.markerSVGObject);
10719
+ mergeSeparateCluster(this.sameMarkerData, this.maps);
10617
10720
  }
10618
10721
  else {
10619
10722
  this.sameMarkerData = options.clusterCollection;
@@ -10633,7 +10736,7 @@ class Marker {
10633
10736
  * To get marker from target id
10634
10737
  *
10635
10738
  * @param {string} target - Specifies the target
10636
- * @returns {string} - Returns the string
10739
+ * @returns {object} - Returns the marker, data, clusterCollection, markCollection
10637
10740
  */
10638
10741
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10639
10742
  getMarker(target) {
@@ -10701,7 +10804,7 @@ class Marker {
10701
10804
  return;
10702
10805
  }
10703
10806
  if (options.marker.enableDrag) {
10704
- document.getElementById(this.maps.element.id + "_svg").style.cursor = isNullOrUndefined(this.maps.markerDragArgument) ?
10807
+ document.getElementById(this.maps.element.id + '_svg').style.cursor = isNullOrUndefined(this.maps.markerDragArgument) ?
10705
10808
  'pointer' : 'grabbing';
10706
10809
  }
10707
10810
  const eventArgs = {
@@ -10735,7 +10838,10 @@ class Marker {
10735
10838
  };
10736
10839
  this.maps.trigger(markerClusterMouseMove, eventArgs);
10737
10840
  }
10738
- /** @private */
10841
+ /** @private
10842
+ *
10843
+ * @returns {void}
10844
+ */
10739
10845
  initializeMarkerClusterList() {
10740
10846
  for (let i = 0; i < this.maps.layers.length; i++) {
10741
10847
  this.initialMarkerCluster[i] = [];
@@ -10770,8 +10876,12 @@ class Marker {
10770
10876
  * When injected, this module will be used to render polygon shapes over the Maps.
10771
10877
  */
10772
10878
  class Polygon {
10879
+ /* eslint-disable @typescript-eslint/no-unused-vars */
10880
+ /* eslint-disable @typescript-eslint/no-empty-function */
10773
10881
  constructor(maps) {
10774
10882
  }
10883
+ /* eslint-enable @typescript-eslint/no-unused-vars */
10884
+ /* eslint-enable @typescript-eslint/no-empty-function */
10775
10885
  /**
10776
10886
  * To render polygon for maps
10777
10887
  *
@@ -10790,7 +10900,6 @@ class Polygon {
10790
10900
  const polygonSVGObject = maps.renderer.createGroup({
10791
10901
  id: maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group_' + polygonIndex
10792
10902
  });
10793
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10794
10903
  const polygonData = polygonSetting.points;
10795
10904
  const path = calculatePolygonPath(maps, factor, currentLayer, polygonData);
10796
10905
  const pathOptions = new PathOption(maps.element.id + '_LayerIndex_' + layerIndex + '_PolygonIndex_' + polygonIndex, polygonSetting.fill, (polygonSetting.borderWidth / factor), polygonSetting.borderColor, polygonSetting.opacity, polygonSetting.borderOpacity, '', path);
@@ -10815,6 +10924,7 @@ class Polygon {
10815
10924
  * @returns {void}
10816
10925
  * @private
10817
10926
  */
10927
+ //eslint-disable-next-line @typescript-eslint/no-empty-function
10818
10928
  destroy() {
10819
10929
  }
10820
10930
  }
@@ -10853,7 +10963,7 @@ class DataLabel {
10853
10963
  *
10854
10964
  * @param {LayerSettings} layer - Specifies the layer settings
10855
10965
  * @param {number} layerIndex - Specifies the layer index.
10856
- * @param {any} shape - Specifies the shape.
10966
+ * @param {object} shape - Specifies the shape.
10857
10967
  * @param {any[]} layerData - Specifies the layer data.
10858
10968
  * @param {Element} group Specifies the element.
10859
10969
  * @param {HTMLElement} labelTemplateElement - Specifies the template element.
@@ -10862,9 +10972,7 @@ class DataLabel {
10862
10972
  * @returns {void}
10863
10973
  * @private
10864
10974
  */
10865
- renderLabel(
10866
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10867
- layer, layerIndex, shape,
10975
+ renderLabel(layer, layerIndex, shape,
10868
10976
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10869
10977
  layerData, group, labelTemplateElement, index, intersect) {
10870
10978
  const dataLabel = layer.dataLabelSettings;
@@ -11066,7 +11174,7 @@ class DataLabel {
11066
11174
  const templateElement = templateFn ? templateFn(!isNullOrUndefined(datasrcObj) ?
11067
11175
  datasrcObj : shapeData['properties'], this.maps, eventargs.template, this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
11068
11176
  templateElement.innerHTML = !templateFn ? eventargs.template : '';
11069
- labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties'], index, this.maps);
11177
+ labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties']);
11070
11178
  if (this.maps.isTileMap) {
11071
11179
  labelElement.style.left = (((location['x'] + transPoint['x']) * scale) - (textSize['width'] / 2)) + 'px';
11072
11180
  labelElement.style.top = (((location['y'] + transPoint['y']) * scale) - textSize['height']) + 'px';
@@ -11220,7 +11328,7 @@ class DataLabel {
11220
11328
  element.setAttribute(isRect ? 'fill-opacity' : 'opacity', (opacity * height).toString());
11221
11329
  }
11222
11330
  },
11223
- end: (model) => {
11331
+ end: () => {
11224
11332
  element.style.visibility = 'visible';
11225
11333
  element.setAttribute(isRect ? 'fill-opacity' : 'opacity', opacity.toString());
11226
11334
  }
@@ -11387,6 +11495,7 @@ class NavigationLine {
11387
11495
  pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
11388
11496
  navigationEle = this.maps.renderer.drawPath(pathOption);
11389
11497
  if (!isNullOrUndefined(arrowPosition)) {
11498
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
11390
11499
  const position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
11391
11500
  : navigationEle.setAttribute('marker-end', endArrow);
11392
11501
  }
@@ -11783,9 +11892,9 @@ class Legend {
11783
11892
  * Get the legend collections
11784
11893
  *
11785
11894
  * @param {number} layerIndex - Specifies the layer index
11786
- * @param {object[]} layerData - Specifies the layer data
11895
+ * @param {any[]} layerData - Specifies the layer data
11787
11896
  * @param {ColorMappingSettings[]} colorMapping - Specifies the color mapping
11788
- * @param {object[]} dataSource - Specifies the data source
11897
+ * @param {any[]} dataSource - Specifies the data source
11789
11898
  * @param {string} dataPath - Specifies the data path
11790
11899
  * @param {string} colorValuePath - Specifies the color value path
11791
11900
  * @param {string | string[]} propertyPath - Specifies the property path
@@ -11827,6 +11936,7 @@ class Legend {
11827
11936
  // eslint-disable-next-line valid-jsdoc
11828
11937
  /**
11829
11938
  * To draw the legend shape and text.
11939
+ *
11830
11940
  * @private
11831
11941
  */
11832
11942
  drawLegend() {
@@ -11871,7 +11981,7 @@ class Legend {
11871
11981
  }
11872
11982
  }
11873
11983
  /**
11874
- * @param {string} page - Specifies the legend page.
11984
+ * @param {number} page - Specifies the legend page.
11875
11985
  * @returns {void}
11876
11986
  * @private
11877
11987
  */
@@ -11895,8 +12005,6 @@ class Legend {
11895
12005
  const legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
11896
12006
  let legendText = collection['DisplayText'];
11897
12007
  const pagingArrowPadding = 4;
11898
- const shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
11899
- legend.shape : 'Image') : collection['legendShape']);
11900
12008
  const strokeColor = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
11901
12009
  || legend.shape === 'Cross') ? isNullOrUndefined(legend.fill) ? '#000000' : legend.fill : shapeBorder.color;
11902
12010
  const strokeWidth = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
@@ -12281,9 +12389,7 @@ class Legend {
12281
12389
  }
12282
12390
  }
12283
12391
  }
12284
- shapeHighLightAndSelection(
12285
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12286
- targetElement, data, module, getValue, layerIndex) {
12392
+ shapeHighLightAndSelection(targetElement, data, module, getValue, layerIndex) {
12287
12393
  if (data !== undefined) {
12288
12394
  this.updateLegendElement();
12289
12395
  this.shapeToggled = true;
@@ -12709,9 +12815,12 @@ class Legend {
12709
12815
  }
12710
12816
  if (legendTitle) {
12711
12817
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
12712
- textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
12713
- textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size : this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
12714
- textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight : this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
12818
+ textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily
12819
+ : this.maps.themeStyle.fontFamily;
12820
+ textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size
12821
+ : this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
12822
+ textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight
12823
+ : this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
12715
12824
  textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
12716
12825
  const element = renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
12717
12826
  element.setAttribute('aria-label', legendTitle);
@@ -12814,6 +12923,7 @@ class Legend {
12814
12923
  const field = marker$$1.legendText;
12815
12924
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12816
12925
  let templateFn;
12926
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12817
12927
  Array.prototype.forEach.call(dataSource, (data, dataIndex) => {
12818
12928
  let imageSrc = null;
12819
12929
  const showLegend = isNullOrUndefined(data[this.maps.legendSettings.showLegendPath]) ? true :
@@ -12824,6 +12934,7 @@ class Legend {
12824
12934
  const templateElement = templateFn(this.maps);
12825
12935
  const markerEle = isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] :
12826
12936
  templateElement;
12937
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
12827
12938
  imageSrc = markerEle.querySelector('img').src;
12828
12939
  }
12829
12940
  const text = isNullOrUndefined(data[field]) ? '' : data[field];
@@ -13013,7 +13124,6 @@ class Legend {
13013
13124
  }
13014
13125
  });
13015
13126
  if (outOfRangeValues.length === 0) {
13016
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13017
13127
  let range = false;
13018
13128
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13019
13129
  Array.prototype.forEach.call(dataSource, (data, dataIndex) => {
@@ -13248,7 +13358,12 @@ class Legend {
13248
13358
  this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
13249
13359
  }
13250
13360
  else {
13251
- this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[k].shapeSettings.fill);
13361
+ this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
13362
+ ? 0 : this.maps.layers[k].shapeSettings.border.width,
13363
+ /* eslint-disable-next-line max-len */
13364
+ isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
13365
+ ? this.maps.layers[k].shapeSettings.opacity
13366
+ : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[k].shapeSettings.fill);
13252
13367
  }
13253
13368
  }
13254
13369
  }
@@ -13317,7 +13432,12 @@ class Legend {
13317
13432
  this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
13318
13433
  }
13319
13434
  else {
13320
- this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ? this.maps.layers[j].shapeSettings.opacity : this.maps.layers[j].shapeSettings.border.opacity, this.maps.layers[j].shapeSettings.fill);
13435
+ this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width)
13436
+ ? 0 : this.maps.layers[j].shapeSettings.border.width,
13437
+ /* eslint-disable-next-line max-len */
13438
+ isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity)
13439
+ ? this.maps.layers[j].shapeSettings.opacity
13440
+ : this.maps.layers[j].shapeSettings.border.opacity, this.maps.layers[j].shapeSettings.fill);
13321
13441
  }
13322
13442
  }
13323
13443
  }
@@ -13395,7 +13515,15 @@ class Legend {
13395
13515
  this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
13396
13516
  }
13397
13517
  else {
13398
- this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width), (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity), this.maps.layers[k].shapeSettings.fill);
13518
+ this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color,
13519
+ /* eslint-disable-next-line max-len */
13520
+ (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
13521
+ ? 0
13522
+ : this.maps.layers[k].shapeSettings.border.width),
13523
+ /* eslint-disable-next-line max-len */
13524
+ (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
13525
+ ? this.maps.layers[k].shapeSettings.opacity
13526
+ : this.maps.layers[k].shapeSettings.border.opacity), this.maps.layers[k].shapeSettings.fill);
13399
13527
  }
13400
13528
  }
13401
13529
  }
@@ -13466,7 +13594,13 @@ class Legend {
13466
13594
  this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
13467
13595
  }
13468
13596
  else {
13469
- this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[0].shapeSettings.fill);
13597
+ this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
13598
+ ? 0
13599
+ : this.maps.layers[k].shapeSettings.border.width,
13600
+ /* eslint-disable-next-line max-len */
13601
+ isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
13602
+ ? this.maps.layers[k].shapeSettings.opacity
13603
+ : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[0].shapeSettings.fill);
13470
13604
  }
13471
13605
  }
13472
13606
  }
@@ -13674,9 +13808,13 @@ class Highlight {
13674
13808
  this.maps.off(Browser.touchMoveEvent, this.mouseMove);
13675
13809
  this.maps.off(Browser.touchStartEvent, this.mouseMove);
13676
13810
  }
13677
- // eslint-disable-next-line valid-jsdoc
13678
13811
  /**
13679
13812
  * Public method for highlight module
13813
+ *
13814
+ * @param {number} layerIndex - Specifies the index of the layer.
13815
+ * @param {string} name - Specifies the name.
13816
+ * @param {boolean} enable - Specifies the enabling of highlight in map.
13817
+ * @returns {void}
13680
13818
  * @private
13681
13819
  */
13682
13820
  addHighlight(layerIndex, name, enable) {
@@ -13783,9 +13921,15 @@ class Highlight {
13783
13921
  }
13784
13922
  }
13785
13923
  /**
13924
+ * Handles the highlighting events in map
13925
+ *
13926
+ * @param {Element} targetElement - Specifies the target element.
13927
+ * @param {number} layerIndex - Specifies the index of the layer.
13928
+ * @param {object} data - Specifies the data for the map.
13929
+ * @param {object} shapeData - Specifies the data for the map to render.
13930
+ * @returns {void}
13786
13931
  * @private
13787
13932
  */
13788
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13789
13933
  handleHighlight(targetElement, layerIndex, data, shapeData) {
13790
13934
  if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule
13791
13935
  && this.maps.legendSettings.type === 'Layers') {
@@ -13996,9 +14140,15 @@ class Selection {
13996
14140
  }
13997
14141
  }
13998
14142
  /**
14143
+ * Selects the element in the map
14144
+ *
14145
+ * @param {Element} targetElement - Specifies the target element.
14146
+ * @param {number} layerIndex - Specifies the index of the layer.
14147
+ * @param {object} data - Specifies the data for the map.
14148
+ * @param {object} shapeData - Specifies the data for the map to render.
14149
+ * @returns {void}
13999
14150
  * @private
14000
14151
  */
14001
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
14002
14152
  selectElement(targetElement, layerIndex, data, shapeData) {
14003
14153
  this.maps.mapSelect = targetElement ? true : false;
14004
14154
  if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
@@ -14010,9 +14160,13 @@ class Selection {
14010
14160
  this.selectMap(targetElement, shapeData, data);
14011
14161
  }
14012
14162
  }
14013
- // eslint-disable-next-line valid-jsdoc
14014
14163
  /**
14015
14164
  * Public method for selection
14165
+ *
14166
+ * @param {number} layerIndex - Specifies the index of the layer.
14167
+ * @param {string} name - Specifies the name.
14168
+ * @param {boolean} enable - Specifies the enabling of selection in map.
14169
+ * @returns {void}
14016
14170
  * @private
14017
14171
  */
14018
14172
  addSelection(layerIndex, name, enable) {
@@ -14034,9 +14188,7 @@ class Selection {
14034
14188
  */
14035
14189
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14036
14190
  selectMap(targetElement, shapeData, data) {
14037
- const layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
14038
14191
  const isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
14039
- const selectionsettings = this.selectionsettings;
14040
14192
  const border = {
14041
14193
  color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) :
14042
14194
  this.selectionsettings.border.color,
@@ -14055,6 +14207,7 @@ class Selection {
14055
14207
  data: data,
14056
14208
  maps: this.maps
14057
14209
  };
14210
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
14058
14211
  this.maps.trigger('itemSelection', eventArgs, (observedArgs) => {
14059
14212
  eventArgs.border.opacity = isNullOrUndefined(this.selectionsettings.border.opacity) ?
14060
14213
  this.selectionsettings.opacity : this.selectionsettings.border.opacity;
@@ -14226,6 +14379,8 @@ class MapsTooltip {
14226
14379
  this.addEventListener();
14227
14380
  }
14228
14381
  /**
14382
+ * @param {PointerEvent} e - Specifies the event.
14383
+ * @returns {void}
14229
14384
  * @private
14230
14385
  */
14231
14386
  renderTooltip(e) {
@@ -14414,6 +14569,7 @@ class MapsTooltip {
14414
14569
  }
14415
14570
  document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
14416
14571
  }
14572
+ // eslint-disable-next-line no-constant-condition
14417
14573
  if (typeof (isPolygon ? polygon.tooltipTemplate !== 'function' : option.template !== 'function') && (isPolygon ? polygon.tooltipTemplate !== null : option.template !== null) && Object.keys(typeof (isPolygon ? polygon.tooltipTemplate === 'object' : option.template === 'object') ? (isPolygon ? polygon.tooltipTemplate : option.template) : {}).length === 1) {
14418
14574
  if (isPolygon) {
14419
14575
  polygon.tooltipTemplate = polygon.tooltipTemplate[Object.keys(polygon.tooltipTemplate)[0]];
@@ -14532,7 +14688,7 @@ class MapsTooltip {
14532
14688
  }
14533
14689
  }
14534
14690
  else {
14535
- let tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
14691
+ const tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
14536
14692
  if (isNullOrUndefined(tooltipElement)) {
14537
14693
  this.clearTooltip(e.target);
14538
14694
  }
@@ -14571,6 +14727,10 @@ class MapsTooltip {
14571
14727
  return format;
14572
14728
  }
14573
14729
  /**
14730
+ * Handles the mouse up
14731
+ *
14732
+ * @param {PointerEvent} e - Specifies the event
14733
+ * @returns {void}
14574
14734
  * @private
14575
14735
  */
14576
14736
  mouseUpHandler(e) {
@@ -14583,6 +14743,9 @@ class MapsTooltip {
14583
14743
  }
14584
14744
  }
14585
14745
  /**
14746
+ * Removes the tooltip
14747
+ *
14748
+ * @returns {boolean} - Returns the boolean whether tooltip is removed or not.
14586
14749
  * @private
14587
14750
  */
14588
14751
  removeTooltip() {
@@ -14594,7 +14757,8 @@ class MapsTooltip {
14594
14757
  return isTooltipRemoved;
14595
14758
  }
14596
14759
  clearTooltip(element) {
14597
- let tooltipElement = element.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
14760
+ // eslint-disable-next-line @typescript-eslint/tslint/config
14761
+ const tooltipElement = element.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
14598
14762
  if (isNullOrUndefined(tooltipElement)) {
14599
14763
  const isTooltipRemoved = this.removeTooltip();
14600
14764
  if (isTooltipRemoved) {
@@ -14603,9 +14767,10 @@ class MapsTooltip {
14603
14767
  }
14604
14768
  }
14605
14769
  }
14606
- // eslint-disable-next-line valid-jsdoc
14607
14770
  /**
14608
14771
  * To bind events for tooltip module
14772
+ *
14773
+ * @returns {void}
14609
14774
  * @private
14610
14775
  */
14611
14776
  addEventListener() {
@@ -14625,6 +14790,9 @@ class MapsTooltip {
14625
14790
  this.maps.element.addEventListener('contextmenu', this.removeTooltip);
14626
14791
  }
14627
14792
  /**
14793
+ * Removes the event listeners
14794
+ *
14795
+ * @returns {void}
14628
14796
  * @private
14629
14797
  */
14630
14798
  removeEventListener() {
@@ -14683,7 +14851,6 @@ class Zoom {
14683
14851
  this.rectZoomingStart = false;
14684
14852
  /** @private */
14685
14853
  this.browserName = Browser.info.name;
14686
- // eslint-disable-next-line @typescript-eslint/ban-types
14687
14854
  /** @private */
14688
14855
  this.isPointer = Browser.isPointer;
14689
14856
  this.handled = false;
@@ -14693,10 +14860,8 @@ class Zoom {
14693
14860
  this.pinchFactor = 1;
14694
14861
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14695
14862
  this.startTouches = [];
14696
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
14697
14863
  /** @private */
14698
14864
  this.mouseDownLatLong = { x: 0, y: 0 };
14699
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
14700
14865
  /** @private */
14701
14866
  this.mouseMoveLatLong = { x: 0, y: 0 };
14702
14867
  /** @private */
@@ -14812,7 +14977,6 @@ class Zoom {
14812
14977
  }
14813
14978
  this.markerLineAnimation(map);
14814
14979
  map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
14815
- const element1 = document.getElementById(this.maps.element.id + '_tiles');
14816
14980
  const animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
14817
14981
  setTimeout(() => {
14818
14982
  // if (type === 'ZoomOut') {
@@ -14891,6 +15055,7 @@ class Zoom {
14891
15055
  position.y - ((y * totalSize) / 100);
14892
15056
  }
14893
15057
  /**
15058
+ * @returns {void}
14894
15059
  * @private
14895
15060
  */
14896
15061
  performRectZooming() {
@@ -14970,26 +15135,29 @@ class Zoom {
14970
15135
  }
14971
15136
  }
14972
15137
  /**
15138
+ * @param {PointerEvent} e - Specifies the vent in the map
15139
+ * @returns {void}
14973
15140
  * @private
14974
15141
  */
15142
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
14975
15143
  performPinchZooming(e) {
14976
15144
  const map = this.maps;
14977
15145
  const prevLevel = map.tileZoomLevel;
14978
- const availSize = map.mapAreaRect;
14979
- map.isMarkerZoomCompleted = false;
14980
- map.previousScale = map.scale;
14981
- map.previousPoint = map.translatePoint;
14982
- map.previousProjection = map.projectionType;
14983
- const prevTilePoint = map.tileTranslatePoint;
14984
- const scale = calculateScale(this.touchStartList, this.touchMoveList);
14985
- const touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
14986
- const newScale = scale / this.lastScale;
14987
- this.lastScale = scale;
14988
- this.pinchFactor *= newScale;
14989
- this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
14990
15146
  let zoomCalculationFactor = this.pinchFactor;
14991
15147
  let isZoomCancelled;
15148
+ const prevTilePoint = map.tileTranslatePoint;
14992
15149
  if (!map.isTileMap) {
15150
+ const availSize = map.mapAreaRect;
15151
+ map.isMarkerZoomCompleted = false;
15152
+ map.previousScale = map.scale;
15153
+ map.previousPoint = map.translatePoint;
15154
+ map.previousProjection = map.projectionType;
15155
+ const scale = calculateScale(this.touchStartList, this.touchMoveList);
15156
+ const touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
15157
+ const newScale = scale / this.lastScale;
15158
+ this.lastScale = scale;
15159
+ this.pinchFactor *= newScale;
15160
+ this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
14993
15161
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14994
15162
  const minBounds = map.baseMapRectBounds['min'];
14995
15163
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -15024,24 +15192,38 @@ class Zoom {
15024
15192
  }
15025
15193
  }
15026
15194
  else {
15027
- const newTileFactor = zoomCalculationFactor;
15028
- this.getTileTranslatePosition(prevLevel, newTileFactor, { x: touchCenter.x, y: touchCenter.y });
15029
- map.tileZoomLevel = newTileFactor;
15030
- map.translatePoint.x = (map.tileTranslatePoint.x - (0.5 * Math.pow(2, newTileFactor))) /
15031
- (Math.pow(2, newTileFactor));
15032
- map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
15033
- (Math.pow(2, newTileFactor));
15034
- map.scale = (Math.pow(2, newTileFactor));
15035
- isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
15036
- if (isZoomCancelled) {
15037
- map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
15038
- map.scale = map.previousScale;
15039
- map.tileZoomLevel = prevLevel;
15040
- map.zoomSettings.zoomFactor = map.previousScale;
15041
- }
15042
- else {
15043
- map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
15195
+ const touchCenter = this.getTouchCenterPoint();
15196
+ const distance = Math.sqrt(Math.pow((this.touchMoveList[0].pageX - this.touchMoveList[1].pageX), 2) + Math.pow((this.touchMoveList[0].pageY - this.touchMoveList[1].pageY), 2));
15197
+ let factor = map.tileZoomLevel;
15198
+ if (!isNullOrUndefined(this.pinchDistance)) {
15199
+ if (this.pinchDistance > distance) {
15200
+ factor = factor - 1;
15201
+ }
15202
+ else if (this.pinchDistance < distance) {
15203
+ factor = factor + 1;
15204
+ }
15205
+ factor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.maps.zoomSettings.minZoom, factor));
15206
+ if (factor !== map.tileZoomLevel) {
15207
+ this.pinchFactor = factor;
15208
+ map.previousScale = map.scale;
15209
+ map.tileZoomLevel = this.pinchFactor;
15210
+ map.scale = Math.pow(2, map.tileZoomLevel - 1);
15211
+ this.getTileTranslatePosition(prevLevel, this.pinchFactor, { x: touchCenter.x, y: touchCenter.y }, null);
15212
+ map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.scale)) / map.scale;
15213
+ map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.scale)) / map.scale;
15214
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
15215
+ if (isZoomCancelled) {
15216
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
15217
+ map.scale = map.previousScale;
15218
+ map.tileZoomLevel = prevLevel;
15219
+ map.zoomSettings.zoomFactor = map.previousScale;
15220
+ }
15221
+ else {
15222
+ map.mapLayerPanel.generateTiles(factor, map.tileTranslatePoint);
15223
+ }
15224
+ }
15044
15225
  }
15226
+ this.pinchDistance = distance;
15045
15227
  }
15046
15228
  map.mapScaleValue = zoomCalculationFactor;
15047
15229
  if (!isZoomCancelled) {
@@ -15052,6 +15234,16 @@ class Zoom {
15052
15234
  this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
15053
15235
  }
15054
15236
  }
15237
+ getTouchCenterPoint() {
15238
+ const touchList = [];
15239
+ for (let i = 0; i < this.touchMoveList.length; i++) {
15240
+ touchList.push(this.getMousePosition(this.touchMoveList[i].pageX, this.touchMoveList[i].pageY));
15241
+ }
15242
+ return {
15243
+ x: (touchList[0].x + touchList[1].x) / 2,
15244
+ y: (touchList[0].y + touchList[1].y) / 2
15245
+ };
15246
+ }
15055
15247
  triggerZoomComplete(map, prevLevel, type) {
15056
15248
  if (map.zoomSettings.enable) {
15057
15249
  let zoomArgs;
@@ -15083,6 +15275,7 @@ class Zoom {
15083
15275
  }
15084
15276
  }
15085
15277
  /**
15278
+ * @returns {void}
15086
15279
  * @private
15087
15280
  */
15088
15281
  drawZoomRectangle() {
@@ -15095,7 +15288,6 @@ class Zoom {
15095
15288
  const height = Math.abs(move.y - down.y);
15096
15289
  const x = ((move.x > down.x) ? down.x : down.x - width);
15097
15290
  const y = ((move.y > down.y) ? down.y : down.y - height);
15098
- const elementRect = getElementByID(map.element.id).getBoundingClientRect();
15099
15291
  if ((x > map.mapAreaRect.x && x < (map.mapAreaRect.x + map.mapAreaRect.width)) &&
15100
15292
  (y > map.mapAreaRect.y) && (y < map.mapAreaRect.y + map.mapAreaRect.height)) {
15101
15293
  this.zoomingRect = new Rect(x, y, width, height);
@@ -15133,6 +15325,10 @@ class Zoom {
15133
15325
  }
15134
15326
  }
15135
15327
  /**
15328
+ * @param {Maps} maps - Specifies the Map control
15329
+ * @param {boolean} animate - Specifies the animation is available or not
15330
+ * @param {boolean} isPanning - Specifies that it is panning or not
15331
+ * @returns {void}
15136
15332
  * @private
15137
15333
  */
15138
15334
  applyTransform(maps, animate$$1, isPanning) {
@@ -15143,7 +15339,6 @@ class Zoom {
15143
15339
  const x = maps.translatePoint.x;
15144
15340
  const y = maps.translatePoint.y;
15145
15341
  let currentLabelIndex = 0;
15146
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15147
15342
  maps.zoomShapeCollection = [];
15148
15343
  if (document.getElementById(maps.element.id + '_mapsTooltip')) {
15149
15344
  removeElement(maps.element.id + '_mapsTooltip');
@@ -15175,7 +15370,7 @@ class Zoom {
15175
15370
  this.currentLayer.polygonSettings.polygons.map((polygonSettings, polygonIndex) => {
15176
15371
  const markerData = polygonSettings.points;
15177
15372
  const path = calculatePolygonPath(maps, maps.tileZoomLevel, this.currentLayer, markerData);
15178
- let element = document.getElementById(maps.element.id + '_LayerIndex_' + this.index + '_PolygonIndex_' + polygonIndex);
15373
+ const element = document.getElementById(maps.element.id + '_LayerIndex_' + this.index + '_PolygonIndex_' + polygonIndex);
15179
15374
  element.setAttribute('d', path);
15180
15375
  });
15181
15376
  document.getElementById(maps.element.id + '_LayerIndex_' + this.index + '_Polygons_Group').style.visibility = '';
@@ -15189,14 +15384,13 @@ class Zoom {
15189
15384
  }
15190
15385
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
15191
15386
  if ((!this.isPanModeEnabled) && !isNullOrUndefined(currentEle.childNodes[0])) {
15192
- this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
15387
+ this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement);
15193
15388
  }
15194
15389
  currentEle = layerElement.childNodes[j];
15195
15390
  let markerAnimation;
15196
15391
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
15197
15392
  Array.prototype.forEach.call(currentEle.childNodes, (childNode, k) => {
15198
15393
  this.markerTranslate(childNode, factor, x, y, scale, 'Marker', animate$$1);
15199
- const layerIndex = parseInt(childNode['id'].split('_LayerIndex_')[1].split('_')[0], 10);
15200
15394
  const dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
15201
15395
  const markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
15202
15396
  markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
@@ -15289,11 +15483,13 @@ class Zoom {
15289
15483
  maps.zoomLabelPositions = [];
15290
15484
  maps.zoomLabelPositions = maps.dataLabelModule.dataLabelCollections;
15291
15485
  const labelAnimate = !maps.isTileMap && animate$$1;
15486
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15292
15487
  const intersect = [];
15488
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15293
15489
  Array.prototype.forEach.call(currentEle.childNodes, (childNode, k) => {
15294
15490
  if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
15295
15491
  const labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
15296
- var zoomShapeWidth = currentEle.childNodes[k].id;
15492
+ const zoomShapeWidth = currentEle.childNodes[k].id;
15297
15493
  maps.zoomShapeCollection.push(zoomShapeWidth);
15298
15494
  this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, 'DataLabel', labelAnimate, currentLabelIndex, isPanning, intersect);
15299
15495
  currentLabelIndex++;
@@ -15328,7 +15524,7 @@ class Zoom {
15328
15524
  }
15329
15525
  }
15330
15526
  }
15331
- markerTranslates(element, factor, x, y, scale, type, layerElement, animate$$1 = false) {
15527
+ markerTranslates(element, factor, x, y, scale, type, layerElement) {
15332
15528
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15333
15529
  let templateFn;
15334
15530
  let nullCount = 0;
@@ -15372,6 +15568,7 @@ class Zoom {
15372
15568
  };
15373
15569
  eventArgs = markerShapeChoose(eventArgs, data);
15374
15570
  eventArgs = markerColorChoose(eventArgs, data);
15571
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
15375
15572
  this.maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
15376
15573
  if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
15377
15574
  eventArgs = markerShapeChoose(eventArgs, data);
@@ -15478,12 +15675,13 @@ class Zoom {
15478
15675
  }
15479
15676
  if (!isNullOrUndefined(polygonElement)) {
15480
15677
  for (let k = 0; k < polygonElement.childElementCount; k++) {
15481
- let width = maps.layersCollection[i].polygonSettings.polygons[k].borderWidth;
15678
+ const width = maps.layersCollection[i].polygonSettings.polygons[k].borderWidth;
15482
15679
  polygonElement.childNodes[k].childNodes[0].setAttribute('stroke-width', (width / scale).toString());
15483
15680
  }
15484
15681
  }
15485
15682
  }
15486
15683
  }
15684
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15487
15685
  dataLabelTranslate(element, factor, x, y, scale, type, animate$$1 = false, currentLabelIndex, isPanning, intersect) {
15488
15686
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15489
15687
  const labelCollection = this.maps.dataLabelModule.dataLabelCollections;
@@ -15501,8 +15699,8 @@ class Zoom {
15501
15699
  }
15502
15700
  const duration = this.currentLayer.animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.currentLayer.animationDuration;
15503
15701
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15504
- let label = labelCollection[currentLabelIndex];
15505
- let index = currentLabelIndex;
15702
+ const label = labelCollection[currentLabelIndex];
15703
+ const index = currentLabelIndex;
15506
15704
  if (label['layerIndex'] === layerIndex && label['shapeIndex'] === shapeIndex
15507
15705
  && label['labelIndex'] === labelIndex) {
15508
15706
  let labelX = label['location']['x'];
@@ -15554,7 +15752,7 @@ class Zoom {
15554
15752
  element.textContent = text;
15555
15753
  }
15556
15754
  }
15557
- let widthList = [];
15755
+ const widthList = [];
15558
15756
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Trim') {
15559
15757
  if (scale > 1) {
15560
15758
  zoomtrimLabel = textTrim((this.maps.dataLabelShape[index] * scale), zoomtext, style, zoomtextSize.width, true, widthList);
@@ -15595,7 +15793,7 @@ class Zoom {
15595
15793
  || textLocations['heightTop'] > intersect[j]['heightBottom']) {
15596
15794
  trimmedLable = !isNullOrUndefined(text) ? text : zoomtext;
15597
15795
  if (scale > 1) {
15598
- let trimmedWidth = widthList.length > 0 ? widthList[0] : zoomtextSize.width;
15796
+ const trimmedWidth = widthList.length > 0 ? widthList[0] : zoomtextSize.width;
15599
15797
  trimmedLable = textTrim((this.maps.dataLabelShape[index] * scale), trimmedLable, style, trimmedWidth, true);
15600
15798
  }
15601
15799
  element.textContent = trimmedLable;
@@ -15605,7 +15803,7 @@ class Zoom {
15605
15803
  const width = intersect[j]['rightWidth'] - textLocations['leftWidth'];
15606
15804
  const difference = width - (textLocations['rightWidth'] - textLocations['leftWidth']);
15607
15805
  text = !isNullOrUndefined(text) ? text : zoomtext;
15608
- let trimmedWidth = widthList.length > 0 ? widthList[0] : zoomtextSize.width;
15806
+ const trimmedWidth = widthList.length > 0 ? widthList[0] : zoomtextSize.width;
15609
15807
  trimmedLable = textTrim(difference, text, style, trimmedWidth, true);
15610
15808
  element.textContent = trimmedLable;
15611
15809
  break;
@@ -15614,7 +15812,7 @@ class Zoom {
15614
15812
  const width = textLocations['rightWidth'] - intersect[j]['leftWidth'];
15615
15813
  const difference = Math.abs(width - (textLocations['rightWidth'] - textLocations['leftWidth']));
15616
15814
  text = !isNullOrUndefined(text) ? text : zoomtext;
15617
- let trimmedWidth = widthList.length > 0 ? widthList[0] : zoomtextSize.width;
15815
+ const trimmedWidth = widthList.length > 0 ? widthList[0] : zoomtextSize.width;
15618
15816
  trimmedLable = textTrim(difference, text, style, trimmedWidth, true);
15619
15817
  element.textContent = trimmedLable;
15620
15818
  break;
@@ -15729,11 +15927,11 @@ class Zoom {
15729
15927
  * @param {PanDirection} direction - Specifies the direction of the panning.
15730
15928
  * @param {number} xDifference - Specifies the distance moved in the horizontal direction.
15731
15929
  * @param {number} yDifference - Specifies the distance moved in the vertical direction.
15732
- * @param {PointerEvent | TouchEvent | KeyboardEvent} mouseLocation - Specifies the pointer event argument.
15930
+ * @param {PointerEvent | TouchEvent | KeyboardEvent} event - Specifies the pointer event argument.
15733
15931
  * @returns {void}
15734
15932
  * @private
15735
15933
  */
15736
- panning(direction, xDifference, yDifference, mouseLocation) {
15934
+ panning(direction, xDifference, yDifference, event) {
15737
15935
  const map = this.maps;
15738
15936
  let panArgs;
15739
15937
  const down = this.mouseDownPoints;
@@ -15749,6 +15947,8 @@ class Zoom {
15749
15947
  let y;
15750
15948
  xDifference = !isNullOrUndefined(xDifference) ? xDifference : (down.x - move.x);
15751
15949
  yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
15950
+ const layerX = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerX'] : event.touches[0].pageX;
15951
+ const layerY = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerY'] : event.touches[0].pageY;
15752
15952
  this.maps.mergeCluster();
15753
15953
  if (!map.isTileMap) {
15754
15954
  const legendElement = document.getElementById(map.element.id + '_Legend_Group');
@@ -15762,7 +15962,7 @@ class Zoom {
15762
15962
  const panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
15763
15963
  ((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
15764
15964
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15765
- const location = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
15965
+ const location = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, layerX, layerY);
15766
15966
  const minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
15767
15967
  panArgs = {
15768
15968
  cancel: false, name: pan, maps: map,
@@ -15791,18 +15991,16 @@ class Zoom {
15791
15991
  else if (this.maps.tileZoomLevel > 1) {
15792
15992
  x = map.tileTranslatePoint.x - xDifference;
15793
15993
  y = map.tileTranslatePoint.y - yDifference;
15794
- this.distanceX = x - map.tileTranslatePoint.x;
15795
- this.distanceY = y - map.tileTranslatePoint.y;
15796
15994
  map.tileTranslatePoint.x = x;
15797
15995
  map.tileTranslatePoint.y = y;
15798
15996
  if ((map.tileTranslatePoint.y > -10 && yDifference < 0) || ((map.tileTranslatePoint.y < -((Math.pow(2, this.maps.tileZoomLevel) - 2) * 256) && yDifference > 0))) {
15799
15997
  map.tileTranslatePoint.x = x + xDifference;
15800
15998
  map.tileTranslatePoint.y = y + yDifference;
15801
15999
  }
15802
- map.translatePoint.x = (map.tileTranslatePoint.x - xDifference) / map.scale;
15803
- map.translatePoint.y = (map.tileTranslatePoint.y - yDifference) / map.scale;
16000
+ map.translatePoint.x = (map.tileTranslatePoint.x) / map.scale;
16001
+ map.translatePoint.y = (map.tileTranslatePoint.y) / map.scale;
15804
16002
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15805
- const location = this.maps.getTileGeoLocation(mouseLocation['layerX'], mouseLocation['layerY']);
16003
+ const location = this.maps.getTileGeoLocation(layerX, layerY);
15806
16004
  const minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
15807
16005
  panArgs = {
15808
16006
  cancel: false, name: pan, maps: map,
@@ -15815,19 +16013,17 @@ class Zoom {
15815
16013
  map.trigger(pan, panArgs);
15816
16014
  map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint, 'Pan');
15817
16015
  this.applyTransform(map, false, true);
16016
+ map.translatePoint.x = (map.tileTranslatePoint.x - xDifference) / map.scale;
16017
+ map.translatePoint.y = (map.tileTranslatePoint.y - yDifference) / map.scale;
15818
16018
  }
15819
16019
  map.zoomTranslatePoint = map.translatePoint;
15820
16020
  this.mouseDownPoints = this.mouseMovePoints;
15821
16021
  this.isSingleClick = false;
15822
16022
  }
15823
- toAlignSublayer() {
15824
- this.maps.translatePoint.x = !isNullOrUndefined(this.distanceX) ? (this.maps.translatePoint.x -
15825
- (this.distanceX / this.maps.scale)) : this.maps.translatePoint.x;
15826
- this.maps.translatePoint.y = !isNullOrUndefined(this.distanceY) ? this.maps.translatePoint.y -
15827
- (this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
15828
- this.applyTransform(this.maps, false);
15829
- }
15830
16023
  /**
16024
+ * @param {number} zoomFactor - Specifies the factor for zooming
16025
+ * @param {string} type - Specifies the type
16026
+ * @returns {void}
15831
16027
  * @private
15832
16028
  */
15833
16029
  toolBarZooming(zoomFactor, type) {
@@ -15920,7 +16116,6 @@ class Zoom {
15920
16116
  }
15921
16117
  this.markerLineAnimation(map);
15922
16118
  map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
15923
- const element1 = document.getElementById(this.maps.element.id + '_tiles');
15924
16119
  const animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
15925
16120
  setTimeout(() => {
15926
16121
  this.applyTransform(this.maps, true);
@@ -15936,12 +16131,11 @@ class Zoom {
15936
16131
  this.triggerZoomComplete(map, prevLevel, type);
15937
16132
  }
15938
16133
  /**
16134
+ * @returns {void}
15939
16135
  * @private
15940
16136
  */
15941
16137
  createZoomingToolbars() {
15942
16138
  const map = this.maps;
15943
- let zoomInElements;
15944
- let zoomOutElements;
15945
16139
  this.toolBarGroup = map.renderer.createGroup({
15946
16140
  id: map.element.id + '_Zooming_KitCollection',
15947
16141
  opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
@@ -15995,7 +16189,7 @@ class Zoom {
15995
16189
  });
15996
16190
  this.currentToolbarEle.setAttribute('class', 'e-maps-toolbar');
15997
16191
  this.currentToolbarEle.appendChild(map.renderer.drawCircle(new CircleOption(map.element.id + '_Zooming_ToolBar_' + toolbar + '_Rect', button.fill, { color: borderColor, width: button.borderWidth, opacity: button.borderOpacity }, button.opacity, cx, cy, radius, '')));
15998
- let opacity = 1;
16192
+ const opacity = 1;
15999
16193
  let direction = '';
16000
16194
  const fill = button.fill;
16001
16195
  this.selectionColor = this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor;
@@ -16023,10 +16217,6 @@ class Zoom {
16023
16217
  fillColor = this.maps.themeStyle.zoomFillColor;
16024
16218
  strokeColor = pathStroke;
16025
16219
  }
16026
- else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
16027
- fillColor = fill;
16028
- strokeColor = pathStroke;
16029
- }
16030
16220
  else {
16031
16221
  fillColor = this.selectionColor;
16032
16222
  strokeColor = this.selectionColor;
@@ -16040,18 +16230,20 @@ class Zoom {
16040
16230
  }
16041
16231
  case 'zoomin':
16042
16232
  direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
16233
+ /* eslint-disable no-case-declarations */
16043
16234
  const zoomInPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar + '_Path', fill, 3, pathStroke, 1, 1, null, direction));
16235
+ /* eslint-enable no-case-declarations */
16044
16236
  zoomInPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
16045
16237
  this.currentToolbarEle.appendChild(zoomInPath);
16046
- zoomInElements = this.currentToolbarEle;
16047
16238
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
16048
16239
  break;
16049
16240
  case 'zoomout':
16050
16241
  direction = 'M 0, 8 L 16, 8';
16242
+ /* eslint-disable no-case-declarations */
16051
16243
  const zoomOutPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, fill, 3, pathStroke, 1, 1, null, direction));
16244
+ /* eslint-enable no-case-declarations */
16052
16245
  zoomOutPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
16053
16246
  this.currentToolbarEle.appendChild(zoomOutPath);
16054
- zoomOutElements = this.currentToolbarEle;
16055
16247
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
16056
16248
  break;
16057
16249
  case 'pan': {
@@ -16081,7 +16273,9 @@ class Zoom {
16081
16273
  direction = 'M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,';
16082
16274
  direction += '1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,';
16083
16275
  direction += '13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,';
16276
+ /* eslint-disable no-case-declarations */
16084
16277
  const resetPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, fill, null, pathStroke, 1, 1, null, direction + '3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z'));
16278
+ /* eslint-enable no-case-declarations */
16085
16279
  resetPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
16086
16280
  this.currentToolbarEle.appendChild(resetPath);
16087
16281
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
@@ -16091,6 +16285,8 @@ class Zoom {
16091
16285
  }
16092
16286
  }
16093
16287
  /**
16288
+ * @param {PointerEvent} e - Specifies the event in the map
16289
+ * @returns {void}
16094
16290
  * @private
16095
16291
  */
16096
16292
  performToolBarAction(e) {
@@ -16104,13 +16300,15 @@ class Zoom {
16104
16300
  isToolbarPerform = (this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) + 1 <= this.maps.zoomSettings.maxZoom;
16105
16301
  break;
16106
16302
  case 'zoomout':
16303
+ /* eslint-disable no-case-declarations */
16107
16304
  const scaleValue = this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale;
16305
+ /* eslint-enable no-case-declarations */
16108
16306
  isToolbarPerform = (this.maps.projectionType === 'Miller' || this.maps.projectionType === 'Winkel3' ||
16109
16307
  this.maps.projectionType === 'AitOff') ? Math.round(scaleValue) - 1 >= this.maps.zoomSettings.minZoom :
16110
16308
  (scaleValue) - 1 >= this.maps.zoomSettings.minZoom;
16111
16309
  break;
16112
16310
  case 'reset':
16113
- isToolbarPerform = Math.round(this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) != this.maps.zoomSettings.minZoom;
16311
+ isToolbarPerform = Math.round(this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) !== this.maps.zoomSettings.minZoom;
16114
16312
  break;
16115
16313
  }
16116
16314
  if (isTouch && isToolbarPerform) {
@@ -16244,6 +16442,8 @@ class Zoom {
16244
16442
  }
16245
16443
  }
16246
16444
  /**
16445
+ * @param {PointerEvent} e - Specifies the event in the map
16446
+ * @returns {void}
16247
16447
  * @private
16248
16448
  */
16249
16449
  showTooltip(e) {
@@ -16272,6 +16472,7 @@ class Zoom {
16272
16472
  }
16273
16473
  }
16274
16474
  /**
16475
+ * @returns {void}
16275
16476
  * @private
16276
16477
  */
16277
16478
  removeTooltip() {
@@ -16280,6 +16481,7 @@ class Zoom {
16280
16481
  }
16281
16482
  }
16282
16483
  /**
16484
+ * @returns {void}
16283
16485
  * @private
16284
16486
  */
16285
16487
  alignToolBar() {
@@ -16339,6 +16541,9 @@ class Zoom {
16339
16541
  element.appendChild(style);
16340
16542
  }
16341
16543
  /**
16544
+ * @param {number} factor - Specifies the factor for toolbar
16545
+ * @param {string} id - Specifies the id
16546
+ * @returns {void}
16342
16547
  * @private
16343
16548
  */
16344
16549
  removeToolbarOpacity(factor, id) {
@@ -16351,8 +16556,8 @@ class Zoom {
16351
16556
  else {
16352
16557
  this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : '', 'e-maps-toolbar', 'e-maps-toolbar', this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : '', 'e-maps-toolbar');
16353
16558
  }
16354
- let toolbarShapeOpacity = this.maps.toolbarProperties.shapeOpacity;
16355
- let toolbarButtonOpacity = this.maps.toolbarProperties.borderOpacity;
16559
+ const toolbarShapeOpacity = this.maps.toolbarProperties.shapeOpacity;
16560
+ const toolbarButtonOpacity = this.maps.toolbarProperties.borderOpacity;
16356
16561
  if (this.maps.isTileMap && (factor <= 1.1 || this.maps.zoomSettings.minZoom === factor)) {
16357
16562
  if (!this.maps.isDevice) {
16358
16563
  this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : '', 'e-maps-toolbar', '', this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : '', '');
@@ -16440,6 +16645,12 @@ class Zoom {
16440
16645
  this.setOpacity('_Zooming_ToolBar_Reset_Rect', '_Zooming_ToolBar_Reset', resetStrokeOpacity, resetOpacity);
16441
16646
  }
16442
16647
  /**
16648
+ * @param {string} zoomClassStyle - Specifies the style for zoom class.
16649
+ * @param {string} zoomInClassStyle - Specifies the style for zoom in.
16650
+ * @param {string} zoomOutClassStyle - Specifies the style for zoom out.
16651
+ * @param {string} panClassStyle - Specifies the style for pan.
16652
+ * @param {string} resetClassStyle - Specifies the style for reset.
16653
+ * @returns {void}
16443
16654
  * @private
16444
16655
  */
16445
16656
  removeToolbarClass(zoomClassStyle, zoomInClassStyle, zoomOutClassStyle, panClassStyle, resetClassStyle) {
@@ -16477,30 +16688,30 @@ class Zoom {
16477
16688
  * To bind events.
16478
16689
  *
16479
16690
  * @param {Element} element - Specifies the element.
16480
- * @param {any} process - Specifies the process.
16691
+ * @param {Function} process - Specifies the process.
16481
16692
  * @returns {void}
16482
16693
  * @private
16483
16694
  */
16484
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16485
16695
  wireEvents(element, process) {
16486
16696
  EventHandler.add(element, Browser.touchStartEvent, process, this);
16487
16697
  EventHandler.add(element, 'mouseover', this.showTooltip, this);
16488
16698
  EventHandler.add(element, 'mouseout', this.removeTooltip, this);
16489
16699
  }
16490
16700
  /**
16701
+ * @param {WheelEvent} e - Specifies the wheel event in the map for zooming
16702
+ * @returns {void}
16491
16703
  * @private
16492
16704
  */
16493
16705
  mapMouseWheel(e) {
16494
16706
  if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
16495
16707
  const map = this.maps;
16496
- const size = map.availableSize;
16497
16708
  map.markerZoomedState = false;
16498
16709
  map.zoomPersistence = map.enablePersistence;
16499
16710
  const position = this.getMousePosition(e.pageX, e.pageY);
16500
16711
  const prevLevel = map.tileZoomLevel;
16501
16712
  const prevScale = map.scale;
16502
16713
  const delta = 1;
16503
- const staticMaxZoomLevel = 22; // google map maximum zoom level value
16714
+ const staticMaxZoomLevel = map.zoomSettings.maxZoom;
16504
16715
  const value = (map.isTileMap) ? prevLevel : prevScale;
16505
16716
  if (((position.x > map.mapAreaRect.x) && (position.x < (map.mapAreaRect.x + map.mapAreaRect.width))) &&
16506
16717
  (position.y > map.mapAreaRect.y) && position.y < (map.mapAreaRect.y + map.mapAreaRect.height)) {
@@ -16513,8 +16724,8 @@ class Zoom {
16513
16724
  map.staticMapZoom = map.tileZoomLevel;
16514
16725
  if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
16515
16726
  map.staticMapZoom += 1;
16727
+ this.performZooming(position, (value + delta), direction);
16516
16728
  }
16517
- this.performZooming(position, (value + delta), direction);
16518
16729
  }
16519
16730
  else {
16520
16731
  map.mapScaleValue = value - delta;
@@ -16535,18 +16746,18 @@ class Zoom {
16535
16746
  }
16536
16747
  }
16537
16748
  /**
16749
+ * @param {PointerEvent} e - Specifies the event in the map
16750
+ * @returns {void}
16538
16751
  * @private
16539
16752
  */
16540
16753
  doubleClick(e) {
16541
16754
  const pageX = e.pageX;
16542
16755
  const pageY = e.pageY;
16543
- const target = e.target;
16544
- let tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
16756
+ const tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
16545
16757
  if (this.maps.zoomSettings.enable && this.maps.zoomSettings.doubleClickZoom
16546
16758
  && !(e.target['id'].indexOf('_Zooming_') > -1) && isNullOrUndefined(tooltipElement)) {
16547
16759
  const position = this.getMousePosition(pageX, pageY);
16548
16760
  const map = this.maps;
16549
- const size = map.availableSize;
16550
16761
  const prevLevel = map.tileZoomLevel;
16551
16762
  const prevScale = map.scale;
16552
16763
  map.mapScaleValue = map.mapScaleValue + 1;
@@ -16558,6 +16769,8 @@ class Zoom {
16558
16769
  }
16559
16770
  }
16560
16771
  /**
16772
+ * @param {PointerEvent} e - Specifies the event in the map
16773
+ * @returns {void}
16561
16774
  * @private
16562
16775
  */
16563
16776
  mouseDownHandler(e) {
@@ -16565,6 +16778,7 @@ class Zoom {
16565
16778
  let pageY;
16566
16779
  let target;
16567
16780
  let touches = null;
16781
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
16568
16782
  const element = e.target;
16569
16783
  if (e.type === 'touchstart') {
16570
16784
  this.isTouch = true;
@@ -16576,6 +16790,7 @@ class Zoom {
16576
16790
  else {
16577
16791
  pageX = e.pageX;
16578
16792
  pageY = e.pageY;
16793
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
16579
16794
  target = e.target;
16580
16795
  }
16581
16796
  if (!this.maps.zoomSettings.enablePanning) {
@@ -16586,10 +16801,10 @@ class Zoom {
16586
16801
  this.isPan = this.isPanModeEnabled = !this.isZoomSelection;
16587
16802
  }
16588
16803
  this.mouseDownLatLong = { x: pageX, y: pageY };
16589
- let scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
16804
+ const scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
16590
16805
  this.rectZoomingStart = ((this.isZoomSelection && scale < this.maps.zoomSettings.maxZoom) && this.maps.zoomSettings.enable);
16591
16806
  this.mouseDownPoints = this.getMousePosition(pageX, pageY);
16592
- if (this.isTouch) {
16807
+ if (this.isTouch && touches !== null) {
16593
16808
  this.firstMove = true;
16594
16809
  this.pinchFactor = this.maps.scale;
16595
16810
  this.fingers = touches.length;
@@ -16597,12 +16812,15 @@ class Zoom {
16597
16812
  this.isSingleClick = true;
16598
16813
  }
16599
16814
  /**
16815
+ * @param {PointerEvent} e - Specifies the event in the map
16816
+ * @returns {void}
16600
16817
  * @private
16601
16818
  */
16602
16819
  mouseMoveHandler(e) {
16603
16820
  let pageX;
16604
16821
  let pageY;
16605
16822
  const map = this.maps;
16823
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
16606
16824
  let target;
16607
16825
  let touches = null;
16608
16826
  const zoom = this.maps.zoomSettings;
@@ -16627,7 +16845,7 @@ class Zoom {
16627
16845
  }
16628
16846
  }
16629
16847
  if (this.isTouch) {
16630
- if (this.maps.zoomSettings.pinchZooming) {
16848
+ if (this.maps.zoomSettings.pinchZooming && touches !== null) {
16631
16849
  if (this.firstMove && touches.length === 2) {
16632
16850
  this.rectZoomingStart = false;
16633
16851
  this.updateInteraction();
@@ -16643,9 +16861,7 @@ class Zoom {
16643
16861
  }
16644
16862
  }
16645
16863
  this.mouseMovePoints = this.getMousePosition(pageX, pageY);
16646
- const targetId = e.target['id'];
16647
- const targetEle = e.target;
16648
- if (zoom.enable && this.isPanModeEnabled && this.maps.markerDragId.indexOf('_MarkerIndex_') == -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
16864
+ if (zoom.enable && this.isPanModeEnabled && this.maps.markerDragId.indexOf('_MarkerIndex_') === -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
16649
16865
  e.preventDefault();
16650
16866
  this.maps.element.style.cursor = 'pointer';
16651
16867
  this.mouseMoveLatLong = { x: pageX, y: pageY };
@@ -16657,9 +16873,9 @@ class Zoom {
16657
16873
  this.mouseDownLatLong['y'] = pageY;
16658
16874
  }
16659
16875
  }
16660
- if (this.isTouch ? (touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
16876
+ if (this.isTouch ? (touches !== null && touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
16661
16877
  e.preventDefault();
16662
- let scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
16878
+ const scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
16663
16879
  if (this.maps.zoomSettings.enableSelectionZooming && scale < this.maps.zoomSettings.maxZoom) {
16664
16880
  this.drawZoomRectangle();
16665
16881
  }
@@ -16670,10 +16886,11 @@ class Zoom {
16670
16886
  }
16671
16887
  }
16672
16888
  /**
16889
+ * @param {PointerEvent} e - Specifies the event in the map
16890
+ * @returns {void}
16673
16891
  * @private
16674
16892
  */
16675
16893
  mouseUpHandler(e) {
16676
- const map = this.maps;
16677
16894
  this.rectZoomingStart = false;
16678
16895
  this.isSingleClick = this.isSingleClick ? true : false;
16679
16896
  this.isTouch = false;
@@ -16681,7 +16898,6 @@ class Zoom {
16681
16898
  this.touchMoveList = [];
16682
16899
  this.lastScale = 1;
16683
16900
  this.maps.element.style.cursor = 'auto';
16684
- // eslint-disable-next-line max-len
16685
16901
  if (this.isPanModeEnabled && this.maps.zoomSettings.enablePanning && !isNullOrUndefined(this.maps.previousPoint) &&
16686
16902
  (this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)) {
16687
16903
  let pageX;
@@ -16689,10 +16905,9 @@ class Zoom {
16689
16905
  let layerX = 0;
16690
16906
  let layerY = 0;
16691
16907
  let target;
16692
- const rect = this.maps.element.getBoundingClientRect();
16693
16908
  const element = e.target;
16694
16909
  if (e.type.indexOf('touch') !== -1) {
16695
- let touchArg = e;
16910
+ const touchArg = e;
16696
16911
  layerX = pageX = touchArg.changedTouches[0].pageX;
16697
16912
  pageY = touchArg.changedTouches[0].pageY;
16698
16913
  layerY = pageY - (this.maps.isTileMap ? 10 : 0);
@@ -16704,6 +16919,7 @@ class Zoom {
16704
16919
  pageY = e.pageY;
16705
16920
  layerX = e['layerX'];
16706
16921
  layerY = e['layerY'] - (this.maps.isTileMap ? 10 : 0);
16922
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
16707
16923
  target = e.target;
16708
16924
  }
16709
16925
  let panCompleteEventArgs;
@@ -16735,10 +16951,6 @@ class Zoom {
16735
16951
  this.maps.trigger('panComplete', panCompleteEventArgs);
16736
16952
  }
16737
16953
  this.isPanModeEnabled = false;
16738
- if ((!isNullOrUndefined(this.distanceX) || !isNullOrUndefined(this.distanceY)) && (!isNullOrUndefined(this.currentLayer) && this.currentLayer.type === 'SubLayer')) {
16739
- this.toAlignSublayer();
16740
- this.distanceX = this.distanceY = null;
16741
- }
16742
16954
  const zoomRectElement = getElementByID(this.maps.element.id + '_Selection_Rect_Zooming');
16743
16955
  if (zoomRectElement && this.maps.zoomSettings.enable && this.maps.zoomSettings.enableSelectionZooming) {
16744
16956
  remove(zoomRectElement);
@@ -16746,10 +16958,14 @@ class Zoom {
16746
16958
  }
16747
16959
  this.mouseMoveLatLong = { x: 0, y: 0 };
16748
16960
  this.mouseDownLatLong = { x: 0, y: 0 };
16961
+ this.pinchDistance = null;
16749
16962
  }
16750
16963
  /**
16964
+ * @param {PointerEvent} e - Specifies the event in the map
16965
+ * @returns {void}
16751
16966
  * @private
16752
16967
  */
16968
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
16753
16969
  mouseCancelHandler(e) {
16754
16970
  this.isPanModeEnabled = false;
16755
16971
  this.isTouch = false;
@@ -16769,7 +16985,7 @@ class Zoom {
16769
16985
  */
16770
16986
  click(e) {
16771
16987
  const map = this.maps;
16772
- let tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
16988
+ const tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
16773
16989
  if ((map.markerModule && map.markerModule.sameMarkerData.length > 0) ||
16774
16990
  (e.target['id'].indexOf('MarkerIndex') > -1 && e.target['id'].indexOf('cluster') === -1) || !isNullOrUndefined(tooltipElement)) {
16775
16991
  return null;
@@ -16790,6 +17006,11 @@ class Zoom {
16790
17006
  }
16791
17007
  }
16792
17008
  /**
17009
+ * Gets the Mouse Position
17010
+ *
17011
+ * @param {number} pageX - Specifies the Page x in map
17012
+ * @param {number} pageY - Specifies the Page y in map
17013
+ * @returns {Point} - returns the mouse point position
16793
17014
  * @private
16794
17015
  */
16795
17016
  getMousePosition(pageX, pageY) {
@@ -16804,6 +17025,7 @@ class Zoom {
16804
17025
  return new Point(Math.abs(pageX - positionX), Math.abs(pageY - positionY));
16805
17026
  }
16806
17027
  /**
17028
+ * @returns {void}
16807
17029
  * @private
16808
17030
  */
16809
17031
  addEventListener() {
@@ -16819,6 +17041,7 @@ class Zoom {
16819
17041
  EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this);
16820
17042
  }
16821
17043
  /**
17044
+ * @returns {void}
16822
17045
  * @private
16823
17046
  */
16824
17047
  removeEventListener() {
@@ -16865,6 +17088,7 @@ class Zoom {
16865
17088
  this.removeEventListener();
16866
17089
  this.layerCollectionEle = null;
16867
17090
  this.currentLayer = null;
17091
+ this.pinchDistance = null;
16868
17092
  this.maps = null;
16869
17093
  }
16870
17094
  }
@@ -16897,6 +17121,7 @@ class Print {
16897
17121
  const argsData = {
16898
17122
  cancel: false, htmlContent: this.getHTMLContent(maps, elements), name: beforePrint
16899
17123
  };
17124
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
16900
17125
  maps.trigger('beforePrint', argsData, (beforePrintArgs) => {
16901
17126
  if (!argsData.cancel) {
16902
17127
  print(argsData.htmlContent, printWindow);
@@ -16914,6 +17139,7 @@ class Print {
16914
17139
  getHTMLContent(maps, elements) {
16915
17140
  const div = createElement('div');
16916
17141
  const divElement = maps.element.cloneNode(true);
17142
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
16917
17143
  let backgroundElement = (!maps.isTileMap ? divElement.getElementsByTagName('svg')[0] : divElement.getElementsByTagName('svg')[1]);
16918
17144
  if (!isNullOrUndefined(backgroundElement)) {
16919
17145
  backgroundElement = backgroundElement.childNodes[0];
@@ -17021,7 +17247,7 @@ class ImageExport {
17021
17247
  const svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
17022
17248
  let svgDataElement;
17023
17249
  let tileSvg;
17024
- let svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
17250
+ const svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
17025
17251
  const backgroundElement = svgObject.childNodes[0];
17026
17252
  const backgroundColor = backgroundElement.getAttribute('fill');
17027
17253
  if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
@@ -17081,7 +17307,7 @@ class ImageExport {
17081
17307
  const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
17082
17308
  const exportTileImg = new Image();
17083
17309
  exportTileImg.crossOrigin = 'Anonymous';
17084
- let background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
17310
+ const background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
17085
17311
  (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
17086
17312
  ctxt.fillStyle = background;
17087
17313
  ctxt.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
@@ -17161,7 +17387,7 @@ class ImageExport {
17161
17387
  * @returns {void}
17162
17388
  * @private
17163
17389
  */
17164
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
17390
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
17165
17391
  destroy() { }
17166
17392
  }
17167
17393
 
@@ -17175,7 +17401,7 @@ class PdfExport {
17175
17401
  * Constructor for Maps
17176
17402
  *
17177
17403
  */
17178
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
17404
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
17179
17405
  constructor() { }
17180
17406
  /**
17181
17407
  * To export the file as image/svg format
@@ -17190,7 +17416,7 @@ class PdfExport {
17190
17416
  */
17191
17417
  export(maps, type, fileName, allowDownload, orientation) {
17192
17418
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
17193
- const promise = new Promise((resolve, reject) => {
17419
+ const promise = new Promise((resolve) => {
17194
17420
  if (maps.isTileMap) {
17195
17421
  maps.isExportInitialTileMap = true;
17196
17422
  }
@@ -17248,7 +17474,7 @@ class PdfExport {
17248
17474
  const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
17249
17475
  const tileImg = new Image();
17250
17476
  tileImg.crossOrigin = 'Anonymous';
17251
- let background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
17477
+ const background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
17252
17478
  (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
17253
17479
  ctx.fillStyle = background;
17254
17480
  ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
@@ -17326,7 +17552,7 @@ class PdfExport {
17326
17552
  * @returns {void}
17327
17553
  * @private
17328
17554
  */
17329
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
17555
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
17330
17556
  destroy() { }
17331
17557
  }
17332
17558