@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
@@ -448,6 +448,7 @@ function measureTextElement(text, font) {
448
448
  var metrics = context.measureText(text);
449
449
  var width = metrics.width;
450
450
  var height = parseFloat(font.size) || 16;
451
+ canvas = null;
451
452
  return new Size(width, height);
452
453
  }
453
454
  /**
@@ -978,14 +979,19 @@ function updateImageUrl(eventArgs, data) {
978
979
  * @param {HTMLElement | Element} markerTemplate - Specifies the marker template
979
980
  * @param {Maps} maps - Specifies the instance of the maps
980
981
  * @param {number} layerIndex - Specifies the layer index
982
+ * @param {number} markerIndex - Specifies the marker index
981
983
  * @param {Element} markerCollection - Specifies the marker collection
982
984
  * @param {Element} layerElement - Specifies the layer element
983
985
  * @param {boolean} check - Specifies the boolean value
984
986
  * @param {boolean} zoomCheck - Specifies the boolean value
987
+ * @param {any} translatePoint - Specifies the data
988
+ * @param {boolean} allowInnerClusterSetting - Specifies the boolean value
985
989
  * @returns {boolean} -Returns boolean for cluster completion
986
990
  * @private
987
991
  */
988
- function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerCollection, layerElement, check, zoomCheck) {
992
+ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerIndex, markerCollection,
993
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
994
+ layerElement, check, zoomCheck, translatePoint, allowInnerClusterSetting) {
989
995
  var bounds1;
990
996
  var bounds2;
991
997
  var colloideBounds = [];
@@ -994,7 +1000,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
994
1000
  var tempY = 0;
995
1001
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
996
1002
  var data;
997
- var style = currentLayer.markerClusterSettings.labelStyle;
1003
+ var markerSetting = currentLayer.markerSettings[markerIndex];
998
1004
  var options;
999
1005
  var textElement;
1000
1006
  var tempElement1;
@@ -1004,7 +1010,9 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1004
1010
  var postionY = (15 / 4);
1005
1011
  var m = 0;
1006
1012
  var indexCollection = [];
1007
- var clusters = currentLayer.markerClusterSettings;
1013
+ var clusters = !allowInnerClusterSetting && currentLayer.markerClusterSettings.allowClustering ?
1014
+ currentLayer.markerClusterSettings : markerSetting.clusterSettings;
1015
+ var style = clusters.labelStyle;
1008
1016
  var clusterGroup = maps.renderer.createGroup({ id: maps.element.id + '_LayerIndex_' + layerIndex + '_markerCluster' });
1009
1017
  var eventArg = {
1010
1018
  cancel: false, name: markerClusterRendering, fill: clusters.fill, height: clusters.height,
@@ -1020,9 +1028,13 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1020
1028
  }
1021
1029
  var isClusteringCompleted = false;
1022
1030
  var currentZoomFactor = !maps.isTileMap ? maps.mapScaleValue : maps.tileZoomLevel;
1031
+ var markerGroup = (markerSetting.clusterSettings.allowClustering
1032
+ || (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1))
1033
+ ? markerTemplate.querySelectorAll("[id*='LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "']:not([id*='_Group'])")
1034
+ : markerTemplate.childNodes;
1023
1035
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
1024
1036
  maps.trigger('markerClusterRendering', eventArg, function (clusterargs) {
1025
- Array.prototype.forEach.call(markerTemplate.childNodes, function (markerElement, o) {
1037
+ Array.prototype.forEach.call(markerGroup, function (markerElement, o) {
1026
1038
  indexCollection = [];
1027
1039
  if (markerElement['style']['visibility'] !== 'hidden') {
1028
1040
  tempElement = markerElement;
@@ -1032,19 +1044,19 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1032
1044
  var list = (maps.markerModule.zoomedMarkerCluster.length > 0 && maps.markerModule.zoomedMarkerCluster[layerIndex] && maps.markerModule.zoomedMarkerCluster[layerIndex][o] && maps.markerModule.zoomedMarkerCluster[layerIndex][o].length > 0)
1033
1045
  || (maps.markerModule.initialMarkerCluster.length > 0 && maps.markerModule.initialMarkerCluster[layerIndex] && maps.markerModule.initialMarkerCluster[layerIndex][o] && maps.markerModule.initialMarkerCluster[layerIndex][o].length > 0) ?
1034
1046
  (maps.previousScale < currentZoomFactor ? maps.markerModule.zoomedMarkerCluster[layerIndex][o] : maps.markerModule.initialMarkerCluster[layerIndex][o]) : null;
1035
- if (!isNullOrUndefined(list) && list.length !== 0) {
1047
+ if (!isNullOrUndefined(list) && list.length !== 0 && !markerSetting.clusterSettings.allowClustering) {
1036
1048
  Array.prototype.forEach.call(list, function (currentIndex) {
1037
1049
  if (o !== currentIndex) {
1038
1050
  var otherMarkerElement = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
1039
- + 0 + '_dataIndex_' + currentIndex);
1040
- if (otherMarkerElement['style']['visibility'] !== 'hidden') {
1051
+ + markerIndex + '_dataIndex_' + currentIndex);
1052
+ if (otherMarkerElement && otherMarkerElement['style']['visibility'] !== 'hidden') {
1041
1053
  markerBoundsComparer(otherMarkerElement, bounds1, colloideBounds, indexCollection, currentIndex);
1042
1054
  }
1043
1055
  }
1044
1056
  });
1045
1057
  }
1046
1058
  else {
1047
- Array.prototype.forEach.call(markerTemplate.childNodes, function (otherMarkerElement, p) {
1059
+ Array.prototype.forEach.call(markerGroup, function (otherMarkerElement, p) {
1048
1060
  if (p >= o + 1 && otherMarkerElement['style']['visibility'] !== 'hidden') {
1049
1061
  markerBoundsComparer(otherMarkerElement, bounds1, colloideBounds, indexCollection, p);
1050
1062
  }
@@ -1060,23 +1072,23 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1060
1072
  tempY = (tempY - ((maps.availableSize.height <= containerRect['height']) ?
1061
1073
  containerRect['top'] : (containerRect['bottom'] - containerRect['top'])));
1062
1074
  var dataIndex = parseInt(markerElement['id'].split('_dataIndex_')[1].split('_')[0], 10);
1063
- var markerIndex = parseInt(markerElement['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
1064
- var markerSetting = currentLayer.markerSettings[markerIndex];
1075
+ var markerIndex_1 = parseInt(markerElement['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
1076
+ var markerSetting_1 = currentLayer.markerSettings[markerIndex_1];
1065
1077
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1066
- var markerData = markerSetting.dataSource[dataIndex];
1078
+ var markerData = markerSetting_1.dataSource[dataIndex];
1067
1079
  var location_1;
1068
- var longitude = (!isNullOrUndefined(markerSetting.longitudeValuePath)) ?
1069
- Number(getValueFromObject(markerData, markerSetting.longitudeValuePath)) :
1080
+ var longitude = (!isNullOrUndefined(markerSetting_1.longitudeValuePath)) ?
1081
+ Number(getValueFromObject(markerData, markerSetting_1.longitudeValuePath)) :
1070
1082
  !isNullOrUndefined(markerData['longitude']) ? parseFloat(markerData['longitude']) :
1071
1083
  !isNullOrUndefined(markerData['Longitude']) ? parseFloat(markerData['Longitude']) : 0;
1072
- var latitude = (!isNullOrUndefined(markerSetting.latitudeValuePath)) ?
1073
- Number(getValueFromObject(markerData, markerSetting.latitudeValuePath)) :
1084
+ var latitude = (!isNullOrUndefined(markerSetting_1.latitudeValuePath)) ?
1085
+ Number(getValueFromObject(markerData, markerSetting_1.latitudeValuePath)) :
1074
1086
  !isNullOrUndefined(markerData['latitude']) ? parseFloat(markerData['latitude']) :
1075
1087
  !isNullOrUndefined(markerData['Latitude']) ? parseFloat(markerData['Latitude']) : 0;
1076
1088
  if (!maps.isTileMap) {
1077
1089
  location_1 = convertGeoToPoint(latitude, longitude, factor, currentLayer, maps);
1078
1090
  }
1079
- else if (maps.isTileMap && !maps.zoomSettings.enable) {
1091
+ else if (maps.isTileMap) {
1080
1092
  location_1 = convertTileLatLongToPoint(new Point(longitude, latitude), maps.tileZoomLevel, maps.tileTranslatePoint, true);
1081
1093
  }
1082
1094
  markerElement['style']['visibility'] = 'hidden';
@@ -1101,12 +1113,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1101
1113
  }
1102
1114
  tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX : tempX + postionY - (eventArg.width / 2);
1103
1115
  tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY : tempY - (eventArg.height / 2);
1104
- if (maps.isTileMap && !maps.zoomSettings.enable) {
1116
+ if (maps.isTileMap) {
1105
1117
  tempX = location_1.x;
1106
1118
  tempY = location_1.y;
1107
1119
  }
1108
- var clusterID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_cluster_' + (m);
1109
- var labelID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_cluster_' + (m) + '_datalabel_' + m;
1120
+ else {
1121
+ tempX = (((location_1.x + ((!isNullOrUndefined(maps.translatePoint) && maps.translatePoint.x !== 0 && !maps.isResize) ? maps.translatePoint.x : translatePoint.location.x)) * (isNullOrUndefined(maps.scale) ? translatePoint.scale : maps.scale)) + markerSetting_1.offset.x);
1122
+ tempY = (((location_1.y + ((!isNullOrUndefined(maps.translatePoint) && maps.translatePoint.y !== 0 && !maps.isResize) ? maps.translatePoint.y : translatePoint.location.y)) * (isNullOrUndefined(maps.scale) ? translatePoint.scale : maps.scale)) + markerSetting_1.offset.y);
1123
+ }
1124
+ var clusterID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex_1 + '_dataIndex_' + dataIndex + '_cluster_' + (m);
1125
+ var labelID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex_1 + '_dataIndex_' + dataIndex + '_cluster_' + (m) + '_datalabel_' + m;
1110
1126
  m++;
1111
1127
  var ele = drawSymbols(shapeCustom['shape'], shapeCustom['imageUrl'], { x: 0, y: 0 }, clusterID, shapeCustom, markerCollection, maps);
1112
1128
  ele.setAttribute('transform', 'translate( ' + tempX + ' ' + tempY + ' )');
@@ -1119,8 +1135,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1119
1135
  options = new TextOption(labelID, (0), postionY, 'middle', (colloideBounds.length + 1).toString(), '', '');
1120
1136
  textElement = renderTextElement(options, style, style.color, markerCollection);
1121
1137
  textElement.setAttribute('transform', 'translate( ' + tempX + ' ' + tempY + ' )');
1122
- clusterGroup.appendChild(textElement);
1123
- clusterGroup.appendChild(ele);
1138
+ var eleMarkerIndex = parseFloat(ele.id.split('_MarkerIndex_')[1]);
1139
+ if ((markerSetting_1.clusterSettings.allowClustering && eleMarkerIndex === markerIndex_1) ||
1140
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1 && eleMarkerIndex === markerIndex_1)) {
1141
+ clusterGroup.appendChild(ele);
1142
+ clusterGroup.appendChild(textElement);
1143
+ }
1144
+ else {
1145
+ clusterGroup.appendChild(textElement);
1146
+ clusterGroup.appendChild(ele);
1147
+ }
1124
1148
  }
1125
1149
  }
1126
1150
  colloideBounds = [];
@@ -1133,7 +1157,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1133
1157
  layerElement.appendChild(clusterGroup);
1134
1158
  maps.svgObject.appendChild(layerElement);
1135
1159
  maps.element.appendChild(maps.svgObject);
1136
- if (clusters.allowDeepClustering) {
1160
+ if (clusters.allowDeepClustering && !allowInnerClusterSetting) {
1137
1161
  Array.prototype.forEach.call(clusterGroup.childNodes, function (clusterElement, o) {
1138
1162
  if (clusterElement['style']['visibility'] !== 'hidden') {
1139
1163
  tempElement = clusterElement;
@@ -1149,7 +1173,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1149
1173
  clusterColloideBounds.push(tempElement1);
1150
1174
  clusterColloideBounds.push(clusterGroup.childNodes[p - 1]);
1151
1175
  clusterGroup.childNodes[p]['style']['visibility'] = 'hidden';
1152
- clusterGroup.childNodes[p - 1]['style']['visibility'] = 'hidden';
1176
+ var eleMarkerIndex = !isNullOrUndefined(clusterGroup.childNodes[p + 1]) ?
1177
+ parseFloat(clusterGroup.childNodes[p + 1].id.split('_MarkerIndex_')[1]) : null;
1178
+ if ((markerSetting.clusterSettings.allowClustering && eleMarkerIndex === markerIndex) ||
1179
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1 && eleMarkerIndex === markerIndex)) {
1180
+ clusterGroup.childNodes[p + 1]['style']['visibility'] = 'hidden';
1181
+ }
1182
+ else {
1183
+ eleMarkerIndex = parseFloat(clusterGroup.childNodes[p - 1].id.split('_MarkerIndex_')[1]);
1184
+ clusterGroup.childNodes[p - 1]['style']['visibility'] = (eleMarkerIndex === markerIndex) ? 'hidden' : clusterGroup.childNodes[p - 1]['style']['visibility'];
1185
+ }
1153
1186
  indexCollection.push(p);
1154
1187
  }
1155
1188
  }
@@ -1165,7 +1198,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1165
1198
  else {
1166
1199
  tempElement.textContent = tempElement.textContent + ',' + clusterColloideBounds[i].textContent;
1167
1200
  }
1168
- clusterGroup.childNodes[o - 1].textContent = ((+(clusterGroup.childNodes[o - 1].textContent)) + (+(clusterColloideBounds[i + 1].textContent))).toString();
1201
+ var eleMarkerIndex = parseFloat(clusterGroup.childNodes[o + 1].id.split('_MarkerIndex_')[1]);
1202
+ if ((markerSetting.clusterSettings.allowClustering && eleMarkerIndex === markerIndex) ||
1203
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1 && eleMarkerIndex === markerIndex)) {
1204
+ clusterGroup.childNodes[o + 1].textContent = ((+(clusterGroup.childNodes[o + 1].textContent)) + (+(clusterColloideBounds[i + 1].textContent))).toString();
1205
+ }
1206
+ else {
1207
+ eleMarkerIndex = parseFloat(clusterGroup.childNodes[o - 1].id.split('_MarkerIndex_')[1]);
1208
+ clusterGroup.childNodes[o - 1].textContent = (eleMarkerIndex === markerIndex) ?
1209
+ ((+(clusterGroup.childNodes[o - 1].textContent)) + (+(clusterColloideBounds[i + 1].textContent))).toString() : clusterGroup.childNodes[o - 1].textContent;
1210
+ }
1169
1211
  i++;
1170
1212
  }
1171
1213
  }
@@ -1175,7 +1217,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1175
1217
  });
1176
1218
  }
1177
1219
  while (0 < clusterGroup.childNodes.length) {
1178
- markerCollection.insertBefore(clusterGroup.childNodes[0], markerCollection.firstChild);
1220
+ var eleMarkerIndex = parseFloat(clusterGroup.childNodes[0].id.split('_MarkerIndex_')[1]);
1221
+ if ((markerSetting.clusterSettings.allowClustering && eleMarkerIndex === markerIndex) ||
1222
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1 && eleMarkerIndex === markerIndex)) {
1223
+ markerCollection.insertBefore(clusterGroup.childNodes[0], null);
1224
+ }
1225
+ else {
1226
+ if (eleMarkerIndex === markerIndex) {
1227
+ markerCollection.insertBefore(clusterGroup.childNodes[0], markerCollection.firstChild);
1228
+ }
1229
+ }
1179
1230
  }
1180
1231
  if (!check) {
1181
1232
  getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
@@ -1281,6 +1332,10 @@ function mergeSeparateCluster(sameMarkerData, maps) {
1281
1332
  for (var i = 0; i < markerDataLength; i++) {
1282
1333
  markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1283
1334
  markerEle['style']['visibility'] = 'hidden';
1335
+ if (markerEle.id.indexOf('Group') > -1) {
1336
+ var marker_1 = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1337
+ marker_1['style']['visibility'] = 'hidden';
1338
+ }
1284
1339
  }
1285
1340
  removeElement(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine');
1286
1341
  }
@@ -1302,9 +1357,13 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1302
1357
  var getElementFunction = isDom ? getElement : markerElement.querySelector.bind(markerElement);
1303
1358
  var getQueryConnect = isDom ? '' : '#';
1304
1359
  var markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
1305
- var marker = maps.layers[layerIndex].markerSettings[markerIndex];
1360
+ var layer = maps.layers[layerIndex];
1361
+ var allowInnerClusterSetting = maps.markerModule.allowInnerClusterSetting(layer);
1362
+ var cluster = !allowInnerClusterSetting && layer.markerClusterSettings.allowClustering ?
1363
+ layer.markerClusterSettings : layer.markerSettings[markerIndex].clusterSettings;
1364
+ var marker = layer.markerSettings[markerIndex];
1306
1365
  var clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
1307
- var clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + clusterId + '_Group') : getElementFunction(getQueryConnect + '' + clusterId);
1366
+ var clusterEle = cluster.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + clusterId + '_Group') : getElementFunction(getQueryConnect + '' + clusterId);
1308
1367
  var clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
1309
1368
  clusterEle.setAttribute('visibility', 'hidden');
1310
1369
  clusterEleLabel.setAttribute('visibility', 'hidden');
@@ -1313,6 +1372,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1313
1372
  var width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
1314
1373
  var centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
1315
1374
  var centerY = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[1].split(')')[0].trim();
1375
+ width = (typeof width === 'string' ? parseFloat(width) : width);
1316
1376
  var radius = width + 5;
1317
1377
  var area = 2 * 3.14 * radius;
1318
1378
  var totalMarker = 0;
@@ -1355,14 +1415,20 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1355
1415
  markerEle.setAttribute('transform', 'translate( ' + x1 + ' ' + y1 + ')');
1356
1416
  }
1357
1417
  markerEle['style']['visibility'] = 'visible';
1418
+ if (markerEle.id.indexOf('Group') > -1) {
1419
+ var marker_2 = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1420
+ marker_2['style']['visibility'] = 'visible';
1421
+ }
1358
1422
  newAngle += angle;
1359
1423
  }
1360
- var connectorLine = maps.layers[layerIndex].markerClusterSettings.connectorLineSettings;
1424
+ var connectorLine = cluster.connectorLineSettings;
1361
1425
  var options = {
1362
1426
  d: path, id: maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_markerClusterConnectorLine', stroke: connectorLine.color,
1363
1427
  'fill-opacity': connectorLine.opacity, 'stroke-opacity': connectorLine.opacity, 'stroke-width': connectorLine.width
1364
1428
  };
1365
1429
  markerElement = isDom ? getElementFunction(maps.element.id + '_Markers_Group') : markerElement;
1430
+ var layerElement = getElementFunction(maps.element.id + '_LayerIndex_' + layerIndex);
1431
+ markerElement = layerElement.querySelector('#' + markerElement.id);
1366
1432
  var groupEle = maps.renderer.createGroup({ id: maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine' });
1367
1433
  groupEle.appendChild(maps.renderer.drawPath(options));
1368
1434
  if (marker.shape === 'Balloon') {
@@ -1442,8 +1508,9 @@ function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, mark
1442
1508
  for (var i = 0; i < markerElement.children.length; i++) {
1443
1509
  markerElement.children[i].style.pointerEvents = 'auto';
1444
1510
  }
1445
- markerElement.style.left = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x - maps.mapAreaRect.x + 'px';
1446
- markerElement.style.top = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y - maps.mapAreaRect.y + 'px';
1511
+ markerElement.style.left = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x - (maps.isTileMap ? 0 : maps.mapAreaRect.x) + 'px';
1512
+ markerElement.style.top = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y - (maps.isTileMap ? 0 : maps.mapAreaRect.y) + 'px';
1513
+ markerElement.style.transform = 'translate(-50%, -50%)';
1447
1514
  markerTemplate.appendChild(markerElement);
1448
1515
  }
1449
1516
  return markerTemplate;
@@ -2511,22 +2578,6 @@ function fixInitialScaleForTile(map) {
2511
2578
  function getElementByID(id) {
2512
2579
  return document.getElementById(id);
2513
2580
  }
2514
- /**
2515
- * Function to get clientElement from id.
2516
- *
2517
- * @param {string} id - Specifies the id
2518
- * @returns {Element} - Returns the element
2519
- * @private
2520
- */
2521
- function getClientElement(id) {
2522
- var element = document.getElementById(id);
2523
- if (!isNullOrUndefined(element)) {
2524
- return element.getClientRects()[0];
2525
- }
2526
- else {
2527
- return null;
2528
- }
2529
- }
2530
2581
  /**
2531
2582
  * Function to return the number value for the string value.
2532
2583
  *
@@ -2836,6 +2887,11 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius) {
2836
2887
  element.setAttribute('transform', 'translate( ' + (centerX - (radius * height)) + ' ' + (centerY - (radius * height)) +
2837
2888
  ' ) scale(' + height + ')');
2838
2889
  }
2890
+ else {
2891
+ if (maps.zoomModule.isPanningInProgress) {
2892
+ transform = element.getAttribute('transform');
2893
+ }
2894
+ }
2839
2895
  },
2840
2896
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2841
2897
  end: function (model) {
@@ -3769,6 +3825,12 @@ function getShapeColor(theme) {
3769
3825
  themePalette = ['#10B981', '#22D3EE', '#2DD4BF', '#4ADE80', '#8B5CF6',
3770
3826
  '#E879F9', '#F472B6', '#F87171', '#F97316', '#FCD34D'];
3771
3827
  break;
3828
+ case 'tailwind3':
3829
+ themePalette = ['#2F4074', '#03B4B4', '#0D72DE', '#FF5733', '#D63384', '#F39C12', '#EF291F', '#91C822'];
3830
+ break;
3831
+ case 'tailwind3dark':
3832
+ themePalette = ['#8029F1', '#1ABC9C', '#0D72DE', '#FF5733', '#D63384', '#F39C12', '#EF291F', '#91C822'];
3833
+ break;
3772
3834
  case 'fluent':
3773
3835
  themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
3774
3836
  '#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
@@ -4093,6 +4155,72 @@ function getThemeStyle(theme) {
4093
4155
  zoomButtonRadius: 30
4094
4156
  };
4095
4157
  break;
4158
+ case 'tailwind3':
4159
+ style = {
4160
+ backgroundColor: 'rgba(255,255,255, 0.0)',
4161
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
4162
+ titleFontColor: '#111827',
4163
+ subTitleFontColor: '#111827',
4164
+ legendTitleFontColor: '#111827',
4165
+ legendTextColor: '#6B7280',
4166
+ dataLabelFontColor: '#111827',
4167
+ tooltipFontColor: '#F9FAFB',
4168
+ tooltipFillColor: '#111827',
4169
+ zoomFillColor: '#374151',
4170
+ fontFamily: 'Inter',
4171
+ fontSize: '12px',
4172
+ fontWeight: '400',
4173
+ titleFontSize: '14px',
4174
+ legendFontSize: '12px',
4175
+ tooltipFillOpacity: 1,
4176
+ tooltipTextOpacity: 1,
4177
+ labelFontFamily: 'Inter',
4178
+ titleFontWeight: '500',
4179
+ zoomSelectionColor: '#6B7280',
4180
+ shapeFill: '#F3F4F6',
4181
+ shapeBorderColor: '#E5E7EB',
4182
+ rectangleZoomFillColor: '#818CF8',
4183
+ rectangleZoomFillOpacity: 0.3,
4184
+ rectangleZoomBorderColor: '#4F46E5',
4185
+ legendBorderColor: '#E5E7EB',
4186
+ legendBorderWidth: 0,
4187
+ tooltipBorderColor: '#111827',
4188
+ zoomButtonRadius: 32
4189
+ };
4190
+ break;
4191
+ case 'tailwind3dark':
4192
+ style = {
4193
+ backgroundColor: 'rgba(255,255,255, 0.0)',
4194
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
4195
+ titleFontColor: '#FFFFFF',
4196
+ subTitleFontColor: '#FFFFFF',
4197
+ legendTitleFontColor: '#FFFFFF',
4198
+ legendTextColor: '#9CA3AF',
4199
+ dataLabelFontColor: '#FFFFFF',
4200
+ tooltipFontColor: '#1F2937',
4201
+ tooltipFillColor: '#F9FAFB',
4202
+ zoomFillColor: '#D1D5DB',
4203
+ fontFamily: 'Inter',
4204
+ fontSize: '12px',
4205
+ fontWeight: '400',
4206
+ titleFontSize: '14px',
4207
+ legendFontSize: '12px',
4208
+ tooltipFillOpacity: 1,
4209
+ tooltipTextOpacity: 1,
4210
+ labelFontFamily: 'Inter',
4211
+ titleFontWeight: '600',
4212
+ zoomSelectionColor: '#9CA3AF',
4213
+ shapeFill: '#282F3C',
4214
+ shapeBorderColor: '#282F3C',
4215
+ rectangleZoomFillColor: '#3730A3',
4216
+ rectangleZoomFillOpacity: 0.3,
4217
+ rectangleZoomBorderColor: '#6366F1',
4218
+ legendBorderColor: '#282F3C',
4219
+ legendBorderWidth: 0,
4220
+ tooltipBorderColor: '#F9FAFB',
4221
+ zoomButtonRadius: 30
4222
+ };
4223
+ break;
4096
4224
  case 'bootstrap5':
4097
4225
  style = {
4098
4226
  backgroundColor: 'transparent',
@@ -5468,6 +5596,12 @@ var MarkerBase = /** @__PURE__ @class */ (function (_super) {
5468
5596
  __decorate([
5469
5597
  Property('#FF471A')
5470
5598
  ], MarkerBase.prototype, "fill", void 0);
5599
+ __decorate([
5600
+ Property(null)
5601
+ ], MarkerBase.prototype, "heightValuePath", void 0);
5602
+ __decorate([
5603
+ Property(null)
5604
+ ], MarkerBase.prototype, "widthValuePath", void 0);
5471
5605
  __decorate([
5472
5606
  Property(10)
5473
5607
  ], MarkerBase.prototype, "height", void 0);
@@ -5531,6 +5665,9 @@ var MarkerBase = /** @__PURE__ @class */ (function (_super) {
5531
5665
  __decorate([
5532
5666
  Collection([], InitialMarkerSelectionSettings)
5533
5667
  ], MarkerBase.prototype, "initialMarkerSelection", void 0);
5668
+ __decorate([
5669
+ Complex({}, MarkerClusterSettings)
5670
+ ], MarkerBase.prototype, "clusterSettings", void 0);
5534
5671
  return MarkerBase;
5535
5672
  }(ChildProperty));
5536
5673
  /**
@@ -5794,6 +5931,12 @@ var markerClusterClick = 'markerClusterClick';
5794
5931
  * @private
5795
5932
  */
5796
5933
  var markerMouseMove = 'markerMouseMove';
5934
+ /**
5935
+ * Specifies the maps mouse move event name.
5936
+ *
5937
+ * @private
5938
+ */
5939
+ var mouseMove = 'mouseMove';
5797
5940
  /**
5798
5941
  * Specifies the maps cluster mouse move event name.
5799
5942
  *
@@ -6429,7 +6572,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6429
6572
  proxy.renderTileLayer(proxy, layer, layerIndex, bing);
6430
6573
  this.mapObject.arrangeTemplate();
6431
6574
  if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
6432
- this.mapObject.zoomModule.applyTransform(this.mapObject, true);
6575
+ this.mapObject.zoomModule.applyTransform(this.mapObject, false, true);
6433
6576
  }
6434
6577
  };
6435
6578
  LayerPanel.prototype.bubbleCalculation = function (bubbleSettings, range) {
@@ -7730,6 +7873,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7730
7873
  _this.isTileMap = false;
7731
7874
  /**
7732
7875
  * Resize the map
7876
+ *
7877
+ * @private
7733
7878
  */
7734
7879
  _this.isResize = false;
7735
7880
  /**
@@ -8326,7 +8471,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8326
8471
  }
8327
8472
  }
8328
8473
  if (this.zoomModule && ((this.previousScale !== this.scale) || this.zoomNotApplied || this.isZoomByPosition)) {
8329
- this.zoomModule.applyTransform(this, true);
8474
+ this.zoomModule.applyTransform(this, false, true);
8330
8475
  }
8331
8476
  }
8332
8477
  };
@@ -8388,14 +8533,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8388
8533
  -(Math.abs(elementOffset.top - layerOffset.top)) : Math.abs(elementOffset.top - layerOffset.top);
8389
8534
  }
8390
8535
  Array.prototype.forEach.call(templateGroupEle.childNodes, function (currentTemplate) {
8391
- if (currentTemplate.id.indexOf('Marker') !== -1) {
8392
- if (currentTemplate.style.visibility !== 'hidden') {
8393
- var elementOffset_1 = getElementByID(currentTemplate.id).getBoundingClientRect();
8394
- currentTemplate.style.left = parseFloat(currentTemplate.style.left) - (_this.isTileMap ? 0 : elementOffset_1.width / 2) + 'px';
8395
- currentTemplate.style.top = parseFloat(currentTemplate.style.top) - (_this.isTileMap ? 0 : elementOffset_1.height / 2) + 'px';
8396
- }
8397
- }
8398
- else {
8536
+ if (currentTemplate.id.indexOf('Marker') === -1) {
8399
8537
  currentTemplate.style.left = parseFloat(currentTemplate.style.left) + offSetLetValue + 'px';
8400
8538
  currentTemplate.style.top = parseFloat(currentTemplate.style.top) + offSetTopValue + 'px';
8401
8539
  currentTemplate.style.transform = 'translate(-50%, -50%)';
@@ -9180,6 +9318,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9180
9318
  // if (target.id.indexOf('shapeIndex') !== -1 && !this.highlightSettings.enable) {
9181
9319
  // triggerShapeEvent(target.id, this.highlightSettings, this, shapeHighlight);
9182
9320
  // }
9321
+ this.mouseMoveEvent(e);
9183
9322
  if (this.markerModule) {
9184
9323
  this.markerModule.markerMove(e);
9185
9324
  this.markerModule.markerClusterMouseMove(e);
@@ -9193,6 +9332,34 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9193
9332
  this.onMouseMove(e);
9194
9333
  this.notify(Browser.touchMoveEvent, e);
9195
9334
  };
9335
+ /**
9336
+ * To check and trigger mouse move event on maps.
9337
+ *
9338
+ * @param {PointerEvent} e - Specifies the pointer event on maps.
9339
+ * @returns {void}
9340
+ * @private
9341
+ */
9342
+ Maps.prototype.mouseMoveEvent = function (e) {
9343
+ var targetId = e.target.id;
9344
+ var layerIndex;
9345
+ var eventArgs;
9346
+ if (this.isTileMap) {
9347
+ var latLongValue = this.getTileGeoLocation(e['layerX'], e['layerY']);
9348
+ eventArgs = {
9349
+ x: e.clientX, y: e.clientY, latitude: latLongValue.latitude,
9350
+ longitude: latLongValue.longitude, target: e.target
9351
+ };
9352
+ }
9353
+ else {
9354
+ layerIndex = targetId.indexOf('_LayerIndex_') > -1 ? parseInt(targetId.split('_LayerIndex_')[1].split('_')[0], 10) : this.baseLayerIndex;
9355
+ var latLongValue = this.getGeoLocation(layerIndex, e.clientX, e.clientY);
9356
+ eventArgs = {
9357
+ x: e.clientX, y: e.clientY, latitude: latLongValue.latitude,
9358
+ longitude: latLongValue.longitude, target: e.target
9359
+ };
9360
+ }
9361
+ this.trigger(mouseMove, eventArgs);
9362
+ };
9196
9363
  /**
9197
9364
  * This method is used to perform operations when mouse move event is performed on maps.
9198
9365
  *
@@ -9423,13 +9590,24 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
9423
9590
  */
9424
9591
  Maps.prototype.addMarker = function (layerIndex, markerCollection) {
9425
9592
  if (!this.isDestroyed && !isNullOrUndefined(this.markerModule)) {
9426
- var layerEle = document.getElementById(this.element.id + '_LayerIndex_' + layerIndex);
9427
- if (markerCollection.length > 0 && layerEle) {
9428
- for (var _i = 0, markerCollection_1 = markerCollection; _i < markerCollection_1.length; _i++) {
9429
- var newMarker = markerCollection_1[_i];
9430
- this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
9593
+ if (!isNullOrUndefined(layerIndex) && !isNullOrUndefined(markerCollection)) {
9594
+ var layerEle = document.getElementById(this.element.id + '_LayerIndex_' + layerIndex);
9595
+ if (markerCollection.length > 0 && layerEle) {
9596
+ for (var _i = 0, markerCollection_1 = markerCollection; _i < markerCollection_1.length; _i++) {
9597
+ var newMarker = markerCollection_1[_i];
9598
+ this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
9599
+ }
9600
+ this.markerModule.markerRender(this, layerEle, layerIndex, this.isTileMap ? this.tileZoomLevel : this.mapLayerPanel['currentFactor'], 'AddMarker');
9601
+ this.arrangeTemplate();
9602
+ }
9603
+ }
9604
+ else {
9605
+ for (var i = 0; i < this.layers.length; i++) {
9606
+ var layerEle = document.getElementById(this.element.id + '_LayerIndex_' + i);
9607
+ this.markerModule.zoomedMarkerCluster[i] = [];
9608
+ this.markerModule.initialMarkerCluster[i] = [];
9609
+ this.markerModule.markerRender(this, layerEle, i, this.isTileMap ? this.tileZoomLevel : this.mapLayerPanel['currentFactor'], null);
9431
9610
  }
9432
- this.markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
9433
9611
  this.arrangeTemplate();
9434
9612
  }
9435
9613
  }
@@ -10424,6 +10602,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
10424
10602
  __decorate$1([
10425
10603
  Event()
10426
10604
  ], Maps.prototype, "markerMouseMove", void 0);
10605
+ __decorate$1([
10606
+ Event()
10607
+ ], Maps.prototype, "mouseMove", void 0);
10427
10608
  __decorate$1([
10428
10609
  Event()
10429
10610
  ], Maps.prototype, "dataLabelRendering", void 0);
@@ -10759,7 +10940,6 @@ var Bubble = /** @__PURE__ @class */ (function () {
10759
10940
  var Marker = /** @__PURE__ @class */ (function () {
10760
10941
  function Marker(maps) {
10761
10942
  this.maps = maps;
10762
- this.trackElements = [];
10763
10943
  this.sameMarkerData = [];
10764
10944
  this.initialMarkerCluster = [];
10765
10945
  this.zoomedMarkerCluster = [];
@@ -10777,23 +10957,43 @@ var Marker = /** @__PURE__ @class */ (function () {
10777
10957
  var templateFn;
10778
10958
  var markerCount = 0;
10779
10959
  var nullCount = 0;
10960
+ var isMarkerTemplateNewCreation = false;
10780
10961
  var markerTemplateCount = 0;
10781
10962
  maps.translateType = 'marker';
10782
10963
  var currentLayer = maps.layersCollection[layerIndex];
10783
- this.markerSVGObject = maps.renderer.createGroup({
10784
- id: maps.element.id + '_Markers_Group',
10785
- class: 'GroupElement'
10786
- });
10964
+ var markerElement = layerElement.querySelectorAll('#' + maps.element.id + '_Markers_Group');
10965
+ if (markerElement.length > 0) {
10966
+ this.markerSVGObject = markerElement[0];
10967
+ this.markerSVGObject.innerHTML = '';
10968
+ isMarkerTemplateNewCreation = true;
10969
+ }
10970
+ else {
10971
+ this.markerSVGObject = maps.renderer.createGroup({
10972
+ id: maps.element.id + '_Markers_Group',
10973
+ class: 'GroupElement'
10974
+ });
10975
+ }
10787
10976
  this.markerSVGObject.style.pointerEvents = 'auto';
10788
- var markerTemplateEle = createElement('div', {
10789
- id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
10790
- className: maps.element.id + '_template'
10791
- });
10792
- markerTemplateEle.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
10793
- 'top:' + maps.mapAreaRect.y + 'px;' +
10794
- 'left:' + maps.mapAreaRect.x + 'px;' +
10795
- 'height:' + maps.mapAreaRect.height + 'px;' +
10796
- 'width:' + maps.mapAreaRect.width + 'px;';
10977
+ var secondaryElement = getElementByID(maps.element.id + '_Secondary_Element');
10978
+ var markerTemplateElement = secondaryElement.querySelectorAll('#' + maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group');
10979
+ var markerTemplateEle;
10980
+ if (markerTemplateElement && markerTemplateElement.length > 0 && markerTemplateElement[0].childElementCount > 0) {
10981
+ markerTemplateEle = getElementByID(maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group');
10982
+ markerTemplateEle.innerHTML = '';
10983
+ isMarkerTemplateNewCreation = true;
10984
+ }
10985
+ else {
10986
+ markerTemplateEle = createElement('div', {
10987
+ id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
10988
+ className: maps.element.id + '_template'
10989
+ });
10990
+ markerTemplateEle.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
10991
+ 'top:' + maps.mapAreaRect.y + 'px;' +
10992
+ 'left:' + maps.mapAreaRect.x + 'px;' +
10993
+ 'height:' + maps.mapAreaRect.height + 'px;' +
10994
+ 'width:' + maps.mapAreaRect.width + 'px;';
10995
+ }
10996
+ var allowInnerClusterSetting = this.allowInnerClusterSetting(currentLayer);
10797
10997
  var allowAnimation = (currentLayer.animationDuration !== 0 || animationMode === 'Enable') || isNullOrUndefined(maps.zoomModule);
10798
10998
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10799
10999
  var translatePoint;
@@ -10805,13 +11005,20 @@ var Marker = /** @__PURE__ @class */ (function () {
10805
11005
  Array.prototype.forEach.call(currentLayer.markerSettings, function (markerSettings, markerIndex) {
10806
11006
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10807
11007
  var markerData = markerSettings.dataSource;
11008
+ markerCount = 0;
10808
11009
  if (!isNullOrUndefined(markerSettings.dataSource)) {
10809
11010
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10810
11011
  Array.prototype.forEach.call(markerData, function (data, dataIndex) {
10811
11012
  maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
10812
11013
  var eventArgs = {
10813
- cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
10814
- width: markerSettings.width, imageUrl: markerSettings.imageUrl, shape: markerSettings.shape,
11014
+ cancel: false, name: markerRendering, fill: markerSettings.fill,
11015
+ height: (!isNullOrUndefined(markerSettings.heightValuePath) &&
11016
+ !isNullOrUndefined(data[markerSettings.heightValuePath]) ?
11017
+ data[markerSettings.heightValuePath] : markerSettings.height),
11018
+ width: (!isNullOrUndefined(markerSettings.widthValuePath) &&
11019
+ !isNullOrUndefined(data[markerSettings.widthValuePath]) ?
11020
+ data[markerSettings.widthValuePath] : markerSettings.width),
11021
+ imageUrl: markerSettings.imageUrl, shape: markerSettings.shape,
10815
11022
  template: markerSettings.template, data: data, maps: maps, marker: markerSettings,
10816
11023
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
10817
11024
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
@@ -10837,12 +11044,14 @@ var Marker = /** @__PURE__ @class */ (function () {
10837
11044
  var scale = type === 'AddMarker' ? maps.scale : translatePoint['scale'];
10838
11045
  var transPoint = type === 'AddMarker' ? maps.translatePoint : translatePoint['location'];
10839
11046
  if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
11047
+ isMarkerTemplateNewCreation = false;
10840
11048
  markerTemplateCount++;
10841
11049
  markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location_1, transPoint, scale, offset, maps);
10842
11050
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10843
11051
  maps.renderReactTemplates();
10844
11052
  }
10845
11053
  else if (!eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
11054
+ isMarkerTemplateNewCreation = true;
10846
11055
  markerCount++;
10847
11056
  marker(eventArgs, markerSettings, markerData, dataIndex, location_1, transPoint, markerID, offset, scale, maps, _this.markerSVGObject);
10848
11057
  }
@@ -10854,32 +11063,55 @@ var Marker = /** @__PURE__ @class */ (function () {
10854
11063
  maps.markerNullCount + 1 : maps.markerNullCount;
10855
11064
  var markerDataLength = markerData.length - maps.markerNullCount;
10856
11065
  var isMarkersClustered = false;
10857
- if (_this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
10858
- layerElement.appendChild(_this.markerSVGObject);
10859
- if (currentLayer.markerClusterSettings.allowClustering) {
10860
- maps.svgObject.appendChild(_this.markerSVGObject);
10861
- maps.element.appendChild(maps.svgObject);
11066
+ var markerGroup = (markerSettings.clusterSettings.allowClustering ||
11067
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1))
11068
+ ? _this.markerSVGObject.querySelectorAll("[id*='LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "']:not([id*='_Group'])")
11069
+ : _this.markerSVGObject.childNodes;
11070
+ var templateCount = _this.markerSVGObject.childNodes === markerGroup ? markerTemplateCount : 0;
11071
+ if (markerGroup.length === (markerDataLength - templateCount - nullCount) && (type !== 'Template')) {
11072
+ if (markerElement.length === 0) {
11073
+ layerElement.appendChild(_this.markerSVGObject);
11074
+ }
11075
+ if (markerSettings.clusterSettings.allowClustering || !allowInnerClusterSetting &&
11076
+ currentLayer.markerClusterSettings.allowClustering) {
11077
+ if (markerElement.length === 0) {
11078
+ maps.svgObject.appendChild(_this.markerSVGObject);
11079
+ maps.element.appendChild(maps.svgObject);
11080
+ }
10862
11081
  if ((currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData))
10863
11082
  && maps.zoomSettings.enable) {
10864
- isMarkersClustered = clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
10865
- layerElement.appendChild(_this.markerSVGObject);
11083
+ isMarkersClustered = clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, markerIndex, _this.markerSVGObject, layerElement, true, false, null, allowInnerClusterSetting);
11084
+ if (markerElement.length === 0) {
11085
+ layerElement.appendChild(_this.markerSVGObject);
11086
+ }
10866
11087
  }
10867
11088
  else {
10868
- isMarkersClustered = clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
11089
+ isMarkersClustered = clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, markerIndex, _this.markerSVGObject, layerElement, true, false, translatePoint, allowInnerClusterSetting);
10869
11090
  }
10870
11091
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10871
11092
  maps.renderReactTemplates();
10872
11093
  }
10873
11094
  }
10874
- if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
10875
- getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
11095
+ var markerTemplateGroup = (markerSettings.clusterSettings.allowClustering ||
11096
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1))
11097
+ ? markerTemplateEle.querySelectorAll("[id*='LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "']:not([id*='_Group'])")
11098
+ : markerTemplateEle.childNodes;
11099
+ if (markerTemplateGroup.length === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
11100
+ if (!isMarkerTemplateNewCreation) {
11101
+ getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
11102
+ }
10876
11103
  if (maps.checkInitialRender) {
10877
- if (currentLayer.markerClusterSettings.allowClustering && !isMarkersClustered) {
10878
- clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, _this.markerSVGObject, layerElement, false, false);
11104
+ if ((markerSettings.clusterSettings.allowClustering || !allowInnerClusterSetting &&
11105
+ currentLayer.markerClusterSettings.allowClustering) && !isMarkersClustered) {
11106
+ clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, markerIndex, _this.markerSVGObject, layerElement, false, false, translatePoint, allowInnerClusterSetting);
10879
11107
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10880
11108
  maps.renderReactTemplates();
10881
11109
  }
10882
11110
  }
11111
+ if (currentLayer.markerClusterSettings.allowClustering && markerElement.length > 0) {
11112
+ var layerCollectionEle = getElementByID(maps.element.id + '_Layer_Collections');
11113
+ layerCollectionEle.appendChild(layerElement);
11114
+ }
10883
11115
  }
10884
11116
  });
10885
11117
  });
@@ -11160,16 +11392,18 @@ var Marker = /** @__PURE__ @class */ (function () {
11160
11392
  var markCollection = [];
11161
11393
  var clusterCollection = [];
11162
11394
  var marker;
11163
- this.maps.markerClusterExpand = layer.markerClusterSettings.allowClusterExpand;
11164
11395
  if (target.indexOf('_MarkerIndex_') > -1) {
11165
11396
  var markerIndex = parseInt(id[1].split('_MarkerIndex_')[1].split('_')[0], 10);
11166
11397
  var dataIndex = parseInt(id[1].split('_dataIndex_')[1].split('_')[0], 10);
11167
11398
  marker = layer.markerSettings[markerIndex];
11399
+ var allowInnerClusterSetting = this.allowInnerClusterSetting(layer);
11400
+ this.maps.markerClusterExpand = !allowInnerClusterSetting && layer.markerClusterSettings.allowClustering ?
11401
+ layer.markerClusterSettings.allowClusterExpand : marker.clusterSettings.allowClusterExpand;
11168
11402
  if (!isNaN(markerIndex)) {
11169
11403
  data = marker.dataSource[dataIndex];
11170
11404
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11171
11405
  var collection_1 = [];
11172
- if (!marker.template && (target.indexOf('_cluster_') > -1) && (this.maps.layers[index].markerClusterSettings.allowClusterExpand)) {
11406
+ if (!marker.template && (target.indexOf('_cluster_') > -1) && this.maps.markerClusterExpand) {
11173
11407
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11174
11408
  Array.prototype.forEach.call(marker.dataSource, function (location, index) {
11175
11409
  if (location['latitude'] === data['latitude'] && location['longitude'] === data['longitude']) {
@@ -11179,8 +11413,10 @@ var Marker = /** @__PURE__ @class */ (function () {
11179
11413
  }
11180
11414
  if ((target.indexOf('_cluster_') > -1)) {
11181
11415
  var isClusterSame = false;
11182
- var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? layer.markerClusterSettings.shape === 'Balloon' ? target.split('_datalabel_')[0] + '_Group' : target.split('_datalabel_')[0] : layer.markerClusterSettings.shape === 'Balloon' ? target + '_Group' : target);
11183
- var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].textContent.split(',').map(Number) : clusterElement.textContent.split(',').map(Number);
11416
+ var cluster = !allowInnerClusterSetting && layer.markerClusterSettings.allowClustering ?
11417
+ layer.markerClusterSettings : layer.markerSettings[markerIndex].clusterSettings;
11418
+ var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? cluster.shape === 'Balloon' ? target.split('_datalabel_')[0] + '_Group' : target.split('_datalabel_')[0] : cluster.shape === 'Balloon' ? target + '_Group' : target);
11419
+ var indexes = cluster.shape === 'Balloon' ? clusterElement.children[0].textContent.split(',').map(Number) : clusterElement.textContent.split(',').map(Number);
11184
11420
  collection_1 = [];
11185
11421
  for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
11186
11422
  var i = indexes_1[_i];
@@ -11250,6 +11486,23 @@ var Marker = /** @__PURE__ @class */ (function () {
11250
11486
  };
11251
11487
  this.maps.trigger(markerClusterMouseMove, eventArgs);
11252
11488
  };
11489
+ /**
11490
+ * This method is used to return whether the clustering is enabled in any marker settings.
11491
+ *
11492
+ * @param {LayerSettings} layer - Specifies the layer settings
11493
+ * @returns {boolean} - Specifies whether the clustering is enabled in any marker settings.
11494
+ * @private
11495
+ */
11496
+ Marker.prototype.allowInnerClusterSetting = function (layer) {
11497
+ var allowInnerClusterSetting = false;
11498
+ for (var markerIndex = 0; markerIndex < layer.markerSettings.length; markerIndex++) {
11499
+ if (layer.markerSettings[markerIndex].clusterSettings.allowClustering) {
11500
+ allowInnerClusterSetting = true;
11501
+ break;
11502
+ }
11503
+ }
11504
+ return allowInnerClusterSetting;
11505
+ };
11253
11506
  /**
11254
11507
  * @private
11255
11508
  * @returns {void}
@@ -11276,7 +11529,6 @@ var Marker = /** @__PURE__ @class */ (function () {
11276
11529
  */
11277
11530
  Marker.prototype.destroy = function () {
11278
11531
  this.maps = null;
11279
- this.trackElements = [];
11280
11532
  this.markerSVGObject = null;
11281
11533
  this.sameMarkerData = [];
11282
11534
  this.initialMarkerCluster = [];
@@ -12146,6 +12398,13 @@ var Legend = /** @__PURE__ @class */ (function () {
12146
12398
  else {
12147
12399
  legendText = '';
12148
12400
  }
12401
+ if (legend.position === 'Left' || legend.position === 'Right') {
12402
+ for (var i_1 = 0; i_1 < this.legendCollection.length; i_1++) {
12403
+ var legendItem = this.legendCollection[i_1];
12404
+ var legendTextSize = measureText(legendItem['text'], legend.textStyle);
12405
+ this.textMaxWidth = Math.max(this.textMaxWidth, legendTextSize.width);
12406
+ }
12407
+ }
12149
12408
  maxTextHeight = Math.max(maxTextHeight, itemTextSize.height);
12150
12409
  maxTextWidth = Math.max(maxTextWidth, itemTextSize.width);
12151
12410
  if (itemTextSize.width > 0 && itemTextSize.height > 0) {
@@ -12155,26 +12414,26 @@ var Legend = /** @__PURE__ @class */ (function () {
12155
12414
  (startY - textPadding_1);
12156
12415
  }
12157
12416
  else {
12158
- textX_1 = (position_1 === 'After') ? startX - (itemTextSize.width / 2) - textPadding_1
12159
- : (startX + rectWidth + itemTextSize.width / 2) + textPadding_1;
12417
+ textX_1 = (position_1 === 'After') ? startX - (this.textMaxWidth / 2) - textPadding_1
12418
+ : (startX + rectWidth + this.textMaxWidth / 2) + textPadding_1;
12160
12419
  textY_1 = startY + (rectHeight / 2) + (itemTextSize.height / 4);
12161
12420
  }
12162
12421
  }
12163
12422
  if (i === 0) {
12164
12423
  itemStartX = (arrangement === 'Horizontal') ? startX : (position_1 === 'After') ?
12165
- textX_1 - (itemTextSize.width / 2) : startX;
12424
+ textX_1 - (this.textMaxWidth / 2) : startX;
12166
12425
  itemStartY = (arrangement === 'Horizontal') ? (position_1 === 'After') ? startY :
12167
12426
  textY_1 - (itemTextSize.height / 2) : startY;
12168
12427
  if (this.legendCollection.length === 1) {
12169
12428
  legendWidth = (arrangement === 'Horizontal') ? Math.abs((startX + rectWidth) - itemStartX) :
12170
- (rectWidth + maxTextWidth + textPadding_1);
12429
+ (rectWidth + this.textMaxWidth + textPadding_1);
12171
12430
  legendHeight = (arrangement === 'Horizontal') ? (rectHeight + (maxTextHeight / 2) + textPadding_1) :
12172
12431
  Math.abs((startY + rectHeight) - itemStartY);
12173
12432
  }
12174
12433
  }
12175
12434
  else if (i === this.legendCollection.length - 1) {
12176
12435
  legendWidth = (arrangement === 'Horizontal') ? Math.abs((startX + rectWidth) - itemStartX) :
12177
- (rectWidth + maxTextWidth + textPadding_1);
12436
+ (rectWidth + this.textMaxWidth + textPadding_1);
12178
12437
  legendHeight = (arrangement === 'Horizontal') ? (rectHeight + (maxTextHeight / 2) + textPadding_1) :
12179
12438
  Math.abs((startY + rectHeight) - itemStartY);
12180
12439
  }
@@ -12186,8 +12445,8 @@ var Legend = /** @__PURE__ @class */ (function () {
12186
12445
  shapeBorder: this.legendCollection[i]['shapeBorder']
12187
12446
  });
12188
12447
  }
12189
- if (this.legendCollection.length === 1 && !(map.theme === 'Fluent2HighContrast' && legend.position === 'Bottom')) {
12190
- legendHeight = rectHeight;
12448
+ if (this.legendCollection.length === 1) {
12449
+ legendHeight = maxTextHeight + textPadding_1;
12191
12450
  legendWidth = rectWidth;
12192
12451
  }
12193
12452
  this.legendItemRect = { x: itemStartX, y: itemStartY, width: legendWidth, height: legendHeight };
@@ -12697,8 +12956,8 @@ var Legend = /** @__PURE__ @class */ (function () {
12697
12956
  if (shapeElement !== null) {
12698
12957
  var shapeMatch = true;
12699
12958
  if (this.maps.legendSelectionCollection !== null) {
12700
- for (var i_1 = 0; i_1 < this.maps.legendSelectionCollection.length; i_1++) {
12701
- if (this.maps.legendSelectionCollection[i_1]['legendElement'] === targetElement) {
12959
+ for (var i_2 = 0; i_2 < this.maps.legendSelectionCollection.length; i_2++) {
12960
+ if (this.maps.legendSelectionCollection[i_2]['legendElement'] === targetElement) {
12702
12961
  shapeMatch = false;
12703
12962
  break;
12704
12963
  }
@@ -13254,18 +13513,7 @@ var Legend = /** @__PURE__ @class */ (function () {
13254
13513
  var spacing = 10;
13255
13514
  var trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
13256
13515
  var textSize = measureText(trimTitle, textStyle);
13257
- var sameTextWidth = false;
13258
- for (var i = 0; i < this.legendRenderingCollections.length; i++) {
13259
- if (this.legendRenderingCollections[i].textWidth !== this.legendRenderingCollections[0].textWidth) {
13260
- sameTextWidth = false;
13261
- break;
13262
- }
13263
- else {
13264
- sameTextWidth = true;
13265
- }
13266
- }
13267
- this.legendBorderRect = new Rect((map.theme === 'Fluent2HighContrast' && !sameTextWidth && (legend.position === 'Left' || legend.position === 'Right') && legend.mode === 'Interactive')
13268
- ? (this.legendItemRect.x - (spacing * 3)) : (this.legendItemRect.x - spacing), (this.legendItemRect.y - spacing - textSize.height), (this.legendItemRect.width) + (spacing * 2), (this.legendItemRect.height) + (spacing * 2) + textSize.height +
13516
+ this.legendBorderRect = new Rect((this.legendItemRect.x - spacing), (this.legendItemRect.y - spacing - textSize.height), (this.legendItemRect.width) + (spacing * 2), (this.legendItemRect.height) + (spacing * 2) + textSize.height +
13269
13517
  (legend.mode === 'Interactive' ? 0 : (this.page !== 0) ? spacing : 0));
13270
13518
  var legendBorder = {
13271
13519
  color: legend.border.color || this.maps.themeStyle.legendBorderColor, opacity: legend.border.opacity,
@@ -14198,6 +14446,12 @@ var Legend = /** @__PURE__ @class */ (function () {
14198
14446
  this.maps.off(Browser.touchMoveEvent, this.interactiveHandler);
14199
14447
  this.maps.off(Browser.touchEndEvent, this.interactiveHandler);
14200
14448
  this.maps.off(click, this.legendClick);
14449
+ var pagingElement = document.getElementById(this.maps.element.id + '_Legend_Paging_Group');
14450
+ if (pagingElement) {
14451
+ for (var i = 0; i < pagingElement.childElementCount; i++) {
14452
+ EventHandler.remove(pagingElement.childNodes[i], Browser.touchStartEvent, this.changeNextPage);
14453
+ }
14454
+ }
14201
14455
  };
14202
14456
  Legend.prototype.getLegendData = function (
14203
14457
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -15407,6 +15661,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
15407
15661
  MapsTooltip.prototype.destroy = function () {
15408
15662
  if (!isNullOrUndefined(this.svgTooltip)) {
15409
15663
  this.svgTooltip.destroy();
15664
+ this.svgTooltip.controlInstance = null;
15665
+ removeElement(this.maps.element.id + '_mapsTooltip');
15410
15666
  }
15411
15667
  this.svgTooltip = null;
15412
15668
  this.maps = null;
@@ -15459,11 +15715,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
15459
15715
  * @param {Point} position - Specifies the position.
15460
15716
  * @param {number} newZoomFactor - Specifies the zoom factor.
15461
15717
  * @param {string} type - Specifies the type.
15718
+ * @param {boolean} isMouseWheel - Indicates whether the zoom operation was triggered by the mouse wheel.
15462
15719
  * @returns {void}
15463
15720
  * @private
15464
15721
  */
15465
- Zoom.prototype.performZooming = function (position, newZoomFactor, type) {
15722
+ Zoom.prototype.performZooming = function (position, newZoomFactor, type, isMouseWheel) {
15466
15723
  var _this = this;
15724
+ if (isMouseWheel === void 0) { isMouseWheel = false; }
15467
15725
  var map = this.maps;
15468
15726
  map.previousProjection = newZoomFactor <= 1.5 ? undefined : map.projectionType;
15469
15727
  map.defaultState = false;
@@ -15522,7 +15780,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
15522
15780
  map.scale = map.mapScaleValue = map.previousScale;
15523
15781
  }
15524
15782
  else {
15525
- this.applyTransform(map);
15783
+ this.applyTransform(map, isMouseWheel);
15526
15784
  }
15527
15785
  }
15528
15786
  else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
@@ -15566,7 +15824,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
15566
15824
  // element1 = element1;
15567
15825
  // }
15568
15826
  // }
15569
- _this.applyTransform(_this.maps);
15827
+ _this.applyTransform(_this.maps, isMouseWheel);
15570
15828
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
15571
15829
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
15572
15830
  }
@@ -15692,7 +15950,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
15692
15950
  }
15693
15951
  if (!isZoomCancelled) {
15694
15952
  map.mapScaleValue = zoomCalculationFactor;
15695
- this.applyTransform(map, true);
15953
+ this.applyTransform(map, false, true);
15696
15954
  this.maps.zoomNotApplied = false;
15697
15955
  this.zoomingRect = null;
15698
15956
  }
@@ -15725,6 +15983,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
15725
15983
  var zoomCalculationFactor = this.pinchFactor;
15726
15984
  var isZoomCancelled;
15727
15985
  var prevTilePoint = map.tileTranslatePoint;
15986
+ this.maps.mergeCluster();
15728
15987
  if (!map.isTileMap) {
15729
15988
  var availSize = map.mapAreaRect;
15730
15989
  map.isMarkerZoomCompleted = false;
@@ -15905,12 +16164,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
15905
16164
  };
15906
16165
  /**
15907
16166
  * @param {Maps} maps - Specifies the Map control
16167
+ * @param {boolean} isMouseWheel - Indicates whether the zoom operation was triggered by the mouse wheel.
15908
16168
  * @param {boolean} animate - Specifies the animation is available or not
15909
16169
  * @param {boolean} isPanning - Specifies that it is panning or not
15910
16170
  * @returns {void}
15911
16171
  * @private
15912
16172
  */
15913
- Zoom.prototype.applyTransform = function (maps, animate, isPanning) {
16173
+ Zoom.prototype.applyTransform = function (maps, isMouseWheel, animate, isPanning) {
15914
16174
  var _this = this;
15915
16175
  var layerIndex;
15916
16176
  this.templateCount = 0;
@@ -15924,6 +16184,17 @@ var Zoom = /** @__PURE__ @class */ (function () {
15924
16184
  if (document.getElementById(maps.element.id + '_mapsTooltip')) {
15925
16185
  removeElement(maps.element.id + '_mapsTooltip');
15926
16186
  }
16187
+ if (maps.isTileMap) {
16188
+ var element = document.getElementById(maps.element.id + '_svg');
16189
+ if (element) {
16190
+ for (var k = 0; k < maps.layers.length; k++) {
16191
+ var layerElement = element.querySelector('#' + maps.element.id + '_LayerIndex_' + k);
16192
+ if (layerElement) {
16193
+ element.removeChild(layerElement);
16194
+ }
16195
+ }
16196
+ }
16197
+ }
15927
16198
  if (this.layerCollectionEle) {
15928
16199
  var _loop_1 = function (i) {
15929
16200
  var layerElement = this_1.layerCollectionEle.childNodes[i];
@@ -15933,6 +16204,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
15933
16204
  this_1.currentLayer = maps.layersCollection[this_1.index];
15934
16205
  var factor_1 = maps.mapLayerPanel.calculateFactor(this_1.currentLayer);
15935
16206
  var elementCount = layerElement.childElementCount;
16207
+ var templateElement = document.getElementById(maps.element.id + '_LayerIndex_' + this_1.index + '_Markers_Template_Group');
15936
16208
  var _loop_2 = function (j) {
15937
16209
  var currentEle = layerElement.childNodes[j];
15938
16210
  if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
@@ -15966,17 +16238,16 @@ var Zoom = /** @__PURE__ @class */ (function () {
15966
16238
  }
15967
16239
  }
15968
16240
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
15969
- if ((!this_1.isPanModeEnabled || !isPanning) && !isNullOrUndefined(currentEle.childNodes[0])) {
15970
- this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement);
16241
+ if ((!this_1.isPanModeEnabled || !isPanning) && (!isNullOrUndefined(currentEle.childNodes[0]) || !isNullOrUndefined(templateElement.childNodes[0]))) {
16242
+ var processElement = (!isNullOrUndefined(currentEle.childNodes[0]) ? currentEle.childNodes[0] : templateElement.childNodes[0]);
16243
+ this_1.markerTranslates(processElement, factor_1, x, y, scale, 'Marker', layerElement);
15971
16244
  }
15972
16245
  currentEle = layerElement.childNodes[j];
15973
- var markerAnimation_1;
15974
16246
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
15975
16247
  Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
15976
16248
  _this.markerTranslate(childNode, factor_1, x, y, scale, 'Marker', animate);
15977
16249
  var dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
15978
16250
  var markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
15979
- markerAnimation_1 = _this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
15980
16251
  if (_this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length > 0) {
15981
16252
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15982
16253
  var markerSelectionValues = _this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
@@ -15990,16 +16261,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
15990
16261
  }
15991
16262
  }
15992
16263
  if (((_this.currentLayer.animationDuration > 0 || animationMode === 'Enable') || ((maps.layersCollection[0].animationDuration > 0 || animationMode === 'Enable') && _this.currentLayer.type === 'SubLayer')) && !_this.isPanModeEnabled) {
15993
- if (maps.isTileMap) {
15994
- var groupElement = document.querySelector('.GroupElement');
15995
- if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation_1) {
15996
- groupElement.style.display = 'none';
16264
+ if (!maps.isTileMap) {
16265
+ markerStyle = isMouseWheel ? markerStyle : 'visibility:hidden';
16266
+ if (!isNullOrUndefined(markerStyle)) {
16267
+ currentEle.style.cssText = markerStyle;
15997
16268
  }
15998
16269
  }
15999
- else {
16000
- markerStyle = 'visibility:hidden';
16001
- currentEle.style.cssText = markerStyle;
16002
- }
16003
16270
  }
16004
16271
  });
16005
16272
  if (this_1.isPanModeEnabled && maps.markerModule.sameMarkerData.length > 0) {
@@ -16144,92 +16411,111 @@ var Zoom = /** @__PURE__ @class */ (function () {
16144
16411
  removeElement(markerTemplateElements.id);
16145
16412
  }
16146
16413
  var currentLayers = this.maps.layersCollection[layerIndex];
16414
+ var allowInnerClusterSetting = this.maps.markerModule.allowInnerClusterSetting(currentLayers);
16147
16415
  Array.prototype.forEach.call(currentLayers.markerSettings, function (markerSettings, markerIndex) {
16416
+ markerTemplateCounts = 0;
16417
+ markerCounts = 0;
16148
16418
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16149
16419
  var markerDatas = markerSettings.dataSource;
16150
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16151
- Array.prototype.forEach.call(markerDatas, function (data, dataIndex) {
16152
- _this.maps.markerNullCount = markerIndex >= 0 && dataIndex === 0 ? 0 : _this.maps.markerNullCount;
16153
- var eventArgs = {
16154
- template: markerSettings.template, data: data, maps: _this.maps, marker: markerSettings,
16155
- cancel: false, name: markerRendering, fill: markerSettings.fill, colorValuePath: markerSettings.colorValuePath,
16156
- shapeValuePath: markerSettings.shapeValuePath, height: markerSettings.height,
16157
- width: markerSettings.width, imageUrl: markerSettings.imageUrl, imageUrlValuePath: markerSettings.imageUrlValuePath, shape: markerSettings.shape,
16158
- border: markerSettings.border
16159
- };
16160
- eventArgs = markerShapeChoose(eventArgs, data);
16161
- eventArgs = markerColorChoose(eventArgs, data);
16162
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
16163
- _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
16164
- if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
16165
- eventArgs = markerShapeChoose(eventArgs, data);
16166
- }
16167
- if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
16168
- eventArgs = markerColorChoose(eventArgs, data);
16169
- }
16170
- var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
16171
- Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
16172
- parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
16173
- var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
16174
- Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
16175
- parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
16176
- var offset = markerSettings.offset;
16177
- if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
16178
- var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
16179
- + markerIndex + '_dataIndex_' + dataIndex;
16180
- 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);
16181
- var transPoint = { x: x, y: y };
16182
- if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
16183
- markerTemplateCounts++;
16184
- markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateElements, location_1, transPoint, scale, offset, _this.maps);
16420
+ if (!isNullOrUndefined(markerDatas)) {
16421
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16422
+ Array.prototype.forEach.call(markerDatas, function (data, dataIndex) {
16423
+ _this.maps.markerNullCount = markerIndex >= 0 && dataIndex === 0 ? 0 : _this.maps.markerNullCount;
16424
+ var eventArgs = {
16425
+ template: markerSettings.template, data: data, maps: _this.maps, marker: markerSettings,
16426
+ cancel: false, name: markerRendering, fill: markerSettings.fill, colorValuePath: markerSettings.colorValuePath,
16427
+ shapeValuePath: markerSettings.shapeValuePath,
16428
+ height: !isNullOrUndefined(markerSettings.heightValuePath) && !isNullOrUndefined(data[markerSettings.heightValuePath])
16429
+ ? data[markerSettings.heightValuePath] : markerSettings.height,
16430
+ width: !isNullOrUndefined(markerSettings.widthValuePath) && !isNullOrUndefined(data[markerSettings.widthValuePath])
16431
+ ? data[markerSettings.widthValuePath] : markerSettings.width,
16432
+ imageUrl: markerSettings.imageUrl, imageUrlValuePath: markerSettings.imageUrlValuePath, shape: markerSettings.shape,
16433
+ border: markerSettings.border
16434
+ };
16435
+ eventArgs = markerShapeChoose(eventArgs, data);
16436
+ eventArgs = markerColorChoose(eventArgs, data);
16437
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16438
+ _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
16439
+ if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
16440
+ eventArgs = markerShapeChoose(eventArgs, data);
16185
16441
  }
16186
- else if (!eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
16187
- markerCounts++;
16188
- marker(eventArgs, markerSettings, markerDatas, dataIndex, location_1, transPoint, markerID, offset, scale, _this.maps, markerSVGObject);
16442
+ if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
16443
+ eventArgs = markerColorChoose(eventArgs, data);
16189
16444
  }
16190
- }
16191
- nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
16192
- markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
16193
- markerCounts += (eventArgs.cancel) ? 1 : 0;
16194
- _this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
16195
- ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
16196
- var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
16197
- var isMarkersClustered = false;
16198
- if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
16199
- if (_this.maps.isTileMap) {
16200
- var polygonsElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group');
16201
- var polygonElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygon_Group');
16202
- if (!isNullOrUndefined(polygonsElement)) {
16203
- polygonsElement.insertAdjacentElement('afterend', markerSVGObject);
16445
+ var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
16446
+ Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
16447
+ parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
16448
+ var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
16449
+ Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
16450
+ parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
16451
+ var offset = markerSettings.offset;
16452
+ if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
16453
+ var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
16454
+ + markerIndex + '_dataIndex_' + dataIndex;
16455
+ 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);
16456
+ var transPoint = { x: x, y: y };
16457
+ if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
16458
+ markerTemplateCounts++;
16459
+ markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateElements, location_1, transPoint, scale, offset, _this.maps);
16204
16460
  }
16205
- else {
16206
- if (!isNullOrUndefined(polygonElement)) {
16207
- polygonElement.insertAdjacentElement('afterend', markerSVGObject);
16461
+ else if (!eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
16462
+ markerCounts++;
16463
+ marker(eventArgs, markerSettings, markerDatas, dataIndex, location_1, transPoint, markerID, offset, scale, _this.maps, markerSVGObject);
16464
+ }
16465
+ }
16466
+ nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
16467
+ markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
16468
+ markerCounts += (eventArgs.cancel) ? 1 : 0;
16469
+ _this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
16470
+ ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
16471
+ var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
16472
+ var isMarkersClustered = false;
16473
+ var markerGroup = (markerSettings.clusterSettings.allowClustering
16474
+ || (currentLayers.markerClusterSettings.allowClustering && currentLayers.markerSettings.length > 1))
16475
+ ? markerSVGObject.querySelectorAll("[id*='LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "']:not([id*='_Group'])")
16476
+ : markerSVGObject.childNodes;
16477
+ if (markerGroup.length === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
16478
+ if (_this.maps.isTileMap) {
16479
+ var polygonsElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group');
16480
+ var polygonElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygon_Group');
16481
+ if (!isNullOrUndefined(polygonsElement)) {
16482
+ polygonsElement.insertAdjacentElement('afterend', markerSVGObject);
16208
16483
  }
16209
16484
  else {
16210
- layerElement.insertBefore(markerSVGObject, layerElement.firstElementChild);
16485
+ if (!isNullOrUndefined(polygonElement)) {
16486
+ polygonElement.insertAdjacentElement('afterend', markerSVGObject);
16487
+ }
16488
+ else {
16489
+ layerElement.insertBefore(markerSVGObject, layerElement.firstElementChild);
16490
+ }
16211
16491
  }
16212
16492
  }
16493
+ else {
16494
+ layerElement.appendChild(markerSVGObject);
16495
+ }
16496
+ if (currentLayers.markerSettings[markerIndex].clusterSettings.allowClustering ||
16497
+ !allowInnerClusterSetting && currentLayers.markerClusterSettings.allowClustering) {
16498
+ _this.maps.svgObject.appendChild(markerSVGObject);
16499
+ _this.maps.element.appendChild(_this.maps.svgObject);
16500
+ isMarkersClustered = clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerIndex, markerSVGObject, layerElement, true, true, null, allowInnerClusterSetting);
16501
+ }
16213
16502
  }
16214
- else {
16215
- layerElement.appendChild(markerSVGObject);
16216
- }
16217
- if (currentLayers.markerClusterSettings.allowClustering) {
16218
- _this.maps.svgObject.appendChild(markerSVGObject);
16219
- _this.maps.element.appendChild(_this.maps.svgObject);
16220
- isMarkersClustered = clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
16221
- }
16222
- }
16223
- if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
16224
- getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
16225
- if (scale >= 1) {
16226
- if (currentLayers.markerClusterSettings.allowClustering && !isMarkersClustered) {
16227
- clusterTemplate(currentLayers, markerTemplateElements, _this.maps, layerIndex, markerSVGObject, layerElement, false, true);
16503
+ var markerTemplateGroup = (markerSettings.clusterSettings.allowClustering
16504
+ || (currentLayers.markerClusterSettings.allowClustering && currentLayers.markerSettings.length > 1))
16505
+ ? markerTemplateElements.querySelectorAll("[id*='LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "']:not([id*='_Group'])")
16506
+ : markerTemplateElements.childNodes;
16507
+ if (markerTemplateGroup.length === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
16508
+ getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
16509
+ if (scale >= 1) {
16510
+ if ((markerSettings.clusterSettings.allowClustering || !allowInnerClusterSetting &&
16511
+ currentLayers.markerClusterSettings.allowClustering) && !isMarkersClustered) {
16512
+ clusterTemplate(currentLayers, markerTemplateElements, _this.maps, layerIndex, markerIndex, markerSVGObject, layerElement, false, true, null, allowInnerClusterSetting);
16513
+ }
16228
16514
  }
16229
16515
  }
16230
- }
16516
+ });
16231
16517
  });
16232
- });
16518
+ }
16233
16519
  });
16234
16520
  };
16235
16521
  /**
@@ -16425,6 +16711,18 @@ var Zoom = /** @__PURE__ @class */ (function () {
16425
16711
  }
16426
16712
  }
16427
16713
  };
16714
+ /**
16715
+ *
16716
+ * @param {Element | HTMLElement} element - Specifies the marker element.
16717
+ * @param {number} factor - Specifies scale factor.
16718
+ * @param {number} x - Specifies the x location of the marker element.
16719
+ * @param {number} y - Specifies the y location of the marker element.
16720
+ * @param {number} scale - Specifies scale factor.
16721
+ * @param {number} type - Specifies the type of the marker processing.
16722
+ * @param {number} animate - Specifies whether the animation is enabled or not.
16723
+ * @returns {void}
16724
+ * @private
16725
+ */
16428
16726
  Zoom.prototype.markerTranslate = function (element, factor, x, y, scale, type, animate) {
16429
16727
  if (animate === void 0) { animate = false; }
16430
16728
  var layerIndex = parseInt(element.id.split('_LayerIndex_')[1].split('_')[0], 10);
@@ -16445,9 +16743,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
16445
16743
  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);
16446
16744
  if (this.maps.isTileMap) {
16447
16745
  if (type === 'Template') {
16448
- var templateOffset = element.getBoundingClientRect();
16449
- element.style.left = ((location_2.x - (templateOffset.width / 2)) + marker.offset.x) + 'px';
16450
- element.style.top = ((location_2.y - (templateOffset.height / 2)) + marker.offset.y) + 'px';
16746
+ element.style.left = (location_2.x + marker.offset.x) + 'px';
16747
+ element.style.top = (location_2.y + marker.offset.y) + 'px';
16451
16748
  }
16452
16749
  else {
16453
16750
  location_2.x += marker.offset.x;
@@ -16467,9 +16764,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
16467
16764
  element.style.transform = 'translate(-50%, -50%)';
16468
16765
  }
16469
16766
  else {
16470
- var elementOffset = element.getBoundingClientRect();
16471
- element.style.left = ((location_2.x + x) * scale) + marker.offset.x - this.maps.mapAreaRect.x - (elementOffset.width / 2) + 'px';
16472
- element.style.top = ((location_2.y + y) * scale) + marker.offset.y - this.maps.mapAreaRect.y - (elementOffset.height / 2) + 'px';
16767
+ element.style.left = ((location_2.x + x) * scale) + marker.offset.x - this.maps.mapAreaRect.x + 'px';
16768
+ element.style.top = ((location_2.y + y) * scale) + marker.offset.y - this.maps.mapAreaRect.y + 'px';
16473
16769
  }
16474
16770
  }
16475
16771
  else {
@@ -16556,15 +16852,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
16556
16852
  if (!panArgs.cancel) {
16557
16853
  if (panningXDirection && panningYDirection) {
16558
16854
  map.translatePoint = new Point(x, y);
16559
- this.applyTransform(map, false, true);
16855
+ this.applyTransform(map, false, false, true);
16560
16856
  }
16561
16857
  else if (panningXDirection) {
16562
16858
  map.translatePoint = new Point(x, map.translatePoint.y);
16563
- this.applyTransform(map, false, true);
16859
+ this.applyTransform(map, false, false, true);
16564
16860
  }
16565
16861
  else if (panningYDirection) {
16566
16862
  map.translatePoint = new Point(map.translatePoint.x, y);
16567
- this.applyTransform(map, false, true);
16863
+ this.applyTransform(map, false, false, true);
16568
16864
  }
16569
16865
  }
16570
16866
  this.maps.zoomNotApplied = false;
@@ -16593,7 +16889,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
16593
16889
  };
16594
16890
  map.trigger(pan, panArgs);
16595
16891
  map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint, 'Pan');
16596
- this.applyTransform(map, false, true);
16892
+ this.applyTransform(map, false, false, true);
16597
16893
  map.translatePoint.x = (map.tileTranslatePoint.x - xDifference) / map.scale;
16598
16894
  map.translatePoint.y = (map.tileTranslatePoint.y - yDifference) / map.scale;
16599
16895
  }
@@ -16623,6 +16919,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
16623
16919
  var size = map.mapAreaRect;
16624
16920
  var translatePoint = map.previousPoint = map.translatePoint;
16625
16921
  var prevTilePoint = map.tileTranslatePoint;
16922
+ this.maps.mergeCluster();
16626
16923
  map.previousProjection = type === 'Reset' ? undefined : map.projectionType;
16627
16924
  zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
16628
16925
  zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
@@ -16663,7 +16960,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
16663
16960
  map.scale = map.previousScale;
16664
16961
  }
16665
16962
  else {
16666
- this.applyTransform(map, true);
16963
+ this.applyTransform(map, false, true);
16667
16964
  }
16668
16965
  }
16669
16966
  else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
@@ -16700,7 +16997,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
16700
16997
  map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
16701
16998
  var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
16702
16999
  setTimeout(function () {
16703
- _this.applyTransform(_this.maps, true);
17000
+ _this.applyTransform(_this.maps, false, true);
16704
17001
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
16705
17002
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
16706
17003
  }
@@ -17300,6 +17597,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
17300
17597
  var delta = 1;
17301
17598
  var staticMaxZoomLevel = map.zoomSettings.maxZoom;
17302
17599
  var value = (map.isTileMap) ? prevLevel : prevScale;
17600
+ this.maps.mergeCluster();
17303
17601
  if (((position.x > map.mapAreaRect.x) && (position.x < (map.mapAreaRect.x + map.mapAreaRect.width))) &&
17304
17602
  (position.y > map.mapAreaRect.y) && position.y < (map.mapAreaRect.y + map.mapAreaRect.height)) {
17305
17603
  e.preventDefault();
@@ -17312,11 +17610,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
17312
17610
  map.staticMapZoom = map.tileZoomLevel;
17313
17611
  if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
17314
17612
  map.staticMapZoom += 1;
17315
- this.performZooming(position, (value + delta), direction);
17613
+ this.performZooming(position, (value + delta), direction, true);
17316
17614
  }
17317
17615
  }
17318
17616
  else {
17319
- this.performZooming(position, (value + delta), direction);
17617
+ this.performZooming(position, (value + delta), direction, true);
17320
17618
  }
17321
17619
  }
17322
17620
  else {
@@ -17330,7 +17628,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
17330
17628
  if (map.staticMapZoom > 1 && map.staticMapZoom < staticMaxZoomLevel) {
17331
17629
  map.staticMapZoom -= 1;
17332
17630
  }
17333
- this.performZooming(position, (value - delta), direction);
17631
+ this.performZooming(position, (value - delta), direction, true);
17334
17632
  }
17335
17633
  }
17336
17634
  this.removeToolbarOpacity(map.mapScaleValue, (!this.maps.isDevice ? (!isNullOrUndefined(e.target) ? e.target['id'] :
@@ -17651,6 +17949,16 @@ var Zoom = /** @__PURE__ @class */ (function () {
17651
17949
  this.maps.off(Browser.touchStartEvent, this.mouseDownHandler);
17652
17950
  this.maps.off(Browser.touchEndEvent, this.mouseUpHandler);
17653
17951
  EventHandler.remove(this.maps.element, this.cancelEvent, this.mouseCancelHandler);
17952
+ var toolbarElement = document.getElementById(this.maps.element.id + '_Zooming_KitCollection');
17953
+ if (toolbarElement) {
17954
+ for (var i = 0; i < toolbarElement.childNodes.length; i++) {
17955
+ if (toolbarElement.childNodes[i].tagName === 'g') {
17956
+ EventHandler.add(toolbarElement.childNodes[i], Browser.touchStartEvent, this.performToolBarAction);
17957
+ EventHandler.add(toolbarElement.childNodes[i], 'mouseover', this.showTooltip);
17958
+ EventHandler.add(toolbarElement.childNodes[i], 'mouseout', this.removeTooltip);
17959
+ }
17960
+ }
17961
+ }
17654
17962
  };
17655
17963
  /**
17656
17964
  * Get module name.
@@ -17685,7 +17993,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
17685
17993
  this.layerCollectionEle = null;
17686
17994
  this.currentLayer = null;
17687
17995
  this.pinchDistance = null;
17688
- this.maps = null;
17689
17996
  };
17690
17997
  return Zoom;
17691
17998
  }());
@@ -17743,12 +18050,12 @@ var Print = /** @__PURE__ @class */ (function () {
17743
18050
  backgroundElement = backgroundElement.childNodes[0];
17744
18051
  if (!isNullOrUndefined(backgroundElement)) {
17745
18052
  var backgroundColor = backgroundElement.getAttribute('fill');
17746
- if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
18053
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Tailwind3' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
17747
18054
  maps.theme === 'Fluent2')
17748
18055
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17749
18056
  backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
17750
18057
  }
17751
- else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
18058
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Tailwind3Dark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
17752
18059
  maps.theme === 'Fluent2Dark' || maps.theme === 'Fluent2HighContrast')
17753
18060
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17754
18061
  backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
@@ -17853,11 +18160,11 @@ var ImageExport = /** @__PURE__ @class */ (function () {
17853
18160
  var svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
17854
18161
  var backgroundElement = svgObject.childNodes[0];
17855
18162
  var backgroundColor = backgroundElement.getAttribute('fill');
17856
- if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' || maps.theme === 'Fluent2')
18163
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Tailwind3' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' || maps.theme === 'Fluent2')
17857
18164
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17858
18165
  svgObject.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
17859
18166
  }
17860
- else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
18167
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Tailwind3Dark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
17861
18168
  maps.theme === 'Fluent2Dark' || maps.theme === 'Fluent2HighContrast')
17862
18169
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17863
18170
  svgObject.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
@@ -17913,8 +18220,8 @@ var ImageExport = /** @__PURE__ @class */ (function () {
17913
18220
  var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
17914
18221
  var exportTileImg = new Image();
17915
18222
  exportTileImg.crossOrigin = 'Anonymous';
17916
- var background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
17917
- (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
18223
+ var background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Tailwind3' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
18224
+ (maps.theme === 'TailwindDark' || maps.theme === 'Tailwind3Dark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
17918
18225
  ctxt_1.fillStyle = background;
17919
18226
  ctxt_1.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
17920
18227
  ctxt_1.font = maps.titleSettings.textStyle.size + ' Arial';
@@ -18044,12 +18351,12 @@ var PdfExport = /** @__PURE__ @class */ (function () {
18044
18351
  var exportElement = maps.svgObject.cloneNode(true);
18045
18352
  var backgroundElement = exportElement.childNodes[0];
18046
18353
  var backgroundColor = backgroundElement.getAttribute('fill');
18047
- if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
18354
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Tailwind3' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
18048
18355
  maps.theme === 'Fluent2')
18049
18356
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
18050
18357
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
18051
18358
  }
18052
- else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
18359
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Tailwind3Dark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
18053
18360
  maps.theme === 'Fluent2Dark' || maps.theme === 'Fluent2HighContrast')
18054
18361
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
18055
18362
  exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
@@ -18089,8 +18396,8 @@ var PdfExport = /** @__PURE__ @class */ (function () {
18089
18396
  var tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
18090
18397
  var tileImg = new Image();
18091
18398
  tileImg.crossOrigin = 'Anonymous';
18092
- var background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
18093
- (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
18399
+ var background = maps.background ? maps.background : ((maps.theme === 'Tailwind' || maps.theme === 'Tailwind3' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) ? '#ffffff' :
18400
+ (maps.theme === 'TailwindDark' || maps.theme === 'Tailwind3Dark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
18094
18401
  ctx.fillStyle = background;
18095
18402
  ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
18096
18403
  ctx.font = maps.titleSettings.textStyle.size + ' Arial';
@@ -18175,5 +18482,5 @@ var PdfExport = /** @__PURE__ @class */ (function () {
18175
18482
  return PdfExport;
18176
18483
  }());
18177
18484
 
18178
- export { Annotation, Annotations, Arrow, BingMap, Border, Bubble, BubbleSettings, CenterPosition, CircleOption, ColorMapping, ColorMappingSettings, ColorValue, CommonTitleSettings, ConnectorLineSettings, Coordinate, DataLabel, DataLabelSettings, Font, GeoLocation, Highlight, HighlightSettings, ImageExport, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, Internalize, LayerPanel, LayerSettings, Legend, LegendSettings, Line, LineOption, MapAjax, MapLocation, Maps, MapsAreaSettings, MapsTooltip, Margin, Marker, MarkerBase, MarkerClusterData, MarkerClusterSettings, MarkerSettings, MinMax, NavigationLine, NavigationLineSettings, PathOption, PatternOptions, PdfExport, Point, Polygon, PolygonOption, PolygonSetting, PolygonSettings, PolygonTooltipSettings, PolylineOption, Print, Rect, RectOption, Selection, SelectionSettings, ShapeSettings, Size, SubTitleSettings, TextOption, Tile, TitleSettings, ToggleLegendSettings, TooltipSettings, Zoom, ZoomSettings, ZoomToolbarButtonSettings, ZoomToolbarSettings, ZoomToolbarTooltipSettings, acos, aitoff, animate, animationComplete, annotationRendering, appendShape, beforePrint, bubbleClick, bubbleMouseMove, bubbleRendering, calculateBound, calculateCenterFromPixel, calculatePolygonPath, calculateScale, calculateShapes, calculateSize, calculateZoomLevel, changeBorderWidth, changeNavaigationLineWidth, checkPropertyPath, checkShapeDataFields, click, clusterSeparate, clusterTemplate, compareZoomFactor, convertElement, convertElementFromLabel, convertGeoToPoint, convertStringToValue, convertTileLatLongToPoint, createStyle, createSvg, createTooltip, customizeStyle, dataLabelRendering, degreesToRadians, doubleClick, drawBalloon, drawCircle, drawCross, drawDiamond, drawHorizontalLine, drawLine, drawPath, drawPattern, drawPolygon, drawPolyline, drawRectangle, drawStar, drawSymbol, drawSymbols, drawTriangle, drawVerticalLine, elementAnimate, filter, findMidPointOfPolygon, findPosition, fixInitialScaleForTile, formatValue, getClientElement, getDistance, getElement, getElementByID, getElementOffset, getElementsByClassName, getFieldData, getHexColor, getMousePosition, getProcessedMarginValue, getRatioOfBubble, getShapeData, getTargetElement, getTemplateFunction, getTouchCenter, getTouches, getTranslate, getValueFromObject, getZoomTranslate, isCustomPath, itemHighlight, itemSelection, layerRendering, legendRendering, load, loaded, maintainSelection, maintainStyleClass, maintainToggleSelection, marker, markerBoundsComparer, markerClick, markerClusterClick, markerClusterListHandler, markerClusterMouseMove, markerClusterRendering, markerColorChoose, markerDragEnd, markerDragStart, markerMouseMove, markerRendering, markerShapeChoose, markerTemplate, measureText, measureTextElement, mergeSeparateCluster, mousedown, mousemove, mouseup, onclick, pan, panComplete, processResult, querySelector, radiansToDegrees, removeClass, removeElement, renderLegendShape, renderTextElement, resize, rightClick, roundTo, shapeHighlight, shapeRendering, shapeSelected, showTooltip, sinci, smoothTranslate, stringToNumber, sum, targetTouches, textTrim, timeout, tooltipRender, triggerDownload, triggerItemSelectionEvent, triggerShapeEvent, wordWrap, xToCoordinate, yToCoordinate, zoomAnimate, zoomComplete, zoomIn, zoomOut };
18485
+ export { Annotation, Annotations, Arrow, BingMap, Border, Bubble, BubbleSettings, CenterPosition, CircleOption, ColorMapping, ColorMappingSettings, ColorValue, CommonTitleSettings, ConnectorLineSettings, Coordinate, DataLabel, DataLabelSettings, Font, GeoLocation, Highlight, HighlightSettings, ImageExport, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, Internalize, LayerPanel, LayerSettings, Legend, LegendSettings, Line, LineOption, MapAjax, MapLocation, Maps, MapsAreaSettings, MapsTooltip, Margin, Marker, MarkerBase, MarkerClusterData, MarkerClusterSettings, MarkerSettings, MinMax, NavigationLine, NavigationLineSettings, PathOption, PatternOptions, PdfExport, Point, Polygon, PolygonOption, PolygonSetting, PolygonSettings, PolygonTooltipSettings, PolylineOption, Print, Rect, RectOption, Selection, SelectionSettings, ShapeSettings, Size, SubTitleSettings, TextOption, Tile, TitleSettings, ToggleLegendSettings, TooltipSettings, Zoom, ZoomSettings, ZoomToolbarButtonSettings, ZoomToolbarSettings, ZoomToolbarTooltipSettings, acos, aitoff, animate, animationComplete, annotationRendering, appendShape, beforePrint, bubbleClick, bubbleMouseMove, bubbleRendering, calculateBound, calculateCenterFromPixel, calculatePolygonPath, calculateScale, calculateShapes, calculateSize, calculateZoomLevel, changeBorderWidth, changeNavaigationLineWidth, checkPropertyPath, checkShapeDataFields, click, clusterSeparate, clusterTemplate, compareZoomFactor, convertElement, convertElementFromLabel, convertGeoToPoint, convertStringToValue, convertTileLatLongToPoint, createStyle, createSvg, createTooltip, customizeStyle, dataLabelRendering, degreesToRadians, doubleClick, drawBalloon, drawCircle, drawCross, drawDiamond, drawHorizontalLine, drawLine, drawPath, drawPattern, drawPolygon, drawPolyline, drawRectangle, drawStar, drawSymbol, drawSymbols, drawTriangle, drawVerticalLine, elementAnimate, filter, findMidPointOfPolygon, findPosition, fixInitialScaleForTile, formatValue, getDistance, getElement, getElementByID, getElementOffset, getElementsByClassName, getFieldData, getHexColor, getMousePosition, getProcessedMarginValue, getRatioOfBubble, getShapeData, getTargetElement, getTemplateFunction, getTouchCenter, getTouches, getTranslate, getValueFromObject, getZoomTranslate, isCustomPath, itemHighlight, itemSelection, layerRendering, legendRendering, load, loaded, maintainSelection, maintainStyleClass, maintainToggleSelection, marker, markerBoundsComparer, markerClick, markerClusterClick, markerClusterListHandler, markerClusterMouseMove, markerClusterRendering, markerColorChoose, markerDragEnd, markerDragStart, markerMouseMove, markerRendering, markerShapeChoose, markerTemplate, measureText, measureTextElement, mergeSeparateCluster, mouseMove, mousedown, mousemove, mouseup, onclick, pan, panComplete, processResult, querySelector, radiansToDegrees, removeClass, removeElement, renderLegendShape, renderTextElement, resize, rightClick, roundTo, shapeHighlight, shapeRendering, shapeSelected, showTooltip, sinci, smoothTranslate, stringToNumber, sum, targetTouches, textTrim, timeout, tooltipRender, triggerDownload, triggerItemSelectionEvent, triggerShapeEvent, wordWrap, xToCoordinate, yToCoordinate, zoomAnimate, zoomComplete, zoomIn, zoomOut };
18179
18486
  //# sourceMappingURL=ej2-maps.es5.js.map