@syncfusion/ej2-maps 20.3.49 → 20.4.38

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 (48) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +65 -51
  4. package/dist/ej2-maps.min.js +2 -2
  5. package/dist/ej2-maps.umd.min.js +2 -2
  6. package/dist/ej2-maps.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-maps.es2015.js +1030 -781
  8. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  9. package/dist/es6/ej2-maps.es5.js +1017 -772
  10. package/dist/es6/ej2-maps.es5.js.map +1 -1
  11. package/dist/global/ej2-maps.min.js +2 -2
  12. package/dist/global/ej2-maps.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +34 -21
  15. package/src/maps/layers/bing-map.d.ts +1 -0
  16. package/src/maps/layers/bing-map.js +1 -0
  17. package/src/maps/layers/bubble.d.ts +4 -0
  18. package/src/maps/layers/bubble.js +7 -3
  19. package/src/maps/layers/color-mapping.d.ts +5 -0
  20. package/src/maps/layers/color-mapping.js +5 -3
  21. package/src/maps/layers/data-label.d.ts +0 -1
  22. package/src/maps/layers/data-label.js +13 -14
  23. package/src/maps/layers/layer-panel.d.ts +7 -7
  24. package/src/maps/layers/layer-panel.js +119 -72
  25. package/src/maps/layers/legend.js +30 -25
  26. package/src/maps/layers/marker.d.ts +13 -0
  27. package/src/maps/layers/marker.js +133 -115
  28. package/src/maps/layers/navigation-selected-line.d.ts +5 -0
  29. package/src/maps/layers/navigation-selected-line.js +70 -65
  30. package/src/maps/maps-model.d.ts +1 -1
  31. package/src/maps/maps.d.ts +19 -0
  32. package/src/maps/maps.js +469 -382
  33. package/src/maps/model/base.js +2 -2
  34. package/src/maps/model/export-image.d.ts +4 -3
  35. package/src/maps/model/export-image.js +7 -6
  36. package/src/maps/model/export-pdf.d.ts +6 -6
  37. package/src/maps/model/export-pdf.js +8 -7
  38. package/src/maps/model/interface.d.ts +2 -2
  39. package/src/maps/model/print.d.ts +4 -2
  40. package/src/maps/model/print.js +6 -3
  41. package/src/maps/user-interaction/annotation.js +2 -3
  42. package/src/maps/user-interaction/highlight.js +37 -13
  43. package/src/maps/user-interaction/selection.js +4 -2
  44. package/src/maps/user-interaction/tooltip.js +8 -8
  45. package/src/maps/user-interaction/zoom.d.ts +5 -0
  46. package/src/maps/user-interaction/zoom.js +39 -29
  47. package/src/maps/utils/helper.d.ts +2 -0
  48. package/src/maps/utils/helper.js +58 -45
@@ -16,8 +16,6 @@ var __extends$1 = (undefined && undefined.__extends) || (function () {
16
16
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
17
  };
18
18
  })();
19
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
20
- /* eslint-disable @typescript-eslint/no-unused-vars */
21
19
  /* eslint-disable max-len */
22
20
  /**
23
21
  * Helper functions for maps control
@@ -667,9 +665,9 @@ function renderTextElement(option, style, color, parent, isMinus) {
667
665
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
668
666
  function convertElement(element, markerId, data, index, mapObj) {
669
667
  var childElement = createElement('div', {
670
- id: markerId,
671
- styles: 'position: absolute;pointer-events: auto;'
668
+ id: markerId
672
669
  });
670
+ childElement.style.cssText = 'position: absolute;pointer-events: auto;';
673
671
  var elementLength = element.length;
674
672
  while (elementLength > 0) {
675
673
  childElement.appendChild(element[0]);
@@ -677,13 +675,14 @@ function convertElement(element, markerId, data, index, mapObj) {
677
675
  }
678
676
  var templateHtml = childElement.innerHTML;
679
677
  var properties = Object.keys(data);
678
+ var regExp = RegExp;
680
679
  for (var i = 0; i < properties.length; i++) {
681
680
  if (typeof data[properties[i]] === 'object') {
682
681
  templateHtml = convertStringToValue(templateHtml, '', data, mapObj);
683
682
  // eslint-disable-next-line @typescript-eslint/ban-types
684
683
  }
685
684
  else if (properties[i].toLowerCase() !== 'latitude' && properties[i].toLowerCase() !== 'longitude') {
686
- templateHtml = templateHtml.replace(new RegExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
685
+ templateHtml = templateHtml.replace(new regExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
687
686
  }
688
687
  }
689
688
  childElement.innerHTML = templateHtml;
@@ -720,6 +719,7 @@ function formatValue(value, maps) {
720
719
  function convertStringToValue(stringTemplate, format, data, maps) {
721
720
  var templateHtml = (stringTemplate === '') ? format : stringTemplate;
722
721
  var templateValue = (stringTemplate === '') ? templateHtml.split('${') : templateHtml.split('{{:');
722
+ var regExp = RegExp;
723
723
  for (var i = 0; i < templateValue.length; i++) {
724
724
  if ((templateValue[i].indexOf('}}') > -1 && templateValue[i].indexOf('.') > -1) ||
725
725
  (templateValue[i].indexOf('}') > -1 && templateValue[i].search('.') > -1)) {
@@ -729,7 +729,7 @@ function convertStringToValue(stringTemplate, format, data, maps) {
729
729
  var templateSplitValue = (getValueFromObject(data, split[j])).toString();
730
730
  templateHtml = (stringTemplate === '') ?
731
731
  templateHtml.split('${' + split[j] + '}').join(formatValue(templateSplitValue, maps)) :
732
- templateHtml.replace(new RegExp('{{:' + split[j] + '}}', 'g'), templateSplitValue);
732
+ templateHtml.replace(new regExp('{{:' + split[j] + '}}', 'g'), templateSplitValue);
733
733
  }
734
734
  }
735
735
  }
@@ -751,15 +751,17 @@ function convertElementFromLabel(element, labelId, data, index, mapObj) {
751
751
  var templateHtml = labelEle.outerHTML;
752
752
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
753
753
  var properties = Object.keys(data);
754
+ var regExp = RegExp;
754
755
  for (var i = 0; i < properties.length; i++) {
755
756
  // eslint-disable-next-line @typescript-eslint/ban-types
756
- templateHtml = templateHtml.replace(new RegExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
757
+ templateHtml = templateHtml.replace(new regExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
757
758
  }
758
- return createElement('div', {
759
+ var templateEle = createElement('div', {
759
760
  id: labelId,
760
- innerHTML: templateHtml,
761
- styles: 'position: absolute'
761
+ innerHTML: templateHtml
762
762
  });
763
+ templateEle.style.position = 'absolute';
764
+ return templateEle;
763
765
  }
764
766
  /**
765
767
  *
@@ -861,7 +863,7 @@ function markerShapeChoose(eventArgs, data) {
861
863
  var shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
862
864
  (getValueFromObject(data, eventArgs.shapeValuePath).toString()) :
863
865
  data[eventArgs.shapeValuePath]);
864
- eventArgs.shape = (shape.toString() !== "") ? shape : eventArgs.shape;
866
+ eventArgs.shape = (shape.toString() !== '') ? shape : eventArgs.shape;
865
867
  if (data[eventArgs.shapeValuePath] === 'Image') {
866
868
  eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
867
869
  ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
@@ -870,7 +872,7 @@ function markerShapeChoose(eventArgs, data) {
870
872
  }
871
873
  else {
872
874
  var shapes = (!isNullOrUndefined(eventArgs.shapeValuePath)) ? ((eventArgs.shapeValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.shapeValuePath).toString() : eventArgs.shape) : eventArgs.shape;
873
- eventArgs.shape = (shapes.toString() !== "") ? shapes : eventArgs.shape;
875
+ eventArgs.shape = (shapes.toString() !== '') ? shapes : eventArgs.shape;
874
876
  var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
875
877
  ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
876
878
  data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
@@ -949,8 +951,6 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
949
951
  container['top'] : (container['bottom'] - container['top'])));
950
952
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
951
953
  var translate = (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
952
- var transPoint = (maps.isTileMap) ? { x: 0, y: 0 } : (maps.translatePoint.x !== 0) ?
953
- maps.translatePoint : translate['location'];
954
954
  var dataIndex = parseInt(markerTemplate.childNodes[o]['id'].split('_dataIndex_')[1].split('_')[0], 10);
955
955
  var markerIndex = parseInt(markerTemplate.childNodes[o]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
956
956
  var markerSetting = currentLayer.markerSettings[markerIndex];
@@ -1599,6 +1599,7 @@ function drawStar(maps, options, size, location, element) {
1599
1599
  * @param {PathOption} options - Specifies the path options
1600
1600
  * @param {Size} size - Specifies the size
1601
1601
  * @param {MapLocation} location - Specifies the map location
1602
+ * @param {string} type - Specifies the type.
1602
1603
  * @param {Element} element - Specifies the element
1603
1604
  * @returns {Element} - Returns the element
1604
1605
  * @private
@@ -2089,7 +2090,8 @@ function getTranslate(mapObject, layer, animate) {
2089
2090
  mapObject.zoomTranslatePoint.y = y;
2090
2091
  }
2091
2092
  else {
2092
- if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1 || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
2093
+ if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1
2094
+ || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
2093
2095
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2094
2096
  scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
2095
2097
  mapWidth *= scaleFactor;
@@ -2107,8 +2109,10 @@ function getTranslate(mapObject, layer, animate) {
2107
2109
  }
2108
2110
  }
2109
2111
  if (!isNullOrUndefined(mapObject.translatePoint)) {
2110
- x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
2111
- y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
2112
+ x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
2113
+ mapObject.translatePoint.x : x;
2114
+ y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
2115
+ mapObject.translatePoint.y : y;
2112
2116
  }
2113
2117
  }
2114
2118
  scaleFactor = (mapObject.enablePersistence) ? ((mapObject.mapScaleValue >= 1) ? mapObject.mapScaleValue : 1) : scaleFactor;
@@ -2159,9 +2163,11 @@ function getZoomTranslate(mapObject, layer, animate) {
2159
2163
  mapObject.mapScaleValue = mapObject.zoomSettings.zoomFactor !== 1 &&
2160
2164
  mapObject.zoomSettings.zoomFactor ===
2161
2165
  mapObject.mapScaleValue ? mapObject.zoomSettings.zoomFactor :
2162
- mapObject.zoomSettings.zoomFactor !== mapObject.mapScaleValue && !mapObject.centerPositionChanged ? mapObject.mapScaleValue : mapObject.zoomSettings.zoomFactor;
2163
- if (mapObject.zoomSettings.shouldZoomInitially) {
2164
- mapObject.mapScaleValue = zoomFactorValue = scaleFactor = ((mapObject.enablePersistence || mapObject.zoomSettings.shouldZoomInitially) && mapObject.scale === 1)
2166
+ mapObject.zoomSettings.zoomFactor !== mapObject.mapScaleValue && !mapObject.centerPositionChanged ?
2167
+ mapObject.mapScaleValue : mapObject.zoomSettings.zoomFactor;
2168
+ if (mapObject.zoomSettings.shouldZoomInitially && !mapObject.isZoomByPosition) {
2169
+ mapObject.mapScaleValue = zoomFactorValue = scaleFactor = ((mapObject.enablePersistence
2170
+ || mapObject.zoomSettings.shouldZoomInitially) && mapObject.scale === 1)
2165
2171
  ? mapObject.scale : (isNullOrUndefined(mapObject.markerZoomFactor)) ? mapObject.mapScaleValue : mapObject.markerZoomFactor;
2166
2172
  zoomFactorValue = mapObject.mapScaleValue;
2167
2173
  if (!isNullOrUndefined(mapObject.markerCenterLatitude) && !isNullOrUndefined(mapObject.markerCenterLongitude)) {
@@ -2188,12 +2194,17 @@ function getZoomTranslate(mapObject, layer, animate) {
2188
2194
  var leftPosition = ((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) / factor;
2189
2195
  var point = checkZoomMethod ? calculateCenterFromPixel(mapObject, layer) :
2190
2196
  convertGeoToPoint(latitude, longitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
2191
- if ((!isNullOrUndefined(mapObject.zoomTranslatePoint) || !isNullOrUndefined(mapObject.previousProjection)) && !mapObject.zoomNotApplied) {
2197
+ if ((!isNullOrUndefined(mapObject.zoomTranslatePoint) || !isNullOrUndefined(mapObject.previousProjection)) &&
2198
+ !mapObject.zoomNotApplied) {
2192
2199
  if (mapObject.previousProjection !== mapObject.projectionType) {
2193
2200
  x = -point.x + leftPosition;
2194
2201
  y = -point.y + topPosition;
2195
2202
  }
2196
2203
  else {
2204
+ if (mapObject.isZoomByPosition) {
2205
+ mapObject.zoomTranslatePoint.x = -point.x + leftPosition;
2206
+ mapObject.zoomTranslatePoint.y = -point.y + topPosition;
2207
+ }
2197
2208
  x = mapObject.zoomTranslatePoint.x;
2198
2209
  y = mapObject.zoomTranslatePoint.y;
2199
2210
  zoomFactorValue = zoomFactor;
@@ -2204,8 +2215,10 @@ function getZoomTranslate(mapObject, layer, animate) {
2204
2215
  y = -point.y + topPosition + mapObject.mapAreaRect.y / zoomFactor;
2205
2216
  }
2206
2217
  if (!isNullOrUndefined(mapObject.translatePoint)) {
2207
- y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
2208
- x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
2218
+ y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
2219
+ mapObject.translatePoint.y : y;
2220
+ x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
2221
+ mapObject.translatePoint.x : x;
2209
2222
  }
2210
2223
  scaleFactor = zoomFactorValue !== 0 ? zoomFactorValue : 1;
2211
2224
  }
@@ -2243,8 +2256,10 @@ function getZoomTranslate(mapObject, layer, animate) {
2243
2256
  }
2244
2257
  }
2245
2258
  if (!isNullOrUndefined(mapObject.translatePoint)) {
2246
- x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : leftPosition;
2247
- y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : topPosition;
2259
+ x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
2260
+ mapObject.translatePoint.x : leftPosition;
2261
+ y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
2262
+ mapObject.translatePoint.y : topPosition;
2248
2263
  }
2249
2264
  }
2250
2265
  scaleFactor = (mapObject.enablePersistence) ? (mapObject.mapScaleValue === 0 ? 1 : mapObject.mapScaleValue) : scaleFactor;
@@ -2309,6 +2324,7 @@ function Internalize(maps, value) {
2309
2324
  * Function to compile the template function for maps.
2310
2325
  *
2311
2326
  * @param {string} template - Specifies the template
2327
+ * @param {Maps} maps - Specifies the Maps instance.
2312
2328
  * @returns {Function} - Returns the function
2313
2329
  * @private
2314
2330
  */
@@ -2316,10 +2332,10 @@ function Internalize(maps, value) {
2316
2332
  function getTemplateFunction(template, maps) {
2317
2333
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2318
2334
  var templateFn = null;
2319
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2320
2335
  try {
2321
2336
  if (document.querySelectorAll(template).length) {
2322
2337
  templateFn = compile(document.querySelector(template).innerHTML.trim());
2338
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2323
2339
  }
2324
2340
  else if (maps.isVue || maps.isVue3) {
2325
2341
  templateFn = compile(template);
@@ -2401,7 +2417,7 @@ function triggerShapeEvent(targetId, selection, maps, eventName) {
2401
2417
  target: targetId,
2402
2418
  maps: maps
2403
2419
  };
2404
- maps.trigger(eventName, eventArgs, function (observedArgs) {
2420
+ maps.trigger(eventName, eventArgs, function () {
2405
2421
  eventArgs.border.opacity = isNullOrUndefined(eventArgs.border.opacity) ? eventArgs.opacity : eventArgs.border.opacity;
2406
2422
  });
2407
2423
  return eventArgs;
@@ -2524,7 +2540,8 @@ shapeData, data) {
2524
2540
  maps: map
2525
2541
  };
2526
2542
  map.trigger('itemSelection', eventArgs, function (observedArgs) {
2527
- eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity : selectionSettings.border.opacity;
2543
+ eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity :
2544
+ selectionSettings.border.opacity;
2528
2545
  map.shapeSelectionItem.push(eventArgs.shapeData);
2529
2546
  if (!getElement('ShapeselectionMap')) {
2530
2547
  document.body.appendChild(createStyle('ShapeselectionMap', 'ShapeselectionMapStyle', eventArgs));
@@ -2624,16 +2641,16 @@ function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element, isTou
2624
2641
  var demo = str[0].length;
2625
2642
  for (var i = 1; i < str.length; i++) {
2626
2643
  if (demo < str[i].length) {
2627
- demo = str[i].length;
2644
+ demo = (str[i]).length;
2628
2645
  }
2629
2646
  }
2630
2647
  if (!tooltip) {
2631
2648
  tooltip = createElement('div', {
2632
- id: id,
2633
- styles: 'background-color: rgb(255, 255, 255) !important; color:black !important; ' +
2634
- 'position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;' +
2635
- 'font-size:12px; font-family: "Segoe UI"; text-align:center'
2649
+ id: id
2636
2650
  });
2651
+ tooltip.style.cssText = 'background-color: rgb(255, 255, 255) !important; color:black !important; ' +
2652
+ 'position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;' +
2653
+ 'font-size:12px; font-family: "Segoe UI"; text-align:center';
2637
2654
  }
2638
2655
  if (x < (areaWidth - width)) {
2639
2656
  // eslint-disable-next-line no-self-assign
@@ -2694,7 +2711,7 @@ function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
2694
2711
  // if (touches) {
2695
2712
  // touchList = [];
2696
2713
  // for (let i: number = 0, length: number = touches.length; i < length; i++) {
2697
- // touchList.push({ pageX: touches[i].clientX, pageY: touches[i].clientY, pointerId: null });
2714
+ // touchList.push({ pageX: touches[i as number].clientX, pageY: touches[i as number].clientY, pointerId: null });
2698
2715
  // }
2699
2716
  // } else {
2700
2717
  // touchList = touchList ? touchList : [];
@@ -2702,8 +2719,8 @@ function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
2702
2719
  // touchList.push({ pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId });
2703
2720
  // } else {
2704
2721
  // for (let i: number = 0, length: number = touchList.length; i < length; i++) {
2705
- // if (touchList[i].pointerId === e.pointerId) {
2706
- // touchList[i] = { pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId };
2722
+ // if (touchList[i as number].pointerId === e.pointerId) {
2723
+ // touchList[i as number] = { pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId };
2707
2724
  // } else {
2708
2725
  // touchList.push({ pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId });
2709
2726
  // }
@@ -2731,13 +2748,14 @@ function createTooltip(id, text, top, left, fontSize) {
2731
2748
  'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
2732
2749
  if (!tooltip) {
2733
2750
  tooltip = createElement('div', {
2734
- id: id, innerHTML: '&nbsp;' + text + '&nbsp;', styles: style
2751
+ id: id, innerHTML: '&nbsp;' + text + '&nbsp;'
2735
2752
  });
2753
+ tooltip.style.cssText = style;
2736
2754
  document.body.appendChild(tooltip);
2737
2755
  }
2738
2756
  else {
2739
- tooltip.setAttribute('innerHTML', '&nbsp;' + text + '&nbsp;');
2740
- tooltip.setAttribute('styles', style);
2757
+ tooltip.innerHTML = '&nbsp;' + text + '&nbsp;';
2758
+ tooltip.style.cssText = style;
2741
2759
  }
2742
2760
  }
2743
2761
  /**
@@ -3134,7 +3152,7 @@ function animate(element, delay, duration, process, end) {
3134
3152
  end.call(_this, { element: element });
3135
3153
  if (element.id.indexOf('Marker') > -1) {
3136
3154
  var markerElement = getElementByID(element.id.split('_Layer')[0] + '_Markers_Group');
3137
- markerElement.setAttribute('style', markerStyle);
3155
+ markerElement.style.cssText = markerStyle;
3138
3156
  }
3139
3157
  }
3140
3158
  };
@@ -3847,7 +3865,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
3847
3865
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
3848
3866
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3849
3867
  };
3850
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
3868
+ /* eslint-disable max-len */
3851
3869
  /**
3852
3870
  * Maps base document
3853
3871
  */
@@ -4405,7 +4423,7 @@ var ZoomSettings = /** @__PURE__ @class */ (function (_super) {
4405
4423
  Property(false)
4406
4424
  ], ZoomSettings.prototype, "doubleClickZoom", void 0);
4407
4425
  __decorate$1([
4408
- Property(false)
4426
+ Property(true)
4409
4427
  ], ZoomSettings.prototype, "pinchZooming", void 0);
4410
4428
  __decorate$1([
4411
4429
  Property(false)
@@ -4881,18 +4899,18 @@ var Marker = /** @__PURE__ @class */ (function () {
4881
4899
  var currentLayer = maps.layersCollection[layerIndex];
4882
4900
  this.markerSVGObject = maps.renderer.createGroup({
4883
4901
  id: maps.element.id + '_Markers_Group',
4884
- class: 'GroupElement',
4885
- style: 'pointer-events: auto;'
4902
+ class: 'GroupElement'
4886
4903
  });
4904
+ this.markerSVGObject.style.pointerEvents = 'auto';
4887
4905
  var markerTemplateEle = createElement('div', {
4888
4906
  id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
4889
- className: maps.element.id + '_template',
4890
- styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
4891
- 'top:' + maps.mapAreaRect.y + 'px;' +
4892
- 'left:' + maps.mapAreaRect.x + 'px;' +
4893
- 'height:' + maps.mapAreaRect.height + 'px;' +
4894
- 'width:' + maps.mapAreaRect.width + 'px;'
4907
+ className: maps.element.id + '_template'
4895
4908
  });
4909
+ markerTemplateEle.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
4910
+ 'top:' + maps.mapAreaRect.y + 'px;' +
4911
+ 'left:' + maps.mapAreaRect.x + 'px;' +
4912
+ 'height:' + maps.mapAreaRect.height + 'px;' +
4913
+ 'width:' + maps.mapAreaRect.width + 'px;';
4896
4914
  currentLayer.markerSettings.map(function (markerSettings, markerIndex) {
4897
4915
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4898
4916
  var markerData = markerSettings.dataSource;
@@ -4942,7 +4960,8 @@ var Marker = /** @__PURE__ @class */ (function () {
4942
4960
  nullCount += (!isNaN(lat) && !isNaN(lng)) ? 0 : 1;
4943
4961
  markerTemplateCount += (eventArgs.cancel) ? 1 : 0;
4944
4962
  markerCount += (eventArgs.cancel) ? 1 : 0;
4945
- maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ? maps.markerNullCount + 1 : maps.markerNullCount;
4963
+ maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ?
4964
+ maps.markerNullCount + 1 : maps.markerNullCount;
4946
4965
  var markerDataLength = markerData.length - maps.markerNullCount;
4947
4966
  if (_this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
4948
4967
  layerElement.appendChild(_this.markerSVGObject);
@@ -5000,125 +5019,134 @@ var Marker = /** @__PURE__ @class */ (function () {
5000
5019
  };
5001
5020
  /**
5002
5021
  * To calculate center position and factor value dynamically
5022
+ *
5023
+ * @param {LayerSettings[]} layersCollection - Specifies the layer settings instance.
5024
+ * @returns {void}
5003
5025
  */
5004
5026
  Marker.prototype.calculateZoomCenterPositionAndFactor = function (layersCollection) {
5005
- if (this.maps.zoomSettings.shouldZoomInitially && this.maps.markerModule) {
5006
- var minLong_1;
5007
- var maxLat_1;
5008
- var minLat_1;
5009
- var maxLong_1;
5010
- var zoomLevel = void 0;
5011
- var centerLat = void 0;
5012
- var centerLong = void 0;
5013
- var maxZoomFact = this.maps.zoomSettings.maxZoom;
5014
- var mapWidth = this.maps.mapAreaRect.width;
5015
- var mapHeight = this.maps.mapAreaRect.height;
5016
- this.maps.markerZoomedState = this.maps.markerZoomedState ? this.maps.markerZoomedState : isNullOrUndefined(this.maps.markerZoomFactor) ?
5017
- !this.maps.markerZoomedState : this.maps.markerZoomFactor > 1 ? this.maps.markerZoomedState : !this.maps.markerZoomedState;
5018
- this.maps.defaultState = this.maps.markerZoomedState ? !this.maps.markerZoomedState : this.maps.defaultState;
5019
- Array.prototype.forEach.call(layersCollection, function (currentLayer, layerIndex) {
5020
- var isMarker = currentLayer.markerSettings.length !== 0;
5021
- if (isMarker) {
5022
- Array.prototype.forEach.call(currentLayer.markerSettings, function (markerSetting, markerIndex) {
5023
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5024
- var markerData = markerSetting.dataSource;
5025
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5026
- Array.prototype.forEach.call(markerData, function (data, dataIndex) {
5027
- var latitude = !isNullOrUndefined(data['latitude']) ? parseFloat(data['latitude']) :
5028
- !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
5029
- var longitude = !isNullOrUndefined(data['longitude']) ? parseFloat(data['longitude']) :
5030
- !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : null;
5031
- minLong_1 = isNullOrUndefined(minLong_1) && dataIndex === 0 ?
5032
- longitude : minLong_1;
5033
- maxLat_1 = isNullOrUndefined(maxLat_1) && dataIndex === 0 ?
5034
- latitude : maxLat_1;
5035
- minLat_1 = isNullOrUndefined(minLat_1) && dataIndex === 0 ?
5036
- latitude : minLat_1;
5037
- maxLong_1 = isNullOrUndefined(maxLong_1) && dataIndex === 0 ?
5038
- longitude : maxLong_1;
5039
- if (minLong_1 > longitude) {
5040
- minLong_1 = longitude;
5041
- }
5042
- if (minLat_1 > latitude) {
5043
- minLat_1 = latitude;
5044
- }
5045
- if (maxLong_1 < longitude) {
5046
- maxLong_1 = longitude;
5047
- }
5048
- if (maxLat_1 < latitude) {
5049
- maxLat_1 = latitude;
5050
- }
5027
+ if (!isNullOrUndefined(this.maps)) {
5028
+ if (this.maps.zoomSettings.shouldZoomInitially && this.maps.markerModule) {
5029
+ var minLong_1;
5030
+ var maxLat_1;
5031
+ var minLat_1;
5032
+ var maxLong_1;
5033
+ var zoomLevel = void 0;
5034
+ var centerLat = void 0;
5035
+ var centerLong = void 0;
5036
+ var maxZoomFact = this.maps.zoomSettings.maxZoom;
5037
+ var mapWidth = this.maps.mapAreaRect.width;
5038
+ var mapHeight = this.maps.mapAreaRect.height;
5039
+ this.maps.markerZoomedState = this.maps.markerZoomedState ? this.maps.markerZoomedState :
5040
+ isNullOrUndefined(this.maps.markerZoomFactor) ? !this.maps.markerZoomedState :
5041
+ this.maps.markerZoomFactor > 1 ? this.maps.markerZoomedState : !this.maps.markerZoomedState;
5042
+ this.maps.defaultState = this.maps.markerZoomedState ? !this.maps.markerZoomedState : this.maps.defaultState;
5043
+ Array.prototype.forEach.call(layersCollection, function (currentLayer) {
5044
+ var isMarker = currentLayer.markerSettings.length !== 0;
5045
+ if (isMarker) {
5046
+ Array.prototype.forEach.call(currentLayer.markerSettings, function (markerSetting) {
5047
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5048
+ var markerData = markerSetting.dataSource;
5049
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5050
+ Array.prototype.forEach.call(markerData, function (data, dataIndex) {
5051
+ var latitude = !isNullOrUndefined(data['latitude']) ? parseFloat(data['latitude']) :
5052
+ !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
5053
+ var longitude = !isNullOrUndefined(data['longitude']) ? parseFloat(data['longitude']) :
5054
+ !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : null;
5055
+ minLong_1 = isNullOrUndefined(minLong_1) && dataIndex === 0 ?
5056
+ longitude : minLong_1;
5057
+ maxLat_1 = isNullOrUndefined(maxLat_1) && dataIndex === 0 ?
5058
+ latitude : maxLat_1;
5059
+ minLat_1 = isNullOrUndefined(minLat_1) && dataIndex === 0 ?
5060
+ latitude : minLat_1;
5061
+ maxLong_1 = isNullOrUndefined(maxLong_1) && dataIndex === 0 ?
5062
+ longitude : maxLong_1;
5063
+ if (minLong_1 > longitude) {
5064
+ minLong_1 = longitude;
5065
+ }
5066
+ if (minLat_1 > latitude) {
5067
+ minLat_1 = latitude;
5068
+ }
5069
+ if (maxLong_1 < longitude) {
5070
+ maxLong_1 = longitude;
5071
+ }
5072
+ if (maxLat_1 < latitude) {
5073
+ maxLat_1 = latitude;
5074
+ }
5075
+ });
5051
5076
  });
5052
- });
5053
- }
5054
- });
5055
- if (!isNullOrUndefined(minLat_1) && !isNullOrUndefined(minLong_1) &&
5056
- !isNullOrUndefined(maxLong_1) && !isNullOrUndefined(maxLat_1)) {
5057
- // To find the center position
5058
- centerLat = (minLat_1 + maxLat_1) / 2;
5059
- centerLong = (minLong_1 + maxLong_1) / 2;
5060
- this.maps.markerCenterLatitude = centerLat;
5061
- this.maps.markerCenterLongitude = centerLong;
5062
- if (isNullOrUndefined(this.maps.markerZoomCenterPoint) || this.maps.markerZoomedState) {
5063
- this.maps.markerZoomCenterPoint = {
5064
- latitude: centerLat,
5065
- longitude: centerLong
5066
- };
5067
- }
5068
- var markerFactor = void 0;
5069
- if (this.maps.isTileMap || this.maps.baseMapRectBounds['min']['x'] === 0) {
5070
- zoomLevel = calculateZoomLevel(minLat_1, maxLat_1, minLong_1, maxLong_1, mapWidth, mapHeight, this.maps);
5071
- if (this.maps.isTileMap) {
5072
- markerFactor = isNullOrUndefined(this.maps.markerZoomFactor) ?
5073
- zoomLevel : isNullOrUndefined(this.maps.mapScaleValue) ?
5074
- zoomLevel : this.maps.mapScaleValue > 1 && this.maps.markerZoomFactor !== 1 ?
5075
- this.maps.mapScaleValue : zoomLevel;
5077
+ }
5078
+ });
5079
+ if (!isNullOrUndefined(minLat_1) && !isNullOrUndefined(minLong_1) &&
5080
+ !isNullOrUndefined(maxLong_1) && !isNullOrUndefined(maxLat_1)) {
5081
+ // To find the center position
5082
+ centerLat = (minLat_1 + maxLat_1) / 2;
5083
+ centerLong = (minLong_1 + maxLong_1) / 2;
5084
+ this.maps.markerCenterLatitude = centerLat;
5085
+ this.maps.markerCenterLongitude = centerLong;
5086
+ if (isNullOrUndefined(this.maps.markerZoomCenterPoint) || this.maps.markerZoomedState) {
5087
+ this.maps.markerZoomCenterPoint = {
5088
+ latitude: centerLat,
5089
+ longitude: centerLong
5090
+ };
5091
+ }
5092
+ var markerFactor = void 0;
5093
+ if (this.maps.isTileMap || this.maps.baseMapRectBounds['min']['x'] === 0) {
5094
+ zoomLevel = calculateZoomLevel(minLat_1, maxLat_1, minLong_1, maxLong_1, mapWidth, mapHeight, this.maps);
5095
+ if (this.maps.isTileMap) {
5096
+ markerFactor = isNullOrUndefined(this.maps.markerZoomFactor) ?
5097
+ zoomLevel : isNullOrUndefined(this.maps.mapScaleValue) ?
5098
+ zoomLevel : this.maps.mapScaleValue > 1 && this.maps.markerZoomFactor !== 1 ?
5099
+ this.maps.mapScaleValue : zoomLevel;
5100
+ }
5101
+ else {
5102
+ markerFactor = isNullOrUndefined(this.maps.mapScaleValue) ? zoomLevel :
5103
+ (Math.floor(this.maps.scale) !== 1 &&
5104
+ this.maps.mapScaleValue !== zoomLevel)
5105
+ &&
5106
+ (isNullOrUndefined(this.maps.shouldZoomCurrentFactor))
5107
+ ? this.maps.mapScaleValue : zoomLevel;
5108
+ if (((markerFactor === this.maps.mapScaleValue &&
5109
+ (this.maps.markerZoomFactor === 1 || this.maps.mapScaleValue === 1))
5110
+ && (!this.maps.enablePersistence))) {
5111
+ markerFactor = zoomLevel;
5112
+ }
5113
+ }
5076
5114
  }
5077
5115
  else {
5116
+ zoomLevel = this.calculateIndividualLayerMarkerZoomLevel(mapWidth, mapHeight, maxZoomFact);
5078
5117
  markerFactor = isNullOrUndefined(this.maps.mapScaleValue) ? zoomLevel :
5079
- (Math.floor(this.maps.scale) !== 1 &&
5080
- this.maps.mapScaleValue !== zoomLevel)
5081
- &&
5082
- (isNullOrUndefined(this.maps.shouldZoomCurrentFactor))
5118
+ (this.maps.mapScaleValue !== zoomLevel)
5083
5119
  ? this.maps.mapScaleValue : zoomLevel;
5084
- if (((markerFactor === this.maps.mapScaleValue &&
5085
- (this.maps.markerZoomFactor === 1 || this.maps.mapScaleValue === 1))
5086
- && (!this.maps.enablePersistence))) {
5087
- markerFactor = zoomLevel;
5088
- }
5089
5120
  }
5121
+ this.maps.markerZoomFactor = markerFactor;
5090
5122
  }
5091
- else {
5092
- zoomLevel = this.calculateIndividualLayerMarkerZoomLevel(mapWidth, mapHeight, maxZoomFact);
5093
- markerFactor = isNullOrUndefined(this.maps.mapScaleValue) ? zoomLevel :
5094
- (this.maps.mapScaleValue !== zoomLevel)
5095
- ? this.maps.mapScaleValue : zoomLevel;
5096
- }
5097
- this.maps.markerZoomFactor = markerFactor;
5098
5123
  }
5099
- }
5100
- else {
5101
- this.maps.markerZoomedState = false;
5102
- if (this.maps.markerZoomFactor > 1) {
5103
- this.maps.markerCenterLatitude = null;
5104
- this.maps.markerCenterLongitude = null;
5105
- this.maps.markerZoomFactor = 1;
5106
- if (!this.maps.enablePersistence) {
5107
- this.maps.mapScaleValue = 1;
5124
+ else {
5125
+ this.maps.markerZoomedState = false;
5126
+ if (this.maps.markerZoomFactor > 1) {
5127
+ this.maps.markerCenterLatitude = null;
5128
+ this.maps.markerCenterLongitude = null;
5129
+ this.maps.markerZoomFactor = 1;
5130
+ if (!this.maps.enablePersistence) {
5131
+ this.maps.mapScaleValue = 1;
5132
+ }
5108
5133
  }
5109
- }
5110
- if (this.maps.isTileMap && !this.maps.enablePersistence
5111
- && this.maps.mapScaleValue <= 1) {
5112
- this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ? 1 : this.maps.mapScaleValue;
5113
- if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1) {
5114
- this.maps.tileTranslatePoint.x = 0;
5115
- this.maps.tileTranslatePoint.y = 0;
5134
+ if (this.maps.isTileMap && !this.maps.enablePersistence
5135
+ && this.maps.mapScaleValue <= 1) {
5136
+ this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ? (this.maps.isZoomByPosition ? this.maps.tileZoomLevel : 1)
5137
+ : this.maps.mapScaleValue;
5138
+ if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1) {
5139
+ this.maps.tileTranslatePoint.x = 0;
5140
+ this.maps.tileTranslatePoint.y = 0;
5141
+ }
5116
5142
  }
5117
5143
  }
5118
5144
  }
5119
5145
  };
5120
5146
  /**
5121
5147
  * To check and trigger marker click event
5148
+ * @param {PointerEvent} e - Specifies the pointer event argument.
5149
+ * @returns {void}
5122
5150
  */
5123
5151
  Marker.prototype.markerClick = function (e) {
5124
5152
  var target = e.target.id;
@@ -5140,6 +5168,8 @@ var Marker = /** @__PURE__ @class */ (function () {
5140
5168
  };
5141
5169
  /**
5142
5170
  * To check and trigger Cluster click event
5171
+ * @param {PointerEvent} e - Specifies the pointer event argument.
5172
+ * @returns {void}
5143
5173
  */
5144
5174
  Marker.prototype.markerClusterClick = function (e) {
5145
5175
  var target = e.target.id;
@@ -5231,6 +5261,9 @@ var Marker = /** @__PURE__ @class */ (function () {
5231
5261
  };
5232
5262
  /**
5233
5263
  * To check and trigger marker move event
5264
+ *
5265
+ * @param {PointerEvent} e - Specifies the pointer event argument.
5266
+ * @returns {void}
5234
5267
  */
5235
5268
  Marker.prototype.markerMove = function (e) {
5236
5269
  var targetId = e.target.id;
@@ -5249,6 +5282,9 @@ var Marker = /** @__PURE__ @class */ (function () {
5249
5282
  };
5250
5283
  /**
5251
5284
  * To check and trigger cluster move event
5285
+ *
5286
+ * @param {PointerEvent} e - Specifies the pointer event argument.
5287
+ * @returns {void}
5252
5288
  */
5253
5289
  Marker.prototype.markerClusterMouseMove = function (e) {
5254
5290
  var targetId = e.target.id;
@@ -5257,7 +5293,7 @@ var Marker = /** @__PURE__ @class */ (function () {
5257
5293
  }
5258
5294
  var options = this.getMarker(targetId);
5259
5295
  if (this.maps.markerClusterExpand) {
5260
- e.target.setAttribute('style', 'cursor: pointer');
5296
+ e.target.style.cursor = 'pointer';
5261
5297
  }
5262
5298
  if (isNullOrUndefined(options)) {
5263
5299
  return;
@@ -5522,6 +5558,7 @@ var BingMap = /** @__PURE__ @class */ (function () {
5522
5558
  }
5523
5559
  };
5524
5560
  /**
5561
+ * @returns {void}
5525
5562
  * @private
5526
5563
  */
5527
5564
  BingMap.prototype.destroy = function () {
@@ -5559,6 +5596,11 @@ var ColorMapping = /** @__PURE__ @class */ (function () {
5559
5596
  };
5560
5597
  /**
5561
5598
  * To color by value and color mapping
5599
+ *
5600
+ * @param {ColorMappingSettingsModel[]} colorMapping - Specifies the color mapping instance.
5601
+ * @param {number} colorValue - Specifies the color value
5602
+ * @param {string} equalValue - Specifies the equal value.
5603
+ * @returns {any} - Returns the color mapping values.
5562
5604
  */
5563
5605
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5564
5606
  ColorMapping.prototype.getColorByValue = function (colorMapping, colorValue, equalValue) {
@@ -5751,10 +5793,7 @@ var ColorMapping = /** @__PURE__ @class */ (function () {
5751
5793
  return ColorMapping;
5752
5794
  }());
5753
5795
 
5754
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
5755
- /* eslint-disable jsdoc/require-param */
5756
5796
  /* eslint-disable no-case-declarations */
5757
- /* eslint-disable @typescript-eslint/no-unused-vars */
5758
5797
  /**
5759
5798
  * To calculate and render the shape layer
5760
5799
  */
@@ -5778,10 +5817,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5778
5817
  height: areaRect.height
5779
5818
  });
5780
5819
  var parentElement = createElement('div', {
5781
- id: this.mapObject.element.id + '_Tile_SVG_Parent', styles: 'position: absolute; height: ' +
5782
- (areaRect.height) + 'px; width: '
5783
- + (areaRect.width) + 'px;'
5820
+ id: this.mapObject.element.id + '_Tile_SVG_Parent'
5784
5821
  });
5822
+ parentElement.style.cssText = 'position: absolute; height: ' + (areaRect.height) + 'px; width: ' +
5823
+ (areaRect.width) + 'px;';
5785
5824
  parentElement.appendChild(this.tileSvgObject);
5786
5825
  secondaryEle.appendChild(parentElement);
5787
5826
  }
@@ -5835,13 +5874,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5835
5874
  (!isNullOrUndefined(panel.mapObject.tileZoomLevel) && panel.mapObject.tileZoomLevel !== 1)) ?
5836
5875
  false : true;
5837
5876
  if (isNullOrUndefined(panel.mapObject.previousCenterLatitude) &&
5838
- isNullOrUndefined(panel.mapObject.previousCenterLongitude)) {
5877
+ isNullOrUndefined(panel.mapObject.previousCenterLongitude) && !panel.mapObject.isZoomByPosition) {
5839
5878
  panel.mapObject.previousCenterLatitude = panel.mapObject.centerPosition.latitude;
5840
5879
  panel.mapObject.previousCenterLongitude = panel.mapObject.centerPosition.longitude;
5841
5880
  }
5842
- else if (panel.mapObject.previousCenterLatitude !==
5881
+ else if ((panel.mapObject.previousCenterLatitude !==
5843
5882
  panel.mapObject.centerPosition.latitude && panel.mapObject.previousCenterLongitude !==
5844
- panel.mapObject.centerPosition.longitude) {
5883
+ panel.mapObject.centerPosition.longitude) || panel.mapObject.isZoomByPosition) {
5845
5884
  panel.mapObject.centerPositionChanged = true;
5846
5885
  panel.mapObject.previousCenterLatitude = panel.mapObject.centerPosition.latitude;
5847
5886
  panel.mapObject.previousCenterLongitude = panel.mapObject.centerPosition.longitude;
@@ -5853,7 +5892,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5853
5892
  var centerTileMap = center;
5854
5893
  if ((this.mapObject.isTileMap && panel.mapObject.markerModule) && panel.mapObject.zoomSettings.enable) {
5855
5894
  panel.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);
5856
- if (!isNullOrUndefined(this.mapObject.markerCenterLatitude) && !isNullOrUndefined(this.mapObject.markerCenterLongitude)) {
5895
+ if (!isNullOrUndefined(this.mapObject.markerCenterLatitude) && !isNullOrUndefined(this.mapObject.markerCenterLongitude)
5896
+ && !panel.mapObject.isZoomByPosition) {
5857
5897
  centerTileMap = new Point(panel.mapObject.markerCenterLongitude, panel.mapObject.markerCenterLatitude);
5858
5898
  }
5859
5899
  }
@@ -5869,7 +5909,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5869
5909
  else {
5870
5910
  center = { x: null, y: null };
5871
5911
  }
5872
- var zoomFactorValue = panel.mapObject.zoomSettings.shouldZoomInitially ?
5912
+ var zoomFactorValue = (panel.mapObject.zoomSettings.shouldZoomInitially && !panel.mapObject.isZoomByPosition) ?
5873
5913
  isNullOrUndefined(panel.mapObject.markerZoomFactor) ? 1 :
5874
5914
  panel.mapObject.markerZoomFactor : panel.mapObject.zoomSettings.zoomFactor;
5875
5915
  zoomFactorValue = (panel.mapObject.enablePersistence) ? ((isNullOrUndefined(panel.mapObject.mapScaleValue))
@@ -5942,7 +5982,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5942
5982
  panel.mapObject.previousZoomFactor = panel.mapObject.zoomSettings.zoomFactor;
5943
5983
  }
5944
5984
  if (panel.mapObject.navigationLineModule) {
5945
- panel.layerObject.appendChild(panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex));
5985
+ var navigationLineElement = panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex);
5986
+ if (!isNullOrUndefined(navigationLineElement)) {
5987
+ panel.layerObject.appendChild(navigationLineElement);
5988
+ }
5946
5989
  }
5947
5990
  if (panel.mapObject.markerModule) {
5948
5991
  panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
@@ -6010,7 +6053,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6010
6053
  var imageUrl = resource['imageUrl'];
6011
6054
  var subDomains = resource['imageUrlSubdomains'];
6012
6055
  var maxZoom = resource['zoomMax'];
6013
- var markerGroupElement = document.getElementById(proxy_1.mapObject.element.id + '_Markers_Group');
6014
6056
  if (imageUrl !== null && imageUrl !== undefined && imageUrl !== bing_1.imageUrl) {
6015
6057
  bing_1.imageUrl = imageUrl;
6016
6058
  }
@@ -6125,13 +6167,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6125
6167
  var colors = shapeSettings.palette.length > 1 ? shapeSettings.palette : getShapeColor(this.mapObject.theme);
6126
6168
  var labelTemplateEle = createElement('div', {
6127
6169
  id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_Label_Template_Group',
6128
- className: this.mapObject.element.id + '_template',
6129
- styles: 'pointer-events: none; overflow: hidden; position: absolute;' +
6130
- 'top:' + this.mapObject.mapAreaRect.y + 'px;' +
6131
- 'left:' + this.mapObject.mapAreaRect.x + 'px;' +
6132
- 'height:' + this.mapObject.mapAreaRect.height + 'px;' +
6133
- 'width:' + this.mapObject.mapAreaRect.width + 'px;'
6170
+ className: this.mapObject.element.id + '_template'
6134
6171
  });
6172
+ labelTemplateEle.style.cssText = 'pointer-events: none; overflow: hidden; position: absolute;' +
6173
+ 'top:' + this.mapObject.mapAreaRect.y + 'px;' +
6174
+ 'left:' + this.mapObject.mapAreaRect.x + 'px;' +
6175
+ 'height:' + this.mapObject.mapAreaRect.height + 'px;' +
6176
+ 'width:' + this.mapObject.mapAreaRect.width + 'px;';
6135
6177
  if (this.currentLayer.layerData.length !== 0) {
6136
6178
  var _loop_1 = function (i) {
6137
6179
  var k = void 0;
@@ -6172,8 +6214,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6172
6214
  fill = Object.prototype.toString.call(getShapeColor_1) === '[object Object]' && !isNullOrUndefined(getShapeColor_1['fill'])
6173
6215
  ? getShapeColor_1['fill'] : fill;
6174
6216
  if (this_1.currentLayer.shapeSettings.borderColorValuePath || this_1.currentLayer.shapeSettings.borderWidthValuePath) {
6175
- var borderColorValue = this_1.currentLayer.shapeSettings.borderColorValuePath;
6176
- var borderWidthValue = this_1.currentLayer.shapeSettings.borderWidthValuePath;
6177
6217
  k = checkShapeDataFields(
6178
6218
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6179
6219
  this_1.currentLayer.dataSource, currentShapeData['property'], this_1.currentLayer.shapeDataPath, this_1.currentLayer.shapePropertyPath, this_1.currentLayer);
@@ -6300,7 +6340,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6300
6340
  case 'Point':
6301
6341
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6302
6342
  var pointData = currentShapeData['point'];
6303
- var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
6343
+ var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ?
6344
+ shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ?
6345
+ _this.mapObject.scale : _this.currentFactor);
6304
6346
  circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6305
6347
  pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6306
6348
  break;
@@ -6310,7 +6352,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6310
6352
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6311
6353
  var pointData = multiPointData['point'];
6312
6354
  var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
6313
- circleOptions = new CircleOption((shapeID + "_multiLine_" + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6355
+ circleOptions = new CircleOption((shapeID + '_multiLine_' + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
6314
6356
  pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6315
6357
  _this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
6316
6358
  });
@@ -6343,15 +6385,16 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6343
6385
  /**
6344
6386
  * layer features as bubble, marker, datalabel, navigation line.
6345
6387
  *
6346
- * @param {groupElement} Element - Specifies the element to append the group
6347
- * @param {pathEle} Element - Specifies the svg element
6348
- * @param {drawingType} string - Specifies the data type
6349
- * @param {currentShapeData} any - Specifies the layer of shapedata.
6350
- * @param {index} number - Specifies the tab index.
6388
+ * @param {Element} groupElement - Specifies the element to append the group.
6389
+ * @param {Element} pathEle - Specifies the svg element.
6390
+ * @param {string} drawingType - Specifies the data type.
6391
+ * @param {any} currentShapeData - Specifies the layer of shapedata.
6392
+ * @param {number} index - Specifies the tab index.
6351
6393
  * @returns {void}
6352
6394
  */
6395
+ LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType,
6353
6396
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6354
- LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType, currentShapeData, index) {
6397
+ currentShapeData, index) {
6355
6398
  var property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
6356
6399
  this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
6357
6400
  var properties;
@@ -6363,10 +6406,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6363
6406
  }
6364
6407
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6365
6408
  (currentShapeData['property'][properties]) : ''));
6366
- pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + index + 3).toString());
6409
+ pathEle.tabIndex = this.mapObject.tabIndex + index + 3;
6367
6410
  pathEle.setAttribute('role', '');
6368
6411
  if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
6369
- pathEle.setAttribute('style', 'outline:none');
6412
+ pathEle.style.cssText = 'outline:none';
6370
6413
  }
6371
6414
  maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
6372
6415
  if (this.mapObject.toggledShapeElementId) {
@@ -6378,7 +6421,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6378
6421
  pathEle.setAttribute('stroke', styleProperty.border.color);
6379
6422
  pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
6380
6423
  pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
6381
- pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
6424
+ pathEle.setAttribute('stroke-width', (isNullOrUndefined(styleProperty.border.width) ? 0 : styleProperty.border.width).toString());
6382
6425
  }
6383
6426
  }
6384
6427
  }
@@ -6425,9 +6468,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6425
6468
  this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);
6426
6469
  }
6427
6470
  var group = (this.mapObject.renderer.createGroup({
6428
- id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_dataLableIndex_Group',
6429
- style: 'pointer-events: none;'
6471
+ id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_dataLableIndex_Group'
6430
6472
  }));
6473
+ group.style.pointerEvents = 'none';
6431
6474
  if (this.mapObject.dataLabelModule && this.currentLayer.dataLabelSettings.visible) {
6432
6475
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6433
6476
  var intersect_1 = [];
@@ -6444,8 +6487,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6444
6487
  _this.layerObject.appendChild(element);
6445
6488
  });
6446
6489
  if (this.mapObject.markerModule) {
6447
- this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
6448
- : this.currentFactor), null);
6490
+ this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor) :
6491
+ this.currentFactor), null);
6449
6492
  }
6450
6493
  this.translateLayerElements(this.layerObject, layerIndex);
6451
6494
  this.layerGroup.appendChild(this.layerObject);
@@ -6455,11 +6498,11 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6455
6498
  *
6456
6499
  * @param {LayerSettings} layer - Specifies the layer
6457
6500
  * @param {number} layerIndex - Specifies the layer index
6458
- * @param {object[]} shape - Specifies the shape
6501
+ * @param {any[]} shape - Specifies the shape
6459
6502
  * @param {Element} group - Specifies the group
6460
6503
  * @param {number} shapeIndex - Specifies the shape index
6461
6504
  * @param {HTMLElement} labelTemplateEle - Specifies the label template element
6462
- * @param {object[]} intersect - Specifies the intersect
6505
+ * @param {any[]} intersect - Specifies the intersect
6463
6506
  * @returns {void}
6464
6507
  */
6465
6508
  LayerPanel.prototype.renderLabel = function (layer, layerIndex,
@@ -6558,10 +6601,12 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6558
6601
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6559
6602
  var multiPolygonDatas = [];
6560
6603
  for (var i = 0; i < coordinates.length; i++) {
6561
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6562
- newData = this.calculatePolygonBox(coordinates[i][0], data, properties);
6563
- if (newData.length > 0) {
6564
- multiPolygonDatas.push(newData);
6604
+ for (var j = 0; j < coordinates[i].length; j++) {
6605
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6606
+ newData = this.calculatePolygonBox(coordinates[i][j], data, properties);
6607
+ if (newData.length > 0) {
6608
+ multiPolygonDatas.push(newData);
6609
+ }
6565
6610
  }
6566
6611
  }
6567
6612
  multiPolygonDatas['property'] = properties;
@@ -6570,15 +6615,15 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6570
6615
  this.currentLayer.layerData.push(multiPolygonDatas);
6571
6616
  break;
6572
6617
  case 'linestring':
6573
- var extraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6618
+ var lineExtraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6574
6619
  (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6575
6620
  parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
6576
6621
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6577
- coordinates.map(function (points, index) {
6622
+ coordinates.map(function (points) {
6578
6623
  latitude = points[1];
6579
6624
  longitude = points[0];
6580
6625
  var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
6581
- _this.calculateBox(point, extraSpace_1);
6626
+ _this.calculateBox(point, lineExtraSpace_1);
6582
6627
  newData.push({
6583
6628
  point: point, lat: latitude, lng: longitude
6584
6629
  });
@@ -6591,10 +6636,12 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6591
6636
  var extraSpaces_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6592
6637
  (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6593
6638
  parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
6639
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6594
6640
  var multiLineData_1 = [];
6595
6641
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6596
6642
  coordinates.map(function (multiPoints) {
6597
6643
  newData = [];
6644
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6598
6645
  multiPoints.map(function (points) {
6599
6646
  latitude = points[1];
6600
6647
  longitude = points[0];
@@ -6623,8 +6670,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6623
6670
  point: point, type: type, lat: latitude, lng: longitude, property: properties
6624
6671
  });
6625
6672
  break;
6626
- case 'multipoint': {
6627
- var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6673
+ case 'multipoint':
6674
+ var extraSpace_1 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6628
6675
  (typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
6629
6676
  parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
6630
6677
  (this.currentLayer.shapeSettings.circleRadius * 2);
@@ -6634,7 +6681,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6634
6681
  latitude = points[1];
6635
6682
  longitude = points[0];
6636
6683
  var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
6637
- _this.calculateBox(point, extraSpace_2);
6684
+ _this.calculateBox(point, extraSpace_1);
6638
6685
  newData.push({
6639
6686
  point: point, lat: latitude, lng: longitude
6640
6687
  });
@@ -6643,7 +6690,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6643
6690
  newData['type'] = type;
6644
6691
  this.currentLayer.layerData.push(newData);
6645
6692
  break;
6646
- }
6647
6693
  case 'path':
6648
6694
  this.currentLayer.layerData.push({
6649
6695
  point: data['d'], type: type, property: properties
@@ -6653,7 +6699,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6653
6699
  };
6654
6700
  LayerPanel.prototype.calculateBox = function (point, extraSpace) {
6655
6701
  if (isNullOrUndefined(this.rectBounds)) {
6656
- this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace, y: point.y + extraSpace } };
6702
+ this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace,
6703
+ y: point.y + extraSpace } };
6657
6704
  }
6658
6705
  else {
6659
6706
  this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x - extraSpace);
@@ -6777,6 +6824,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6777
6824
  case 'multilinestring':
6778
6825
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6779
6826
  coordinates.map(function (multiPoint, index) {
6827
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6780
6828
  multiPoint.map(function (point, index) {
6781
6829
  _this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
6782
6830
  });
@@ -6792,6 +6840,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6792
6840
  _this.calculateRectBox(coordinates, 'point');
6793
6841
  break;
6794
6842
  case 'multipoint':
6843
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6795
6844
  coordinates.map(function (point, index) {
6796
6845
  _this.calculateRectBox(point, 'multipoint', index === 0 ? true : false);
6797
6846
  });
@@ -6807,7 +6856,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6807
6856
  var newData = [];
6808
6857
  var bounds = this.mapObject.baseMapBounds;
6809
6858
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6810
- coordinates.map(function (currentPoint, index) {
6859
+ coordinates.map(function (currentPoint) {
6811
6860
  var latitude = currentPoint[1];
6812
6861
  var longitude = currentPoint[0];
6813
6862
  if ((longitude >= bounds.longitude.min && longitude <= bounds.longitude.max)
@@ -6901,8 +6950,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6901
6950
  tileI = (tileI % ycount) + ycount;
6902
6951
  }
6903
6952
  var tile = new Tile(tileI % ycount, j);
6904
- tile.left = x;
6905
- tile.top = y;
6953
+ tile.left = Math.round(x);
6954
+ tile.top = Math.round(y);
6906
6955
  if (baseLayer.layerType === 'Bing' || (bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
6907
6956
  var key = baseLayer.key;
6908
6957
  tile.src = bing.getBingMap(tile, key, baseLayer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
@@ -6949,7 +6998,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6949
6998
  }
6950
6999
  }
6951
7000
  }
6952
- if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset) {
7001
+ if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset || this.mapObject.isZoomByPosition
7002
+ || this.mapObject.zoomNotApplied) {
6953
7003
  this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
6954
7004
  }
6955
7005
  };
@@ -6995,18 +7045,45 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6995
7045
  animateElement = element ? element.children[0] : null;
6996
7046
  }
6997
7047
  }
6998
- var id = 0;
6999
- var _loop_3 = function (tile) {
7000
- var imgElement = createElement('img');
7001
- imgElement.setAttribute('height', '256px');
7002
- imgElement.setAttribute('width', '256px');
7003
- imgElement.setAttribute('src', tile.src);
7004
- imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
7048
+ for (var id = 0; id < _this.tiles.length; id++) {
7049
+ var tile = _this.tiles[id];
7050
+ var imgElement = null;
7005
7051
  var mapId = _this.mapObject.element.id;
7006
- imgElement.onload = function () {
7007
- if (document.getElementById(mapId + '_tile_' + id) && type === 'Pan') {
7008
- removeElement(mapId + '_tile_' + id);
7052
+ if (type === 'Pan') {
7053
+ var child = document.getElementById(mapId + '_tile_' + id);
7054
+ var isNewTile = false;
7055
+ if (isNullOrUndefined(child)) {
7056
+ isNewTile = true;
7057
+ child = createElement('div', { id: mapId + '_tile_' + id });
7058
+ imgElement = createElement('img');
7059
+ }
7060
+ else {
7061
+ child.style.removeProperty('display');
7062
+ imgElement = child.children[0];
7063
+ }
7064
+ if (!isNewTile && imgElement && imgElement.src !== tile.src) {
7065
+ imgElement.src = tile.src;
7066
+ }
7067
+ child.style.position = 'absolute';
7068
+ child.style.left = tile.left + 'px';
7069
+ child.style.top = tile.top + 'px';
7070
+ child.style.height = tile.height + 'px';
7071
+ child.style.width = tile.width + 'px';
7072
+ if (isNewTile) {
7073
+ imgElement.setAttribute('height', '256px');
7074
+ imgElement.setAttribute('width', '256px');
7075
+ imgElement.setAttribute('src', tile.src);
7076
+ imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
7077
+ child.appendChild(imgElement);
7078
+ animateElement.appendChild(child);
7009
7079
  }
7080
+ }
7081
+ else {
7082
+ imgElement = createElement('img');
7083
+ imgElement.setAttribute('height', '256px');
7084
+ imgElement.setAttribute('width', '256px');
7085
+ imgElement.setAttribute('src', tile.src);
7086
+ imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
7010
7087
  var child = createElement('div', { id: mapId + '_tile_' + id });
7011
7088
  child.style.position = 'absolute';
7012
7089
  child.style.left = tile.left + 'px';
@@ -7017,15 +7094,27 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
7017
7094
  if (animateElement) {
7018
7095
  animateElement.appendChild(child);
7019
7096
  }
7020
- id++;
7021
- if (id === _this.tiles.length && document.getElementById(_this.mapObject.element.id + '_animated_tiles_old')) {
7022
- removeElement(_this.mapObject.element.id + '_animated_tiles_old');
7097
+ }
7098
+ if (id === (_this.tiles.length - 1) && document.getElementById(_this.mapObject.element.id + '_animated_tiles_old')) {
7099
+ removeElement(_this.mapObject.element.id + '_animated_tiles_old');
7100
+ }
7101
+ }
7102
+ if (!isNullOrUndefined(_this.mapObject.currentTiles)) {
7103
+ for (var l = _this.tiles.length; l < animateElement.childElementCount; l++) {
7104
+ var isExistingElement = false;
7105
+ for (var a = 0; a < _this.mapObject.currentTiles.childElementCount; a++) {
7106
+ if (!isExistingElement &&
7107
+ _this.mapObject.currentTiles.children[a].id === animateElement.children[l].id) {
7108
+ isExistingElement = true;
7109
+ }
7110
+ }
7111
+ if (isExistingElement) {
7112
+ animateElement.children[l].style.display = 'none';
7023
7113
  }
7024
- };
7025
- };
7026
- for (var _i = 0, _a = _this.tiles; _i < _a.length; _i++) {
7027
- var tile = _a[_i];
7028
- _loop_3(tile);
7114
+ else {
7115
+ animateElement.removeChild(animateElement.children[l]);
7116
+ }
7117
+ }
7029
7118
  }
7030
7119
  }, timeOut);
7031
7120
  }
@@ -7195,8 +7284,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
7195
7284
  return LayerPanel;
7196
7285
  }());
7197
7286
 
7198
- /* eslint-disable @typescript-eslint/no-unused-vars */
7199
- /* eslint-disable jsdoc/require-param */
7200
7287
  /**
7201
7288
  * Represents the annotation elements for map.
7202
7289
  */
@@ -7237,8 +7324,9 @@ var Annotations = /** @__PURE__ @class */ (function () {
7237
7324
  var availSize = map.availableSize;
7238
7325
  var id = map.element.id + '_Annotation_' + annotationIndex;
7239
7326
  var childElement = createElement('div', {
7240
- id: map.element.id + '_Annotation_' + annotationIndex, styles: 'position: absolute; z-index:' + annotation.zIndex + ';'
7327
+ id: map.element.id + '_Annotation_' + annotationIndex
7241
7328
  });
7329
+ childElement.style.cssText = 'position: absolute; z-index:' + annotation.zIndex + ';';
7242
7330
  var argsData = {
7243
7331
  cancel: false, name: annotationRendering, content: annotation.content,
7244
7332
  annotation: annotation
@@ -7335,11 +7423,6 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
7335
7423
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
7336
7424
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7337
7425
  };
7338
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
7339
- /* eslint-disable @typescript-eslint/no-unused-vars */
7340
- /* eslint-disable radix */
7341
- /* eslint-disable max-len */
7342
- /* eslint-disable valid-jsdoc */
7343
7426
  /**
7344
7427
  * Maps Component file
7345
7428
  */
@@ -7523,18 +7606,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7523
7606
  this.setCulture();
7524
7607
  };
7525
7608
  Maps.prototype.renderElements = function () {
7526
- this.trigger(load, { maps: this });
7527
- this.createSVG();
7528
- this.findBaseAndSubLayers();
7529
- this.createSecondaryElement();
7530
- this.addTabIndex();
7531
- this.themeStyle = getThemeStyle(this.theme);
7532
- this.renderBorder();
7533
- this.renderTitle(this.titleSettings, 'title', null, null);
7534
- this.renderArea();
7535
- this.processRequestJsonData();
7536
- this.renderComplete();
7537
- this.isAddLayer = !this.isTileMap ? false : this.isAddLayer;
7609
+ if (!this.isDestroyed) {
7610
+ this.trigger(load, { maps: this });
7611
+ this.createSVG();
7612
+ this.findBaseAndSubLayers();
7613
+ this.createSecondaryElement();
7614
+ this.addTabIndex();
7615
+ this.themeStyle = getThemeStyle(this.theme);
7616
+ this.renderBorder();
7617
+ this.renderTitle(this.titleSettings, 'title', null, null);
7618
+ this.renderArea();
7619
+ this.processRequestJsonData();
7620
+ this.renderComplete();
7621
+ this.isAddLayer = !this.isTileMap ? false : this.isAddLayer;
7622
+ }
7538
7623
  };
7539
7624
  /**
7540
7625
  * To Initialize the control rendering.
@@ -7584,7 +7669,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7584
7669
  if (layer.markerSettings[i].dataSource instanceof DataManager) {
7585
7670
  _this.serverProcess['request']++;
7586
7671
  dataModule = layer.markerSettings[i].dataSource;
7587
- queryModule = layer.markerSettings[i].query instanceof Query ? layer.markerSettings[i].query : new Query();
7672
+ queryModule = layer.markerSettings[i].query instanceof Query ?
7673
+ layer.markerSettings[i].query : new Query();
7588
7674
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7589
7675
  var dataManager = dataModule.executeQuery(queryModule);
7590
7676
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -7603,7 +7689,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7603
7689
  if (layer.bubbleSettings[i].dataSource instanceof DataManager) {
7604
7690
  _this.serverProcess['request']++;
7605
7691
  dataModule = layer.bubbleSettings[i].dataSource;
7606
- queryModule = layer.bubbleSettings[i].query instanceof Query ? layer.bubbleSettings[i].query : new Query();
7692
+ queryModule = layer.bubbleSettings[i].query instanceof Query ?
7693
+ layer.bubbleSettings[i].query : new Query();
7607
7694
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7608
7695
  var dataManager = dataModule.executeQuery(queryModule);
7609
7696
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -7713,6 +7800,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7713
7800
  }
7714
7801
  if (!this.isResize) {
7715
7802
  for (var k = 0; k < this.layers[i].markerSettings.length; k++) {
7803
+ // eslint-disable-next-line max-len
7716
7804
  if (this.layers[i].markerSettings[k].selectionSettings && this.layers[i].markerSettings[k].selectionSettings.enable
7717
7805
  && this.layers[i].markerSettings[k].initialMarkerSelection.length > 0) {
7718
7806
  var markerSelectionValues = this.layers[i].markerSettings[k].initialMarkerSelection;
@@ -7784,7 +7872,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7784
7872
  }
7785
7873
  }
7786
7874
  this.zoomingChange();
7787
- this.trigger(loaded, { maps: this, isResized: this.isResize });
7875
+ if (!this.isZoomByPosition && !this.zoomNotApplied) {
7876
+ this.trigger(loaded, { maps: this, isResized: this.isResize });
7877
+ }
7788
7878
  this.isResize = false;
7789
7879
  };
7790
7880
  /**
@@ -7878,7 +7968,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7878
7968
  Maps.prototype.addTabIndex = function () {
7879
7969
  this.element.setAttribute('aria-label', this.description || 'Maps Element');
7880
7970
  this.element.setAttribute('role', '');
7881
- this.element.setAttribute('tabindex', this.tabIndex.toString());
7971
+ this.element.tabIndex = this.tabIndex;
7882
7972
  };
7883
7973
  // private setSecondaryElementPosition(): void {
7884
7974
  // if (!this.isTileMap) {
@@ -7906,8 +7996,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7906
7996
  tileSvgParentElement.style.left = left + 'px';
7907
7997
  tileSvgParentElement.style.top = top + 'px';
7908
7998
  if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
7909
- tileElement.style.width = tileSvgElement.style.width = this.legendModule.legendTotalRect.width.toString();
7910
- tileElement.style.height = tileSvgElement.style.height = this.legendModule.legendTotalRect.height.toString();
7999
+ tileElement.style.width = tileSvgElement.style.width =
8000
+ this.legendModule.legendTotalRect.width.toString();
8001
+ tileElement.style.height = tileSvgElement.style.height =
8002
+ this.legendModule.legendTotalRect.height.toString();
7911
8003
  tileSvgParentElement.style.width = this.legendModule.legendTotalRect.width + 'px';
7912
8004
  tileSvgParentElement.style.height = this.legendModule.legendTotalRect.height + 'px';
7913
8005
  }
@@ -7928,7 +8020,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7928
8020
  if (!isNullOrUndefined(elements) && elements.childElementCount > 0) {
7929
8021
  for (var i = 0; i < elements.childNodes.length; i++) {
7930
8022
  var childElement = elements.childNodes[i];
7931
- if (childElement.tagName === 'g' && childElement.id.indexOf('_Legend_Group') == -1) {
8023
+ if (childElement.tagName === 'g' && childElement.id.indexOf('_Legend_Group') === -1) {
7932
8024
  var layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
7933
8025
  for (var j = 0; j < childElement.childNodes.length; j++) {
7934
8026
  var childNode = childElement.childNodes[j];
@@ -7941,7 +8033,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7941
8033
  }
7942
8034
  }
7943
8035
  }
7944
- if (this.zoomModule && (this.previousScale !== this.scale)) {
8036
+ if (this.zoomModule && ((this.previousScale !== this.scale) || this.zoomNotApplied || this.isZoomByPosition)) {
7945
8037
  this.zoomModule.applyTransform(this, true);
7946
8038
  }
7947
8039
  }
@@ -7949,9 +8041,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7949
8041
  Maps.prototype.createSecondaryElement = function () {
7950
8042
  if (isNullOrUndefined(document.getElementById(this.element.id + '_Secondary_Element'))) {
7951
8043
  var secondaryElement = createElement('div', {
7952
- id: this.element.id + '_Secondary_Element',
7953
- styles: 'position: absolute;z-index:2;'
8044
+ id: this.element.id + '_Secondary_Element'
7954
8045
  });
8046
+ secondaryElement.style.cssText = 'position: absolute;z-index:2;';
7955
8047
  this.element.appendChild(secondaryElement);
7956
8048
  }
7957
8049
  };
@@ -8005,18 +8097,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8005
8097
  removeElement(this.element.id + '_tiles');
8006
8098
  removeElement('animated_tiles');
8007
8099
  var ele = createElement('div', {
8008
- id: this.element.id + '_tile_parent', styles: 'position: absolute; left: ' +
8009
- (this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
8010
- + (this.mapAreaRect.y + padding) + 'px; height: ' +
8011
- (this.mapAreaRect.height) + 'px; width: '
8012
- + (this.mapAreaRect.width) + 'px; overflow: hidden;'
8100
+ id: this.element.id + '_tile_parent'
8013
8101
  });
8102
+ ele.style.cssText = 'position: absolute; left: ' +
8103
+ (this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
8104
+ + (this.mapAreaRect.y + padding) + 'px; height: ' +
8105
+ (this.mapAreaRect.height) + 'px; width: '
8106
+ + (this.mapAreaRect.width) + 'px; overflow: hidden;';
8014
8107
  var ele1 = createElement('div', {
8015
- id: this.element.id + '_tiles', styles: 'position: absolute; left: ' +
8016
- (this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
8017
- + (this.mapAreaRect.y + padding) + 'px; height: ' + (this.mapAreaRect.height) + 'px; width: '
8018
- + (this.mapAreaRect.width) + 'px; overflow: hidden;'
8108
+ id: this.element.id + '_tiles'
8019
8109
  });
8110
+ ele1.style.cssText = 'position: absolute; left: ' +
8111
+ (this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
8112
+ + (this.mapAreaRect.y + padding) + 'px; height: ' + (this.mapAreaRect.height) + 'px; width: '
8113
+ + (this.mapAreaRect.width) + 'px; overflow: hidden;';
8020
8114
  this.element.appendChild(ele);
8021
8115
  this.element.appendChild(ele1);
8022
8116
  }
@@ -8057,7 +8151,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8057
8151
  break;
8058
8152
  }
8059
8153
  }
8060
- subLayers.map(function (subLayer, subLayerIndex) {
8154
+ subLayers.map(function (subLayer) {
8061
8155
  if (subLayer.visible) {
8062
8156
  _this.layersCollection.push(subLayer);
8063
8157
  }
@@ -8217,6 +8311,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8217
8311
  };
8218
8312
  Maps.prototype.keyUpHandler = function (event) {
8219
8313
  var id = event.target['id'];
8314
+ if (this.isTileMap) {
8315
+ this.removeTileMap();
8316
+ }
8220
8317
  if (event.code === 'Tab' && id.indexOf('_LayerIndex_') > -1 && id.indexOf('shapeIndex') > -1) {
8221
8318
  this.keyboardHighlightSelection(id, event.type);
8222
8319
  }
@@ -8250,6 +8347,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8250
8347
  };
8251
8348
  Maps.prototype.keyDownHandler = function (event) {
8252
8349
  var zoom = this.zoomModule;
8350
+ if ((event.code === 'ArrowUp' || event.code === 'ArrowDown' || event.code === 'ArrowLeft'
8351
+ || event.code === 'ArrowRight') && zoom) {
8352
+ var animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
8353
+ if (this.isTileMap && !isNullOrUndefined(animatedTiles)) {
8354
+ this.currentTiles = animatedTiles.cloneNode(true);
8355
+ }
8356
+ }
8253
8357
  if ((event.key === '+' || event.code === 'Equal') && zoom) {
8254
8358
  zoom.performZoomingByToolBar('zoomin');
8255
8359
  }
@@ -8324,6 +8428,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8324
8428
  * This method is used to perform the operations when a click operation is performed on maps.
8325
8429
  *
8326
8430
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8431
+ * @returns {void}
8327
8432
  */
8328
8433
  Maps.prototype.mapsOnClick = function (e) {
8329
8434
  var _this = this;
@@ -8389,8 +8494,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8389
8494
  Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y) {
8390
8495
  var layerIndex = 0;
8391
8496
  var latLongValue;
8392
- if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap && (parseInt(this.mouseDownEvent['x']) === parseInt(this.mouseClickEvent['x']))
8393
- && (parseInt(this.mouseDownEvent['y']) === parseInt(this.mouseClickEvent['y']))) {
8497
+ if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap &&
8498
+ (parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
8499
+ (parseInt(this.mouseDownEvent['y'], 10) === parseInt(this.mouseClickEvent['y'], 10))) {
8394
8500
  layerIndex = parseFloat(targetId.split('_LayerIndex_')[1].split('_')[0]);
8395
8501
  if (this.layers[layerIndex].geometryType === 'Normal') {
8396
8502
  if (targetId.indexOf('_shapeIndex_') > -1) {
@@ -8427,12 +8533,21 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8427
8533
  latLongValue = this.getGeoLocation(layerIndex, x, y);
8428
8534
  }
8429
8535
  }
8430
- else if (this.isTileMap && (parseInt(this.mouseDownEvent['x']) === parseInt(this.mouseClickEvent['x']))
8431
- && (parseInt(this.mouseDownEvent['y']) === parseInt(this.mouseClickEvent['y']))) {
8536
+ else if (this.isTileMap && (parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
8537
+ (parseInt(this.mouseDownEvent['y'], 10) === parseInt(this.mouseClickEvent['y'], 10))) {
8432
8538
  latLongValue = this.getTileGeoLocation(x, y);
8433
8539
  }
8434
8540
  return latLongValue;
8435
8541
  };
8542
+ Maps.prototype.removeTileMap = function () {
8543
+ var animateElement = document.getElementById(this.element.id + '_animated_tiles');
8544
+ if (!isNullOrUndefined(this.currentTiles) && animateElement.childElementCount !== this.currentTiles.childElementCount) {
8545
+ for (var l = animateElement.childElementCount - 1; l >= this.currentTiles.childElementCount; l--) {
8546
+ animateElement.removeChild(animateElement.children[l]);
8547
+ }
8548
+ }
8549
+ this.currentTiles = null;
8550
+ };
8436
8551
  /**
8437
8552
  * This method is used to perform operations when mouse click on maps.
8438
8553
  *
@@ -8464,6 +8579,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8464
8579
  pageY = e.pageY;
8465
8580
  target = e.target;
8466
8581
  }
8582
+ if (this.isTileMap) {
8583
+ this.removeTileMap();
8584
+ }
8467
8585
  if (this.isTouch) {
8468
8586
  if (targetEle.id.indexOf('_ToolBar') === -1) {
8469
8587
  var latLongValue = this.getClickLocation(targetId, pageX, pageY, targetEle, pageX, pageY);
@@ -8496,13 +8614,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8496
8614
  }
8497
8615
  var rect = this.element.getBoundingClientRect();
8498
8616
  var element = e.target;
8617
+ var animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
8618
+ if (this.isTileMap && !isNullOrUndefined(animatedTiles)) {
8619
+ this.currentTiles = animatedTiles.cloneNode(true);
8620
+ }
8499
8621
  if (element.id.indexOf('_ToolBar') === -1) {
8500
8622
  var markerModule = this.markerModule;
8501
8623
  if (element.id.indexOf('shapeIndex') > -1 || element.id.indexOf('Tile') > -1) {
8502
8624
  this.mergeCluster();
8503
- if (element.id.indexOf('shapeIndex') > -1) {
8504
- this.triggerShapeSelection(element);
8505
- }
8506
8625
  }
8507
8626
  if (markerModule) {
8508
8627
  markerModule.markerClick(e);
@@ -8531,6 +8650,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8531
8650
  * This method is used to perform operations when performing the double click operation on maps.
8532
8651
  *
8533
8652
  * @param {PointerEvent} e - Specifies the pointer event.
8653
+ * @returns {void}
8534
8654
  */
8535
8655
  Maps.prototype.mapsOnDoubleClick = function (e) {
8536
8656
  this.notify('dblclick', e);
@@ -8554,8 +8674,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8554
8674
  latitude = latLongValue['latitude'];
8555
8675
  longitude = latLongValue['longitude'];
8556
8676
  }
8557
- var doubleClickArgs = { cancel: false, name: doubleClick, x: e.clientX, y: e.clientY,
8558
- target: targetId, latitude: latitude, longitude: longitude, isShapeSelected: null };
8677
+ var doubleClickArgs = {
8678
+ cancel: false, name: doubleClick, x: e.clientX, y: e.clientY,
8679
+ target: targetId, latitude: latitude, longitude: longitude, isShapeSelected: null
8680
+ };
8559
8681
  this.trigger('doubleClick', doubleClickArgs);
8560
8682
  }
8561
8683
  };
@@ -8647,28 +8769,30 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8647
8769
  */
8648
8770
  Maps.prototype.mapsOnResize = function (e) {
8649
8771
  var _this = this;
8650
- this.isResize = this.isReset = true;
8651
- var args = {
8652
- cancel: false,
8653
- name: resize,
8654
- previousSize: this.availableSize,
8655
- currentSize: calculateSize(this),
8656
- maps: this
8657
- };
8658
- this.trigger(resize, args);
8659
- if (!args.cancel) {
8660
- if (this.resizeTo) {
8661
- clearTimeout(this.resizeTo);
8662
- }
8663
- if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
8664
- this.resizeTo = setTimeout(function () {
8665
- _this.unWireEVents();
8666
- _this.createSVG();
8667
- _this.refreshing = true;
8668
- _this.wireEVents();
8669
- _this.render();
8670
- _this.refreshing = false;
8671
- }, 500);
8772
+ if (!this.isDestroyed) {
8773
+ this.isResize = this.isReset = true;
8774
+ var args = {
8775
+ cancel: false,
8776
+ name: resize,
8777
+ previousSize: this.availableSize,
8778
+ currentSize: calculateSize(this),
8779
+ maps: this
8780
+ };
8781
+ this.trigger(resize, args);
8782
+ if (!args.cancel) {
8783
+ if (this.resizeTo) {
8784
+ clearTimeout(this.resizeTo);
8785
+ }
8786
+ if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
8787
+ this.resizeTo = setTimeout(function () {
8788
+ _this.unWireEVents();
8789
+ _this.createSVG();
8790
+ _this.refreshing = true;
8791
+ _this.wireEVents();
8792
+ _this.render();
8793
+ _this.refreshing = false;
8794
+ }, 500);
8795
+ }
8672
8796
  }
8673
8797
  }
8674
8798
  return false;
@@ -8683,32 +8807,34 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8683
8807
  * @returns {void}
8684
8808
  */
8685
8809
  Maps.prototype.zoomByPosition = function (centerPosition, zoomFactor) {
8686
- var factor = this.mapLayerPanel.calculateFactor(this.layersCollection[0]);
8687
- var position;
8688
- var size = this.mapAreaRect;
8689
- if (!this.isTileMap && this.zoomModule) {
8690
- if (!isNullOrUndefined(centerPosition)) {
8691
- position = convertGeoToPoint(centerPosition.latitude, centerPosition.longitude, factor, this.layersCollection[0], this);
8692
- var mapRect = document.getElementById(this.element.id + '_Layer_Collections').getBoundingClientRect();
8693
- var svgRect = this.svgObject.getBoundingClientRect();
8694
- var xDiff = Math.abs(mapRect.left - svgRect.left) / this.scale;
8695
- var yDiff = Math.abs(mapRect.top - svgRect.top) / this.scale;
8696
- var x = this.translatePoint.x + xDiff;
8697
- var y = this.translatePoint.y + yDiff;
8698
- this.scale = zoomFactor;
8699
- this.translatePoint.x = ((mapRect.left < svgRect.left ? x : 0) + (size.width / 2) - (position.x * zoomFactor)) / zoomFactor;
8700
- this.translatePoint.y = ((mapRect.top < svgRect.top ? y : 0) + (size.height / 2) - (position.y * zoomFactor)) / zoomFactor;
8701
- this.zoomModule.applyTransform(this);
8810
+ if (!this.isDestroyed) {
8811
+ this.zoomNotApplied = false;
8812
+ var isRefresh = this.zoomSettings.zoomFactor === zoomFactor;
8813
+ if (!this.isTileMap && this.zoomModule) {
8814
+ if (!isNullOrUndefined(centerPosition)) {
8815
+ this.zoomSettings.zoomFactor = zoomFactor;
8816
+ isRefresh = this.centerPosition.latitude === centerPosition.latitude &&
8817
+ this.centerPosition.longitude === centerPosition.longitude ? true : isRefresh;
8818
+ this.centerPosition = centerPosition;
8819
+ this.isZoomByPosition = true;
8820
+ this.mapScaleValue = null;
8821
+ }
8822
+ else {
8823
+ this.zoomSettings.zoomFactor = zoomFactor;
8824
+ this.isZoomByPosition = true;
8825
+ this.mapScaleValue = null;
8826
+ }
8702
8827
  }
8703
- else {
8704
- position = { x: size.width / 2, y: size.height / 2 };
8705
- this.zoomModule.performZooming(position, zoomFactor, zoomFactor > this.scale ? 'ZoomIn' : 'ZoomOut');
8828
+ else if (this.zoomModule) {
8829
+ this.tileZoomLevel = this.zoomSettings.zoomFactor = zoomFactor;
8830
+ isRefresh = this.centerPosition.latitude === centerPosition.latitude &&
8831
+ this.centerPosition.longitude === centerPosition.longitude ? true : isRefresh;
8832
+ this.centerPosition = centerPosition;
8833
+ this.isZoomByPosition = true;
8834
+ }
8835
+ if (isRefresh) {
8836
+ this.refresh();
8706
8837
  }
8707
- }
8708
- else if (this.zoomModule) {
8709
- this.tileZoomLevel = zoomFactor;
8710
- this.tileTranslatePoint = this.mapLayerPanel['panTileMap'](this.availableSize.width, this.availableSize.height, { x: centerPosition.longitude, y: centerPosition.latitude });
8711
- this.mapLayerPanel.generateTiles(zoomFactor, this.tileTranslatePoint, null, new BingMap(this));
8712
8838
  }
8713
8839
  };
8714
8840
  /**
@@ -8716,38 +8842,44 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8716
8842
  *
8717
8843
  * @param {PanDirection} direction - Specifies the direction in which the panning is performed.
8718
8844
  * @param {PointerEvent | TouchEvent} mouseLocation - Specifies the location of the mouse pointer in maps.
8845
+ * @returns {void}
8719
8846
  */
8720
8847
  Maps.prototype.panByDirection = function (direction, mouseLocation) {
8721
- var xDiff = 0;
8722
- var yDiff = 0;
8723
- switch (direction) {
8724
- case 'Left':
8725
- xDiff = -(this.mapAreaRect.width / 7);
8726
- break;
8727
- case 'Right':
8728
- xDiff = (this.mapAreaRect.width / 7);
8729
- break;
8730
- case 'Top':
8731
- yDiff = -(this.mapAreaRect.height / 7);
8732
- break;
8733
- case 'Bottom':
8734
- yDiff = (this.mapAreaRect.height / 7);
8735
- break;
8736
- }
8737
- if (this.zoomModule) {
8738
- this.zoomModule.panning(direction, xDiff, yDiff, mouseLocation);
8848
+ if (!this.isDestroyed) {
8849
+ var xDiff = 0;
8850
+ var yDiff = 0;
8851
+ switch (direction) {
8852
+ case 'Left':
8853
+ xDiff = -(this.mapAreaRect.width / 7);
8854
+ break;
8855
+ case 'Right':
8856
+ xDiff = (this.mapAreaRect.width / 7);
8857
+ break;
8858
+ case 'Top':
8859
+ yDiff = -(this.mapAreaRect.height / 7);
8860
+ break;
8861
+ case 'Bottom':
8862
+ yDiff = (this.mapAreaRect.height / 7);
8863
+ break;
8864
+ }
8865
+ if (this.zoomModule) {
8866
+ this.zoomModule.panning(direction, xDiff, yDiff, mouseLocation);
8867
+ }
8739
8868
  }
8740
8869
  };
8741
8870
  /**
8742
8871
  * This method is used to add the layers dynamically to the maps.
8743
8872
  *
8744
8873
  * @param {Object} layer - Specifies the layer for the maps.
8874
+ * @returns {void}
8745
8875
  */
8746
8876
  Maps.prototype.addLayer = function (layer) {
8747
- var mapsLayer = this.layers;
8748
- mapsLayer.push(layer);
8749
- this.isAddLayer = true;
8750
- this.layers = mapsLayer;
8877
+ if (!this.isDestroyed) {
8878
+ var mapsLayer = this.layers;
8879
+ mapsLayer.push(layer);
8880
+ this.isAddLayer = true;
8881
+ this.layers = mapsLayer;
8882
+ }
8751
8883
  };
8752
8884
  /**
8753
8885
  * This method is used to remove a layer from map.
@@ -8756,9 +8888,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8756
8888
  * @returns {void}
8757
8889
  */
8758
8890
  Maps.prototype.removeLayer = function (index) {
8759
- var mapsLayer = this.layers;
8760
- mapsLayer.splice(index, 1);
8761
- this.layers = mapsLayer;
8891
+ if (!this.isDestroyed) {
8892
+ var mapsLayer = this.layers;
8893
+ mapsLayer.splice(index, 1);
8894
+ this.layers = mapsLayer;
8895
+ }
8762
8896
  };
8763
8897
  /**
8764
8898
  * This method is used to add markers dynamically in the maps.
@@ -8770,15 +8904,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8770
8904
  * @returns {void}
8771
8905
  */
8772
8906
  Maps.prototype.addMarker = function (layerIndex, markerCollection) {
8773
- var layerEle = document.getElementById(this.element.id + '_LayerIndex_' + layerIndex);
8774
- if (markerCollection.length > 0 && layerEle) {
8775
- for (var _i = 0, markerCollection_1 = markerCollection; _i < markerCollection_1.length; _i++) {
8776
- var newMarker = markerCollection_1[_i];
8777
- this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
8907
+ if (!this.isDestroyed) {
8908
+ var layerEle = document.getElementById(this.element.id + '_LayerIndex_' + layerIndex);
8909
+ if (markerCollection.length > 0 && layerEle) {
8910
+ for (var _i = 0, markerCollection_1 = markerCollection; _i < markerCollection_1.length; _i++) {
8911
+ var newMarker = markerCollection_1[_i];
8912
+ this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
8913
+ }
8914
+ var markerModule = new Marker(this);
8915
+ markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
8916
+ this.arrangeTemplate();
8778
8917
  }
8779
- var markerModule = new Marker(this);
8780
- markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
8781
- this.arrangeTemplate();
8782
8918
  }
8783
8919
  };
8784
8920
  /**
@@ -8791,93 +8927,96 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8791
8927
  * @returns {void}
8792
8928
  */
8793
8929
  Maps.prototype.shapeSelection = function (layerIndex, propertyName, name, enable) {
8794
- var targetEle;
8795
- var subLayerIndex;
8796
- var popertyNameArray = Array.isArray(propertyName) ? propertyName : Array(propertyName);
8797
- if (isNullOrUndefined(enable)) {
8798
- enable = true;
8799
- }
8800
- var selectionsettings = this.layers[layerIndex].selectionSettings;
8801
- if (!selectionsettings.enableMultiSelect && this.legendSelection && enable) {
8802
- this.removeShapeSelection();
8803
- }
8804
- if (this.layers[layerIndex].type === 'SubLayer') {
8805
- for (var i = 0; i < this.layersCollection.length; i++) {
8806
- if ((this.layersCollection[i].shapeData === this.layers[layerIndex].shapeData)) {
8807
- subLayerIndex = i;
8808
- break;
8930
+ if (!this.isDestroyed) {
8931
+ var targetEle = void 0;
8932
+ var subLayerIndex = void 0;
8933
+ var popertyNameArray = Array.isArray(propertyName) ? propertyName : Array(propertyName);
8934
+ if (isNullOrUndefined(enable)) {
8935
+ enable = true;
8936
+ }
8937
+ var selectionsettings = this.layers[layerIndex].selectionSettings;
8938
+ if (!selectionsettings.enableMultiSelect && this.legendSelection && enable) {
8939
+ this.removeShapeSelection();
8940
+ }
8941
+ if (this.layers[layerIndex].type === 'SubLayer') {
8942
+ for (var i = 0; i < this.layersCollection.length; i++) {
8943
+ if ((this.layersCollection[i].shapeData === this.layers[layerIndex].shapeData)) {
8944
+ subLayerIndex = i;
8945
+ break;
8946
+ }
8809
8947
  }
8810
8948
  }
8811
- }
8812
- if (selectionsettings.enable) {
8813
- var targetId = void 0;
8814
- var dataIndex = void 0;
8815
- var shapeIndex = void 0;
8816
- var indexValue = void 0;
8817
- var shapeDataValue = void 0;
8818
- var data = void 0;
8819
- var shapeData = this.layers[layerIndex].shapeData['features'];
8820
- for (var i = 0; i < shapeData.length; i++) {
8821
- for (var j = 0; j < popertyNameArray.length; j++) {
8822
- var propertyName_1 = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
8823
- && isNaN(shapeData[i]['properties'][popertyNameArray[j]]) ?
8824
- shapeData[i]['properties'][popertyNameArray[j]].toLowerCase() : shapeData[i]['properties'][popertyNameArray[j]];
8825
- var shapeName = !isNullOrUndefined(name) && typeof name === 'string' ? name.toLowerCase() : name;
8826
- var k = void 0;
8827
- if (propertyName_1 === shapeName) {
8828
- if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
8829
- k = checkShapeDataFields(this.layers[layerIndex].dataSource, shapeData[i]['properties'], this.layers[layerIndex].shapeDataPath, this.layers[layerIndex].shapePropertyPath, this.layers[layerIndex]);
8830
- }
8831
- var baseLayer = this.layers[layerIndex];
8832
- if (this.baseLayerIndex >= 0 && baseLayer.isBaseLayer) {
8833
- indexValue = 0;
8834
- }
8835
- else if (this.layers[layerIndex].type === 'SubLayer') {
8836
- indexValue = subLayerIndex;
8837
- }
8838
- targetId = this.element.id + '_' + 'LayerIndex_' + indexValue + '_shapeIndex_' + i + '_dataIndex_' + k;
8839
- targetEle = getElement(targetId);
8840
- if (isNullOrUndefined(k) && isNullOrUndefined(targetEle)) {
8841
- targetId = this.element.id + '_' + 'LayerIndex_' + layerIndex + '_shapeIndex_' + i + '_dataIndex_null';
8949
+ if (selectionsettings.enable) {
8950
+ var targetId = void 0;
8951
+ var dataIndex = void 0;
8952
+ var shapeIndex = void 0;
8953
+ var indexValue = void 0;
8954
+ var shapeDataValue = void 0;
8955
+ var data = void 0;
8956
+ var shapeData = this.layers[layerIndex].shapeData['features'];
8957
+ for (var i = 0; i < shapeData.length; i++) {
8958
+ for (var j = 0; j < popertyNameArray.length; j++) {
8959
+ var propertyName_1 = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
8960
+ && isNaN(shapeData[i]['properties'][popertyNameArray[j]]) ?
8961
+ shapeData[i]['properties'][popertyNameArray[j]].toLowerCase() : shapeData[i]['properties'][popertyNameArray[j]];
8962
+ var shapeName = !isNullOrUndefined(name) && typeof name === 'string' ? name.toLowerCase() : name;
8963
+ var k = void 0;
8964
+ if (propertyName_1 === shapeName) {
8965
+ if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
8966
+ k = checkShapeDataFields(this.layers[layerIndex].dataSource, shapeData[i]['properties'], this.layers[layerIndex].shapeDataPath, this.layers[layerIndex].shapePropertyPath, this.layers[layerIndex]);
8967
+ }
8968
+ var baseLayer = this.layers[layerIndex];
8969
+ if (this.baseLayerIndex >= 0 && baseLayer.isBaseLayer) {
8970
+ indexValue = 0;
8971
+ }
8972
+ else if (this.layers[layerIndex].type === 'SubLayer') {
8973
+ indexValue = subLayerIndex;
8974
+ }
8975
+ targetId = this.element.id + '_' + 'LayerIndex_' + indexValue + '_shapeIndex_' + i + '_dataIndex_' + k;
8842
8976
  targetEle = getElement(targetId);
8843
- }
8844
- shapeIndex = parseInt(targetEle.id.split('_shapeIndex_')[1].split('_')[0], 10);
8845
- shapeDataValue = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
8846
- this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
8847
- dataIndex = parseInt(targetEle.id.split('_dataIndex_')[1].split('_')[0], 10);
8848
- data = isNullOrUndefined(dataIndex) ? null : this.layers[layerIndex].dataSource[dataIndex];
8849
- if (enable) {
8850
- triggerItemSelectionEvent(selectionsettings, this, targetEle, shapeDataValue, data);
8851
- this.shapeSelectionClass = getElement('ShapeselectionMap');
8852
- if (this.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1) {
8853
- this.legendModule.shapeHighLightAndSelection(targetEle, data, selectionsettings, 'selection', layerIndex);
8977
+ if (isNullOrUndefined(k) && isNullOrUndefined(targetEle)) {
8978
+ targetId = this.element.id + '_' + 'LayerIndex_' + layerIndex + '_shapeIndex_' + i + '_dataIndex_null';
8979
+ targetEle = getElement(targetId);
8854
8980
  }
8855
- var shapeToggled = this.legendSettings.visible ? this.legendModule.shapeToggled : true;
8856
- if (shapeToggled) {
8857
- targetEle.setAttribute('class', 'ShapeselectionMapStyle');
8858
- if (this.selectedElementId.indexOf(targetEle.getAttribute('id')) === -1) {
8859
- this.selectedElementId.push(targetEle.getAttribute('id'));
8981
+ shapeIndex = parseInt(targetEle.id.split('_shapeIndex_')[1].split('_')[0], 10);
8982
+ shapeDataValue = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
8983
+ this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
8984
+ dataIndex = parseInt(targetEle.id.split('_dataIndex_')[1].split('_')[0], 10);
8985
+ data = isNullOrUndefined(dataIndex) ? null : this.layers[layerIndex].dataSource[dataIndex];
8986
+ if (enable) {
8987
+ triggerItemSelectionEvent(selectionsettings, this, targetEle, shapeDataValue, data);
8988
+ this.shapeSelectionClass = getElement('ShapeselectionMap');
8989
+ if (this.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1) {
8990
+ this.legendModule.shapeHighLightAndSelection(targetEle, data, selectionsettings, 'selection', layerIndex);
8860
8991
  }
8861
- if (!selectionsettings.enableMultiSelect) {
8862
- return;
8992
+ var shapeToggled = this.legendSettings.visible ? this.legendModule.shapeToggled : true;
8993
+ if (shapeToggled) {
8994
+ targetEle.setAttribute('class', 'ShapeselectionMapStyle');
8995
+ if (this.selectedElementId.indexOf(targetEle.getAttribute('id')) === -1) {
8996
+ this.selectedElementId.push(targetEle.getAttribute('id'));
8997
+ }
8998
+ if (!selectionsettings.enableMultiSelect) {
8999
+ return;
9000
+ }
8863
9001
  }
8864
9002
  }
8865
- }
8866
- else {
8867
- this.legendSelection = (!selectionsettings.enableMultiSelect && !this.legendSelection) ?
8868
- true : this.legendSelection;
8869
- if (this.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1 &&
8870
- targetEle.getAttribute('class') === 'ShapeselectionMapStyle') {
8871
- this.legendModule.shapeHighLightAndSelection(targetEle, data, selectionsettings, 'selection', layerIndex);
8872
- }
8873
- var shapeToggled = this.legendSettings.visible ? this.legendModule.shapeToggled : true;
8874
- if (shapeToggled) {
8875
- removeClass(targetEle);
8876
- var selectedElementIdIndex = this.selectedElementId.indexOf(targetEle.getAttribute('id'));
8877
- if (selectedElementIdIndex !== -1) {
8878
- this.selectedElementId.splice(selectedElementIdIndex, 1);
8879
- if (!selectionsettings.enableMultiSelect && this.legendSelection && this.selectedElementId.length > 0) {
8880
- this.removeShapeSelection();
9003
+ else {
9004
+ this.legendSelection = (!selectionsettings.enableMultiSelect && !this.legendSelection) ?
9005
+ true : this.legendSelection;
9006
+ if (this.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1 &&
9007
+ targetEle.getAttribute('class') === 'ShapeselectionMapStyle') {
9008
+ this.legendModule.shapeHighLightAndSelection(targetEle, data, selectionsettings, 'selection', layerIndex);
9009
+ }
9010
+ var shapeToggled = this.legendSettings.visible ? this.legendModule.shapeToggled : true;
9011
+ if (shapeToggled) {
9012
+ removeClass(targetEle);
9013
+ var selectedElementIdIndex = this.selectedElementId.indexOf(targetEle.getAttribute('id'));
9014
+ if (selectedElementIdIndex !== -1) {
9015
+ this.selectedElementId.splice(selectedElementIdIndex, 1);
9016
+ if (!selectionsettings.enableMultiSelect && this.legendSelection
9017
+ && this.selectedElementId.length > 0) {
9018
+ this.removeShapeSelection();
9019
+ }
8881
9020
  }
8882
9021
  }
8883
9022
  }
@@ -8898,48 +9037,55 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8898
9037
  */
8899
9038
  Maps.prototype.zoomToCoordinates = function (minLatitude, minLongitude, maxLatitude, maxLongitude) {
8900
9039
  var _a, _b;
8901
- var centerLatitude;
8902
- var centerLongtitude;
8903
- var isTwoCoordinates = false;
8904
- if (isNullOrUndefined(maxLatitude) && isNullOrUndefined(maxLongitude)
8905
- || isNullOrUndefined(minLatitude) && isNullOrUndefined(minLongitude)) {
8906
- minLatitude = isNullOrUndefined(minLatitude) ? 0 : minLatitude;
8907
- minLongitude = isNullOrUndefined(minLatitude) ? 0 : minLongitude;
8908
- maxLatitude = isNullOrUndefined(maxLatitude) ? minLatitude : maxLatitude;
8909
- maxLongitude = isNullOrUndefined(maxLongitude) ? minLongitude : maxLongitude;
8910
- isTwoCoordinates = true;
8911
- }
8912
- if (minLatitude > maxLatitude) {
8913
- _a = [maxLatitude, minLatitude], minLatitude = _a[0], maxLatitude = _a[1];
8914
- }
8915
- if (minLongitude > maxLongitude) {
8916
- _b = [maxLongitude, minLongitude], minLongitude = _b[0], maxLongitude = _b[1];
8917
- }
8918
- if (!isTwoCoordinates) {
8919
- centerLatitude = (minLatitude + maxLatitude) / 2;
8920
- centerLongtitude = (minLongitude + maxLongitude) / 2;
9040
+ if (!this.isDestroyed) {
9041
+ var centerLatitude = void 0;
9042
+ var centerLongtitude = void 0;
9043
+ var isTwoCoordinates = false;
9044
+ this.centerPosition = {
9045
+ latitude: null,
9046
+ longitude: null
9047
+ };
9048
+ this.isZoomByPosition = false;
9049
+ if (isNullOrUndefined(maxLatitude) && isNullOrUndefined(maxLongitude)
9050
+ || isNullOrUndefined(minLatitude) && isNullOrUndefined(minLongitude)) {
9051
+ minLatitude = isNullOrUndefined(minLatitude) ? 0 : minLatitude;
9052
+ minLongitude = isNullOrUndefined(minLatitude) ? 0 : minLongitude;
9053
+ maxLatitude = isNullOrUndefined(maxLatitude) ? minLatitude : maxLatitude;
9054
+ maxLongitude = isNullOrUndefined(maxLongitude) ? minLongitude : maxLongitude;
9055
+ isTwoCoordinates = true;
9056
+ }
9057
+ if (minLatitude > maxLatitude) {
9058
+ _a = [maxLatitude, minLatitude], minLatitude = _a[0], maxLatitude = _a[1];
9059
+ }
9060
+ if (minLongitude > maxLongitude) {
9061
+ _b = [maxLongitude, minLongitude], minLongitude = _b[0], maxLongitude = _b[1];
9062
+ }
9063
+ if (!isTwoCoordinates) {
9064
+ centerLatitude = (minLatitude + maxLatitude) / 2;
9065
+ centerLongtitude = (minLongitude + maxLongitude) / 2;
9066
+ }
9067
+ else {
9068
+ centerLatitude = (minLatitude + maxLatitude);
9069
+ centerLongtitude = (minLongitude + maxLongitude);
9070
+ }
9071
+ this.centerLatOfGivenLocation = centerLatitude;
9072
+ this.centerLongOfGivenLocation = centerLongtitude;
9073
+ this.minLatOfGivenLocation = minLatitude;
9074
+ this.minLongOfGivenLocation = minLongitude;
9075
+ this.maxLatOfGivenLocation = maxLatitude;
9076
+ this.maxLongOfGivenLocation = maxLongitude;
9077
+ this.zoomNotApplied = true;
9078
+ this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this);
9079
+ var zoomArgs = {
9080
+ cancel: false, name: 'zoom', type: zoomIn, maps: this,
9081
+ tileTranslatePoint: {}, translatePoint: {},
9082
+ tileZoomLevel: this.isTileMap ? { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation } : {},
9083
+ scale: !this.isTileMap ? { previous: this.scale, current: this.scaleOfGivenLocation } :
9084
+ { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation }
9085
+ };
9086
+ this.trigger('zoom', zoomArgs);
9087
+ this.refresh();
8921
9088
  }
8922
- else {
8923
- centerLatitude = (minLatitude + maxLatitude);
8924
- centerLongtitude = (minLongitude + maxLongitude);
8925
- }
8926
- this.centerLatOfGivenLocation = centerLatitude;
8927
- this.centerLongOfGivenLocation = centerLongtitude;
8928
- this.minLatOfGivenLocation = minLatitude;
8929
- this.minLongOfGivenLocation = minLongitude;
8930
- this.maxLatOfGivenLocation = maxLatitude;
8931
- this.maxLongOfGivenLocation = maxLongitude;
8932
- this.zoomNotApplied = true;
8933
- this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this);
8934
- var zoomArgs = {
8935
- cancel: false, name: 'zoom', type: zoomIn, maps: this,
8936
- tileTranslatePoint: {}, translatePoint: {},
8937
- tileZoomLevel: this.isTileMap ? { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation } : {},
8938
- scale: !this.isTileMap ? { previous: this.scale, current: this.scaleOfGivenLocation } :
8939
- { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation }
8940
- };
8941
- this.trigger('zoom', zoomArgs);
8942
- this.refresh();
8943
9089
  };
8944
9090
  /**
8945
9091
  * This method is used to remove multiple selected shapes in the maps.
@@ -8990,6 +9136,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8990
9136
  };
8991
9137
  /**
8992
9138
  * This method disposes the maps component.
9139
+ *
9140
+ * @returns {void}
8993
9141
  */
8994
9142
  Maps.prototype.destroy = function () {
8995
9143
  this.unWireEVents();
@@ -9046,93 +9194,96 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9046
9194
  * @private
9047
9195
  */
9048
9196
  Maps.prototype.onPropertyChanged = function (newProp, oldProp) {
9049
- var render = false;
9050
- var isMarker = false;
9051
- var isLayer = false;
9052
- var isStaticMapType = false;
9053
- var layerEle;
9054
- if (newProp['layers']) {
9055
- var newLayerLength = Object.keys(newProp['layers']).length;
9056
- layerEle = document.getElementById(this.element.id + '_LayerIndex_' + (newLayerLength - 1));
9057
- }
9058
- for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
9059
- var prop = _a[_i];
9060
- switch (prop) {
9061
- case 'background':
9062
- this.renderBorder();
9063
- break;
9064
- case 'height':
9065
- case 'width':
9066
- case 'layers':
9067
- case 'projectionType':
9068
- case 'centerPosition':
9069
- case 'legendSettings':
9070
- case 'baseLayerIndex':
9071
- if (prop === 'layers') {
9072
- isLayer = true;
9073
- var layerPropLength = Object.keys(newProp.layers).length;
9074
- for (var x = 0; x < layerPropLength; x++) {
9075
- if (!isNullOrUndefined(newProp.layers[x])) {
9076
- var collection = Object.keys(newProp.layers[x]);
9077
- for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
9078
- var collectionProp = collection_1[_b];
9079
- if ((collectionProp === 'layerType' && newProp.layers[x].layerType !== 'Geometry') || (isNullOrUndefined(this.layers[x].shapeData)
9080
- && !isNullOrUndefined(this.layers[x].urlTemplate) && this.layers[x].urlTemplate !== '')) {
9081
- this.isReset = true;
9082
- }
9083
- else if (collectionProp === 'markerSettings') {
9084
- isMarker = true;
9085
- }
9086
- else if (collectionProp === 'staticMapType') {
9087
- isStaticMapType = true;
9197
+ if (!this.isDestroyed) {
9198
+ var render = false;
9199
+ var isMarker = false;
9200
+ var isLayer = false;
9201
+ var isStaticMapType = false;
9202
+ var layerEle = void 0;
9203
+ if (newProp['layers']) {
9204
+ var newLayerLength = Object.keys(newProp['layers']).length;
9205
+ layerEle = document.getElementById(this.element.id + '_LayerIndex_' + (newLayerLength - 1));
9206
+ }
9207
+ for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
9208
+ var prop = _a[_i];
9209
+ switch (prop) {
9210
+ case 'background':
9211
+ this.renderBorder();
9212
+ break;
9213
+ case 'height':
9214
+ case 'width':
9215
+ case 'layers':
9216
+ case 'projectionType':
9217
+ case 'centerPosition':
9218
+ case 'legendSettings':
9219
+ case 'baseLayerIndex':
9220
+ if (prop === 'layers') {
9221
+ isLayer = true;
9222
+ var layerPropLength = Object.keys(newProp.layers).length;
9223
+ for (var x = 0; x < layerPropLength; x++) {
9224
+ if (!isNullOrUndefined(newProp.layers[x])) {
9225
+ var collection = Object.keys(newProp.layers[x]);
9226
+ for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
9227
+ var collectionProp = collection_1[_b];
9228
+ if ((collectionProp === 'layerType' && newProp.layers[x].layerType !== 'Geometry') ||
9229
+ (isNullOrUndefined(this.layers[x].shapeData)
9230
+ && !isNullOrUndefined(this.layers[x].urlTemplate) && this.layers[x].urlTemplate !== '')) {
9231
+ this.isReset = true;
9232
+ }
9233
+ else if (collectionProp === 'markerSettings') {
9234
+ isMarker = true;
9235
+ }
9236
+ else if (collectionProp === 'staticMapType') {
9237
+ isStaticMapType = true;
9238
+ }
9088
9239
  }
9089
9240
  }
9090
9241
  }
9091
9242
  }
9092
- }
9093
- render = true;
9094
- break;
9095
- case 'zoomSettings':
9096
- if (!isNullOrUndefined(oldProp.zoomSettings)) {
9097
- if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor && !isLayer) {
9098
- render = false;
9099
- }
9100
- else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
9101
- this.zoomSettings.zoomFactor = 1;
9102
- render = true;
9103
- }
9104
- else if (newProp.zoomSettings.enable !== oldProp.zoomSettings.enable) {
9105
- this.zoomSettings.zoomFactor = 1;
9106
- render = true;
9107
- }
9108
- else {
9109
- render = true;
9243
+ render = true;
9244
+ break;
9245
+ case 'zoomSettings':
9246
+ if (!isNullOrUndefined(oldProp.zoomSettings)) {
9247
+ if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor && !isLayer) {
9248
+ render = false;
9249
+ }
9250
+ else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
9251
+ this.zoomSettings.zoomFactor = 1;
9252
+ render = true;
9253
+ }
9254
+ else if (newProp.zoomSettings.enable !== oldProp.zoomSettings.enable) {
9255
+ this.zoomSettings.zoomFactor = 1;
9256
+ render = true;
9257
+ }
9258
+ else {
9259
+ render = true;
9260
+ }
9110
9261
  }
9111
- }
9112
- break;
9113
- case 'locale':
9114
- case 'currencyCode':
9115
- _super.prototype.refresh.call(this);
9116
- break;
9262
+ break;
9263
+ case 'locale':
9264
+ case 'currencyCode':
9265
+ _super.prototype.refresh.call(this);
9266
+ break;
9267
+ }
9117
9268
  }
9118
- }
9119
- if (render) {
9120
- if (newProp.layers && isMarker) {
9121
- removeElement(this.element.id + '_Markers_Group');
9122
- if (this.isTileMap) {
9123
- this.mapLayerPanel.renderTileLayer(this.mapLayerPanel, this.layers['currentFactor'], (this.layers.length - 1));
9269
+ if (render) {
9270
+ if (newProp.layers && isMarker) {
9271
+ removeElement(this.element.id + '_Markers_Group');
9272
+ if (this.isTileMap) {
9273
+ this.mapLayerPanel.renderTileLayer(this.mapLayerPanel, this.layers['currentFactor'], (this.layers.length - 1));
9274
+ }
9275
+ else {
9276
+ this.render();
9277
+ }
9278
+ }
9279
+ else if (newProp.layers && isStaticMapType) {
9280
+ this.mapLayerPanel.renderGoogleMap(this.layers[this.layers.length - 1].key, this.staticMapZoom);
9124
9281
  }
9125
9282
  else {
9126
- this.render();
9283
+ this.createSVG();
9284
+ this.renderElements();
9127
9285
  }
9128
9286
  }
9129
- else if (newProp.layers && isStaticMapType) {
9130
- this.mapLayerPanel.renderGoogleMap(this.layers[this.layers.length - 1].key, this.staticMapZoom);
9131
- }
9132
- else {
9133
- this.createSVG();
9134
- this.renderElements();
9135
- }
9136
9287
  }
9137
9288
  };
9138
9289
  /**
@@ -9145,7 +9296,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9145
9296
  var modules = [];
9146
9297
  var isVisible = this.findVisibleLayers(this.layers);
9147
9298
  var annotationEnable = false;
9148
- this.annotations.map(function (annotation, index) {
9299
+ this.annotations.map(function (annotation) {
9149
9300
  annotationEnable = annotation.content != null;
9150
9301
  });
9151
9302
  if (this.isBubbleVisible()) {
@@ -9230,10 +9381,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9230
9381
  };
9231
9382
  /**
9232
9383
  * To find marker visibility
9384
+ *
9385
+ * @returns {boolean} - Returns whether the markers are visible or not.
9233
9386
  */
9234
9387
  Maps.prototype.isMarkersVisible = function () {
9235
9388
  var isVisible = false;
9236
- Array.prototype.forEach.call(this.layers, function (layer, layerIndex) {
9389
+ Array.prototype.forEach.call(this.layers, function (layer) {
9237
9390
  for (var i = 0; i < layer.markerSettings.length; i++) {
9238
9391
  if (layer.markerSettings[i].visible) {
9239
9392
  isVisible = true;
@@ -9245,6 +9398,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9245
9398
  };
9246
9399
  /**
9247
9400
  * To find DataLabel visibility
9401
+ *
9402
+ * @returns {boolean} - Returns whether the data labels are visible or not.
9248
9403
  */
9249
9404
  Maps.prototype.isDataLabelVisible = function () {
9250
9405
  var isVisible = false;
@@ -9258,10 +9413,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9258
9413
  };
9259
9414
  /**
9260
9415
  * To find navigation line visibility
9416
+ *
9417
+ * @returns {boolean} - Returns whether the navigation lines are visible or not.
9261
9418
  */
9262
9419
  Maps.prototype.isNavigationVisible = function () {
9263
9420
  var isVisible = false;
9264
- Array.prototype.forEach.call(this.layers, function (layer, layerIndex) {
9421
+ Array.prototype.forEach.call(this.layers, function (layer) {
9265
9422
  for (var i = 0; i < layer.navigationLineSettings.length; i++) {
9266
9423
  if (layer.navigationLineSettings[i].visible) {
9267
9424
  isVisible = true;
@@ -9273,6 +9430,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9273
9430
  };
9274
9431
  /**
9275
9432
  * To find space between the secondary element and svg element.
9433
+ *
9434
+ * @returns {Point} - Returns the left and top value of the secondary element of Maps.
9276
9435
  * @private
9277
9436
  */
9278
9437
  Maps.prototype.getExtraPosition = function () {
@@ -9330,7 +9489,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9330
9489
  * @returns {void}
9331
9490
  */
9332
9491
  Maps.prototype.print = function (id) {
9333
- if ((this.allowPrint) && (this.printModule)) {
9492
+ if ((this.allowPrint) && (this.printModule) && !this.isDestroyed) {
9334
9493
  this.printModule.print(this, id);
9335
9494
  }
9336
9495
  };
@@ -9345,18 +9504,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9345
9504
  */
9346
9505
  Maps.prototype.export = function (type, fileName, orientation, allowDownload) {
9347
9506
  var _this = this;
9348
- if (isNullOrUndefined(allowDownload)) {
9349
- allowDownload = true;
9350
- }
9351
- if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
9352
- return new Promise(function (resolve, reject) {
9353
- resolve(_this.imageExportModule.export(_this, type, fileName, allowDownload));
9354
- });
9355
- }
9356
- else if ((this.allowPdfExport) && (this.pdfExportModule)) {
9357
- return new Promise(function (resolve, reject) {
9358
- resolve(_this.pdfExportModule.export(_this, type, fileName, allowDownload, orientation));
9359
- });
9507
+ if (!this.isDestroyed) {
9508
+ if (isNullOrUndefined(allowDownload)) {
9509
+ allowDownload = true;
9510
+ }
9511
+ if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
9512
+ return new Promise(function (resolve, reject) {
9513
+ resolve(_this.imageExportModule.export(_this, type, fileName, allowDownload));
9514
+ });
9515
+ }
9516
+ else if ((this.allowPdfExport) && (this.pdfExportModule)) {
9517
+ return new Promise(function (resolve, reject) {
9518
+ resolve(_this.pdfExportModule.export(_this, type, fileName, allowDownload, orientation));
9519
+ });
9520
+ }
9360
9521
  }
9361
9522
  return null;
9362
9523
  };
@@ -9367,19 +9528,22 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9367
9528
  * @returns {Promise<string>} - Returns the processed Bing URL as Promise.
9368
9529
  */
9369
9530
  Maps.prototype.getBingUrlTemplate = function (url) {
9370
- var promise = new Promise(function (resolve, reject) {
9371
- var ajax = new Ajax({
9372
- url: url
9531
+ var promise;
9532
+ if (!this.isDestroyed) {
9533
+ promise = new Promise(function (resolve, reject) {
9534
+ var ajax = new Ajax({
9535
+ url: url
9536
+ });
9537
+ ajax.onSuccess = function (json) {
9538
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9539
+ var jsonObject = JSON.parse(json);
9540
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9541
+ var resource = jsonObject['resourceSets'][0]['resources'][0];
9542
+ resolve(resource['imageUrl']);
9543
+ };
9544
+ ajax.send();
9373
9545
  });
9374
- ajax.onSuccess = function (json) {
9375
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9376
- var jsonObject = JSON.parse(json);
9377
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9378
- var resource = jsonObject['resourceSets'][0]['resources'][0];
9379
- resolve(resource['imageUrl']);
9380
- };
9381
- ajax.send();
9382
- });
9546
+ }
9383
9547
  return promise;
9384
9548
  };
9385
9549
  /**
@@ -9460,21 +9624,25 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9460
9624
  * @returns {GeoPosition}- Returns the geo position
9461
9625
  */
9462
9626
  Maps.prototype.getGeoLocation = function (layerIndex, x, y) {
9463
- var container = document.getElementById(this.element.id);
9464
- var pageX = x - container.offsetLeft;
9465
- var pageY = y - container.offsetTop;
9466
- var currentLayer = this.layersCollection[layerIndex];
9467
- var translate = getTranslate(this, currentLayer, false);
9468
- var translatePoint = translate['location'];
9469
- var translatePointX = translatePoint.x * this.scale;
9470
- var translatePointY = translatePoint.y * this.scale;
9471
- var mapSize = (Math.min(this.mapAreaRect.height, this.mapAreaRect.width)
9472
- * this.mapLayerPanel['currentFactor']) * this.scale;
9473
- var xx = (this.clip(pageX - translatePointX, 0, mapSize - 1) / mapSize) - 0.5;
9474
- var yy = 0.5 - (this.clip(pageY - translatePointY, 0, mapSize - 1) / mapSize);
9475
- var lat = 90 - 360 * Math.atan(Math.exp(-yy * 2 * Math.PI)) / Math.PI;
9476
- var long = 360 * xx;
9477
- return { latitude: lat, longitude: long };
9627
+ var latitude = 0;
9628
+ var longitude = 0;
9629
+ if (!this.isDestroyed) {
9630
+ var container = document.getElementById(this.element.id);
9631
+ var pageX = x - container.offsetLeft;
9632
+ var pageY = y - container.offsetTop;
9633
+ var currentLayer = this.layersCollection[layerIndex];
9634
+ var translate = getTranslate(this, currentLayer, false);
9635
+ var translatePoint = translate['location'];
9636
+ var translatePointX = translatePoint.x * this.scale;
9637
+ var translatePointY = translatePoint.y * this.scale;
9638
+ var mapSize = (Math.min(this.mapAreaRect.height, this.mapAreaRect.width)
9639
+ * this.mapLayerPanel['currentFactor']) * this.scale;
9640
+ var xx = (this.clip(pageX - translatePointX, 0, mapSize - 1) / mapSize) - 0.5;
9641
+ var yy = 0.5 - (this.clip(pageY - translatePointY, 0, mapSize - 1) / mapSize);
9642
+ latitude = 90 - 360 * Math.atan(Math.exp(-yy * 2 * Math.PI)) / Math.PI;
9643
+ longitude = 360 * xx;
9644
+ }
9645
+ return { latitude: latitude, longitude: longitude };
9478
9646
  };
9479
9647
  Maps.prototype.clip = function (value, minVal, maxVal) {
9480
9648
  return Math.min(Math.max(value, minVal), maxVal);
@@ -9487,10 +9655,16 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9487
9655
  * @returns {GeoPosition} - Returns the position
9488
9656
  */
9489
9657
  Maps.prototype.getTileGeoLocation = function (x, y) {
9490
- var container = document.getElementById(this.element.id);
9491
- var ele = document.getElementById(this.element.id + '_tile_parent');
9492
- var latLong = this.pointToLatLong(x + this.mapAreaRect.x - (ele.offsetLeft - container.offsetLeft), y + this.mapAreaRect.y - (ele.offsetTop - container.offsetTop));
9493
- return { latitude: latLong['latitude'], longitude: latLong['longitude'] };
9658
+ var latitude = 0;
9659
+ var longitude = 0;
9660
+ if (!this.isDestroyed) {
9661
+ var container = document.getElementById(this.element.id);
9662
+ var ele = document.getElementById(this.element.id + '_tile_parent');
9663
+ var latLong = this.pointToLatLong(x + this.mapAreaRect.x - (ele.offsetLeft - container.offsetLeft), y + this.mapAreaRect.y - (ele.offsetTop - container.offsetTop));
9664
+ latitude = latLong['latitude'];
9665
+ longitude = latLong['longitude'];
9666
+ }
9667
+ return { latitude: latitude, longitude: longitude };
9494
9668
  };
9495
9669
  /**
9496
9670
  * This method is used to convert the point to latitude and longitude in maps.
@@ -9500,14 +9674,18 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9500
9674
  * @returns {Object} - Returns the object.
9501
9675
  */
9502
9676
  Maps.prototype.pointToLatLong = function (pageX, pageY) {
9503
- var padding = this.layers[this.layers.length - 1].layerType === 'GoogleStaticMap' ? 0 : 10;
9504
- pageY = (this.zoomSettings.enable) ? pageY + padding : pageY;
9505
- var mapSize = 256 * Math.pow(2, this.tileZoomLevel);
9506
- var x1 = (this.clip(pageX - (this.translatePoint.x * this.scale), 0, mapSize - 1) / mapSize) - 0.5;
9507
- var y1 = 0.5 - (this.clip(pageY - (this.translatePoint.y * this.scale), 0, mapSize - 1) / mapSize);
9508
- var lat = 90 - 360 * Math.atan(Math.exp(-y1 * 2 * Math.PI)) / Math.PI;
9509
- var long = 360 * x1;
9510
- return { latitude: lat, longitude: long };
9677
+ var latitude = 0;
9678
+ var longitude = 0;
9679
+ if (!this.isDestroyed) {
9680
+ var padding = this.layers[this.layers.length - 1].layerType === 'GoogleStaticMap' ? 0 : 10;
9681
+ pageY = (this.zoomSettings.enable) ? pageY + padding : pageY;
9682
+ var mapSize = 256 * Math.pow(2, this.tileZoomLevel);
9683
+ var x1 = (this.clip(pageX - (this.translatePoint.x * this.scale), 0, mapSize - 1) / mapSize) - 0.5;
9684
+ var y1 = 0.5 - (this.clip(pageY - (this.translatePoint.y * this.scale), 0, mapSize - 1) / mapSize);
9685
+ latitude = 90 - 360 * Math.atan(Math.exp(-y1 * 2 * Math.PI)) / Math.PI;
9686
+ longitude = 360 * x1;
9687
+ }
9688
+ return { latitude: latitude, longitude: longitude };
9511
9689
  };
9512
9690
  __decorate([
9513
9691
  Property(null)
@@ -9703,7 +9881,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
9703
9881
  var layerData = layer.layerData;
9704
9882
  var colorValuePath = bubbleSettings.colorValuePath;
9705
9883
  var equalValue = (!isNullOrUndefined(colorValuePath)) ? ((colorValuePath.indexOf('.') > -1) ?
9706
- (getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : shapeData[colorValuePath]) : shapeData[colorValuePath];
9884
+ (getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : shapeData[colorValuePath]) :
9885
+ shapeData[colorValuePath];
9707
9886
  var colorValue = (!isNullOrUndefined(colorValuePath)) ? ((colorValuePath.indexOf('.') > -1) ?
9708
9887
  Number(getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : Number(shapeData[colorValuePath])) :
9709
9888
  Number(shapeData[colorValuePath]);
@@ -9857,16 +10036,17 @@ var Bubble = /** @__PURE__ @class */ (function () {
9857
10036
  }
9858
10037
  else {
9859
10038
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9860
- shape.map(function (current, index) {
10039
+ shape.map(function (current) {
9861
10040
  points.push(new Point(current['point']['x'], current['point']['y']));
9862
10041
  });
9863
10042
  }
9864
10043
  return points;
9865
10044
  };
9866
- // eslint-disable-next-line valid-jsdoc
9867
10045
  /**
9868
10046
  * To check and trigger bubble click event
9869
10047
  *
10048
+ * @param {PointerEvent} e - Specifies the pointer event argument.
10049
+ * @returns {void}
9870
10050
  * @private
9871
10051
  */
9872
10052
  Bubble.prototype.bubbleClick = function (e) {
@@ -9912,6 +10092,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
9912
10092
  /**
9913
10093
  * To check and trigger bubble move event
9914
10094
  *
10095
+ * @param {PointerEvent} e - Specifies the pointer event argument.
10096
+ * @retruns {void}
9915
10097
  * @private
9916
10098
  */
9917
10099
  Bubble.prototype.bubbleMove = function (e) {
@@ -10002,6 +10184,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10002
10184
  var _this = this;
10003
10185
  var dataLabel = layer.dataLabelSettings;
10004
10186
  var style = layer.dataLabelSettings.textStyle;
10187
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10005
10188
  var templateFn;
10006
10189
  var options;
10007
10190
  var dataLabelSettings = layer.dataLabelSettings;
@@ -10012,7 +10195,6 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10012
10195
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10013
10196
  var shapeData = shape;
10014
10197
  var element;
10015
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10016
10198
  var text = '';
10017
10199
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10018
10200
  var datasrcObj;
@@ -10151,7 +10333,6 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10151
10333
  if (eventargs_1.cancel) {
10152
10334
  return;
10153
10335
  }
10154
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10155
10336
  var position = [];
10156
10337
  var width = zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied
10157
10338
  && _this.maps.zoomShapeCollection.length > index ? _this.maps.zoomShapeCollection[index]['width'] :
@@ -10195,8 +10376,14 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10195
10376
  datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
10196
10377
  templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
10197
10378
  labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties'], index, _this.maps);
10198
- labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
10199
- labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
10379
+ if (_this.maps.isTileMap) {
10380
+ labelElement.style.left = (((location['x'] + transPoint['x']) * scale) - (textSize['width'] / 2)) + 'px';
10381
+ labelElement.style.top = (((location['y'] + transPoint['y']) * scale) - textSize['height']) + 'px';
10382
+ }
10383
+ else {
10384
+ labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
10385
+ labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
10386
+ }
10200
10387
  labelTemplateElement.appendChild(labelElement);
10201
10388
  }
10202
10389
  else {
@@ -10266,8 +10453,8 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10266
10453
  }
10267
10454
  if (trimmedLable.length > 1) {
10268
10455
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10269
- var border_1 = eventargs_1.border;
10270
- if (border_1['width'] > 1) {
10456
+ var border = eventargs_1.border;
10457
+ if (border['width'] > 1) {
10271
10458
  var fill = eventargs_1.fill;
10272
10459
  var opacity = dataLabelSettings.opacity;
10273
10460
  var rx = dataLabelSettings.rx;
@@ -10283,8 +10470,8 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10283
10470
  x = ((location['x'] + transPoint['x']) * scale) - textSize['width'] / 2;
10284
10471
  y = ((location['y'] + transPoint['y']) * scale) - textSize['height'] / 2;
10285
10472
  }
10286
- border_1.opacity = isNullOrUndefined(border_1.opacity) ? opacity : border_1.opacity;
10287
- var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border_1, opacity, new Rect((x + labelArgs.offsetX), (y + labelArgs.offsetY), textSize['width'], textSize['height']), rx, ry);
10473
+ border.opacity = isNullOrUndefined(border.opacity) ? opacity : border.opacity;
10474
+ var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border, opacity, new Rect((x + labelArgs.offsetX), (y + labelArgs.offsetY), textSize['width'], textSize['height']), rx, ry);
10288
10475
  var rect = _this.maps.renderer.drawRectangle(rectOptions);
10289
10476
  group.appendChild(rect);
10290
10477
  }
@@ -10331,7 +10518,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10331
10518
  }
10332
10519
  else {
10333
10520
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10334
- shapes.map(function (current, index) {
10521
+ shapes.map(function (current) {
10335
10522
  points.push(new Point(current['point']['x'], current['point']['y']));
10336
10523
  });
10337
10524
  }
@@ -10346,7 +10533,6 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10346
10533
  return 'DataLabel';
10347
10534
  };
10348
10535
  /**
10349
- *
10350
10536
  * @returns {void}
10351
10537
  * @private
10352
10538
  */
@@ -10365,79 +10551,84 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10365
10551
  function NavigationLine(maps) {
10366
10552
  this.maps = maps;
10367
10553
  }
10368
- // eslint-disable-next-line valid-jsdoc
10369
10554
  /**
10370
10555
  * To render navigation line for maps
10556
+ *
10557
+ * @param {LayerSettings} layer - Specifies the layer instance to which the navigation line is to be rendered.
10558
+ * @param {number} factor - Specifies the current zoom factor of the Maps.
10559
+ * @param {number} layerIndex -Specifies the index of current layer.
10560
+ * @returns {Element} - Returns the navigation line element.
10371
10561
  */
10372
10562
  NavigationLine.prototype.renderNavigation = function (layer, factor, layerIndex) {
10373
- var navigationEle;
10374
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10375
- var navigation = layer.navigationLineSettings;
10376
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10377
- var longitude;
10378
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10379
- var point = [];
10380
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10381
- var latitude;
10382
- var visible;
10383
- var angle;
10384
- var width;
10385
- var color;
10386
- var dashArray;
10387
- var pathOption;
10388
- var direction;
10389
- var showArrow;
10390
- var arrowColor;
10391
- var arrowSize;
10392
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10393
- var arrowSettings;
10394
- var arrowPosition;
10395
- var startArrow;
10396
- var endArrow;
10397
- var offSet;
10398
- var offSetValue;
10399
- var navigationGroup;
10400
- var d;
10401
- var group = (this.maps.renderer.createGroup({
10402
- id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_line_Group'
10403
- }));
10404
- for (var i = 0; i < navigation.length; i++) {
10405
- latitude = navigation[i]['properties']['latitude'];
10406
- longitude = navigation[i]['properties']['longitude'];
10407
- visible = navigation[i]['properties']['visible'];
10408
- angle = navigation[i]['angle'];
10409
- width = navigation[i]['width'] || 1;
10410
- color = navigation[i]['color'];
10411
- dashArray = navigation[i]['properties']['dashArray'];
10412
- arrowSettings = navigation[i]['properties']['arrowSettings'];
10413
- showArrow = (isNullOrUndefined(arrowSettings)) ? false : arrowSettings['properties']['showArrow'];
10414
- if (longitude['length'] === latitude['length'] && visible) {
10415
- for (var i_1 = 0; i_1 < longitude['length']; i_1++) {
10416
- var location_1 = (this.maps.isTileMap) ? convertTileLatLongToPoint(new Point(longitude[i_1], latitude[i_1]), factor, this.maps.tileTranslatePoint, true) : convertGeoToPoint(latitude[i_1], longitude[i_1], factor, layer, this.maps);
10417
- point.push(location_1);
10418
- }
10419
- }
10420
- navigationGroup = (this.maps.renderer.createGroup({
10421
- id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationGroup' + i + ''
10563
+ var group;
10564
+ if (!isNullOrUndefined(this.maps)) {
10565
+ var navigationEle = void 0;
10566
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10567
+ var navigation = layer.navigationLineSettings;
10568
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10569
+ var longitude = void 0;
10570
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10571
+ var point = [];
10572
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10573
+ var latitude = void 0;
10574
+ var visible = void 0;
10575
+ var angle = void 0;
10576
+ var width = void 0;
10577
+ var color = void 0;
10578
+ var dashArray = void 0;
10579
+ var pathOption = void 0;
10580
+ var direction = void 0;
10581
+ var showArrow = void 0;
10582
+ var arrowColor = void 0;
10583
+ var arrowSize = void 0;
10584
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10585
+ var arrowSettings = void 0;
10586
+ var arrowPosition = void 0;
10587
+ var startArrow = void 0;
10588
+ var endArrow = void 0;
10589
+ var offSet = void 0;
10590
+ var offSetValue = void 0;
10591
+ var navigationGroup = void 0;
10592
+ var d = void 0;
10593
+ group = (this.maps.renderer.createGroup({
10594
+ id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_line_Group'
10422
10595
  }));
10423
- for (var j = 0; j < point['length'] - 1; j++) {
10424
- angle = (-1 > angle) ? -1 : angle;
10425
- angle = (1 < angle) ? 1 : angle;
10426
- var arcId = this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationIndex_' + i + '_Line' + j + '';
10427
- var radius = this.convertRadius(point[j], point[j + 1]);
10428
- if (angle <= 1 && angle > 0) {
10429
- direction = 0;
10430
- if (point[j]['x'] > point[j + 1]['x']) {
10431
- direction = 1;
10432
- }
10433
- }
10434
- if (angle >= -1 && angle < 0) {
10435
- direction = 1;
10436
- if (point[j]['x'] > point[j + 1]['x']) {
10596
+ for (var i = 0; i < navigation.length; i++) {
10597
+ latitude = navigation[i]['properties']['latitude'];
10598
+ longitude = navigation[i]['properties']['longitude'];
10599
+ visible = navigation[i]['properties']['visible'];
10600
+ angle = navigation[i]['angle'];
10601
+ width = navigation[i]['width'] || 1;
10602
+ color = navigation[i]['color'];
10603
+ dashArray = navigation[i]['properties']['dashArray'];
10604
+ arrowSettings = navigation[i]['properties']['arrowSettings'];
10605
+ showArrow = (isNullOrUndefined(arrowSettings)) ? false : arrowSettings['properties']['showArrow'];
10606
+ if (longitude['length'] === latitude['length'] && visible) {
10607
+ for (var i_1 = 0; i_1 < longitude['length']; i_1++) {
10608
+ var location_1 = (this.maps.isTileMap) ? convertTileLatLongToPoint(new Point(longitude[i_1], latitude[i_1]), factor, this.maps.tileTranslatePoint, true) : convertGeoToPoint(latitude[i_1], longitude[i_1], factor, layer, this.maps);
10609
+ point.push(location_1);
10610
+ }
10611
+ }
10612
+ navigationGroup = (this.maps.renderer.createGroup({
10613
+ id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationGroup' + i + ''
10614
+ }));
10615
+ for (var j = 0; j < point['length'] - 1; j++) {
10616
+ angle = (-1 > angle) ? -1 : angle;
10617
+ angle = (1 < angle) ? 1 : angle;
10618
+ var arcId = this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationIndex_' + i + '_Line' + j + '';
10619
+ var radius = this.convertRadius(point[j], point[j + 1]);
10620
+ if (angle <= 1 && angle > 0) {
10437
10621
  direction = 0;
10622
+ if (point[j]['x'] > point[j + 1]['x']) {
10623
+ direction = 1;
10624
+ }
10625
+ }
10626
+ if (angle >= -1 && angle < 0) {
10627
+ direction = 1;
10628
+ if (point[j]['x'] > point[j + 1]['x']) {
10629
+ direction = 0;
10630
+ }
10438
10631
  }
10439
- }
10440
- if (point[j]['x'] !== point[j + 1]['x']) {
10441
10632
  if (showArrow) {
10442
10633
  arrowColor = arrowSettings['properties']['color'];
10443
10634
  arrowSize = arrowSettings['properties']['size'];
@@ -10482,8 +10673,8 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10482
10673
  navigationGroup.appendChild(navigationEle);
10483
10674
  group.appendChild(navigationGroup);
10484
10675
  }
10676
+ point = [];
10485
10677
  }
10486
- point = [];
10487
10678
  }
10488
10679
  return group;
10489
10680
  };
@@ -10993,15 +11184,16 @@ var Legend = /** @__PURE__ @class */ (function () {
10993
11184
  var textId = map.element.id + '_Legend_Text_Index_' + collection['idIndex'];
10994
11185
  var shapeLocation = new Point(collection['Shape']['x'], (collection['Shape']['y'] - pagingArrowPadding));
10995
11186
  var textLocation = new Point(collection['Text']['x'], (collection['Text']['y'] - pagingArrowPadding));
10996
- var imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
10997
- var renderOptions_1 = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
11187
+ var renderOptions = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
10998
11188
  var legendTextStyle = {
10999
11189
  fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
11000
- fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color, opacity: legend.textStyle.opacity
11190
+ fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color,
11191
+ opacity: legend.textStyle.opacity
11001
11192
  };
11002
11193
  legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
11003
11194
  this.maps.themeStyle.legendTextColor;
11004
- legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily : this.maps.themeStyle.fontFamily;
11195
+ legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
11196
+ this.maps.themeStyle.fontFamily;
11005
11197
  legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
11006
11198
  if (i === 0) {
11007
11199
  this.renderLegendBorder();
@@ -11011,11 +11203,11 @@ var Legend = /** @__PURE__ @class */ (function () {
11011
11203
  var marker$$1 = map.layers[legendShapeData['layerIndex']].markerSettings[legendShapeData['markerIndex']];
11012
11204
  legendShape = !isNullOrUndefined(marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']]) && marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']] !== '' ? marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']] : marker$$1.shape;
11013
11205
  }
11014
- if (legendShape === "Balloon") {
11015
- legendElement.appendChild(drawBalloon(map, renderOptions_1, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
11206
+ if (legendShape === 'Balloon') {
11207
+ legendElement.appendChild(drawBalloon(map, renderOptions, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
11016
11208
  }
11017
11209
  else {
11018
- legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions_1));
11210
+ legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions));
11019
11211
  }
11020
11212
  var legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
11021
11213
  if (legendRectSize > this.legendBorderRect.width) {
@@ -11050,14 +11242,14 @@ var Legend = /** @__PURE__ @class */ (function () {
11050
11242
  leftPageElement.appendChild(render.drawPath(leftPageOptions));
11051
11243
  var leftRectPageOptions = new RectOption(map.element.id + '_Left_Page_Rect', 'transparent', {}, 1, new Rect(leftPageX - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
11052
11244
  var pathEle = render.drawRectangle(leftRectPageOptions);
11053
- pathEle.setAttribute('tabindex', ((page + 1) === 1 ? -1 : map.tabIndex + 1).toString());
11245
+ pathEle.tabIndex = (page + 1) === 1 ? -1 : (map.tabIndex + 1);
11054
11246
  leftPageElement.appendChild(pathEle);
11055
11247
  this.wireEvents(leftPageElement);
11056
11248
  var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
11057
11249
  rightPageElement.appendChild(render.drawPath(rightPageOptions));
11058
11250
  var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect(rightPageX - spacing - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
11059
11251
  pathEle = render.drawRectangle(rightRectPageOptions);
11060
- pathEle.setAttribute('tabindex', ((page + 1) === this.totalPages.length ? -1 : map.tabIndex + 2).toString());
11252
+ pathEle.tabIndex = (page + 1) === this.totalPages.length ? -1 : (map.tabIndex + 2);
11061
11253
  rightPageElement.appendChild(pathEle);
11062
11254
  this.wireEvents(rightPageElement);
11063
11255
  pagingGroup.appendChild(leftPageElement);
@@ -11078,7 +11270,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11078
11270
  'dominant-baseline': ''
11079
11271
  };
11080
11272
  var pagingTextElement = render.createText(pageTextOptions, pagingText);
11081
- pagingTextElement.setAttribute('style', 'user-select: none;');
11273
+ pagingTextElement.style.cssText = 'user-select: none;';
11082
11274
  pagingGroup.appendChild(pagingTextElement);
11083
11275
  this.legendGroup.appendChild(pagingGroup);
11084
11276
  }
@@ -11212,11 +11404,14 @@ var Legend = /** @__PURE__ @class */ (function () {
11212
11404
  this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeElement);
11213
11405
  var shapeItemCount = this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].length - 1;
11214
11406
  var shapeOldFillColor = shapeElement.getAttribute('fill');
11407
+ var shapeOldOpacity = shapeElement.getAttribute('fill-opacity');
11215
11408
  this.legendHighlightCollection[length - 1]['shapeOldFillColor'].push(shapeOldFillColor);
11409
+ this.legendHighlightCollection[length - 1]['shapeOldOpacity'] = shapeOldOpacity;
11216
11410
  var shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
11411
+ var shapeOldFillOpacity = this.legendHighlightCollection[length - 1]['shapeOldOpacity'];
11217
11412
  this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
11218
- this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11219
- this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11413
+ this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11414
+ this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11220
11415
  }
11221
11416
  else if (value === 'selection') {
11222
11417
  this.legendHighlightCollection = [];
@@ -11281,6 +11476,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11281
11476
  var length = collection.length;
11282
11477
  collection[length - 1]['MapShapeCollection'] = { Elements: [] };
11283
11478
  collection[length - 1]['shapeOldFillColor'] = [];
11479
+ collection[length - 1]['shapeOldOpacity'] = null;
11284
11480
  };
11285
11481
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11286
11482
  Legend.prototype.removeLegend = function (collection) {
@@ -11292,7 +11488,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11292
11488
  for (var j = 0; j < dataCount; j++) {
11293
11489
  var shapeFillColor = item['legendOldFill'].indexOf('url') !== -1
11294
11490
  ? item['shapeOldFillColor'][j] : item['legendOldFill'];
11295
- this.setColor(item['MapShapeCollection']['Elements'][j], shapeFillColor, item['shapeOpacity'], item['shapeOldBorderColor'], item['shapeOldBorderWidth'], 'highlight');
11491
+ var shapeOpacity = !isNullOrUndefined(item['shapeOldOpacity']) ? item['shapeOldOpacity'] : item['shapeOpacity'];
11492
+ this.setColor(item['MapShapeCollection']['Elements'][j], shapeFillColor, shapeOpacity, item['shapeOldBorderColor'], item['shapeOldBorderWidth'], 'highlight');
11296
11493
  }
11297
11494
  }
11298
11495
  };
@@ -11484,8 +11681,6 @@ var Legend = /** @__PURE__ @class */ (function () {
11484
11681
  }
11485
11682
  if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
11486
11683
  || targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
11487
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
11488
- var element = this.maps.legendSelectionCollection[selectionEle['SelectionIndex']];
11489
11684
  var multiSelection = 0;
11490
11685
  if (module.enableMultiSelect) {
11491
11686
  for (var i = 0; i < shapeElement['Elements'].length; i++) {
@@ -11744,7 +11939,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11744
11939
  var legendTitle = legend.title.text;
11745
11940
  var textStyle = {
11746
11941
  fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
11747
- fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color, opacity: legend.titleStyle.opacity
11942
+ fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color,
11943
+ opacity: legend.titleStyle.opacity
11748
11944
  };
11749
11945
  var textOptions;
11750
11946
  var spacing = 10;
@@ -11805,7 +12001,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11805
12001
  var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
11806
12002
  var locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
11807
12003
  if (legend.position === 'Float') {
11808
- this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) : new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
12004
+ this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) :
12005
+ new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
11809
12006
  this.legendTotalRect = map.mapAreaRect;
11810
12007
  }
11811
12008
  else {
@@ -11888,7 +12085,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11888
12085
  _this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
11889
12086
  }
11890
12087
  else {
11891
- newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
12088
+ newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill,
12089
+ name: text,
11892
12090
  shape: (!isNullOrUndefined(marker$$1.shapeValuePath) && !isNullOrUndefined(data[marker$$1.shapeValuePath]) && data[marker$$1.shapeValuePath] !== '') ? data[marker$$1.shapeValuePath] : (_this.maps.legendSettings.useMarkerShape ? marker$$1.shape : _this.maps.legendSettings.shape) });
11893
12091
  _this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
11894
12092
  }
@@ -12075,6 +12273,7 @@ var Legend = /** @__PURE__ @class */ (function () {
12075
12273
  if (outOfRangeValues.length === 0) {
12076
12274
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12077
12275
  var range_1 = false;
12276
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12078
12277
  Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
12079
12278
  range_1 = false;
12080
12279
  var rangeValue = data[colorValuePath];
@@ -12528,10 +12727,12 @@ var Legend = /** @__PURE__ @class */ (function () {
12528
12727
  this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
12529
12728
  }
12530
12729
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
12531
- mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
12730
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 :
12731
+ this.maps.layers[k].shapeSettings.border.width).toString());
12532
12732
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
12533
12733
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
12534
- this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity).toString());
12734
+ this.maps.layers[k].shapeSettings.opacity :
12735
+ this.maps.layers[k].shapeSettings.border.opacity).toString());
12535
12736
  mapLegendElement.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
12536
12737
  if (targetEle !== null) {
12537
12738
  legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
@@ -12595,7 +12796,7 @@ var Legend = /** @__PURE__ @class */ (function () {
12595
12796
  && isNaN(shapeData['properties'][shapePath]) ?
12596
12797
  shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12597
12798
  if (shapeDataValueCase === dataPathValueCase) {
12598
- if (shapeData['geometry']['type'] != 'MultiPoint') {
12799
+ if (shapeData['geometry']['type'] !== 'MultiPoint') {
12599
12800
  legendData.push({
12600
12801
  layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
12601
12802
  name: data[dataPath], value: value, pointIndex: -1
@@ -12839,16 +13040,37 @@ var Highlight = /** @__PURE__ @class */ (function () {
12839
13040
  var marker$$1 = parseInt(targetEle.id.split('_MarkerIndex_')[1].split('_')[0], 10);
12840
13041
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
12841
13042
  }
12842
- var border = {
12843
- color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color),
12844
- width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
12845
- opacity: this.highlightSettings.border.opacity
12846
- };
13043
+ var borderColor = (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color);
13044
+ var borderWidth = (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale);
13045
+ var borderOpacity = isNullOrUndefined(this.highlightSettings.border.opacity) ? this.highlightSettings.opacity :
13046
+ this.highlightSettings.border.opacity;
13047
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12847
13048
  var eventArgs = {
12848
13049
  opacity: this.highlightSettings.opacity,
12849
13050
  fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
12850
13051
  ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
12851
- border: border,
13052
+ border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
13053
+ cancel: false
13054
+ };
13055
+ var shapeEventArgs = {
13056
+ opacity: eventArgs.opacity,
13057
+ fill: eventArgs.fill,
13058
+ border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
13059
+ name: shapeHighlight,
13060
+ target: targetEle.id,
13061
+ cancel: false,
13062
+ shapeData: shapeData,
13063
+ data: data,
13064
+ maps: this.maps
13065
+ };
13066
+ if (targetEle.id.indexOf('shapeIndex') > -1) {
13067
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
13068
+ this.maps.trigger(shapeHighlight, shapeEventArgs, function () { });
13069
+ }
13070
+ var itemEventArgs = {
13071
+ opacity: eventArgs.opacity,
13072
+ fill: eventArgs.fill,
13073
+ border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
12852
13074
  name: itemHighlight,
12853
13075
  target: targetEle.id,
12854
13076
  cancel: false,
@@ -12856,13 +13078,18 @@ var Highlight = /** @__PURE__ @class */ (function () {
12856
13078
  data: data,
12857
13079
  maps: this.maps
12858
13080
  };
12859
- this.maps.trigger(itemHighlight, eventArgs, function () {
12860
- eventArgs.border.opacity = isNullOrUndefined(_this.highlightSettings.border.opacity) ? _this.highlightSettings.opacity : _this.highlightSettings.border.opacity;
12861
- _this.highlightMap(targetEle, eventArgs);
13081
+ this.maps.trigger(itemHighlight, itemEventArgs, function () {
13082
+ itemEventArgs.cancel = eventArgs.cancel !== itemEventArgs.cancel ? itemEventArgs.cancel : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.cancel : eventArgs.cancel;
13083
+ itemEventArgs.fill = eventArgs.fill !== itemEventArgs.fill ? itemEventArgs.fill : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.fill : eventArgs.fill;
13084
+ itemEventArgs.opacity = eventArgs.opacity !== itemEventArgs.opacity ? itemEventArgs.opacity : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.opacity : eventArgs.opacity;
13085
+ itemEventArgs.border.color = eventArgs.border.color !== itemEventArgs.border.color ? itemEventArgs.border.color : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.color : eventArgs.border.color;
13086
+ itemEventArgs.border.width = eventArgs.border.width !== itemEventArgs.border.width ? itemEventArgs.border.width : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.width : eventArgs.border.width;
13087
+ itemEventArgs.border.opacity = eventArgs.border.opacity !== itemEventArgs.border.opacity ? itemEventArgs.border.opacity : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.opacity : eventArgs.border.opacity;
13088
+ _this.highlightMap(targetEle, itemEventArgs);
12862
13089
  });
12863
13090
  };
12864
13091
  Highlight.prototype.highlightMap = function (targetEle, eventArgs) {
12865
- if (targetEle.getAttribute('class') === 'highlightMapStyle') {
13092
+ if (targetEle.getAttribute('class') === 'highlightMapStyle' || eventArgs.cancel) {
12866
13093
  return;
12867
13094
  }
12868
13095
  else {
@@ -13041,7 +13268,8 @@ var Selection = /** @__PURE__ @class */ (function () {
13041
13268
  var isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
13042
13269
  var selectionsettings = this.selectionsettings;
13043
13270
  var border = {
13044
- color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) : this.selectionsettings.border.color,
13271
+ color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) :
13272
+ this.selectionsettings.border.color,
13045
13273
  width: isLineStringShape ? (this.selectionsettings.border.width / this.maps.scale) :
13046
13274
  (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)),
13047
13275
  opacity: this.selectionsettings.border.opacity
@@ -13058,7 +13286,8 @@ var Selection = /** @__PURE__ @class */ (function () {
13058
13286
  maps: this.maps
13059
13287
  };
13060
13288
  this.maps.trigger('itemSelection', eventArgs, function (observedArgs) {
13061
- eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ? _this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
13289
+ eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ?
13290
+ _this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
13062
13291
  if (!eventArgs.cancel) {
13063
13292
  if (targetElement.getAttribute('class') === _this.selectionType + 'selectionMapStyle'
13064
13293
  || targetElement.getAttribute('class') === 'LineselectionMapStyle') {
@@ -13211,7 +13440,6 @@ var Selection = /** @__PURE__ @class */ (function () {
13211
13440
  return Selection;
13212
13441
  }());
13213
13442
 
13214
- /* eslint-disable @typescript-eslint/no-unused-vars */
13215
13443
  /**
13216
13444
  * Map Tooltip
13217
13445
  */
@@ -13244,7 +13472,6 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13244
13472
  }
13245
13473
  var option;
13246
13474
  var currentData = '';
13247
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13248
13475
  var targetId = target.id;
13249
13476
  var tooltipEle;
13250
13477
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -13368,9 +13595,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13368
13595
  else {
13369
13596
  tooltipEle = createElement('div', {
13370
13597
  id: this.maps.element.id + '_mapsTooltip',
13371
- className: 'EJ2-maps-Tooltip',
13372
- styles: 'position: absolute;pointer-events:none;'
13598
+ className: 'EJ2-maps-Tooltip'
13373
13599
  });
13600
+ tooltipEle.style.cssText = 'position: absolute;pointer-events:none;';
13374
13601
  document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
13375
13602
  }
13376
13603
  if (option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
@@ -13393,6 +13620,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13393
13620
  maps: this.maps,
13394
13621
  element: target, eventArgs: e, content: !isNullOrUndefined(currentData) ? currentData.toString() : ''
13395
13622
  };
13623
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
13396
13624
  this.maps.trigger(tooltipRender, tooltipArgs, function (args) {
13397
13625
  if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
13398
13626
  (targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
@@ -13409,7 +13637,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13409
13637
  header: '',
13410
13638
  data: option['data'],
13411
13639
  template: option['template'],
13412
- content: tooltipArgs.content.toString() != currentData.toString() ? [tooltipArgs.content.toString()] : [currentData.toString()],
13640
+ content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
13641
+ [currentData.toString()],
13413
13642
  shapes: [],
13414
13643
  location: option['location'],
13415
13644
  palette: [markerFill],
@@ -13425,7 +13654,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13425
13654
  header: '',
13426
13655
  data: tooltipArgs.options['data'],
13427
13656
  template: tooltipArgs.options['template'],
13428
- content: tooltipArgs.content.toString() != currentData.toString() ? [tooltipArgs.content.toString()] : [currentData.toString()],
13657
+ content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
13658
+ [currentData.toString()],
13429
13659
  shapes: [],
13430
13660
  location: tooltipArgs.options['location'],
13431
13661
  palette: [markerFill],
@@ -13448,7 +13678,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13448
13678
  && tooltipTemplateElement.innerHTML.indexOf('</a>') !== -1) {
13449
13679
  var templateStyle = tooltipTemplateElement.getAttribute('style');
13450
13680
  templateStyle = templateStyle.replace('pointer-events: none;', 'position-events:all;');
13451
- tooltipTemplateElement.setAttribute('style', templateStyle);
13681
+ tooltipTemplateElement.style.cssText = templateStyle;
13452
13682
  }
13453
13683
  }
13454
13684
  else {
@@ -13741,6 +13971,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13741
13971
  }
13742
13972
  this.maps.zoomNotApplied = false;
13743
13973
  };
13974
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13744
13975
  Zoom.prototype.calculateInitalZoomTranslatePoint = function (newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map) {
13745
13976
  mapTotalWidth *= newZoomFactor;
13746
13977
  mapTotalHeight *= newZoomFactor;
@@ -14002,7 +14233,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14002
14233
  layerElement.appendChild(maps.navigationLineModule.renderNavigation(this.currentLayer, maps.tileZoomLevel, this.index));
14003
14234
  }
14004
14235
  }
14005
- else if (currentEle.id.indexOf('Legend') == -1) {
14236
+ else if (currentEle.id.indexOf('Legend') === -1) {
14006
14237
  changeBorderWidth(currentEle, this.index, scale, maps);
14007
14238
  maps.zoomTranslatePoint = maps.translatePoint;
14008
14239
  this.animateTransform(currentEle, animate$$1, x, y, scale);
@@ -14040,7 +14271,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14040
14271
  }
14041
14272
  else {
14042
14273
  markerStyle = 'visibility:hidden';
14043
- currentEle.setAttribute('style', markerStyle);
14274
+ currentEle.style.cssText = markerStyle;
14044
14275
  }
14045
14276
  }
14046
14277
  }
@@ -14080,7 +14311,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
14080
14311
  var childElement = void 0;
14081
14312
  for (var k = 0; k < currentEle.childElementCount; k++) {
14082
14313
  childElement = currentEle.childNodes[k];
14083
- var bubbleTransform = childElement.getAttribute('transform');
14084
14314
  layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
14085
14315
  var bubleIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[0]);
14086
14316
  var dataIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[2]);
@@ -14158,22 +14388,22 @@ var Zoom = /** @__PURE__ @class */ (function () {
14158
14388
  var layerIndex = parseInt((element ? element : layerElement).id.split('_LayerIndex_')[1].split('_')[0], 10);
14159
14389
  var markerSVGObject = this.maps.renderer.createGroup({
14160
14390
  id: this.maps.element.id + '_Markers_Group',
14161
- class: 'GroupElement',
14162
- style: 'pointer-events: auto;'
14391
+ class: 'GroupElement'
14163
14392
  });
14393
+ markerSVGObject.style.pointerEvents = 'auto';
14164
14394
  if (document.getElementById(markerSVGObject.id)) {
14165
14395
  removeElement(markerSVGObject.id);
14166
14396
  }
14167
14397
  var mapsAreaRect = this.maps.mapAreaRect;
14168
14398
  var markerTemplateElements = createElement('div', {
14169
14399
  id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
14170
- className: 'template',
14171
- styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
14172
- 'top:' + mapsAreaRect.y + 'px;' +
14173
- 'left:' + mapsAreaRect.x + 'px;' +
14174
- 'height:' + mapsAreaRect.height + 'px;' +
14175
- 'width:' + mapsAreaRect.width + 'px;'
14400
+ className: 'template'
14176
14401
  });
14402
+ markerTemplateElements.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
14403
+ 'top:' + mapsAreaRect.y + 'px;' +
14404
+ 'left:' + mapsAreaRect.x + 'px;' +
14405
+ 'height:' + mapsAreaRect.height + 'px;' +
14406
+ 'width:' + mapsAreaRect.width + 'px;';
14177
14407
  if (document.getElementById(markerTemplateElements.id)) {
14178
14408
  removeElement(markerTemplateElements.id);
14179
14409
  }
@@ -14211,7 +14441,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
14211
14441
  var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
14212
14442
  + markerIndex + '_dataIndex_' + dataIndex;
14213
14443
  var location_1 = (_this.maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(long, lati), _this.maps.tileZoomLevel, _this.maps.tileTranslatePoint, true) : convertGeoToPoint(lati, long, factor, currentLayers, _this.maps);
14214
- var animate_1 = currentLayers.animationDuration !== 0 || isNullOrUndefined(_this.maps.zoomModule);
14215
14444
  var transPoint = { x: x, y: y };
14216
14445
  if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
14217
14446
  markerTemplateCounts++;
@@ -14281,15 +14510,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
14281
14510
  if (animate$$1 === void 0) { animate$$1 = false; }
14282
14511
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14283
14512
  var labelCollection = this.maps.dataLabelModule.dataLabelCollections;
14284
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
14285
- var zoomelement = element.getBoundingClientRect();
14286
14513
  var text;
14287
14514
  var trimmedLable;
14288
14515
  var style = this.maps.layers[this.index].dataLabelSettings.textStyle;
14289
14516
  var zoomtext;
14290
14517
  var zoomtextSize;
14291
14518
  var zoomtrimLabel;
14292
- var labelPath = this.maps.layers[this.index].dataLabelSettings.labelPath;
14293
14519
  var layerIndex = parseFloat(element.id.split('_LayerIndex_')[1].split('_')[0]);
14294
14520
  var shapeIndex = parseFloat(element.id.split('_shapeIndex_')[1].split('_')[0]);
14295
14521
  var labelIndex;
@@ -14305,16 +14531,25 @@ var Zoom = /** @__PURE__ @class */ (function () {
14305
14531
  var labelX = label['location']['x'];
14306
14532
  var labelY = label['location']['y'];
14307
14533
  if (type === 'Template') {
14308
- var layerEle = getElementByID(this.maps.element.id + '_Layer_Collections');
14309
- labelX = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - labelX)) * scale);
14310
- labelY = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - labelY)) * scale);
14311
- var templateOffset = element.getBoundingClientRect();
14312
- var layerOffset = layerEle.getBoundingClientRect();
14313
- var elementOffset = element.parentElement.getBoundingClientRect();
14314
- var x_3 = ((labelX) + (layerOffset.left - elementOffset.left) - (templateOffset.width / 2));
14315
- var y_2 = ((labelY) + (layerOffset.top - elementOffset.top) - (templateOffset.height / 2));
14316
- element.style.left = x_3 + 'px';
14317
- element.style.top = y_2 + 'px';
14534
+ var locationX = 0;
14535
+ var locationY = 0;
14536
+ if (this.maps.isTileMap) {
14537
+ zoomtext = label['dataLabelText'];
14538
+ zoomtextSize = measureText(zoomtext, style);
14539
+ locationX = ((labelX + x) * scale) - (zoomtextSize['width'] / 2);
14540
+ locationY = ((labelY + y) * scale) - (zoomtextSize['height']);
14541
+ }
14542
+ else {
14543
+ var layerEle = getElementByID(this.maps.element.id + '_Layer_Collections');
14544
+ labelX = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - labelX)) * scale);
14545
+ labelY = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - labelY)) * scale);
14546
+ var layerOffset = layerEle.getBoundingClientRect();
14547
+ var elementOffset = element.parentElement.getBoundingClientRect();
14548
+ locationX = ((labelX) + (layerOffset.left - elementOffset.left));
14549
+ locationY = ((labelY) + (layerOffset.top - elementOffset.top));
14550
+ }
14551
+ element.style.left = locationX + 'px';
14552
+ element.style.top = locationY + 'px';
14318
14553
  }
14319
14554
  else {
14320
14555
  labelX = ((labelX + x) * scale);
@@ -14446,10 +14681,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
14446
14681
  if (element['style']['display'] !== 'none') {
14447
14682
  if ((staticMapOffset['x'] > templateOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < templateOffset['x'] + templateOffset['width'])
14448
14683
  && (staticMapOffset['y'] > templateOffset['y'] || staticMapOffset['y'] + staticMapOffset['height'] < templateOffset['y'] + templateOffset['height'])) {
14449
- element['style']['display'] = 'none';
14684
+ element.style.display = 'none';
14450
14685
  }
14451
14686
  else if ((staticMapOffset['x'] > templateOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < templateOffset['x'] + templateOffset['width'])) {
14452
- element['style']['display'] = 'none';
14687
+ element.style.display = 'none';
14453
14688
  }
14454
14689
  }
14455
14690
  }
@@ -14505,6 +14740,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
14505
14740
  }
14506
14741
  };
14507
14742
  /**
14743
+ * @param {PanDirection} direction - Specifies the direction of the panning.
14744
+ * @param {number} xDifference - Specifies the distance moved in the horizontal direction.
14745
+ * @param {number} yDifference - Specifies the distance moved in the vertical direction.
14746
+ * @param {PointerEvent | TouchEvent | KeyboardEvent} mouseLocation - Specifies the pointer event argument.
14747
+ * @returns {void}
14508
14748
  * @private
14509
14749
  */
14510
14750
  Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
@@ -14586,7 +14826,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
14586
14826
  }
14587
14827
  map.zoomTranslatePoint = map.translatePoint;
14588
14828
  this.mouseDownPoints = this.mouseMovePoints;
14589
- this.maps.zoomNotApplied = false;
14590
14829
  this.isSingleClick = false;
14591
14830
  };
14592
14831
  Zoom.prototype.toAlignSublayer = function () {
@@ -14927,7 +15166,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
14927
15166
  Zoom.prototype.alignToolBar = function () {
14928
15167
  var map = this.maps;
14929
15168
  var padding = 10;
14930
- var element = createElement('div', { id: map.element.id + '_ToolBar', styles: 'position:absolute;z-index:2' });
15169
+ var element = createElement('div', { id: map.element.id + '_ToolBar' });
15170
+ element.style.cssText = 'position:absolute;z-index:2';
14931
15171
  var rectSVGObject = map.renderer.createSvg({
14932
15172
  id: map.element.id + '_Zooming_ToolBar', width: 10, height: 10
14933
15173
  });
@@ -15301,7 +15541,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
15301
15541
  return Zoom;
15302
15542
  }());
15303
15543
 
15304
- /* eslint-disable @typescript-eslint/no-unused-vars */
15305
15544
  /**
15306
15545
  * This module enables the print functionality in maps.
15307
15546
  *
@@ -15311,14 +15550,16 @@ var Print = /** @__PURE__ @class */ (function () {
15311
15550
  /**
15312
15551
  * Constructor for Maps
15313
15552
  *
15314
- * @param {Maps} control - Specifies the instance of the map
15553
+ * @param {Maps} control - Specifies the instance of the Maps
15315
15554
  */
15555
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
15316
15556
  function Print(control) {
15317
15557
  }
15318
15558
  /**
15319
15559
  * To print the Maps
15320
15560
  *
15321
- * @param {string[] | string | Element} elements - Specifies the element
15561
+ * @param {Maps} maps -Specifies the Maps instance.
15562
+ * @param {string[] | string | Element} elements - Specifies the element of the Maps
15322
15563
  * @returns {void}
15323
15564
  * @private
15324
15565
  */
@@ -15338,6 +15579,7 @@ var Print = /** @__PURE__ @class */ (function () {
15338
15579
  /**
15339
15580
  * To get the html string of the Maps
15340
15581
  *
15582
+ * @param {Maps} maps -Specifies the Maps instance.
15341
15583
  * @param {string[] | string | Element} elements - Specifies the html element
15342
15584
  * @returns {Element} - Returns the div element
15343
15585
  * @private
@@ -15397,11 +15639,11 @@ var Print = /** @__PURE__ @class */ (function () {
15397
15639
  * @returns {void}
15398
15640
  * @private
15399
15641
  */
15642
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
15400
15643
  Print.prototype.destroy = function () { };
15401
15644
  return Print;
15402
15645
  }());
15403
15646
 
15404
- /* eslint-disable @typescript-eslint/no-unused-vars */
15405
15647
  /**
15406
15648
  * This module enables the export to Image functionality in Maps control.
15407
15649
  *
@@ -15413,19 +15655,21 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15413
15655
  *
15414
15656
  * @param {Maps} control - Specifies the instance of the map
15415
15657
  */
15658
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
15416
15659
  function ImageExport(control) {
15417
15660
  }
15418
15661
  /**
15419
15662
  * To export the file as image/svg format
15420
15663
  *
15421
- * @param {ExportType} type - Specifies the type of the image file
15422
- * @param {string} fileName - Specifies the file name of the image file
15664
+ * @param {Maps} maps - Specifies the Maps instance.
15665
+ * @param {ExportType} type - Specifies the type of the image file for exporting.
15666
+ * @param {string} fileName - Specifies the file name of the image file for exporting.
15423
15667
  * @param {boolean} allowDownload - Specifies whether to download image as a file or not.
15424
- * @returns {Promise<string>} - Returns the promise string.
15668
+ * @returns {Promise<string>} - Specifies the base64 string of the exported image which is returned when the allowDownload is set to false.
15425
15669
  * @private
15426
15670
  */
15427
15671
  ImageExport.prototype.export = function (maps, type, fileName, allowDownload) {
15428
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15672
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
15429
15673
  var promise = new Promise(function (resolve, reject) {
15430
15674
  var imageCanvasElement = createElement('canvas', {
15431
15675
  id: 'ej2-canvas',
@@ -15435,7 +15679,6 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15435
15679
  }
15436
15680
  });
15437
15681
  var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
15438
- var toolbarEle = document.getElementById(maps.element.id + '_ToolBar');
15439
15682
  var svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
15440
15683
  var svgDataElement;
15441
15684
  var tileSvg;
@@ -15569,11 +15812,11 @@ var ImageExport = /** @__PURE__ @class */ (function () {
15569
15812
  * @returns {void}
15570
15813
  * @private
15571
15814
  */
15815
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
15572
15816
  ImageExport.prototype.destroy = function () { };
15573
15817
  return ImageExport;
15574
15818
  }());
15575
15819
 
15576
- /* eslint-disable @typescript-eslint/no-unused-vars */
15577
15820
  /**
15578
15821
  * This module enables the export to PDF functionality in Maps control.
15579
15822
  *
@@ -15583,18 +15826,19 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15583
15826
  /**
15584
15827
  * Constructor for Maps
15585
15828
  *
15586
- * @param {Maps} control Specifies the instance of the map
15587
15829
  */
15830
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
15588
15831
  function PdfExport() {
15589
15832
  }
15590
15833
  /**
15591
15834
  * To export the file as image/svg format
15592
15835
  *
15593
- * @param {ExportType} type - Specifies the type of the document
15594
- * @param {string} fileName - Specifies the file name of the document
15595
- * @param {boolean} allowDownload - Specifies whether to download the document or not
15596
- * @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the component
15597
- * @returns {Promise<string>} - Returns the promise string
15836
+ * @param {Maps} maps - Specifies the Maps instance.
15837
+ * @param {ExportType} type - Specifies the type of the document.
15838
+ * @param {string} fileName - Specifies the name of the PDF document.
15839
+ * @param {boolean} allowDownload - Specifies whether to download the document or not.
15840
+ * @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the component.
15841
+ * @returns {Promise<string>} - Returns "null" value when the allowDownload is set to false.
15598
15842
  * @private
15599
15843
  */
15600
15844
  PdfExport.prototype.export = function (maps, type, fileName, allowDownload, orientation) {
@@ -15730,6 +15974,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
15730
15974
  * @returns {void}
15731
15975
  * @private
15732
15976
  */
15977
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
15733
15978
  PdfExport.prototype.destroy = function () { };
15734
15979
  return PdfExport;
15735
15980
  }());