@syncfusion/ej2-maps 25.1.35 → 25.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/ej2-maps.min.js +2 -2
  3. package/dist/ej2-maps.umd.min.js +2 -2
  4. package/dist/ej2-maps.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-maps.es2015.js +624 -398
  6. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  7. package/dist/es6/ej2-maps.es5.js +605 -380
  8. package/dist/es6/ej2-maps.es5.js.map +1 -1
  9. package/dist/global/ej2-maps.min.js +2 -2
  10. package/dist/global/ej2-maps.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +8 -8
  13. package/src/maps/layers/bubble.d.ts +17 -2
  14. package/src/maps/layers/bubble.js +20 -5
  15. package/src/maps/layers/color-mapping.d.ts +1 -1
  16. package/src/maps/layers/color-mapping.js +4 -0
  17. package/src/maps/layers/data-label.d.ts +2 -2
  18. package/src/maps/layers/data-label.js +4 -6
  19. package/src/maps/layers/layer-panel.d.ts +9 -7
  20. package/src/maps/layers/layer-panel.js +124 -121
  21. package/src/maps/layers/legend.d.ts +7 -6
  22. package/src/maps/layers/legend.js +41 -24
  23. package/src/maps/layers/marker.d.ts +7 -2
  24. package/src/maps/layers/marker.js +14 -10
  25. package/src/maps/layers/navigation-selected-line.js +1 -0
  26. package/src/maps/layers/polygon.js +5 -1
  27. package/src/maps/maps-model.d.ts +9 -9
  28. package/src/maps/maps.d.ts +30 -12
  29. package/src/maps/maps.js +88 -59
  30. package/src/maps/model/base-model.d.ts +3 -2
  31. package/src/maps/model/base.d.ts +10 -9
  32. package/src/maps/model/base.js +1 -1
  33. package/src/maps/model/export-image.js +1 -1
  34. package/src/maps/model/export-pdf.js +3 -3
  35. package/src/maps/model/interface.d.ts +1 -0
  36. package/src/maps/model/print.js +2 -0
  37. package/src/maps/model/theme.js +12 -12
  38. package/src/maps/user-interaction/annotation.d.ts +5 -0
  39. package/src/maps/user-interaction/annotation.js +6 -2
  40. package/src/maps/user-interaction/highlight.d.ts +13 -1
  41. package/src/maps/user-interaction/highlight.js +12 -2
  42. package/src/maps/user-interaction/selection.d.ts +13 -1
  43. package/src/maps/user-interaction/selection.js +19 -13
  44. package/src/maps/user-interaction/tooltip.d.ts +14 -0
  45. package/src/maps/user-interaction/tooltip.js +16 -1
  46. package/src/maps/user-interaction/zoom.d.ts +55 -10
  47. package/src/maps/user-interaction/zoom.js +150 -106
  48. package/src/maps/utils/helper.d.ts +64 -36
  49. package/src/maps/utils/helper.js +82 -52
@@ -22,7 +22,6 @@ var Zoom = /** @class */ (function () {
22
22
  this.rectZoomingStart = false;
23
23
  /** @private */
24
24
  this.browserName = Browser.info.name;
25
- // eslint-disable-next-line @typescript-eslint/ban-types
26
25
  /** @private */
27
26
  this.isPointer = Browser.isPointer;
28
27
  this.handled = false;
@@ -32,10 +31,8 @@ var Zoom = /** @class */ (function () {
32
31
  this.pinchFactor = 1;
33
32
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
33
  this.startTouches = [];
35
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
36
34
  /** @private */
37
35
  this.mouseDownLatLong = { x: 0, y: 0 };
38
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
36
  /** @private */
40
37
  this.mouseMoveLatLong = { x: 0, y: 0 };
41
38
  /** @private */
@@ -152,7 +149,6 @@ var Zoom = /** @class */ (function () {
152
149
  }
153
150
  this.markerLineAnimation(map);
154
151
  map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
155
- var element1 = document.getElementById(this.maps.element.id + '_tiles');
156
152
  var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
157
153
  setTimeout(function () {
158
154
  // if (type === 'ZoomOut') {
@@ -231,6 +227,7 @@ var Zoom = /** @class */ (function () {
231
227
  position.y - ((y * totalSize) / 100);
232
228
  };
233
229
  /**
230
+ * @returns {void}
234
231
  * @private
235
232
  */
236
233
  Zoom.prototype.performRectZooming = function () {
@@ -310,27 +307,29 @@ var Zoom = /** @class */ (function () {
310
307
  }
311
308
  };
312
309
  /**
310
+ * @param {PointerEvent} e - Specifies the vent in the map
311
+ * @returns {void}
313
312
  * @private
314
313
  */
314
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
315
315
  Zoom.prototype.performPinchZooming = function (e) {
316
316
  var map = this.maps;
317
317
  var prevLevel = map.tileZoomLevel;
318
- var availSize = map.mapAreaRect;
319
- map.isMarkerZoomCompleted = false;
320
- map.previousScale = map.scale;
321
- map.previousPoint = map.translatePoint;
322
- map.previousProjection = map.projectionType;
323
- var prevTilePoint = map.tileTranslatePoint;
324
- var scale = calculateScale(this.touchStartList, this.touchMoveList);
325
- var touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
326
- var newScale = scale / this.lastScale;
327
- this.lastScale = scale;
328
- this.pinchFactor *= newScale;
329
- this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
330
318
  var zoomCalculationFactor = this.pinchFactor;
331
- var zoomArgs;
332
319
  var isZoomCancelled;
320
+ var prevTilePoint = map.tileTranslatePoint;
333
321
  if (!map.isTileMap) {
322
+ var availSize = map.mapAreaRect;
323
+ map.isMarkerZoomCompleted = false;
324
+ map.previousScale = map.scale;
325
+ map.previousPoint = map.translatePoint;
326
+ map.previousProjection = map.projectionType;
327
+ var scale = calculateScale(this.touchStartList, this.touchMoveList);
328
+ var touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
329
+ var newScale = scale / this.lastScale;
330
+ this.lastScale = scale;
331
+ this.pinchFactor *= newScale;
332
+ this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
334
333
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
335
334
  var minBounds = map.baseMapRectBounds['min'];
336
335
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -365,24 +364,38 @@ var Zoom = /** @class */ (function () {
365
364
  }
366
365
  }
367
366
  else {
368
- var newTileFactor = zoomCalculationFactor;
369
- this.getTileTranslatePosition(prevLevel, newTileFactor, { x: touchCenter.x, y: touchCenter.y });
370
- map.tileZoomLevel = newTileFactor;
371
- map.translatePoint.x = (map.tileTranslatePoint.x - (0.5 * Math.pow(2, newTileFactor))) /
372
- (Math.pow(2, newTileFactor));
373
- map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
374
- (Math.pow(2, newTileFactor));
375
- map.scale = (Math.pow(2, newTileFactor));
376
- isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
377
- if (isZoomCancelled) {
378
- map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
379
- map.scale = map.previousScale;
380
- map.tileZoomLevel = prevLevel;
381
- map.zoomSettings.zoomFactor = map.previousScale;
382
- }
383
- else {
384
- map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
367
+ var touchCenter = this.getTouchCenterPoint();
368
+ var distance = Math.sqrt(Math.pow((this.touchMoveList[0].pageX - this.touchMoveList[1].pageX), 2) + Math.pow((this.touchMoveList[0].pageY - this.touchMoveList[1].pageY), 2));
369
+ var factor = map.tileZoomLevel;
370
+ if (!isNullOrUndefined(this.pinchDistance)) {
371
+ if (this.pinchDistance > distance) {
372
+ factor = factor - 1;
373
+ }
374
+ else if (this.pinchDistance < distance) {
375
+ factor = factor + 1;
376
+ }
377
+ factor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.maps.zoomSettings.minZoom, factor));
378
+ if (factor !== map.tileZoomLevel) {
379
+ this.pinchFactor = factor;
380
+ map.previousScale = map.scale;
381
+ map.tileZoomLevel = this.pinchFactor;
382
+ map.scale = Math.pow(2, map.tileZoomLevel - 1);
383
+ this.getTileTranslatePosition(prevLevel, this.pinchFactor, { x: touchCenter.x, y: touchCenter.y }, null);
384
+ map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.scale)) / map.scale;
385
+ map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.scale)) / map.scale;
386
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
387
+ if (isZoomCancelled) {
388
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
389
+ map.scale = map.previousScale;
390
+ map.tileZoomLevel = prevLevel;
391
+ map.zoomSettings.zoomFactor = map.previousScale;
392
+ }
393
+ else {
394
+ map.mapLayerPanel.generateTiles(factor, map.tileTranslatePoint);
395
+ }
396
+ }
385
397
  }
398
+ this.pinchDistance = distance;
386
399
  }
387
400
  map.mapScaleValue = zoomCalculationFactor;
388
401
  if (!isZoomCancelled) {
@@ -393,6 +406,16 @@ var Zoom = /** @class */ (function () {
393
406
  this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
394
407
  }
395
408
  };
409
+ Zoom.prototype.getTouchCenterPoint = function () {
410
+ var touchList = [];
411
+ for (var i = 0; i < this.touchMoveList.length; i++) {
412
+ touchList.push(this.getMousePosition(this.touchMoveList[i].pageX, this.touchMoveList[i].pageY));
413
+ }
414
+ return {
415
+ x: (touchList[0].x + touchList[1].x) / 2,
416
+ y: (touchList[0].y + touchList[1].y) / 2
417
+ };
418
+ };
396
419
  Zoom.prototype.triggerZoomComplete = function (map, prevLevel, type) {
397
420
  if (map.zoomSettings.enable) {
398
421
  var zoomArgs = void 0;
@@ -424,6 +447,7 @@ var Zoom = /** @class */ (function () {
424
447
  }
425
448
  };
426
449
  /**
450
+ * @returns {void}
427
451
  * @private
428
452
  */
429
453
  Zoom.prototype.drawZoomRectangle = function () {
@@ -436,7 +460,6 @@ var Zoom = /** @class */ (function () {
436
460
  var height = Math.abs(move.y - down.y);
437
461
  var x = ((move.x > down.x) ? down.x : down.x - width);
438
462
  var y = ((move.y > down.y) ? down.y : down.y - height);
439
- var elementRect = getElementByID(map.element.id).getBoundingClientRect();
440
463
  if ((x > map.mapAreaRect.x && x < (map.mapAreaRect.x + map.mapAreaRect.width)) &&
441
464
  (y > map.mapAreaRect.y) && (y < map.mapAreaRect.y + map.mapAreaRect.height)) {
442
465
  this.zoomingRect = new Rect(x, y, width, height);
@@ -474,30 +497,28 @@ var Zoom = /** @class */ (function () {
474
497
  }
475
498
  };
476
499
  /**
500
+ * @param {Maps} maps - Specifies the Map control
501
+ * @param {boolean} animate - Specifies the animation is available or not
502
+ * @param {boolean} isPanning - Specifies that it is panning or not
503
+ * @returns {void}
477
504
  * @private
478
505
  */
479
506
  Zoom.prototype.applyTransform = function (maps, animate, isPanning) {
480
507
  var _this = this;
481
508
  var layerIndex;
482
509
  this.templateCount = 0;
483
- var layer;
484
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
485
- var zoomshapelocation;
486
- var i;
487
510
  var markerStyle;
488
511
  var scale = maps.scale;
489
512
  var x = maps.translatePoint.x;
490
513
  var y = maps.translatePoint.y;
491
514
  var currentLabelIndex = 0;
492
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
493
- var collection = [];
494
515
  maps.zoomShapeCollection = [];
495
516
  if (document.getElementById(maps.element.id + '_mapsTooltip')) {
496
517
  removeElement(maps.element.id + '_mapsTooltip');
497
518
  }
498
519
  if (this.layerCollectionEle) {
499
- var _loop_1 = function (i_1) {
500
- var layerElement = this_1.layerCollectionEle.childNodes[i_1];
520
+ var _loop_1 = function (i) {
521
+ var layerElement = this_1.layerCollectionEle.childNodes[i];
501
522
  if (layerElement.tagName === 'g') {
502
523
  this_1.templateCount++;
503
524
  this_1.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
@@ -536,14 +557,13 @@ var Zoom = /** @class */ (function () {
536
557
  }
537
558
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
538
559
  if ((!this_1.isPanModeEnabled) && !isNullOrUndefined(currentEle.childNodes[0])) {
539
- this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement, animate);
560
+ this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement);
540
561
  }
541
562
  currentEle = layerElement.childNodes[j];
542
563
  var markerAnimation_1;
543
564
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
544
565
  Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
545
566
  _this.markerTranslate(childNode, factor_1, x, y, scale, 'Marker', animate);
546
- var layerIndex = parseInt(childNode['id'].split('_LayerIndex_')[1].split('_')[0], 10);
547
567
  var dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
548
568
  var markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
549
569
  markerAnimation_1 = _this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
@@ -636,7 +656,9 @@ var Zoom = /** @class */ (function () {
636
656
  maps.zoomLabelPositions = [];
637
657
  maps.zoomLabelPositions = maps.dataLabelModule.dataLabelCollections;
638
658
  var labelAnimate_1 = !maps.isTileMap && animate;
659
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
639
660
  var intersect_1 = [];
661
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
640
662
  Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
641
663
  if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
642
664
  var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
@@ -672,8 +694,8 @@ var Zoom = /** @class */ (function () {
672
694
  maps.arrangeTemplate();
673
695
  };
674
696
  var this_1 = this;
675
- for (var i_1 = 0; i_1 < this.layerCollectionEle.childElementCount; i_1++) {
676
- _loop_1(i_1);
697
+ for (var i = 0; i < this.layerCollectionEle.childElementCount; i++) {
698
+ _loop_1(i);
677
699
  }
678
700
  if (!isNullOrUndefined(this.currentLayer)) {
679
701
  if (!animate || this.currentLayer.animationDuration === 0 || maps.isTileMap) {
@@ -682,9 +704,8 @@ var Zoom = /** @class */ (function () {
682
704
  }
683
705
  }
684
706
  };
685
- Zoom.prototype.markerTranslates = function (element, factor, x, y, scale, type, layerElement, animate) {
707
+ Zoom.prototype.markerTranslates = function (element, factor, x, y, scale, type, layerElement) {
686
708
  var _this = this;
687
- if (animate === void 0) { animate = false; }
688
709
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
689
710
  var templateFn;
690
711
  var nullCount = 0;
@@ -728,6 +749,7 @@ var Zoom = /** @class */ (function () {
728
749
  };
729
750
  eventArgs = markerShapeChoose(eventArgs, data);
730
751
  eventArgs = markerColorChoose(eventArgs, data);
752
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
731
753
  _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
732
754
  if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
733
755
  eventArgs = markerShapeChoose(eventArgs, data);
@@ -840,6 +862,7 @@ var Zoom = /** @class */ (function () {
840
862
  }
841
863
  }
842
864
  };
865
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
843
866
  Zoom.prototype.dataLabelTranslate = function (element, factor, x, y, scale, type, animate, currentLabelIndex, isPanning, intersect) {
844
867
  if (animate === void 0) { animate = false; }
845
868
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1087,11 +1110,11 @@ var Zoom = /** @class */ (function () {
1087
1110
  * @param {PanDirection} direction - Specifies the direction of the panning.
1088
1111
  * @param {number} xDifference - Specifies the distance moved in the horizontal direction.
1089
1112
  * @param {number} yDifference - Specifies the distance moved in the vertical direction.
1090
- * @param {PointerEvent | TouchEvent | KeyboardEvent} mouseLocation - Specifies the pointer event argument.
1113
+ * @param {PointerEvent | TouchEvent | KeyboardEvent} event - Specifies the pointer event argument.
1091
1114
  * @returns {void}
1092
1115
  * @private
1093
1116
  */
1094
- Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
1117
+ Zoom.prototype.panning = function (direction, xDifference, yDifference, event) {
1095
1118
  var map = this.maps;
1096
1119
  var panArgs;
1097
1120
  var down = this.mouseDownPoints;
@@ -1107,6 +1130,8 @@ var Zoom = /** @class */ (function () {
1107
1130
  var y;
1108
1131
  xDifference = !isNullOrUndefined(xDifference) ? xDifference : (down.x - move.x);
1109
1132
  yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
1133
+ var layerX = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerX'] : event.touches[0].pageX;
1134
+ var layerY = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerY'] : event.touches[0].pageY;
1110
1135
  this.maps.mergeCluster();
1111
1136
  if (!map.isTileMap) {
1112
1137
  var legendElement = document.getElementById(map.element.id + '_Legend_Group');
@@ -1120,7 +1145,7 @@ var Zoom = /** @class */ (function () {
1120
1145
  var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
1121
1146
  ((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
1122
1147
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1123
- var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
1148
+ var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, layerX, layerY);
1124
1149
  var minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
1125
1150
  panArgs = {
1126
1151
  cancel: false, name: pan, maps: map,
@@ -1149,18 +1174,16 @@ var Zoom = /** @class */ (function () {
1149
1174
  else if (this.maps.tileZoomLevel > 1) {
1150
1175
  x = map.tileTranslatePoint.x - xDifference;
1151
1176
  y = map.tileTranslatePoint.y - yDifference;
1152
- this.distanceX = x - map.tileTranslatePoint.x;
1153
- this.distanceY = y - map.tileTranslatePoint.y;
1154
1177
  map.tileTranslatePoint.x = x;
1155
1178
  map.tileTranslatePoint.y = y;
1156
1179
  if ((map.tileTranslatePoint.y > -10 && yDifference < 0) || ((map.tileTranslatePoint.y < -((Math.pow(2, this.maps.tileZoomLevel) - 2) * 256) && yDifference > 0))) {
1157
1180
  map.tileTranslatePoint.x = x + xDifference;
1158
1181
  map.tileTranslatePoint.y = y + yDifference;
1159
1182
  }
1160
- map.translatePoint.x = (map.tileTranslatePoint.x - xDifference) / map.scale;
1161
- map.translatePoint.y = (map.tileTranslatePoint.y - yDifference) / map.scale;
1183
+ map.translatePoint.x = (map.tileTranslatePoint.x) / map.scale;
1184
+ map.translatePoint.y = (map.tileTranslatePoint.y) / map.scale;
1162
1185
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1163
- var location_4 = this.maps.getTileGeoLocation(mouseLocation['layerX'], mouseLocation['layerY']);
1186
+ var location_4 = this.maps.getTileGeoLocation(layerX, layerY);
1164
1187
  var minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
1165
1188
  panArgs = {
1166
1189
  cancel: false, name: pan, maps: map,
@@ -1173,19 +1196,17 @@ var Zoom = /** @class */ (function () {
1173
1196
  map.trigger(pan, panArgs);
1174
1197
  map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint, 'Pan');
1175
1198
  this.applyTransform(map, false, true);
1199
+ map.translatePoint.x = (map.tileTranslatePoint.x - xDifference) / map.scale;
1200
+ map.translatePoint.y = (map.tileTranslatePoint.y - yDifference) / map.scale;
1176
1201
  }
1177
1202
  map.zoomTranslatePoint = map.translatePoint;
1178
1203
  this.mouseDownPoints = this.mouseMovePoints;
1179
1204
  this.isSingleClick = false;
1180
1205
  };
1181
- Zoom.prototype.toAlignSublayer = function () {
1182
- this.maps.translatePoint.x = !isNullOrUndefined(this.distanceX) ? (this.maps.translatePoint.x -
1183
- (this.distanceX / this.maps.scale)) : this.maps.translatePoint.x;
1184
- this.maps.translatePoint.y = !isNullOrUndefined(this.distanceY) ? this.maps.translatePoint.y -
1185
- (this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
1186
- this.applyTransform(this.maps, false);
1187
- };
1188
1206
  /**
1207
+ * @param {number} zoomFactor - Specifies the factor for zooming
1208
+ * @param {string} type - Specifies the type
1209
+ * @returns {void}
1189
1210
  * @private
1190
1211
  */
1191
1212
  Zoom.prototype.toolBarZooming = function (zoomFactor, type) {
@@ -1208,7 +1229,6 @@ var Zoom = /** @class */ (function () {
1208
1229
  zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
1209
1230
  zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
1210
1231
  zoomFactor = (minZoom > zoomFactor && type === 'ZoomIn') ? minZoom + 1 : zoomFactor;
1211
- var zoomArgs;
1212
1232
  if ((!map.isTileMap) && (type === 'ZoomIn' ? zoomFactor >= minZoom && Math.round(zoomFactor) <= maxZoom : zoomFactor >= minZoom
1213
1233
  || map.isReset)) {
1214
1234
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1280,7 +1300,6 @@ var Zoom = /** @class */ (function () {
1280
1300
  }
1281
1301
  this.markerLineAnimation(map);
1282
1302
  map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
1283
- var element1 = document.getElementById(this.maps.element.id + '_tiles');
1284
1303
  var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
1285
1304
  setTimeout(function () {
1286
1305
  if (type === 'ZoomOut' || type === 'Reset') {
@@ -1300,12 +1319,11 @@ var Zoom = /** @class */ (function () {
1300
1319
  this.triggerZoomComplete(map, prevLevel, type);
1301
1320
  };
1302
1321
  /**
1322
+ * @returns {void}
1303
1323
  * @private
1304
1324
  */
1305
1325
  Zoom.prototype.createZoomingToolbars = function () {
1306
1326
  var map = this.maps;
1307
- var zoomInElements;
1308
- var zoomOutElements;
1309
1327
  this.toolBarGroup = map.renderer.createGroup({
1310
1328
  id: map.element.id + '_Zooming_KitCollection',
1311
1329
  opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
@@ -1359,45 +1377,39 @@ var Zoom = /** @class */ (function () {
1359
1377
  });
1360
1378
  this.currentToolbarEle.setAttribute('class', 'e-maps-toolbar');
1361
1379
  this.currentToolbarEle.appendChild(map.renderer.drawCircle(new CircleOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Rect', button.fill, { color: borderColor, width: button.borderWidth, opacity: button.borderOpacity }, button.opacity, cx, cy, radius, '')));
1362
- var fillColor = '';
1363
1380
  var opacity = 1;
1364
1381
  var direction = '';
1365
- var polygonDirection = '';
1366
1382
  var fill = button.fill;
1367
1383
  this.selectionColor = this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor;
1368
1384
  switch (toolbar_1.toLowerCase()) {
1369
1385
  case 'zoom': {
1370
- var fillColor_1 = void 0;
1386
+ var fillColor = void 0;
1371
1387
  var strokeColor = void 0;
1372
1388
  direction = 'M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,';
1373
1389
  direction += '5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571';
1374
1390
  direction = direction + 'L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,';
1375
1391
  this.currentToolbarEle.setAttribute('class', (this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : ''));
1376
1392
  if (this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
1377
- fillColor_1 = fill;
1393
+ fillColor = fill;
1378
1394
  strokeColor = pathStroke;
1379
1395
  }
1380
1396
  else if (this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
1381
- fillColor_1 = fill;
1397
+ fillColor = fill;
1382
1398
  strokeColor = pathStroke;
1383
1399
  }
1384
1400
  else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
1385
- fillColor_1 = fill;
1401
+ fillColor = fill;
1386
1402
  strokeColor = pathStroke;
1387
1403
  }
1388
1404
  else if (!this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
1389
- fillColor_1 = this.maps.themeStyle.zoomFillColor;
1390
- strokeColor = pathStroke;
1391
- }
1392
- else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
1393
- fillColor_1 = fill;
1405
+ fillColor = this.maps.themeStyle.zoomFillColor;
1394
1406
  strokeColor = pathStroke;
1395
1407
  }
1396
1408
  else {
1397
- fillColor_1 = this.selectionColor;
1409
+ fillColor = this.selectionColor;
1398
1410
  strokeColor = this.selectionColor;
1399
1411
  }
1400
- var zoomPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fillColor_1, 1, strokeColor, opacity, opacity, null, direction + '4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z'));
1412
+ var zoomPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fillColor, 1, strokeColor, opacity, opacity, null, direction + '4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z'));
1401
1413
  zoomPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
1402
1414
  this.currentToolbarEle.appendChild(zoomPath);
1403
1415
  this.zoomElements = this.currentToolbarEle;
@@ -1406,18 +1418,20 @@ var Zoom = /** @class */ (function () {
1406
1418
  }
1407
1419
  case 'zoomin':
1408
1420
  direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
1421
+ /* eslint-disable no-case-declarations */
1409
1422
  var zoomInPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Path', fill, 3, pathStroke, 1, 1, null, direction));
1423
+ /* eslint-enable no-case-declarations */
1410
1424
  zoomInPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
1411
1425
  this.currentToolbarEle.appendChild(zoomInPath);
1412
- zoomInElements = this.currentToolbarEle;
1413
1426
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
1414
1427
  break;
1415
1428
  case 'zoomout':
1416
1429
  direction = 'M 0, 8 L 16, 8';
1430
+ /* eslint-disable no-case-declarations */
1417
1431
  var zoomOutPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fill, 3, pathStroke, 1, 1, null, direction));
1432
+ /* eslint-enable no-case-declarations */
1418
1433
  zoomOutPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
1419
1434
  this.currentToolbarEle.appendChild(zoomOutPath);
1420
- zoomOutElements = this.currentToolbarEle;
1421
1435
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
1422
1436
  break;
1423
1437
  case 'pan': {
@@ -1447,7 +1461,9 @@ var Zoom = /** @class */ (function () {
1447
1461
  direction = 'M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,';
1448
1462
  direction += '1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,';
1449
1463
  direction += '13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,';
1464
+ /* eslint-disable no-case-declarations */
1450
1465
  var resetPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fill, null, pathStroke, 1, 1, null, direction + '3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z'));
1466
+ /* eslint-enable no-case-declarations */
1451
1467
  resetPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
1452
1468
  this.currentToolbarEle.appendChild(resetPath);
1453
1469
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
@@ -1457,6 +1473,8 @@ var Zoom = /** @class */ (function () {
1457
1473
  }
1458
1474
  };
1459
1475
  /**
1476
+ * @param {PointerEvent} e - Specifies the event in the map
1477
+ * @returns {void}
1460
1478
  * @private
1461
1479
  */
1462
1480
  Zoom.prototype.performToolBarAction = function (e) {
@@ -1470,13 +1488,15 @@ var Zoom = /** @class */ (function () {
1470
1488
  isToolbarPerform = (this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) + 1 <= this.maps.zoomSettings.maxZoom;
1471
1489
  break;
1472
1490
  case 'zoomout':
1491
+ /* eslint-disable no-case-declarations */
1473
1492
  var scaleValue = this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale;
1493
+ /* eslint-enable no-case-declarations */
1474
1494
  isToolbarPerform = (this.maps.projectionType === 'Miller' || this.maps.projectionType === 'Winkel3' ||
1475
1495
  this.maps.projectionType === 'AitOff') ? Math.round(scaleValue) - 1 >= this.maps.zoomSettings.minZoom :
1476
1496
  (scaleValue) - 1 >= this.maps.zoomSettings.minZoom;
1477
1497
  break;
1478
1498
  case 'reset':
1479
- isToolbarPerform = Math.round(this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) != this.maps.zoomSettings.minZoom;
1499
+ isToolbarPerform = Math.round(this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) !== this.maps.zoomSettings.minZoom;
1480
1500
  break;
1481
1501
  }
1482
1502
  if (isTouch && isToolbarPerform) {
@@ -1610,6 +1630,8 @@ var Zoom = /** @class */ (function () {
1610
1630
  }
1611
1631
  };
1612
1632
  /**
1633
+ * @param {PointerEvent} e - Specifies the event in the map
1634
+ * @returns {void}
1613
1635
  * @private
1614
1636
  */
1615
1637
  Zoom.prototype.showTooltip = function (e) {
@@ -1638,6 +1660,7 @@ var Zoom = /** @class */ (function () {
1638
1660
  }
1639
1661
  };
1640
1662
  /**
1663
+ * @returns {void}
1641
1664
  * @private
1642
1665
  */
1643
1666
  Zoom.prototype.removeTooltip = function () {
@@ -1646,6 +1669,7 @@ var Zoom = /** @class */ (function () {
1646
1669
  }
1647
1670
  };
1648
1671
  /**
1672
+ * @returns {void}
1649
1673
  * @private
1650
1674
  */
1651
1675
  Zoom.prototype.alignToolBar = function () {
@@ -1705,6 +1729,9 @@ var Zoom = /** @class */ (function () {
1705
1729
  element.appendChild(style);
1706
1730
  };
1707
1731
  /**
1732
+ * @param {number} factor - Specifies the factor for toolbar
1733
+ * @param {string} id - Specifies the id
1734
+ * @returns {void}
1708
1735
  * @private
1709
1736
  */
1710
1737
  Zoom.prototype.removeToolbarOpacity = function (factor, id) {
@@ -1806,6 +1833,12 @@ var Zoom = /** @class */ (function () {
1806
1833
  this.setOpacity('_Zooming_ToolBar_Reset_Rect', '_Zooming_ToolBar_Reset', resetStrokeOpacity, resetOpacity);
1807
1834
  };
1808
1835
  /**
1836
+ * @param {string} zoomClassStyle - Specifies the style for zoom class.
1837
+ * @param {string} zoomInClassStyle - Specifies the style for zoom in.
1838
+ * @param {string} zoomOutClassStyle - Specifies the style for zoom out.
1839
+ * @param {string} panClassStyle - Specifies the style for pan.
1840
+ * @param {string} resetClassStyle - Specifies the style for reset.
1841
+ * @returns {void}
1809
1842
  * @private
1810
1843
  */
1811
1844
  Zoom.prototype.removeToolbarClass = function (zoomClassStyle, zoomInClassStyle, zoomOutClassStyle, panClassStyle, resetClassStyle) {
@@ -1843,30 +1876,30 @@ var Zoom = /** @class */ (function () {
1843
1876
  * To bind events.
1844
1877
  *
1845
1878
  * @param {Element} element - Specifies the element.
1846
- * @param {any} process - Specifies the process.
1879
+ * @param {Function} process - Specifies the process.
1847
1880
  * @returns {void}
1848
1881
  * @private
1849
1882
  */
1850
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1851
1883
  Zoom.prototype.wireEvents = function (element, process) {
1852
1884
  EventHandler.add(element, Browser.touchStartEvent, process, this);
1853
1885
  EventHandler.add(element, 'mouseover', this.showTooltip, this);
1854
1886
  EventHandler.add(element, 'mouseout', this.removeTooltip, this);
1855
1887
  };
1856
1888
  /**
1889
+ * @param {WheelEvent} e - Specifies the wheel event in the map for zooming
1890
+ * @returns {void}
1857
1891
  * @private
1858
1892
  */
1859
1893
  Zoom.prototype.mapMouseWheel = function (e) {
1860
1894
  if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
1861
1895
  var map = this.maps;
1862
- var size = map.availableSize;
1863
1896
  map.markerZoomedState = false;
1864
1897
  map.zoomPersistence = map.enablePersistence;
1865
1898
  var position = this.getMousePosition(e.pageX, e.pageY);
1866
1899
  var prevLevel = map.tileZoomLevel;
1867
1900
  var prevScale = map.scale;
1868
1901
  var delta = 1;
1869
- var staticMaxZoomLevel = 22; // google map maximum zoom level value
1902
+ var staticMaxZoomLevel = map.zoomSettings.maxZoom;
1870
1903
  var value = (map.isTileMap) ? prevLevel : prevScale;
1871
1904
  if (((position.x > map.mapAreaRect.x) && (position.x < (map.mapAreaRect.x + map.mapAreaRect.width))) &&
1872
1905
  (position.y > map.mapAreaRect.y) && position.y < (map.mapAreaRect.y + map.mapAreaRect.height)) {
@@ -1879,8 +1912,8 @@ var Zoom = /** @class */ (function () {
1879
1912
  map.staticMapZoom = map.tileZoomLevel;
1880
1913
  if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
1881
1914
  map.staticMapZoom += 1;
1915
+ this.performZooming(position, (value + delta), direction);
1882
1916
  }
1883
- this.performZooming(position, (value + delta), direction);
1884
1917
  }
1885
1918
  else {
1886
1919
  map.mapScaleValue = value - delta;
@@ -1901,18 +1934,18 @@ var Zoom = /** @class */ (function () {
1901
1934
  }
1902
1935
  };
1903
1936
  /**
1937
+ * @param {PointerEvent} e - Specifies the event in the map
1938
+ * @returns {void}
1904
1939
  * @private
1905
1940
  */
1906
1941
  Zoom.prototype.doubleClick = function (e) {
1907
1942
  var pageX = e.pageX;
1908
1943
  var pageY = e.pageY;
1909
- var target = e.target;
1910
1944
  var tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
1911
1945
  if (this.maps.zoomSettings.enable && this.maps.zoomSettings.doubleClickZoom
1912
1946
  && !(e.target['id'].indexOf('_Zooming_') > -1) && isNullOrUndefined(tooltipElement)) {
1913
1947
  var position = this.getMousePosition(pageX, pageY);
1914
1948
  var map = this.maps;
1915
- var size = map.availableSize;
1916
1949
  var prevLevel = map.tileZoomLevel;
1917
1950
  var prevScale = map.scale;
1918
1951
  map.mapScaleValue = map.mapScaleValue + 1;
@@ -1924,6 +1957,8 @@ var Zoom = /** @class */ (function () {
1924
1957
  }
1925
1958
  };
1926
1959
  /**
1960
+ * @param {PointerEvent} e - Specifies the event in the map
1961
+ * @returns {void}
1927
1962
  * @private
1928
1963
  */
1929
1964
  Zoom.prototype.mouseDownHandler = function (e) {
@@ -1931,6 +1966,7 @@ var Zoom = /** @class */ (function () {
1931
1966
  var pageY;
1932
1967
  var target;
1933
1968
  var touches = null;
1969
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
1934
1970
  var element = e.target;
1935
1971
  if (e.type === 'touchstart') {
1936
1972
  this.isTouch = true;
@@ -1942,6 +1978,7 @@ var Zoom = /** @class */ (function () {
1942
1978
  else {
1943
1979
  pageX = e.pageX;
1944
1980
  pageY = e.pageY;
1981
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
1945
1982
  target = e.target;
1946
1983
  }
1947
1984
  if (!this.maps.zoomSettings.enablePanning) {
@@ -1955,7 +1992,7 @@ var Zoom = /** @class */ (function () {
1955
1992
  var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
1956
1993
  this.rectZoomingStart = ((this.isZoomSelection && scale < this.maps.zoomSettings.maxZoom) && this.maps.zoomSettings.enable);
1957
1994
  this.mouseDownPoints = this.getMousePosition(pageX, pageY);
1958
- if (this.isTouch) {
1995
+ if (this.isTouch && touches !== null) {
1959
1996
  this.firstMove = true;
1960
1997
  this.pinchFactor = this.maps.scale;
1961
1998
  this.fingers = touches.length;
@@ -1963,12 +2000,15 @@ var Zoom = /** @class */ (function () {
1963
2000
  this.isSingleClick = true;
1964
2001
  };
1965
2002
  /**
2003
+ * @param {PointerEvent} e - Specifies the event in the map
2004
+ * @returns {void}
1966
2005
  * @private
1967
2006
  */
1968
2007
  Zoom.prototype.mouseMoveHandler = function (e) {
1969
2008
  var pageX;
1970
2009
  var pageY;
1971
2010
  var map = this.maps;
2011
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
1972
2012
  var touchArg;
1973
2013
  var target;
1974
2014
  var touches = null;
@@ -1994,7 +2034,7 @@ var Zoom = /** @class */ (function () {
1994
2034
  }
1995
2035
  }
1996
2036
  if (this.isTouch) {
1997
- if (this.maps.zoomSettings.pinchZooming) {
2037
+ if (this.maps.zoomSettings.pinchZooming && touches !== null) {
1998
2038
  if (this.firstMove && touches.length === 2) {
1999
2039
  this.rectZoomingStart = false;
2000
2040
  this.updateInteraction();
@@ -2010,9 +2050,7 @@ var Zoom = /** @class */ (function () {
2010
2050
  }
2011
2051
  }
2012
2052
  this.mouseMovePoints = this.getMousePosition(pageX, pageY);
2013
- var targetId = e.target['id'];
2014
- var targetEle = e.target;
2015
- if (zoom.enable && this.isPanModeEnabled && this.maps.markerDragId.indexOf('_MarkerIndex_') == -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
2053
+ if (zoom.enable && this.isPanModeEnabled && this.maps.markerDragId.indexOf('_MarkerIndex_') === -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
2016
2054
  e.preventDefault();
2017
2055
  this.maps.element.style.cursor = 'pointer';
2018
2056
  this.mouseMoveLatLong = { x: pageX, y: pageY };
@@ -2024,7 +2062,7 @@ var Zoom = /** @class */ (function () {
2024
2062
  this.mouseDownLatLong['y'] = pageY;
2025
2063
  }
2026
2064
  }
2027
- if (this.isTouch ? (touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
2065
+ if (this.isTouch ? (touches !== null && touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
2028
2066
  e.preventDefault();
2029
2067
  var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
2030
2068
  if (this.maps.zoomSettings.enableSelectionZooming && scale < this.maps.zoomSettings.maxZoom) {
@@ -2037,11 +2075,11 @@ var Zoom = /** @class */ (function () {
2037
2075
  }
2038
2076
  };
2039
2077
  /**
2078
+ * @param {PointerEvent} e - Specifies the event in the map
2079
+ * @returns {void}
2040
2080
  * @private
2041
2081
  */
2042
2082
  Zoom.prototype.mouseUpHandler = function (e) {
2043
- var isDragZoom;
2044
- var map = this.maps;
2045
2083
  this.rectZoomingStart = false;
2046
2084
  this.isSingleClick = this.isSingleClick ? true : false;
2047
2085
  this.isTouch = false;
@@ -2049,7 +2087,6 @@ var Zoom = /** @class */ (function () {
2049
2087
  this.touchMoveList = [];
2050
2088
  this.lastScale = 1;
2051
2089
  this.maps.element.style.cursor = 'auto';
2052
- // eslint-disable-next-line max-len
2053
2090
  if (this.isPanModeEnabled && this.maps.zoomSettings.enablePanning && !isNullOrUndefined(this.maps.previousPoint) &&
2054
2091
  (this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)) {
2055
2092
  var pageX = void 0;
@@ -2057,7 +2094,6 @@ var Zoom = /** @class */ (function () {
2057
2094
  var layerX = 0;
2058
2095
  var layerY = 0;
2059
2096
  var target = void 0;
2060
- var rect = this.maps.element.getBoundingClientRect();
2061
2097
  var element = e.target;
2062
2098
  if (e.type.indexOf('touch') !== -1) {
2063
2099
  var touchArg = e;
@@ -2072,6 +2108,7 @@ var Zoom = /** @class */ (function () {
2072
2108
  pageY = e.pageY;
2073
2109
  layerX = e['layerX'];
2074
2110
  layerY = e['layerY'] - (this.maps.isTileMap ? 10 : 0);
2111
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
2075
2112
  target = e.target;
2076
2113
  }
2077
2114
  var panCompleteEventArgs = void 0;
@@ -2103,22 +2140,21 @@ var Zoom = /** @class */ (function () {
2103
2140
  this.maps.trigger('panComplete', panCompleteEventArgs);
2104
2141
  }
2105
2142
  this.isPanModeEnabled = false;
2106
- if ((!isNullOrUndefined(this.distanceX) || !isNullOrUndefined(this.distanceY)) && (!isNullOrUndefined(this.currentLayer) && this.currentLayer.type === 'SubLayer')) {
2107
- this.toAlignSublayer();
2108
- this.distanceX = this.distanceY = null;
2109
- }
2110
2143
  var zoomRectElement = getElementByID(this.maps.element.id + '_Selection_Rect_Zooming');
2111
2144
  if (zoomRectElement && this.maps.zoomSettings.enable && this.maps.zoomSettings.enableSelectionZooming) {
2112
- isDragZoom = true;
2113
2145
  remove(zoomRectElement);
2114
2146
  this.performRectZooming();
2115
2147
  }
2116
2148
  this.mouseMoveLatLong = { x: 0, y: 0 };
2117
2149
  this.mouseDownLatLong = { x: 0, y: 0 };
2150
+ this.pinchDistance = null;
2118
2151
  };
2119
2152
  /**
2153
+ * @param {PointerEvent} e - Specifies the event in the map
2154
+ * @returns {void}
2120
2155
  * @private
2121
2156
  */
2157
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
2122
2158
  Zoom.prototype.mouseCancelHandler = function (e) {
2123
2159
  this.isPanModeEnabled = false;
2124
2160
  this.isTouch = false;
@@ -2159,6 +2195,11 @@ var Zoom = /** @class */ (function () {
2159
2195
  }
2160
2196
  };
2161
2197
  /**
2198
+ * Gets the Mouse Position
2199
+ *
2200
+ * @param {number} pageX - Specifies the Page x in map
2201
+ * @param {number} pageY - Specifies the Page y in map
2202
+ * @returns {Point} - returns the mouse point position
2162
2203
  * @private
2163
2204
  */
2164
2205
  Zoom.prototype.getMousePosition = function (pageX, pageY) {
@@ -2173,6 +2214,7 @@ var Zoom = /** @class */ (function () {
2173
2214
  return new Point(Math.abs(pageX - positionX), Math.abs(pageY - positionY));
2174
2215
  };
2175
2216
  /**
2217
+ * @returns {void}
2176
2218
  * @private
2177
2219
  */
2178
2220
  Zoom.prototype.addEventListener = function () {
@@ -2188,6 +2230,7 @@ var Zoom = /** @class */ (function () {
2188
2230
  EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this);
2189
2231
  };
2190
2232
  /**
2233
+ * @returns {void}
2191
2234
  * @private
2192
2235
  */
2193
2236
  Zoom.prototype.removeEventListener = function () {
@@ -2234,6 +2277,7 @@ var Zoom = /** @class */ (function () {
2234
2277
  this.removeEventListener();
2235
2278
  this.layerCollectionEle = null;
2236
2279
  this.currentLayer = null;
2280
+ this.pinchDistance = null;
2237
2281
  this.maps = null;
2238
2282
  };
2239
2283
  return Zoom;