@syncfusion/ej2-maps 25.1.37 → 25.1.41

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 (51) hide show
  1. package/.eslintrc.json +260 -0
  2. package/CHANGELOG.md +18 -0
  3. package/dist/ej2-maps.min.js +2 -2
  4. package/dist/ej2-maps.umd.min.js +2 -2
  5. package/dist/ej2-maps.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-maps.es2015.js +520 -301
  7. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  8. package/dist/es6/ej2-maps.es5.js +501 -283
  9. package/dist/es6/ej2-maps.es5.js.map +1 -1
  10. package/dist/global/ej2-maps.min.js +2 -2
  11. package/dist/global/ej2-maps.min.js.map +1 -1
  12. package/dist/global/index.d.ts +1 -1
  13. package/package.json +7 -7
  14. package/src/maps/layers/bubble.d.ts +17 -2
  15. package/src/maps/layers/bubble.js +20 -5
  16. package/src/maps/layers/color-mapping.d.ts +1 -1
  17. package/src/maps/layers/color-mapping.js +4 -0
  18. package/src/maps/layers/data-label.d.ts +2 -2
  19. package/src/maps/layers/data-label.js +5 -7
  20. package/src/maps/layers/layer-panel.d.ts +8 -7
  21. package/src/maps/layers/layer-panel.js +21 -23
  22. package/src/maps/layers/legend.d.ts +7 -6
  23. package/src/maps/layers/legend.js +41 -24
  24. package/src/maps/layers/marker.d.ts +7 -2
  25. package/src/maps/layers/marker.js +14 -10
  26. package/src/maps/layers/navigation-selected-line.js +1 -0
  27. package/src/maps/layers/polygon.js +5 -1
  28. package/src/maps/maps-model.d.ts +9 -9
  29. package/src/maps/maps.d.ts +30 -12
  30. package/src/maps/maps.js +88 -59
  31. package/src/maps/model/base-model.d.ts +3 -2
  32. package/src/maps/model/base.d.ts +10 -9
  33. package/src/maps/model/base.js +1 -1
  34. package/src/maps/model/export-image.js +1 -1
  35. package/src/maps/model/export-pdf.js +3 -3
  36. package/src/maps/model/interface.d.ts +1 -0
  37. package/src/maps/model/print.js +2 -0
  38. package/src/maps/model/theme.js +12 -12
  39. package/src/maps/user-interaction/annotation.d.ts +5 -0
  40. package/src/maps/user-interaction/annotation.js +6 -2
  41. package/src/maps/user-interaction/highlight.d.ts +13 -1
  42. package/src/maps/user-interaction/highlight.js +12 -2
  43. package/src/maps/user-interaction/selection.d.ts +13 -1
  44. package/src/maps/user-interaction/selection.js +19 -13
  45. package/src/maps/user-interaction/tooltip.d.ts +14 -0
  46. package/src/maps/user-interaction/tooltip.js +16 -1
  47. package/src/maps/user-interaction/zoom.d.ts +55 -10
  48. package/src/maps/user-interaction/zoom.js +146 -104
  49. package/src/maps/utils/helper.d.ts +64 -36
  50. package/src/maps/utils/helper.js +84 -54
  51. package/tslint.json +111 -0
@@ -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,8 +1174,6 @@ 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))) {
@@ -1160,7 +1183,7 @@ var Zoom = /** @class */ (function () {
1160
1183
  map.translatePoint.x = (map.tileTranslatePoint.x) / map.scale;
1161
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,
@@ -1180,14 +1203,10 @@ var Zoom = /** @class */ (function () {
1180
1203
  this.mouseDownPoints = this.mouseMovePoints;
1181
1204
  this.isSingleClick = false;
1182
1205
  };
1183
- Zoom.prototype.toAlignSublayer = function () {
1184
- this.maps.translatePoint.x = !isNullOrUndefined(this.distanceX) ? (this.maps.translatePoint.x -
1185
- (this.distanceX / this.maps.scale)) : this.maps.translatePoint.x;
1186
- this.maps.translatePoint.y = !isNullOrUndefined(this.distanceY) ? this.maps.translatePoint.y -
1187
- (this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
1188
- this.applyTransform(this.maps, false);
1189
- };
1190
1206
  /**
1207
+ * @param {number} zoomFactor - Specifies the factor for zooming
1208
+ * @param {string} type - Specifies the type
1209
+ * @returns {void}
1191
1210
  * @private
1192
1211
  */
1193
1212
  Zoom.prototype.toolBarZooming = function (zoomFactor, type) {
@@ -1210,7 +1229,6 @@ var Zoom = /** @class */ (function () {
1210
1229
  zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
1211
1230
  zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
1212
1231
  zoomFactor = (minZoom > zoomFactor && type === 'ZoomIn') ? minZoom + 1 : zoomFactor;
1213
- var zoomArgs;
1214
1232
  if ((!map.isTileMap) && (type === 'ZoomIn' ? zoomFactor >= minZoom && Math.round(zoomFactor) <= maxZoom : zoomFactor >= minZoom
1215
1233
  || map.isReset)) {
1216
1234
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1282,7 +1300,6 @@ var Zoom = /** @class */ (function () {
1282
1300
  }
1283
1301
  this.markerLineAnimation(map);
1284
1302
  map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
1285
- var element1 = document.getElementById(this.maps.element.id + '_tiles');
1286
1303
  var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
1287
1304
  setTimeout(function () {
1288
1305
  if (type === 'ZoomOut' || type === 'Reset') {
@@ -1302,12 +1319,11 @@ var Zoom = /** @class */ (function () {
1302
1319
  this.triggerZoomComplete(map, prevLevel, type);
1303
1320
  };
1304
1321
  /**
1322
+ * @returns {void}
1305
1323
  * @private
1306
1324
  */
1307
1325
  Zoom.prototype.createZoomingToolbars = function () {
1308
1326
  var map = this.maps;
1309
- var zoomInElements;
1310
- var zoomOutElements;
1311
1327
  this.toolBarGroup = map.renderer.createGroup({
1312
1328
  id: map.element.id + '_Zooming_KitCollection',
1313
1329
  opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
@@ -1361,45 +1377,39 @@ var Zoom = /** @class */ (function () {
1361
1377
  });
1362
1378
  this.currentToolbarEle.setAttribute('class', 'e-maps-toolbar');
1363
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, '')));
1364
- var fillColor = '';
1365
1380
  var opacity = 1;
1366
1381
  var direction = '';
1367
- var polygonDirection = '';
1368
1382
  var fill = button.fill;
1369
1383
  this.selectionColor = this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor;
1370
1384
  switch (toolbar_1.toLowerCase()) {
1371
1385
  case 'zoom': {
1372
- var fillColor_1 = void 0;
1386
+ var fillColor = void 0;
1373
1387
  var strokeColor = void 0;
1374
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,';
1375
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';
1376
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,';
1377
1391
  this.currentToolbarEle.setAttribute('class', (this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : ''));
1378
1392
  if (this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
1379
- fillColor_1 = fill;
1393
+ fillColor = fill;
1380
1394
  strokeColor = pathStroke;
1381
1395
  }
1382
1396
  else if (this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
1383
- fillColor_1 = fill;
1397
+ fillColor = fill;
1384
1398
  strokeColor = pathStroke;
1385
1399
  }
1386
1400
  else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
1387
- fillColor_1 = fill;
1401
+ fillColor = fill;
1388
1402
  strokeColor = pathStroke;
1389
1403
  }
1390
1404
  else if (!this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
1391
- fillColor_1 = this.maps.themeStyle.zoomFillColor;
1392
- strokeColor = pathStroke;
1393
- }
1394
- else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
1395
- fillColor_1 = fill;
1405
+ fillColor = this.maps.themeStyle.zoomFillColor;
1396
1406
  strokeColor = pathStroke;
1397
1407
  }
1398
1408
  else {
1399
- fillColor_1 = this.selectionColor;
1409
+ fillColor = this.selectionColor;
1400
1410
  strokeColor = this.selectionColor;
1401
1411
  }
1402
- 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'));
1403
1413
  zoomPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
1404
1414
  this.currentToolbarEle.appendChild(zoomPath);
1405
1415
  this.zoomElements = this.currentToolbarEle;
@@ -1408,18 +1418,20 @@ var Zoom = /** @class */ (function () {
1408
1418
  }
1409
1419
  case 'zoomin':
1410
1420
  direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
1421
+ /* eslint-disable no-case-declarations */
1411
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 */
1412
1424
  zoomInPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
1413
1425
  this.currentToolbarEle.appendChild(zoomInPath);
1414
- zoomInElements = this.currentToolbarEle;
1415
1426
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
1416
1427
  break;
1417
1428
  case 'zoomout':
1418
1429
  direction = 'M 0, 8 L 16, 8';
1430
+ /* eslint-disable no-case-declarations */
1419
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 */
1420
1433
  zoomOutPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
1421
1434
  this.currentToolbarEle.appendChild(zoomOutPath);
1422
- zoomOutElements = this.currentToolbarEle;
1423
1435
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
1424
1436
  break;
1425
1437
  case 'pan': {
@@ -1449,7 +1461,9 @@ var Zoom = /** @class */ (function () {
1449
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,';
1450
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,';
1451
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 */
1452
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 */
1453
1467
  resetPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
1454
1468
  this.currentToolbarEle.appendChild(resetPath);
1455
1469
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
@@ -1459,6 +1473,8 @@ var Zoom = /** @class */ (function () {
1459
1473
  }
1460
1474
  };
1461
1475
  /**
1476
+ * @param {PointerEvent} e - Specifies the event in the map
1477
+ * @returns {void}
1462
1478
  * @private
1463
1479
  */
1464
1480
  Zoom.prototype.performToolBarAction = function (e) {
@@ -1472,13 +1488,15 @@ var Zoom = /** @class */ (function () {
1472
1488
  isToolbarPerform = (this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) + 1 <= this.maps.zoomSettings.maxZoom;
1473
1489
  break;
1474
1490
  case 'zoomout':
1491
+ /* eslint-disable no-case-declarations */
1475
1492
  var scaleValue = this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale;
1493
+ /* eslint-enable no-case-declarations */
1476
1494
  isToolbarPerform = (this.maps.projectionType === 'Miller' || this.maps.projectionType === 'Winkel3' ||
1477
1495
  this.maps.projectionType === 'AitOff') ? Math.round(scaleValue) - 1 >= this.maps.zoomSettings.minZoom :
1478
1496
  (scaleValue) - 1 >= this.maps.zoomSettings.minZoom;
1479
1497
  break;
1480
1498
  case 'reset':
1481
- 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;
1482
1500
  break;
1483
1501
  }
1484
1502
  if (isTouch && isToolbarPerform) {
@@ -1612,6 +1630,8 @@ var Zoom = /** @class */ (function () {
1612
1630
  }
1613
1631
  };
1614
1632
  /**
1633
+ * @param {PointerEvent} e - Specifies the event in the map
1634
+ * @returns {void}
1615
1635
  * @private
1616
1636
  */
1617
1637
  Zoom.prototype.showTooltip = function (e) {
@@ -1640,6 +1660,7 @@ var Zoom = /** @class */ (function () {
1640
1660
  }
1641
1661
  };
1642
1662
  /**
1663
+ * @returns {void}
1643
1664
  * @private
1644
1665
  */
1645
1666
  Zoom.prototype.removeTooltip = function () {
@@ -1648,6 +1669,7 @@ var Zoom = /** @class */ (function () {
1648
1669
  }
1649
1670
  };
1650
1671
  /**
1672
+ * @returns {void}
1651
1673
  * @private
1652
1674
  */
1653
1675
  Zoom.prototype.alignToolBar = function () {
@@ -1707,6 +1729,9 @@ var Zoom = /** @class */ (function () {
1707
1729
  element.appendChild(style);
1708
1730
  };
1709
1731
  /**
1732
+ * @param {number} factor - Specifies the factor for toolbar
1733
+ * @param {string} id - Specifies the id
1734
+ * @returns {void}
1710
1735
  * @private
1711
1736
  */
1712
1737
  Zoom.prototype.removeToolbarOpacity = function (factor, id) {
@@ -1808,6 +1833,12 @@ var Zoom = /** @class */ (function () {
1808
1833
  this.setOpacity('_Zooming_ToolBar_Reset_Rect', '_Zooming_ToolBar_Reset', resetStrokeOpacity, resetOpacity);
1809
1834
  };
1810
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}
1811
1842
  * @private
1812
1843
  */
1813
1844
  Zoom.prototype.removeToolbarClass = function (zoomClassStyle, zoomInClassStyle, zoomOutClassStyle, panClassStyle, resetClassStyle) {
@@ -1845,30 +1876,30 @@ var Zoom = /** @class */ (function () {
1845
1876
  * To bind events.
1846
1877
  *
1847
1878
  * @param {Element} element - Specifies the element.
1848
- * @param {any} process - Specifies the process.
1879
+ * @param {Function} process - Specifies the process.
1849
1880
  * @returns {void}
1850
1881
  * @private
1851
1882
  */
1852
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1853
1883
  Zoom.prototype.wireEvents = function (element, process) {
1854
1884
  EventHandler.add(element, Browser.touchStartEvent, process, this);
1855
1885
  EventHandler.add(element, 'mouseover', this.showTooltip, this);
1856
1886
  EventHandler.add(element, 'mouseout', this.removeTooltip, this);
1857
1887
  };
1858
1888
  /**
1889
+ * @param {WheelEvent} e - Specifies the wheel event in the map for zooming
1890
+ * @returns {void}
1859
1891
  * @private
1860
1892
  */
1861
1893
  Zoom.prototype.mapMouseWheel = function (e) {
1862
1894
  if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
1863
1895
  var map = this.maps;
1864
- var size = map.availableSize;
1865
1896
  map.markerZoomedState = false;
1866
1897
  map.zoomPersistence = map.enablePersistence;
1867
1898
  var position = this.getMousePosition(e.pageX, e.pageY);
1868
1899
  var prevLevel = map.tileZoomLevel;
1869
1900
  var prevScale = map.scale;
1870
1901
  var delta = 1;
1871
- var staticMaxZoomLevel = 22; // google map maximum zoom level value
1902
+ var staticMaxZoomLevel = map.zoomSettings.maxZoom;
1872
1903
  var value = (map.isTileMap) ? prevLevel : prevScale;
1873
1904
  if (((position.x > map.mapAreaRect.x) && (position.x < (map.mapAreaRect.x + map.mapAreaRect.width))) &&
1874
1905
  (position.y > map.mapAreaRect.y) && position.y < (map.mapAreaRect.y + map.mapAreaRect.height)) {
@@ -1881,8 +1912,8 @@ var Zoom = /** @class */ (function () {
1881
1912
  map.staticMapZoom = map.tileZoomLevel;
1882
1913
  if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
1883
1914
  map.staticMapZoom += 1;
1915
+ this.performZooming(position, (value + delta), direction);
1884
1916
  }
1885
- this.performZooming(position, (value + delta), direction);
1886
1917
  }
1887
1918
  else {
1888
1919
  map.mapScaleValue = value - delta;
@@ -1903,18 +1934,18 @@ var Zoom = /** @class */ (function () {
1903
1934
  }
1904
1935
  };
1905
1936
  /**
1937
+ * @param {PointerEvent} e - Specifies the event in the map
1938
+ * @returns {void}
1906
1939
  * @private
1907
1940
  */
1908
1941
  Zoom.prototype.doubleClick = function (e) {
1909
1942
  var pageX = e.pageX;
1910
1943
  var pageY = e.pageY;
1911
- var target = e.target;
1912
1944
  var tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
1913
1945
  if (this.maps.zoomSettings.enable && this.maps.zoomSettings.doubleClickZoom
1914
1946
  && !(e.target['id'].indexOf('_Zooming_') > -1) && isNullOrUndefined(tooltipElement)) {
1915
1947
  var position = this.getMousePosition(pageX, pageY);
1916
1948
  var map = this.maps;
1917
- var size = map.availableSize;
1918
1949
  var prevLevel = map.tileZoomLevel;
1919
1950
  var prevScale = map.scale;
1920
1951
  map.mapScaleValue = map.mapScaleValue + 1;
@@ -1926,6 +1957,8 @@ var Zoom = /** @class */ (function () {
1926
1957
  }
1927
1958
  };
1928
1959
  /**
1960
+ * @param {PointerEvent} e - Specifies the event in the map
1961
+ * @returns {void}
1929
1962
  * @private
1930
1963
  */
1931
1964
  Zoom.prototype.mouseDownHandler = function (e) {
@@ -1933,6 +1966,7 @@ var Zoom = /** @class */ (function () {
1933
1966
  var pageY;
1934
1967
  var target;
1935
1968
  var touches = null;
1969
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
1936
1970
  var element = e.target;
1937
1971
  if (e.type === 'touchstart') {
1938
1972
  this.isTouch = true;
@@ -1944,6 +1978,7 @@ var Zoom = /** @class */ (function () {
1944
1978
  else {
1945
1979
  pageX = e.pageX;
1946
1980
  pageY = e.pageY;
1981
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
1947
1982
  target = e.target;
1948
1983
  }
1949
1984
  if (!this.maps.zoomSettings.enablePanning) {
@@ -1957,7 +1992,7 @@ var Zoom = /** @class */ (function () {
1957
1992
  var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
1958
1993
  this.rectZoomingStart = ((this.isZoomSelection && scale < this.maps.zoomSettings.maxZoom) && this.maps.zoomSettings.enable);
1959
1994
  this.mouseDownPoints = this.getMousePosition(pageX, pageY);
1960
- if (this.isTouch) {
1995
+ if (this.isTouch && touches !== null) {
1961
1996
  this.firstMove = true;
1962
1997
  this.pinchFactor = this.maps.scale;
1963
1998
  this.fingers = touches.length;
@@ -1965,12 +2000,15 @@ var Zoom = /** @class */ (function () {
1965
2000
  this.isSingleClick = true;
1966
2001
  };
1967
2002
  /**
2003
+ * @param {PointerEvent} e - Specifies the event in the map
2004
+ * @returns {void}
1968
2005
  * @private
1969
2006
  */
1970
2007
  Zoom.prototype.mouseMoveHandler = function (e) {
1971
2008
  var pageX;
1972
2009
  var pageY;
1973
2010
  var map = this.maps;
2011
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
1974
2012
  var touchArg;
1975
2013
  var target;
1976
2014
  var touches = null;
@@ -1996,7 +2034,7 @@ var Zoom = /** @class */ (function () {
1996
2034
  }
1997
2035
  }
1998
2036
  if (this.isTouch) {
1999
- if (this.maps.zoomSettings.pinchZooming) {
2037
+ if (this.maps.zoomSettings.pinchZooming && touches !== null) {
2000
2038
  if (this.firstMove && touches.length === 2) {
2001
2039
  this.rectZoomingStart = false;
2002
2040
  this.updateInteraction();
@@ -2012,9 +2050,7 @@ var Zoom = /** @class */ (function () {
2012
2050
  }
2013
2051
  }
2014
2052
  this.mouseMovePoints = this.getMousePosition(pageX, pageY);
2015
- var targetId = e.target['id'];
2016
- var targetEle = e.target;
2017
- 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)) {
2018
2054
  e.preventDefault();
2019
2055
  this.maps.element.style.cursor = 'pointer';
2020
2056
  this.mouseMoveLatLong = { x: pageX, y: pageY };
@@ -2026,7 +2062,7 @@ var Zoom = /** @class */ (function () {
2026
2062
  this.mouseDownLatLong['y'] = pageY;
2027
2063
  }
2028
2064
  }
2029
- if (this.isTouch ? (touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
2065
+ if (this.isTouch ? (touches !== null && touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
2030
2066
  e.preventDefault();
2031
2067
  var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
2032
2068
  if (this.maps.zoomSettings.enableSelectionZooming && scale < this.maps.zoomSettings.maxZoom) {
@@ -2039,11 +2075,11 @@ var Zoom = /** @class */ (function () {
2039
2075
  }
2040
2076
  };
2041
2077
  /**
2078
+ * @param {PointerEvent} e - Specifies the event in the map
2079
+ * @returns {void}
2042
2080
  * @private
2043
2081
  */
2044
2082
  Zoom.prototype.mouseUpHandler = function (e) {
2045
- var isDragZoom;
2046
- var map = this.maps;
2047
2083
  this.rectZoomingStart = false;
2048
2084
  this.isSingleClick = this.isSingleClick ? true : false;
2049
2085
  this.isTouch = false;
@@ -2051,7 +2087,6 @@ var Zoom = /** @class */ (function () {
2051
2087
  this.touchMoveList = [];
2052
2088
  this.lastScale = 1;
2053
2089
  this.maps.element.style.cursor = 'auto';
2054
- // eslint-disable-next-line max-len
2055
2090
  if (this.isPanModeEnabled && this.maps.zoomSettings.enablePanning && !isNullOrUndefined(this.maps.previousPoint) &&
2056
2091
  (this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)) {
2057
2092
  var pageX = void 0;
@@ -2059,7 +2094,6 @@ var Zoom = /** @class */ (function () {
2059
2094
  var layerX = 0;
2060
2095
  var layerY = 0;
2061
2096
  var target = void 0;
2062
- var rect = this.maps.element.getBoundingClientRect();
2063
2097
  var element = e.target;
2064
2098
  if (e.type.indexOf('touch') !== -1) {
2065
2099
  var touchArg = e;
@@ -2074,6 +2108,7 @@ var Zoom = /** @class */ (function () {
2074
2108
  pageY = e.pageY;
2075
2109
  layerX = e['layerX'];
2076
2110
  layerY = e['layerY'] - (this.maps.isTileMap ? 10 : 0);
2111
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
2077
2112
  target = e.target;
2078
2113
  }
2079
2114
  var panCompleteEventArgs = void 0;
@@ -2105,22 +2140,21 @@ var Zoom = /** @class */ (function () {
2105
2140
  this.maps.trigger('panComplete', panCompleteEventArgs);
2106
2141
  }
2107
2142
  this.isPanModeEnabled = false;
2108
- if ((!isNullOrUndefined(this.distanceX) || !isNullOrUndefined(this.distanceY)) && (!isNullOrUndefined(this.currentLayer) && this.currentLayer.type === 'SubLayer')) {
2109
- this.toAlignSublayer();
2110
- this.distanceX = this.distanceY = null;
2111
- }
2112
2143
  var zoomRectElement = getElementByID(this.maps.element.id + '_Selection_Rect_Zooming');
2113
2144
  if (zoomRectElement && this.maps.zoomSettings.enable && this.maps.zoomSettings.enableSelectionZooming) {
2114
- isDragZoom = true;
2115
2145
  remove(zoomRectElement);
2116
2146
  this.performRectZooming();
2117
2147
  }
2118
2148
  this.mouseMoveLatLong = { x: 0, y: 0 };
2119
2149
  this.mouseDownLatLong = { x: 0, y: 0 };
2150
+ this.pinchDistance = null;
2120
2151
  };
2121
2152
  /**
2153
+ * @param {PointerEvent} e - Specifies the event in the map
2154
+ * @returns {void}
2122
2155
  * @private
2123
2156
  */
2157
+ //eslint-disable-next-line @typescript-eslint/no-unused-vars
2124
2158
  Zoom.prototype.mouseCancelHandler = function (e) {
2125
2159
  this.isPanModeEnabled = false;
2126
2160
  this.isTouch = false;
@@ -2161,6 +2195,11 @@ var Zoom = /** @class */ (function () {
2161
2195
  }
2162
2196
  };
2163
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
2164
2203
  * @private
2165
2204
  */
2166
2205
  Zoom.prototype.getMousePosition = function (pageX, pageY) {
@@ -2175,6 +2214,7 @@ var Zoom = /** @class */ (function () {
2175
2214
  return new Point(Math.abs(pageX - positionX), Math.abs(pageY - positionY));
2176
2215
  };
2177
2216
  /**
2217
+ * @returns {void}
2178
2218
  * @private
2179
2219
  */
2180
2220
  Zoom.prototype.addEventListener = function () {
@@ -2190,6 +2230,7 @@ var Zoom = /** @class */ (function () {
2190
2230
  EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this);
2191
2231
  };
2192
2232
  /**
2233
+ * @returns {void}
2193
2234
  * @private
2194
2235
  */
2195
2236
  Zoom.prototype.removeEventListener = function () {
@@ -2236,6 +2277,7 @@ var Zoom = /** @class */ (function () {
2236
2277
  this.removeEventListener();
2237
2278
  this.layerCollectionEle = null;
2238
2279
  this.currentLayer = null;
2280
+ this.pinchDistance = null;
2239
2281
  this.maps = null;
2240
2282
  };
2241
2283
  return Zoom;