@syncfusion/ej2-maps 27.2.2 → 28.1.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 (36) hide show
  1. package/.gitleaksignore +3 -3
  2. package/README.md +2 -2
  3. package/dist/ej2-maps.min.js +3 -3
  4. package/dist/ej2-maps.umd.min.js +3 -3
  5. package/dist/ej2-maps.umd.min.js.map +1 -1
  6. package/dist/es6/ej2-maps.es2015.js +529 -223
  7. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  8. package/dist/es6/ej2-maps.es5.js +539 -232
  9. package/dist/es6/ej2-maps.es5.js.map +1 -1
  10. package/dist/global/ej2-maps.min.js +3 -3
  11. package/dist/global/ej2-maps.min.js.map +1 -1
  12. package/dist/global/index.d.ts +2 -2
  13. package/package.json +13 -13
  14. package/src/maps/layers/layer-panel.js +1 -1
  15. package/src/maps/layers/legend.js +23 -21
  16. package/src/maps/layers/marker.d.ts +8 -1
  17. package/src/maps/layers/marker.js +104 -33
  18. package/src/maps/maps-model.d.ts +8 -1
  19. package/src/maps/maps.d.ts +19 -3
  20. package/src/maps/maps.js +54 -16
  21. package/src/maps/model/base-model.d.ts +20 -0
  22. package/src/maps/model/base.d.ts +17 -0
  23. package/src/maps/model/base.js +9 -0
  24. package/src/maps/model/constants.d.ts +6 -0
  25. package/src/maps/model/constants.js +6 -0
  26. package/src/maps/model/export-image.js +4 -4
  27. package/src/maps/model/export-pdf.js +4 -4
  28. package/src/maps/model/interface.d.ts +15 -0
  29. package/src/maps/model/print.js +2 -2
  30. package/src/maps/model/theme.js +72 -0
  31. package/src/maps/user-interaction/tooltip.js +3 -1
  32. package/src/maps/user-interaction/zoom.d.ts +17 -3
  33. package/src/maps/user-interaction/zoom.js +156 -105
  34. package/src/maps/utils/enum.d.ts +4 -0
  35. package/src/maps/utils/helper.d.ts +4 -9
  36. package/src/maps/utils/helper.js +102 -46
@@ -52,11 +52,13 @@ var Zoom = /** @class */ (function () {
52
52
  * @param {Point} position - Specifies the position.
53
53
  * @param {number} newZoomFactor - Specifies the zoom factor.
54
54
  * @param {string} type - Specifies the type.
55
+ * @param {boolean} isMouseWheel - Indicates whether the zoom operation was triggered by the mouse wheel.
55
56
  * @returns {void}
56
57
  * @private
57
58
  */
58
- Zoom.prototype.performZooming = function (position, newZoomFactor, type) {
59
+ Zoom.prototype.performZooming = function (position, newZoomFactor, type, isMouseWheel) {
59
60
  var _this = this;
61
+ if (isMouseWheel === void 0) { isMouseWheel = false; }
60
62
  var map = this.maps;
61
63
  map.previousProjection = newZoomFactor <= 1.5 ? undefined : map.projectionType;
62
64
  map.defaultState = false;
@@ -115,7 +117,7 @@ var Zoom = /** @class */ (function () {
115
117
  map.scale = map.mapScaleValue = map.previousScale;
116
118
  }
117
119
  else {
118
- this.applyTransform(map);
120
+ this.applyTransform(map, isMouseWheel);
119
121
  }
120
122
  }
121
123
  else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
@@ -159,7 +161,7 @@ var Zoom = /** @class */ (function () {
159
161
  // element1 = element1;
160
162
  // }
161
163
  // }
162
- _this.applyTransform(_this.maps);
164
+ _this.applyTransform(_this.maps, isMouseWheel);
163
165
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
164
166
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
165
167
  }
@@ -285,7 +287,7 @@ var Zoom = /** @class */ (function () {
285
287
  }
286
288
  if (!isZoomCancelled) {
287
289
  map.mapScaleValue = zoomCalculationFactor;
288
- this.applyTransform(map, true);
290
+ this.applyTransform(map, false, true);
289
291
  this.maps.zoomNotApplied = false;
290
292
  this.zoomingRect = null;
291
293
  }
@@ -318,6 +320,7 @@ var Zoom = /** @class */ (function () {
318
320
  var zoomCalculationFactor = this.pinchFactor;
319
321
  var isZoomCancelled;
320
322
  var prevTilePoint = map.tileTranslatePoint;
323
+ this.maps.mergeCluster();
321
324
  if (!map.isTileMap) {
322
325
  var availSize = map.mapAreaRect;
323
326
  map.isMarkerZoomCompleted = false;
@@ -498,12 +501,13 @@ var Zoom = /** @class */ (function () {
498
501
  };
499
502
  /**
500
503
  * @param {Maps} maps - Specifies the Map control
504
+ * @param {boolean} isMouseWheel - Indicates whether the zoom operation was triggered by the mouse wheel.
501
505
  * @param {boolean} animate - Specifies the animation is available or not
502
506
  * @param {boolean} isPanning - Specifies that it is panning or not
503
507
  * @returns {void}
504
508
  * @private
505
509
  */
506
- Zoom.prototype.applyTransform = function (maps, animate, isPanning) {
510
+ Zoom.prototype.applyTransform = function (maps, isMouseWheel, animate, isPanning) {
507
511
  var _this = this;
508
512
  var layerIndex;
509
513
  this.templateCount = 0;
@@ -517,6 +521,17 @@ var Zoom = /** @class */ (function () {
517
521
  if (document.getElementById(maps.element.id + '_mapsTooltip')) {
518
522
  removeElement(maps.element.id + '_mapsTooltip');
519
523
  }
524
+ if (maps.isTileMap) {
525
+ var element = document.getElementById(maps.element.id + '_svg');
526
+ if (element) {
527
+ for (var k = 0; k < maps.layers.length; k++) {
528
+ var layerElement = element.querySelector('#' + maps.element.id + '_LayerIndex_' + k);
529
+ if (layerElement) {
530
+ element.removeChild(layerElement);
531
+ }
532
+ }
533
+ }
534
+ }
520
535
  if (this.layerCollectionEle) {
521
536
  var _loop_1 = function (i) {
522
537
  var layerElement = this_1.layerCollectionEle.childNodes[i];
@@ -526,6 +541,7 @@ var Zoom = /** @class */ (function () {
526
541
  this_1.currentLayer = maps.layersCollection[this_1.index];
527
542
  var factor_1 = maps.mapLayerPanel.calculateFactor(this_1.currentLayer);
528
543
  var elementCount = layerElement.childElementCount;
544
+ var templateElement = document.getElementById(maps.element.id + '_LayerIndex_' + this_1.index + '_Markers_Template_Group');
529
545
  var _loop_2 = function (j) {
530
546
  var currentEle = layerElement.childNodes[j];
531
547
  if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
@@ -559,17 +575,16 @@ var Zoom = /** @class */ (function () {
559
575
  }
560
576
  }
561
577
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
562
- if ((!this_1.isPanModeEnabled || !isPanning) && !isNullOrUndefined(currentEle.childNodes[0])) {
563
- this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement);
578
+ if ((!this_1.isPanModeEnabled || !isPanning) && (!isNullOrUndefined(currentEle.childNodes[0]) || !isNullOrUndefined(templateElement.childNodes[0]))) {
579
+ var processElement = (!isNullOrUndefined(currentEle.childNodes[0]) ? currentEle.childNodes[0] : templateElement.childNodes[0]);
580
+ this_1.markerTranslates(processElement, factor_1, x, y, scale, 'Marker', layerElement);
564
581
  }
565
582
  currentEle = layerElement.childNodes[j];
566
- var markerAnimation_1;
567
583
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
568
584
  Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
569
585
  _this.markerTranslate(childNode, factor_1, x, y, scale, 'Marker', animate);
570
586
  var dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
571
587
  var markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
572
- markerAnimation_1 = _this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
573
588
  if (_this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length > 0) {
574
589
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
575
590
  var markerSelectionValues = _this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
@@ -583,16 +598,12 @@ var Zoom = /** @class */ (function () {
583
598
  }
584
599
  }
585
600
  if (((_this.currentLayer.animationDuration > 0 || animationMode === 'Enable') || ((maps.layersCollection[0].animationDuration > 0 || animationMode === 'Enable') && _this.currentLayer.type === 'SubLayer')) && !_this.isPanModeEnabled) {
586
- if (maps.isTileMap) {
587
- var groupElement = document.querySelector('.GroupElement');
588
- if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation_1) {
589
- groupElement.style.display = 'none';
601
+ if (!maps.isTileMap) {
602
+ markerStyle = isMouseWheel ? markerStyle : 'visibility:hidden';
603
+ if (!isNullOrUndefined(markerStyle)) {
604
+ currentEle.style.cssText = markerStyle;
590
605
  }
591
606
  }
592
- else {
593
- markerStyle = 'visibility:hidden';
594
- currentEle.style.cssText = markerStyle;
595
- }
596
607
  }
597
608
  });
598
609
  if (this_1.isPanModeEnabled && maps.markerModule.sameMarkerData.length > 0) {
@@ -737,92 +748,111 @@ var Zoom = /** @class */ (function () {
737
748
  removeElement(markerTemplateElements.id);
738
749
  }
739
750
  var currentLayers = this.maps.layersCollection[layerIndex];
751
+ var allowInnerClusterSetting = this.maps.markerModule.allowInnerClusterSetting(currentLayers);
740
752
  Array.prototype.forEach.call(currentLayers.markerSettings, function (markerSettings, markerIndex) {
753
+ markerTemplateCounts = 0;
754
+ markerCounts = 0;
741
755
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
742
756
  var markerDatas = markerSettings.dataSource;
743
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
744
- Array.prototype.forEach.call(markerDatas, function (data, dataIndex) {
745
- _this.maps.markerNullCount = markerIndex >= 0 && dataIndex === 0 ? 0 : _this.maps.markerNullCount;
746
- var eventArgs = {
747
- template: markerSettings.template, data: data, maps: _this.maps, marker: markerSettings,
748
- cancel: false, name: markerRendering, fill: markerSettings.fill, colorValuePath: markerSettings.colorValuePath,
749
- shapeValuePath: markerSettings.shapeValuePath, height: markerSettings.height,
750
- width: markerSettings.width, imageUrl: markerSettings.imageUrl, imageUrlValuePath: markerSettings.imageUrlValuePath, shape: markerSettings.shape,
751
- border: markerSettings.border
752
- };
753
- eventArgs = markerShapeChoose(eventArgs, data);
754
- eventArgs = markerColorChoose(eventArgs, data);
755
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
756
- _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
757
- if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
758
- eventArgs = markerShapeChoose(eventArgs, data);
759
- }
760
- if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
761
- eventArgs = markerColorChoose(eventArgs, data);
762
- }
763
- var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
764
- Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
765
- parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
766
- var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
767
- Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
768
- parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
769
- var offset = markerSettings.offset;
770
- if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
771
- var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
772
- + markerIndex + '_dataIndex_' + dataIndex;
773
- 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);
774
- var transPoint = { x: x, y: y };
775
- if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
776
- markerTemplateCounts++;
777
- markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateElements, location_1, transPoint, scale, offset, _this.maps);
757
+ if (!isNullOrUndefined(markerDatas)) {
758
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
759
+ Array.prototype.forEach.call(markerDatas, function (data, dataIndex) {
760
+ _this.maps.markerNullCount = markerIndex >= 0 && dataIndex === 0 ? 0 : _this.maps.markerNullCount;
761
+ var eventArgs = {
762
+ template: markerSettings.template, data: data, maps: _this.maps, marker: markerSettings,
763
+ cancel: false, name: markerRendering, fill: markerSettings.fill, colorValuePath: markerSettings.colorValuePath,
764
+ shapeValuePath: markerSettings.shapeValuePath,
765
+ height: !isNullOrUndefined(markerSettings.heightValuePath) && !isNullOrUndefined(data[markerSettings.heightValuePath])
766
+ ? data[markerSettings.heightValuePath] : markerSettings.height,
767
+ width: !isNullOrUndefined(markerSettings.widthValuePath) && !isNullOrUndefined(data[markerSettings.widthValuePath])
768
+ ? data[markerSettings.widthValuePath] : markerSettings.width,
769
+ imageUrl: markerSettings.imageUrl, imageUrlValuePath: markerSettings.imageUrlValuePath, shape: markerSettings.shape,
770
+ border: markerSettings.border
771
+ };
772
+ eventArgs = markerShapeChoose(eventArgs, data);
773
+ eventArgs = markerColorChoose(eventArgs, data);
774
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
775
+ _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
776
+ if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
777
+ eventArgs = markerShapeChoose(eventArgs, data);
778
778
  }
779
- else if (!eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
780
- markerCounts++;
781
- marker(eventArgs, markerSettings, markerDatas, dataIndex, location_1, transPoint, markerID, offset, scale, _this.maps, markerSVGObject);
779
+ if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
780
+ eventArgs = markerColorChoose(eventArgs, data);
782
781
  }
783
- }
784
- nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
785
- markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
786
- markerCounts += (eventArgs.cancel) ? 1 : 0;
787
- _this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
788
- ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
789
- var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
790
- var isMarkersClustered = false;
791
- if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
792
- if (_this.maps.isTileMap) {
793
- var polygonsElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group');
794
- var polygonElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygon_Group');
795
- if (!isNullOrUndefined(polygonsElement)) {
796
- polygonsElement.insertAdjacentElement('afterend', markerSVGObject);
782
+ var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
783
+ Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
784
+ parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
785
+ var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
786
+ Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
787
+ parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
788
+ var offset = markerSettings.offset;
789
+ if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
790
+ var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
791
+ + markerIndex + '_dataIndex_' + dataIndex;
792
+ 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);
793
+ var transPoint = { x: x, y: y };
794
+ if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
795
+ markerTemplateCounts++;
796
+ markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateElements, location_1, transPoint, scale, offset, _this.maps);
797
797
  }
798
- else {
799
- if (!isNullOrUndefined(polygonElement)) {
800
- polygonElement.insertAdjacentElement('afterend', markerSVGObject);
798
+ else if (!eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
799
+ markerCounts++;
800
+ marker(eventArgs, markerSettings, markerDatas, dataIndex, location_1, transPoint, markerID, offset, scale, _this.maps, markerSVGObject);
801
+ }
802
+ }
803
+ nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
804
+ markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
805
+ markerCounts += (eventArgs.cancel) ? 1 : 0;
806
+ _this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
807
+ ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
808
+ var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
809
+ var isMarkersClustered = false;
810
+ var markerGroup = (markerSettings.clusterSettings.allowClustering
811
+ || (currentLayers.markerClusterSettings.allowClustering && currentLayers.markerSettings.length > 1))
812
+ ? markerSVGObject.querySelectorAll("[id*='LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "']:not([id*='_Group'])")
813
+ : markerSVGObject.childNodes;
814
+ if (markerGroup.length === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
815
+ if (_this.maps.isTileMap) {
816
+ var polygonsElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group');
817
+ var polygonElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygon_Group');
818
+ if (!isNullOrUndefined(polygonsElement)) {
819
+ polygonsElement.insertAdjacentElement('afterend', markerSVGObject);
801
820
  }
802
821
  else {
803
- layerElement.insertBefore(markerSVGObject, layerElement.firstElementChild);
822
+ if (!isNullOrUndefined(polygonElement)) {
823
+ polygonElement.insertAdjacentElement('afterend', markerSVGObject);
824
+ }
825
+ else {
826
+ layerElement.insertBefore(markerSVGObject, layerElement.firstElementChild);
827
+ }
804
828
  }
805
829
  }
830
+ else {
831
+ layerElement.appendChild(markerSVGObject);
832
+ }
833
+ if (currentLayers.markerSettings[markerIndex].clusterSettings.allowClustering ||
834
+ !allowInnerClusterSetting && currentLayers.markerClusterSettings.allowClustering) {
835
+ _this.maps.svgObject.appendChild(markerSVGObject);
836
+ _this.maps.element.appendChild(_this.maps.svgObject);
837
+ isMarkersClustered = clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerIndex, markerSVGObject, layerElement, true, true, null, allowInnerClusterSetting);
838
+ }
806
839
  }
807
- else {
808
- layerElement.appendChild(markerSVGObject);
809
- }
810
- if (currentLayers.markerClusterSettings.allowClustering) {
811
- _this.maps.svgObject.appendChild(markerSVGObject);
812
- _this.maps.element.appendChild(_this.maps.svgObject);
813
- isMarkersClustered = clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
814
- }
815
- }
816
- if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
817
- getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
818
- if (scale >= 1) {
819
- if (currentLayers.markerClusterSettings.allowClustering && !isMarkersClustered) {
820
- clusterTemplate(currentLayers, markerTemplateElements, _this.maps, layerIndex, markerSVGObject, layerElement, false, true);
840
+ var markerTemplateGroup = (markerSettings.clusterSettings.allowClustering
841
+ || (currentLayers.markerClusterSettings.allowClustering && currentLayers.markerSettings.length > 1))
842
+ ? markerTemplateElements.querySelectorAll("[id*='LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "']:not([id*='_Group'])")
843
+ : markerTemplateElements.childNodes;
844
+ if (markerTemplateGroup.length === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
845
+ getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
846
+ if (scale >= 1) {
847
+ if ((markerSettings.clusterSettings.allowClustering || !allowInnerClusterSetting &&
848
+ currentLayers.markerClusterSettings.allowClustering) && !isMarkersClustered) {
849
+ clusterTemplate(currentLayers, markerTemplateElements, _this.maps, layerIndex, markerIndex, markerSVGObject, layerElement, false, true, null, allowInnerClusterSetting);
850
+ }
821
851
  }
822
852
  }
823
- }
853
+ });
824
854
  });
825
- });
855
+ }
826
856
  });
827
857
  };
828
858
  /**
@@ -1018,6 +1048,18 @@ var Zoom = /** @class */ (function () {
1018
1048
  }
1019
1049
  }
1020
1050
  };
1051
+ /**
1052
+ *
1053
+ * @param {Element | HTMLElement} element - Specifies the marker element.
1054
+ * @param {number} factor - Specifies scale factor.
1055
+ * @param {number} x - Specifies the x location of the marker element.
1056
+ * @param {number} y - Specifies the y location of the marker element.
1057
+ * @param {number} scale - Specifies scale factor.
1058
+ * @param {number} type - Specifies the type of the marker processing.
1059
+ * @param {number} animate - Specifies whether the animation is enabled or not.
1060
+ * @returns {void}
1061
+ * @private
1062
+ */
1021
1063
  Zoom.prototype.markerTranslate = function (element, factor, x, y, scale, type, animate) {
1022
1064
  if (animate === void 0) { animate = false; }
1023
1065
  var layerIndex = parseInt(element.id.split('_LayerIndex_')[1].split('_')[0], 10);
@@ -1038,9 +1080,8 @@ var Zoom = /** @class */ (function () {
1038
1080
  var location_2 = (this.maps.isTileMap) ? convertTileLatLongToPoint(new Point(lng, lat), this.maps.tileZoomLevel, this.maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, layer, this.maps);
1039
1081
  if (this.maps.isTileMap) {
1040
1082
  if (type === 'Template') {
1041
- var templateOffset = element.getBoundingClientRect();
1042
- element.style.left = ((location_2.x - (templateOffset.width / 2)) + marker.offset.x) + 'px';
1043
- element.style.top = ((location_2.y - (templateOffset.height / 2)) + marker.offset.y) + 'px';
1083
+ element.style.left = (location_2.x + marker.offset.x) + 'px';
1084
+ element.style.top = (location_2.y + marker.offset.y) + 'px';
1044
1085
  }
1045
1086
  else {
1046
1087
  location_2.x += marker.offset.x;
@@ -1060,9 +1101,8 @@ var Zoom = /** @class */ (function () {
1060
1101
  element.style.transform = 'translate(-50%, -50%)';
1061
1102
  }
1062
1103
  else {
1063
- var elementOffset = element.getBoundingClientRect();
1064
- element.style.left = ((location_2.x + x) * scale) + marker.offset.x - this.maps.mapAreaRect.x - (elementOffset.width / 2) + 'px';
1065
- element.style.top = ((location_2.y + y) * scale) + marker.offset.y - this.maps.mapAreaRect.y - (elementOffset.height / 2) + 'px';
1104
+ element.style.left = ((location_2.x + x) * scale) + marker.offset.x - this.maps.mapAreaRect.x + 'px';
1105
+ element.style.top = ((location_2.y + y) * scale) + marker.offset.y - this.maps.mapAreaRect.y + 'px';
1066
1106
  }
1067
1107
  }
1068
1108
  else {
@@ -1149,15 +1189,15 @@ var Zoom = /** @class */ (function () {
1149
1189
  if (!panArgs.cancel) {
1150
1190
  if (panningXDirection && panningYDirection) {
1151
1191
  map.translatePoint = new Point(x, y);
1152
- this.applyTransform(map, false, true);
1192
+ this.applyTransform(map, false, false, true);
1153
1193
  }
1154
1194
  else if (panningXDirection) {
1155
1195
  map.translatePoint = new Point(x, map.translatePoint.y);
1156
- this.applyTransform(map, false, true);
1196
+ this.applyTransform(map, false, false, true);
1157
1197
  }
1158
1198
  else if (panningYDirection) {
1159
1199
  map.translatePoint = new Point(map.translatePoint.x, y);
1160
- this.applyTransform(map, false, true);
1200
+ this.applyTransform(map, false, false, true);
1161
1201
  }
1162
1202
  }
1163
1203
  this.maps.zoomNotApplied = false;
@@ -1186,7 +1226,7 @@ var Zoom = /** @class */ (function () {
1186
1226
  };
1187
1227
  map.trigger(pan, panArgs);
1188
1228
  map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint, 'Pan');
1189
- this.applyTransform(map, false, true);
1229
+ this.applyTransform(map, false, false, true);
1190
1230
  map.translatePoint.x = (map.tileTranslatePoint.x - xDifference) / map.scale;
1191
1231
  map.translatePoint.y = (map.tileTranslatePoint.y - yDifference) / map.scale;
1192
1232
  }
@@ -1216,6 +1256,7 @@ var Zoom = /** @class */ (function () {
1216
1256
  var size = map.mapAreaRect;
1217
1257
  var translatePoint = map.previousPoint = map.translatePoint;
1218
1258
  var prevTilePoint = map.tileTranslatePoint;
1259
+ this.maps.mergeCluster();
1219
1260
  map.previousProjection = type === 'Reset' ? undefined : map.projectionType;
1220
1261
  zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
1221
1262
  zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
@@ -1256,7 +1297,7 @@ var Zoom = /** @class */ (function () {
1256
1297
  map.scale = map.previousScale;
1257
1298
  }
1258
1299
  else {
1259
- this.applyTransform(map, true);
1300
+ this.applyTransform(map, false, true);
1260
1301
  }
1261
1302
  }
1262
1303
  else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
@@ -1297,7 +1338,7 @@ var Zoom = /** @class */ (function () {
1297
1338
  // element1.removeChild(element1.children[element1.childElementCount - 1]);
1298
1339
  // element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
1299
1340
  }
1300
- _this.applyTransform(_this.maps, true);
1341
+ _this.applyTransform(_this.maps, false, true);
1301
1342
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
1302
1343
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
1303
1344
  }
@@ -1897,6 +1938,7 @@ var Zoom = /** @class */ (function () {
1897
1938
  var delta = 1;
1898
1939
  var staticMaxZoomLevel = map.zoomSettings.maxZoom;
1899
1940
  var value = (map.isTileMap) ? prevLevel : prevScale;
1941
+ this.maps.mergeCluster();
1900
1942
  if (((position.x > map.mapAreaRect.x) && (position.x < (map.mapAreaRect.x + map.mapAreaRect.width))) &&
1901
1943
  (position.y > map.mapAreaRect.y) && position.y < (map.mapAreaRect.y + map.mapAreaRect.height)) {
1902
1944
  e.preventDefault();
@@ -1909,11 +1951,11 @@ var Zoom = /** @class */ (function () {
1909
1951
  map.staticMapZoom = map.tileZoomLevel;
1910
1952
  if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
1911
1953
  map.staticMapZoom += 1;
1912
- this.performZooming(position, (value + delta), direction);
1954
+ this.performZooming(position, (value + delta), direction, true);
1913
1955
  }
1914
1956
  }
1915
1957
  else {
1916
- this.performZooming(position, (value + delta), direction);
1958
+ this.performZooming(position, (value + delta), direction, true);
1917
1959
  }
1918
1960
  }
1919
1961
  else {
@@ -1927,7 +1969,7 @@ var Zoom = /** @class */ (function () {
1927
1969
  if (map.staticMapZoom > 1 && map.staticMapZoom < staticMaxZoomLevel) {
1928
1970
  map.staticMapZoom -= 1;
1929
1971
  }
1930
- this.performZooming(position, (value - delta), direction);
1972
+ this.performZooming(position, (value - delta), direction, true);
1931
1973
  }
1932
1974
  }
1933
1975
  this.removeToolbarOpacity(map.mapScaleValue, (!this.maps.isDevice ? (!isNullOrUndefined(e.target) ? e.target['id'] :
@@ -2250,6 +2292,16 @@ var Zoom = /** @class */ (function () {
2250
2292
  this.maps.off(Browser.touchStartEvent, this.mouseDownHandler);
2251
2293
  this.maps.off(Browser.touchEndEvent, this.mouseUpHandler);
2252
2294
  EventHandler.remove(this.maps.element, this.cancelEvent, this.mouseCancelHandler);
2295
+ var toolbarElement = document.getElementById(this.maps.element.id + '_Zooming_KitCollection');
2296
+ if (toolbarElement) {
2297
+ for (var i = 0; i < toolbarElement.childNodes.length; i++) {
2298
+ if (toolbarElement.childNodes[i].tagName === 'g') {
2299
+ EventHandler.add(toolbarElement.childNodes[i], Browser.touchStartEvent, this.performToolBarAction);
2300
+ EventHandler.add(toolbarElement.childNodes[i], 'mouseover', this.showTooltip);
2301
+ EventHandler.add(toolbarElement.childNodes[i], 'mouseout', this.removeTooltip);
2302
+ }
2303
+ }
2304
+ }
2253
2305
  };
2254
2306
  /**
2255
2307
  * Get module name.
@@ -2284,7 +2336,6 @@ var Zoom = /** @class */ (function () {
2284
2336
  this.layerCollectionEle = null;
2285
2337
  this.currentLayer = null;
2286
2338
  this.pinchDistance = null;
2287
- this.maps = null;
2288
2339
  };
2289
2340
  return Zoom;
2290
2341
  }());
@@ -37,6 +37,10 @@ export declare type MapsTheme =
37
37
  'Tailwind' |
38
38
  /** Renders a map with TailwindDark theme. */
39
39
  'TailwindDark' |
40
+ /** Renders a map with Tailwind3 theme. */
41
+ 'Tailwind3' |
42
+ /** Renders a map with Tailwind3Dark theme. */
43
+ 'Tailwind3Dark' |
40
44
  /** Renders a map with Bootstrap5 theme. */
41
45
  'Bootstrap5' |
42
46
  /** Render a map with Bootstrap5 dark theme. */
@@ -488,14 +488,17 @@ export declare function markerShapeChoose(eventArgs: IMarkerRenderingEventArgs,
488
488
  * @param {HTMLElement | Element} markerTemplate - Specifies the marker template
489
489
  * @param {Maps} maps - Specifies the instance of the maps
490
490
  * @param {number} layerIndex - Specifies the layer index
491
+ * @param {number} markerIndex - Specifies the marker index
491
492
  * @param {Element} markerCollection - Specifies the marker collection
492
493
  * @param {Element} layerElement - Specifies the layer element
493
494
  * @param {boolean} check - Specifies the boolean value
494
495
  * @param {boolean} zoomCheck - Specifies the boolean value
496
+ * @param {any} translatePoint - Specifies the data
497
+ * @param {boolean} allowInnerClusterSetting - Specifies the boolean value
495
498
  * @returns {boolean} -Returns boolean for cluster completion
496
499
  * @private
497
500
  */
498
- export declare function clusterTemplate(currentLayer: LayerSettings, markerTemplate: HTMLElement | Element, maps: Maps, layerIndex: number, markerCollection: Element, layerElement: Element, check: boolean, zoomCheck: boolean): boolean;
501
+ export declare function clusterTemplate(currentLayer: LayerSettings, markerTemplate: HTMLElement | Element, maps: Maps, layerIndex: number, markerIndex: number, markerCollection: Element, layerElement: Element, check: boolean, zoomCheck: boolean, translatePoint?: any, allowInnerClusterSetting?: boolean): boolean;
499
502
  /**
500
503
  * @param {Maps} maps - Specifies the map control.
501
504
  * @param {number} currentZoomFactor - Specifies the current zoom factor.
@@ -921,14 +924,6 @@ export declare function fixInitialScaleForTile(map: Maps): void;
921
924
  * @private
922
925
  */
923
926
  export declare function getElementByID(id: string): Element;
924
- /**
925
- * Function to get clientElement from id.
926
- *
927
- * @param {string} id - Specifies the id
928
- * @returns {Element} - Returns the element
929
- * @private
930
- */
931
- export declare function getClientElement(id: string): ClientRect;
932
927
  /**
933
928
  * Function to return the number value for the string value.
934
929
  *