@syncfusion/ej2-maps 27.1.56 → 28.1.33

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 +37 -0
  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 +528 -224
  7. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  8. package/dist/es6/ej2-maps.es5.js +537 -233
  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/legend.d.ts +1 -1
  15. package/src/maps/layers/legend.js +40 -38
  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 +53 -15
  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 +13 -1
  33. package/src/maps/user-interaction/zoom.js +139 -91
  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
@@ -424,13 +424,14 @@ function measureText(text, font) {
424
424
  * @private
425
425
  */
426
426
  function measureTextElement(text, font) {
427
- const canvas = document.createElement('canvas');
427
+ let canvas = document.createElement('canvas');
428
428
  // eslint-disable-next-line @typescript-eslint/tslint/config
429
429
  const context = canvas.getContext('2d');
430
430
  context.font = `${font.fontStyle} ${font.fontWeight} ${typeof font.size === 'number' ? font.size + 'px' : font.size} ${font.fontFamily}`;
431
431
  const metrics = context.measureText(text);
432
432
  const width = metrics.width;
433
433
  const height = parseFloat(font.size) || 16;
434
+ canvas = null;
434
435
  return new Size(width, height);
435
436
  }
436
437
  /**
@@ -925,14 +926,19 @@ function updateImageUrl(eventArgs, data) {
925
926
  * @param {HTMLElement | Element} markerTemplate - Specifies the marker template
926
927
  * @param {Maps} maps - Specifies the instance of the maps
927
928
  * @param {number} layerIndex - Specifies the layer index
929
+ * @param {number} markerIndex - Specifies the marker index
928
930
  * @param {Element} markerCollection - Specifies the marker collection
929
931
  * @param {Element} layerElement - Specifies the layer element
930
932
  * @param {boolean} check - Specifies the boolean value
931
933
  * @param {boolean} zoomCheck - Specifies the boolean value
934
+ * @param {any} translatePoint - Specifies the data
935
+ * @param {boolean} allowInnerClusterSetting - Specifies the boolean value
932
936
  * @returns {boolean} -Returns boolean for cluster completion
933
937
  * @private
934
938
  */
935
- function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerCollection, layerElement, check, zoomCheck) {
939
+ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerIndex, markerCollection,
940
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
941
+ layerElement, check, zoomCheck, translatePoint, allowInnerClusterSetting) {
936
942
  let bounds1;
937
943
  let bounds2;
938
944
  let colloideBounds = [];
@@ -941,7 +947,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
941
947
  let tempY = 0;
942
948
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
943
949
  let data;
944
- const style = currentLayer.markerClusterSettings.labelStyle;
950
+ const markerSetting = currentLayer.markerSettings[markerIndex];
945
951
  let options;
946
952
  let textElement;
947
953
  let tempElement1;
@@ -951,7 +957,9 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
951
957
  const postionY = (15 / 4);
952
958
  let m = 0;
953
959
  let indexCollection = [];
954
- const clusters = currentLayer.markerClusterSettings;
960
+ const clusters = !allowInnerClusterSetting && currentLayer.markerClusterSettings.allowClustering ?
961
+ currentLayer.markerClusterSettings : markerSetting.clusterSettings;
962
+ const style = clusters.labelStyle;
955
963
  const clusterGroup = maps.renderer.createGroup({ id: maps.element.id + '_LayerIndex_' + layerIndex + '_markerCluster' });
956
964
  const eventArg = {
957
965
  cancel: false, name: markerClusterRendering, fill: clusters.fill, height: clusters.height,
@@ -967,9 +975,13 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
967
975
  }
968
976
  let isClusteringCompleted = false;
969
977
  const currentZoomFactor = !maps.isTileMap ? maps.mapScaleValue : maps.tileZoomLevel;
978
+ const markerGroup = (markerSetting.clusterSettings.allowClustering
979
+ || (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1))
980
+ ? markerTemplate.querySelectorAll(`[id*='LayerIndex_${layerIndex}_MarkerIndex_${markerIndex}']:not([id*='_Group'])`)
981
+ : markerTemplate.childNodes;
970
982
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
971
983
  maps.trigger('markerClusterRendering', eventArg, (clusterargs) => {
972
- Array.prototype.forEach.call(markerTemplate.childNodes, (markerElement, o) => {
984
+ Array.prototype.forEach.call(markerGroup, (markerElement, o) => {
973
985
  indexCollection = [];
974
986
  if (markerElement['style']['visibility'] !== 'hidden') {
975
987
  tempElement = markerElement;
@@ -979,19 +991,19 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
979
991
  const list = (maps.markerModule.zoomedMarkerCluster.length > 0 && maps.markerModule.zoomedMarkerCluster[layerIndex] && maps.markerModule.zoomedMarkerCluster[layerIndex][o] && maps.markerModule.zoomedMarkerCluster[layerIndex][o].length > 0)
980
992
  || (maps.markerModule.initialMarkerCluster.length > 0 && maps.markerModule.initialMarkerCluster[layerIndex] && maps.markerModule.initialMarkerCluster[layerIndex][o] && maps.markerModule.initialMarkerCluster[layerIndex][o].length > 0) ?
981
993
  (maps.previousScale < currentZoomFactor ? maps.markerModule.zoomedMarkerCluster[layerIndex][o] : maps.markerModule.initialMarkerCluster[layerIndex][o]) : null;
982
- if (!isNullOrUndefined(list) && list.length !== 0) {
994
+ if (!isNullOrUndefined(list) && list.length !== 0 && !markerSetting.clusterSettings.allowClustering) {
983
995
  Array.prototype.forEach.call(list, (currentIndex) => {
984
996
  if (o !== currentIndex) {
985
997
  const otherMarkerElement = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
986
- + 0 + '_dataIndex_' + currentIndex);
987
- if (otherMarkerElement['style']['visibility'] !== 'hidden') {
998
+ + markerIndex + '_dataIndex_' + currentIndex);
999
+ if (otherMarkerElement && otherMarkerElement['style']['visibility'] !== 'hidden') {
988
1000
  markerBoundsComparer(otherMarkerElement, bounds1, colloideBounds, indexCollection, currentIndex);
989
1001
  }
990
1002
  }
991
1003
  });
992
1004
  }
993
1005
  else {
994
- Array.prototype.forEach.call(markerTemplate.childNodes, (otherMarkerElement, p) => {
1006
+ Array.prototype.forEach.call(markerGroup, (otherMarkerElement, p) => {
995
1007
  if (p >= o + 1 && otherMarkerElement['style']['visibility'] !== 'hidden') {
996
1008
  markerBoundsComparer(otherMarkerElement, bounds1, colloideBounds, indexCollection, p);
997
1009
  }
@@ -1023,7 +1035,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1023
1035
  if (!maps.isTileMap) {
1024
1036
  location = convertGeoToPoint(latitude, longitude, factor, currentLayer, maps);
1025
1037
  }
1026
- else if (maps.isTileMap && !maps.zoomSettings.enable) {
1038
+ else if (maps.isTileMap) {
1027
1039
  location = convertTileLatLongToPoint(new Point(longitude, latitude), maps.tileZoomLevel, maps.tileTranslatePoint, true);
1028
1040
  }
1029
1041
  markerElement['style']['visibility'] = 'hidden';
@@ -1048,10 +1060,14 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1048
1060
  }
1049
1061
  tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX : tempX + postionY - (eventArg.width / 2);
1050
1062
  tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY : tempY - (eventArg.height / 2);
1051
- if (maps.isTileMap && !maps.zoomSettings.enable) {
1063
+ if (maps.isTileMap) {
1052
1064
  tempX = location.x;
1053
1065
  tempY = location.y;
1054
1066
  }
1067
+ else {
1068
+ tempX = (((location.x + ((!isNullOrUndefined(maps.translatePoint) && maps.translatePoint.x !== 0 && !maps.isResize) ? maps.translatePoint.x : translatePoint.location.x)) * (isNullOrUndefined(maps.scale) ? translatePoint.scale : maps.scale)) + markerSetting.offset.x);
1069
+ tempY = (((location.y + ((!isNullOrUndefined(maps.translatePoint) && maps.translatePoint.y !== 0 && !maps.isResize) ? maps.translatePoint.y : translatePoint.location.y)) * (isNullOrUndefined(maps.scale) ? translatePoint.scale : maps.scale)) + markerSetting.offset.y);
1070
+ }
1055
1071
  const clusterID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_cluster_' + (m);
1056
1072
  const labelID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_cluster_' + (m) + '_datalabel_' + m;
1057
1073
  m++;
@@ -1066,8 +1082,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1066
1082
  options = new TextOption(labelID, (0), postionY, 'middle', (colloideBounds.length + 1).toString(), '', '');
1067
1083
  textElement = renderTextElement(options, style, style.color, markerCollection);
1068
1084
  textElement.setAttribute('transform', 'translate( ' + tempX + ' ' + tempY + ' )');
1069
- clusterGroup.appendChild(textElement);
1070
- clusterGroup.appendChild(ele);
1085
+ const eleMarkerIndex = parseFloat(ele.id.split('_MarkerIndex_')[1]);
1086
+ if ((markerSetting.clusterSettings.allowClustering && eleMarkerIndex === markerIndex) ||
1087
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1 && eleMarkerIndex === markerIndex)) {
1088
+ clusterGroup.appendChild(ele);
1089
+ clusterGroup.appendChild(textElement);
1090
+ }
1091
+ else {
1092
+ clusterGroup.appendChild(textElement);
1093
+ clusterGroup.appendChild(ele);
1094
+ }
1071
1095
  }
1072
1096
  }
1073
1097
  colloideBounds = [];
@@ -1080,7 +1104,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1080
1104
  layerElement.appendChild(clusterGroup);
1081
1105
  maps.svgObject.appendChild(layerElement);
1082
1106
  maps.element.appendChild(maps.svgObject);
1083
- if (clusters.allowDeepClustering) {
1107
+ if (clusters.allowDeepClustering && !allowInnerClusterSetting) {
1084
1108
  Array.prototype.forEach.call(clusterGroup.childNodes, (clusterElement, o) => {
1085
1109
  if (clusterElement['style']['visibility'] !== 'hidden') {
1086
1110
  tempElement = clusterElement;
@@ -1096,7 +1120,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1096
1120
  clusterColloideBounds.push(tempElement1);
1097
1121
  clusterColloideBounds.push(clusterGroup.childNodes[p - 1]);
1098
1122
  clusterGroup.childNodes[p]['style']['visibility'] = 'hidden';
1099
- clusterGroup.childNodes[p - 1]['style']['visibility'] = 'hidden';
1123
+ let eleMarkerIndex = !isNullOrUndefined(clusterGroup.childNodes[p + 1]) ?
1124
+ parseFloat(clusterGroup.childNodes[p + 1].id.split('_MarkerIndex_')[1]) : null;
1125
+ if ((markerSetting.clusterSettings.allowClustering && eleMarkerIndex === markerIndex) ||
1126
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1 && eleMarkerIndex === markerIndex)) {
1127
+ clusterGroup.childNodes[p + 1]['style']['visibility'] = 'hidden';
1128
+ }
1129
+ else {
1130
+ eleMarkerIndex = parseFloat(clusterGroup.childNodes[p - 1].id.split('_MarkerIndex_')[1]);
1131
+ clusterGroup.childNodes[p - 1]['style']['visibility'] = (eleMarkerIndex === markerIndex) ? 'hidden' : clusterGroup.childNodes[p - 1]['style']['visibility'];
1132
+ }
1100
1133
  indexCollection.push(p);
1101
1134
  }
1102
1135
  }
@@ -1112,7 +1145,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1112
1145
  else {
1113
1146
  tempElement.textContent = tempElement.textContent + ',' + clusterColloideBounds[i].textContent;
1114
1147
  }
1115
- clusterGroup.childNodes[o - 1].textContent = ((+(clusterGroup.childNodes[o - 1].textContent)) + (+(clusterColloideBounds[i + 1].textContent))).toString();
1148
+ let eleMarkerIndex = parseFloat(clusterGroup.childNodes[o + 1].id.split('_MarkerIndex_')[1]);
1149
+ if ((markerSetting.clusterSettings.allowClustering && eleMarkerIndex === markerIndex) ||
1150
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1 && eleMarkerIndex === markerIndex)) {
1151
+ clusterGroup.childNodes[o + 1].textContent = ((+(clusterGroup.childNodes[o + 1].textContent)) + (+(clusterColloideBounds[i + 1].textContent))).toString();
1152
+ }
1153
+ else {
1154
+ eleMarkerIndex = parseFloat(clusterGroup.childNodes[o - 1].id.split('_MarkerIndex_')[1]);
1155
+ clusterGroup.childNodes[o - 1].textContent = (eleMarkerIndex === markerIndex) ?
1156
+ ((+(clusterGroup.childNodes[o - 1].textContent)) + (+(clusterColloideBounds[i + 1].textContent))).toString() : clusterGroup.childNodes[o - 1].textContent;
1157
+ }
1116
1158
  i++;
1117
1159
  }
1118
1160
  }
@@ -1122,7 +1164,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1122
1164
  });
1123
1165
  }
1124
1166
  while (0 < clusterGroup.childNodes.length) {
1125
- markerCollection.insertBefore(clusterGroup.childNodes[0], markerCollection.firstChild);
1167
+ const eleMarkerIndex = parseFloat(clusterGroup.childNodes[0].id.split('_MarkerIndex_')[1]);
1168
+ if ((markerSetting.clusterSettings.allowClustering && eleMarkerIndex === markerIndex) ||
1169
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1 && eleMarkerIndex === markerIndex)) {
1170
+ markerCollection.insertBefore(clusterGroup.childNodes[0], null);
1171
+ }
1172
+ else {
1173
+ if (eleMarkerIndex === markerIndex) {
1174
+ markerCollection.insertBefore(clusterGroup.childNodes[0], markerCollection.firstChild);
1175
+ }
1176
+ }
1126
1177
  }
1127
1178
  if (!check) {
1128
1179
  getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
@@ -1228,6 +1279,10 @@ function mergeSeparateCluster(sameMarkerData, maps) {
1228
1279
  for (let i = 0; i < markerDataLength; i++) {
1229
1280
  markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1230
1281
  markerEle['style']['visibility'] = 'hidden';
1282
+ if (markerEle.id.indexOf('Group') > -1) {
1283
+ const marker = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1284
+ marker['style']['visibility'] = 'hidden';
1285
+ }
1231
1286
  }
1232
1287
  removeElement(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine');
1233
1288
  }
@@ -1249,17 +1304,22 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1249
1304
  const getElementFunction = isDom ? getElement : markerElement.querySelector.bind(markerElement);
1250
1305
  const getQueryConnect = isDom ? '' : '#';
1251
1306
  const markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
1252
- const marker = maps.layers[layerIndex].markerSettings[markerIndex];
1307
+ const layer = maps.layers[layerIndex];
1308
+ const allowInnerClusterSetting = maps.markerModule.allowInnerClusterSetting(layer);
1309
+ const cluster = !allowInnerClusterSetting && layer.markerClusterSettings.allowClustering ?
1310
+ layer.markerClusterSettings : layer.markerSettings[markerIndex].clusterSettings;
1311
+ const marker = layer.markerSettings[markerIndex];
1253
1312
  const clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
1254
- const clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + clusterId + '_Group') : getElementFunction(getQueryConnect + '' + clusterId);
1313
+ const clusterEle = cluster.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + clusterId + '_Group') : getElementFunction(getQueryConnect + '' + clusterId);
1255
1314
  const clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
1256
1315
  clusterEle.setAttribute('visibility', 'hidden');
1257
1316
  clusterEleLabel.setAttribute('visibility', 'hidden');
1258
1317
  let markerEle = marker.shape === 'Balloon' && isNullOrUndefined(marker.template) ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
1259
1318
  const height = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().height : marker.height;
1260
- const width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
1319
+ let width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
1261
1320
  const centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
1262
1321
  const centerY = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[1].split(')')[0].trim();
1322
+ width = (typeof width === 'string' ? parseFloat(width) : width);
1263
1323
  let radius = width + 5;
1264
1324
  let area = 2 * 3.14 * radius;
1265
1325
  let totalMarker = 0;
@@ -1302,14 +1362,20 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1302
1362
  markerEle.setAttribute('transform', 'translate( ' + x1 + ' ' + y1 + ')');
1303
1363
  }
1304
1364
  markerEle['style']['visibility'] = 'visible';
1365
+ if (markerEle.id.indexOf('Group') > -1) {
1366
+ const marker = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
1367
+ marker['style']['visibility'] = 'visible';
1368
+ }
1305
1369
  newAngle += angle;
1306
1370
  }
1307
- const connectorLine = maps.layers[layerIndex].markerClusterSettings.connectorLineSettings;
1371
+ const connectorLine = cluster.connectorLineSettings;
1308
1372
  const options = {
1309
1373
  d: path, id: maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_markerClusterConnectorLine', stroke: connectorLine.color,
1310
1374
  'fill-opacity': connectorLine.opacity, 'stroke-opacity': connectorLine.opacity, 'stroke-width': connectorLine.width
1311
1375
  };
1312
1376
  markerElement = isDom ? getElementFunction(maps.element.id + '_Markers_Group') : markerElement;
1377
+ const layerElement = getElementFunction(maps.element.id + '_LayerIndex_' + layerIndex);
1378
+ markerElement = layerElement.querySelector('#' + markerElement.id);
1313
1379
  const groupEle = maps.renderer.createGroup({ id: maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine' });
1314
1380
  groupEle.appendChild(maps.renderer.drawPath(options));
1315
1381
  if (marker.shape === 'Balloon') {
@@ -1389,8 +1455,9 @@ function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, mark
1389
1455
  for (let i = 0; i < markerElement.children.length; i++) {
1390
1456
  markerElement.children[i].style.pointerEvents = 'auto';
1391
1457
  }
1392
- markerElement.style.left = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x - maps.mapAreaRect.x + 'px';
1393
- markerElement.style.top = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y - maps.mapAreaRect.y + 'px';
1458
+ markerElement.style.left = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x - (maps.isTileMap ? 0 : maps.mapAreaRect.x) + 'px';
1459
+ markerElement.style.top = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y - (maps.isTileMap ? 0 : maps.mapAreaRect.y) + 'px';
1460
+ markerElement.style.transform = 'translate(-50%, -50%)';
1394
1461
  markerTemplate.appendChild(markerElement);
1395
1462
  }
1396
1463
  return markerTemplate;
@@ -2455,22 +2522,6 @@ function fixInitialScaleForTile(map) {
2455
2522
  function getElementByID(id) {
2456
2523
  return document.getElementById(id);
2457
2524
  }
2458
- /**
2459
- * Function to get clientElement from id.
2460
- *
2461
- * @param {string} id - Specifies the id
2462
- * @returns {Element} - Returns the element
2463
- * @private
2464
- */
2465
- function getClientElement(id) {
2466
- const element = document.getElementById(id);
2467
- if (!isNullOrUndefined(element)) {
2468
- return element.getClientRects()[0];
2469
- }
2470
- else {
2471
- return null;
2472
- }
2473
- }
2474
2525
  /**
2475
2526
  * Function to return the number value for the string value.
2476
2527
  *
@@ -2763,7 +2814,7 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius = 0)
2763
2814
  const centerX = point.x;
2764
2815
  const centerY = point.y;
2765
2816
  let height = 0;
2766
- const transform = element.getAttribute('transform') || '';
2817
+ let transform = element.getAttribute('transform') || '';
2767
2818
  new Animation({}).animate(element, {
2768
2819
  duration: (duration === 0 && animationMode === 'Enable') ? 1000 : duration,
2769
2820
  delay: delay,
@@ -2779,6 +2830,11 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius = 0)
2779
2830
  element.setAttribute('transform', 'translate( ' + (centerX - (radius * height)) + ' ' + (centerY - (radius * height)) +
2780
2831
  ' ) scale(' + height + ')');
2781
2832
  }
2833
+ else {
2834
+ if (maps.zoomModule.isPanningInProgress) {
2835
+ transform = element.getAttribute('transform');
2836
+ }
2837
+ }
2782
2838
  },
2783
2839
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
2784
2840
  end: (model) => {
@@ -3710,6 +3766,12 @@ function getShapeColor(theme) {
3710
3766
  themePalette = ['#10B981', '#22D3EE', '#2DD4BF', '#4ADE80', '#8B5CF6',
3711
3767
  '#E879F9', '#F472B6', '#F87171', '#F97316', '#FCD34D'];
3712
3768
  break;
3769
+ case 'tailwind3':
3770
+ themePalette = ['#2F4074', '#03B4B4', '#0D72DE', '#FF5733', '#D63384', '#F39C12', '#EF291F', '#91C822'];
3771
+ break;
3772
+ case 'tailwind3dark':
3773
+ themePalette = ['#8029F1', '#1ABC9C', '#0D72DE', '#FF5733', '#D63384', '#F39C12', '#EF291F', '#91C822'];
3774
+ break;
3713
3775
  case 'fluent':
3714
3776
  themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
3715
3777
  '#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
@@ -4034,6 +4096,72 @@ function getThemeStyle(theme) {
4034
4096
  zoomButtonRadius: 30
4035
4097
  };
4036
4098
  break;
4099
+ case 'tailwind3':
4100
+ style = {
4101
+ backgroundColor: 'rgba(255,255,255, 0.0)',
4102
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
4103
+ titleFontColor: '#111827',
4104
+ subTitleFontColor: '#111827',
4105
+ legendTitleFontColor: '#111827',
4106
+ legendTextColor: '#6B7280',
4107
+ dataLabelFontColor: '#111827',
4108
+ tooltipFontColor: '#F9FAFB',
4109
+ tooltipFillColor: '#111827',
4110
+ zoomFillColor: '#374151',
4111
+ fontFamily: 'Inter',
4112
+ fontSize: '12px',
4113
+ fontWeight: '400',
4114
+ titleFontSize: '14px',
4115
+ legendFontSize: '12px',
4116
+ tooltipFillOpacity: 1,
4117
+ tooltipTextOpacity: 1,
4118
+ labelFontFamily: 'Inter',
4119
+ titleFontWeight: '500',
4120
+ zoomSelectionColor: '#6B7280',
4121
+ shapeFill: '#F3F4F6',
4122
+ shapeBorderColor: '#E5E7EB',
4123
+ rectangleZoomFillColor: '#818CF8',
4124
+ rectangleZoomFillOpacity: 0.3,
4125
+ rectangleZoomBorderColor: '#4F46E5',
4126
+ legendBorderColor: '#E5E7EB',
4127
+ legendBorderWidth: 0,
4128
+ tooltipBorderColor: '#111827',
4129
+ zoomButtonRadius: 32
4130
+ };
4131
+ break;
4132
+ case 'tailwind3dark':
4133
+ style = {
4134
+ backgroundColor: 'rgba(255,255,255, 0.0)',
4135
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
4136
+ titleFontColor: '#FFFFFF',
4137
+ subTitleFontColor: '#FFFFFF',
4138
+ legendTitleFontColor: '#FFFFFF',
4139
+ legendTextColor: '#9CA3AF',
4140
+ dataLabelFontColor: '#FFFFFF',
4141
+ tooltipFontColor: '#1F2937',
4142
+ tooltipFillColor: '#F9FAFB',
4143
+ zoomFillColor: '#D1D5DB',
4144
+ fontFamily: 'Inter',
4145
+ fontSize: '12px',
4146
+ fontWeight: '400',
4147
+ titleFontSize: '14px',
4148
+ legendFontSize: '12px',
4149
+ tooltipFillOpacity: 1,
4150
+ tooltipTextOpacity: 1,
4151
+ labelFontFamily: 'Inter',
4152
+ titleFontWeight: '600',
4153
+ zoomSelectionColor: '#9CA3AF',
4154
+ shapeFill: '#282F3C',
4155
+ shapeBorderColor: '#282F3C',
4156
+ rectangleZoomFillColor: '#3730A3',
4157
+ rectangleZoomFillOpacity: 0.3,
4158
+ rectangleZoomBorderColor: '#6366F1',
4159
+ legendBorderColor: '#282F3C',
4160
+ legendBorderWidth: 0,
4161
+ tooltipBorderColor: '#F9FAFB',
4162
+ zoomButtonRadius: 30
4163
+ };
4164
+ break;
4037
4165
  case 'bootstrap5':
4038
4166
  style = {
4039
4167
  backgroundColor: 'transparent',
@@ -5238,6 +5366,12 @@ __decorate([
5238
5366
  __decorate([
5239
5367
  Property('#FF471A')
5240
5368
  ], MarkerBase.prototype, "fill", void 0);
5369
+ __decorate([
5370
+ Property(null)
5371
+ ], MarkerBase.prototype, "heightValuePath", void 0);
5372
+ __decorate([
5373
+ Property(null)
5374
+ ], MarkerBase.prototype, "widthValuePath", void 0);
5241
5375
  __decorate([
5242
5376
  Property(10)
5243
5377
  ], MarkerBase.prototype, "height", void 0);
@@ -5301,6 +5435,9 @@ __decorate([
5301
5435
  __decorate([
5302
5436
  Collection([], InitialMarkerSelectionSettings)
5303
5437
  ], MarkerBase.prototype, "initialMarkerSelection", void 0);
5438
+ __decorate([
5439
+ Complex({}, MarkerClusterSettings)
5440
+ ], MarkerBase.prototype, "clusterSettings", void 0);
5304
5441
  /**
5305
5442
  * Gets or sets the options to customize the markers in the maps.
5306
5443
  */
@@ -5546,6 +5683,12 @@ const markerClusterClick = 'markerClusterClick';
5546
5683
  * @private
5547
5684
  */
5548
5685
  const markerMouseMove = 'markerMouseMove';
5686
+ /**
5687
+ * Specifies the maps mouse move event name.
5688
+ *
5689
+ * @private
5690
+ */
5691
+ const mouseMove = 'mouseMove';
5549
5692
  /**
5550
5693
  * Specifies the maps cluster mouse move event name.
5551
5694
  *
@@ -7442,6 +7585,8 @@ let Maps = class Maps extends Component {
7442
7585
  this.isTileMap = false;
7443
7586
  /**
7444
7587
  * Resize the map
7588
+ *
7589
+ * @private
7445
7590
  */
7446
7591
  this.isResize = false;
7447
7592
  /**
@@ -8085,14 +8230,7 @@ let Maps = class Maps extends Component {
8085
8230
  -(Math.abs(elementOffset.top - layerOffset.top)) : Math.abs(elementOffset.top - layerOffset.top);
8086
8231
  }
8087
8232
  Array.prototype.forEach.call(templateGroupEle.childNodes, (currentTemplate) => {
8088
- if (currentTemplate.id.indexOf('Marker') !== -1) {
8089
- if (currentTemplate.style.visibility !== 'hidden') {
8090
- const elementOffset = getElementByID(currentTemplate.id).getBoundingClientRect();
8091
- currentTemplate.style.left = parseFloat(currentTemplate.style.left) - (this.isTileMap ? 0 : elementOffset.width / 2) + 'px';
8092
- currentTemplate.style.top = parseFloat(currentTemplate.style.top) - (this.isTileMap ? 0 : elementOffset.height / 2) + 'px';
8093
- }
8094
- }
8095
- else {
8233
+ if (currentTemplate.id.indexOf('Marker') === -1) {
8096
8234
  currentTemplate.style.left = parseFloat(currentTemplate.style.left) + offSetLetValue + 'px';
8097
8235
  currentTemplate.style.top = parseFloat(currentTemplate.style.top) + offSetTopValue + 'px';
8098
8236
  currentTemplate.style.transform = 'translate(-50%, -50%)';
@@ -8875,6 +9013,7 @@ let Maps = class Maps extends Component {
8875
9013
  // if (target.id.indexOf('shapeIndex') !== -1 && !this.highlightSettings.enable) {
8876
9014
  // triggerShapeEvent(target.id, this.highlightSettings, this, shapeHighlight);
8877
9015
  // }
9016
+ this.mouseMoveEvent(e);
8878
9017
  if (this.markerModule) {
8879
9018
  this.markerModule.markerMove(e);
8880
9019
  this.markerModule.markerClusterMouseMove(e);
@@ -8888,6 +9027,34 @@ let Maps = class Maps extends Component {
8888
9027
  this.onMouseMove(e);
8889
9028
  this.notify(Browser.touchMoveEvent, e);
8890
9029
  }
9030
+ /**
9031
+ * To check and trigger mouse move event on maps.
9032
+ *
9033
+ * @param {PointerEvent} e - Specifies the pointer event on maps.
9034
+ * @returns {void}
9035
+ * @private
9036
+ */
9037
+ mouseMoveEvent(e) {
9038
+ const targetId = e.target.id;
9039
+ let layerIndex;
9040
+ let eventArgs;
9041
+ if (this.isTileMap) {
9042
+ const latLongValue = this.getTileGeoLocation(e['layerX'], e['layerY']);
9043
+ eventArgs = {
9044
+ x: e.clientX, y: e.clientY, latitude: latLongValue.latitude,
9045
+ longitude: latLongValue.longitude, target: e.target
9046
+ };
9047
+ }
9048
+ else {
9049
+ layerIndex = targetId.indexOf('_LayerIndex_') > -1 ? parseInt(targetId.split('_LayerIndex_')[1].split('_')[0], 10) : this.baseLayerIndex;
9050
+ const latLongValue = this.getGeoLocation(layerIndex, e.clientX, e.clientY);
9051
+ eventArgs = {
9052
+ x: e.clientX, y: e.clientY, latitude: latLongValue.latitude,
9053
+ longitude: latLongValue.longitude, target: e.target
9054
+ };
9055
+ }
9056
+ this.trigger(mouseMove, eventArgs);
9057
+ }
8891
9058
  /**
8892
9059
  * This method is used to perform operations when mouse move event is performed on maps.
8893
9060
  *
@@ -9117,12 +9284,23 @@ let Maps = class Maps extends Component {
9117
9284
  */
9118
9285
  addMarker(layerIndex, markerCollection) {
9119
9286
  if (!this.isDestroyed && !isNullOrUndefined(this.markerModule)) {
9120
- const layerEle = document.getElementById(this.element.id + '_LayerIndex_' + layerIndex);
9121
- if (markerCollection.length > 0 && layerEle) {
9122
- for (const newMarker of markerCollection) {
9123
- this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
9287
+ if (!isNullOrUndefined(layerIndex) && !isNullOrUndefined(markerCollection)) {
9288
+ const layerEle = document.getElementById(this.element.id + '_LayerIndex_' + layerIndex);
9289
+ if (markerCollection.length > 0 && layerEle) {
9290
+ for (const newMarker of markerCollection) {
9291
+ this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
9292
+ }
9293
+ this.markerModule.markerRender(this, layerEle, layerIndex, this.isTileMap ? this.tileZoomLevel : this.mapLayerPanel['currentFactor'], 'AddMarker');
9294
+ this.arrangeTemplate();
9295
+ }
9296
+ }
9297
+ else {
9298
+ for (let i = 0; i < this.layers.length; i++) {
9299
+ const layerEle = document.getElementById(this.element.id + '_LayerIndex_' + i);
9300
+ this.markerModule.zoomedMarkerCluster[i] = [];
9301
+ this.markerModule.initialMarkerCluster[i] = [];
9302
+ this.markerModule.markerRender(this, layerEle, i, this.isTileMap ? this.tileZoomLevel : this.mapLayerPanel['currentFactor'], null);
9124
9303
  }
9125
- this.markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
9126
9304
  this.arrangeTemplate();
9127
9305
  }
9128
9306
  }
@@ -10102,6 +10280,9 @@ __decorate$1([
10102
10280
  __decorate$1([
10103
10281
  Event()
10104
10282
  ], Maps.prototype, "markerMouseMove", void 0);
10283
+ __decorate$1([
10284
+ Event()
10285
+ ], Maps.prototype, "mouseMove", void 0);
10105
10286
  __decorate$1([
10106
10287
  Event()
10107
10288
  ], Maps.prototype, "dataLabelRendering", void 0);
@@ -10433,7 +10614,6 @@ class Bubble {
10433
10614
  class Marker {
10434
10615
  constructor(maps) {
10435
10616
  this.maps = maps;
10436
- this.trackElements = [];
10437
10617
  this.sameMarkerData = [];
10438
10618
  this.initialMarkerCluster = [];
10439
10619
  this.zoomedMarkerCluster = [];
@@ -10450,23 +10630,43 @@ class Marker {
10450
10630
  let templateFn;
10451
10631
  let markerCount = 0;
10452
10632
  let nullCount = 0;
10633
+ let isMarkerTemplateNewCreation = false;
10453
10634
  let markerTemplateCount = 0;
10454
10635
  maps.translateType = 'marker';
10455
10636
  const currentLayer = maps.layersCollection[layerIndex];
10456
- this.markerSVGObject = maps.renderer.createGroup({
10457
- id: maps.element.id + '_Markers_Group',
10458
- class: 'GroupElement'
10459
- });
10637
+ const markerElement = layerElement.querySelectorAll('#' + maps.element.id + '_Markers_Group');
10638
+ if (markerElement.length > 0) {
10639
+ this.markerSVGObject = markerElement[0];
10640
+ this.markerSVGObject.innerHTML = '';
10641
+ isMarkerTemplateNewCreation = true;
10642
+ }
10643
+ else {
10644
+ this.markerSVGObject = maps.renderer.createGroup({
10645
+ id: maps.element.id + '_Markers_Group',
10646
+ class: 'GroupElement'
10647
+ });
10648
+ }
10460
10649
  this.markerSVGObject.style.pointerEvents = 'auto';
10461
- const markerTemplateEle = createElement('div', {
10462
- id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
10463
- className: maps.element.id + '_template'
10464
- });
10465
- markerTemplateEle.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
10466
- 'top:' + maps.mapAreaRect.y + 'px;' +
10467
- 'left:' + maps.mapAreaRect.x + 'px;' +
10468
- 'height:' + maps.mapAreaRect.height + 'px;' +
10469
- 'width:' + maps.mapAreaRect.width + 'px;';
10650
+ const secondaryElement = getElementByID(maps.element.id + '_Secondary_Element');
10651
+ const markerTemplateElement = secondaryElement.querySelectorAll('#' + maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group');
10652
+ let markerTemplateEle;
10653
+ if (markerTemplateElement && markerTemplateElement.length > 0 && markerTemplateElement[0].childElementCount > 0) {
10654
+ markerTemplateEle = getElementByID(maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group');
10655
+ markerTemplateEle.innerHTML = '';
10656
+ isMarkerTemplateNewCreation = true;
10657
+ }
10658
+ else {
10659
+ markerTemplateEle = createElement('div', {
10660
+ id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
10661
+ className: maps.element.id + '_template'
10662
+ });
10663
+ markerTemplateEle.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
10664
+ 'top:' + maps.mapAreaRect.y + 'px;' +
10665
+ 'left:' + maps.mapAreaRect.x + 'px;' +
10666
+ 'height:' + maps.mapAreaRect.height + 'px;' +
10667
+ 'width:' + maps.mapAreaRect.width + 'px;';
10668
+ }
10669
+ const allowInnerClusterSetting = this.allowInnerClusterSetting(currentLayer);
10470
10670
  const allowAnimation = (currentLayer.animationDuration !== 0 || animationMode === 'Enable') || isNullOrUndefined(maps.zoomModule);
10471
10671
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10472
10672
  let translatePoint;
@@ -10478,13 +10678,20 @@ class Marker {
10478
10678
  Array.prototype.forEach.call(currentLayer.markerSettings, (markerSettings, markerIndex) => {
10479
10679
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10480
10680
  const markerData = markerSettings.dataSource;
10681
+ markerCount = 0;
10481
10682
  if (!isNullOrUndefined(markerSettings.dataSource)) {
10482
10683
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10483
10684
  Array.prototype.forEach.call(markerData, (data, dataIndex) => {
10484
10685
  maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
10485
10686
  let eventArgs = {
10486
- cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
10487
- width: markerSettings.width, imageUrl: markerSettings.imageUrl, shape: markerSettings.shape,
10687
+ cancel: false, name: markerRendering, fill: markerSettings.fill,
10688
+ height: (!isNullOrUndefined(markerSettings.heightValuePath) &&
10689
+ !isNullOrUndefined(data[markerSettings.heightValuePath]) ?
10690
+ data[markerSettings.heightValuePath] : markerSettings.height),
10691
+ width: (!isNullOrUndefined(markerSettings.widthValuePath) &&
10692
+ !isNullOrUndefined(data[markerSettings.widthValuePath]) ?
10693
+ data[markerSettings.widthValuePath] : markerSettings.width),
10694
+ imageUrl: markerSettings.imageUrl, shape: markerSettings.shape,
10488
10695
  template: markerSettings.template, data: data, maps: maps, marker: markerSettings,
10489
10696
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
10490
10697
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
@@ -10510,12 +10717,14 @@ class Marker {
10510
10717
  const scale = type === 'AddMarker' ? maps.scale : translatePoint['scale'];
10511
10718
  const transPoint = type === 'AddMarker' ? maps.translatePoint : translatePoint['location'];
10512
10719
  if (eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
10720
+ isMarkerTemplateNewCreation = false;
10513
10721
  markerTemplateCount++;
10514
10722
  markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location, transPoint, scale, offset, maps);
10515
10723
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10516
10724
  maps.renderReactTemplates();
10517
10725
  }
10518
10726
  else if (!eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
10727
+ isMarkerTemplateNewCreation = true;
10519
10728
  markerCount++;
10520
10729
  marker(eventArgs, markerSettings, markerData, dataIndex, location, transPoint, markerID, offset, scale, maps, this.markerSVGObject);
10521
10730
  }
@@ -10527,32 +10736,55 @@ class Marker {
10527
10736
  maps.markerNullCount + 1 : maps.markerNullCount;
10528
10737
  const markerDataLength = markerData.length - maps.markerNullCount;
10529
10738
  let isMarkersClustered = false;
10530
- if (this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
10531
- layerElement.appendChild(this.markerSVGObject);
10532
- if (currentLayer.markerClusterSettings.allowClustering) {
10533
- maps.svgObject.appendChild(this.markerSVGObject);
10534
- maps.element.appendChild(maps.svgObject);
10739
+ const markerGroup = (markerSettings.clusterSettings.allowClustering ||
10740
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1))
10741
+ ? this.markerSVGObject.querySelectorAll(`[id*='LayerIndex_${layerIndex}_MarkerIndex_${markerIndex}']:not([id*='_Group'])`)
10742
+ : this.markerSVGObject.childNodes;
10743
+ const templateCount = this.markerSVGObject.childNodes === markerGroup ? markerTemplateCount : 0;
10744
+ if (markerGroup.length === (markerDataLength - templateCount - nullCount) && (type !== 'Template')) {
10745
+ if (markerElement.length === 0) {
10746
+ layerElement.appendChild(this.markerSVGObject);
10747
+ }
10748
+ if (markerSettings.clusterSettings.allowClustering || !allowInnerClusterSetting &&
10749
+ currentLayer.markerClusterSettings.allowClustering) {
10750
+ if (markerElement.length === 0) {
10751
+ maps.svgObject.appendChild(this.markerSVGObject);
10752
+ maps.element.appendChild(maps.svgObject);
10753
+ }
10535
10754
  if ((currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData))
10536
10755
  && maps.zoomSettings.enable) {
10537
- isMarkersClustered = clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, this.markerSVGObject, layerElement, true, false);
10538
- layerElement.appendChild(this.markerSVGObject);
10756
+ isMarkersClustered = clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, markerIndex, this.markerSVGObject, layerElement, true, false, null, allowInnerClusterSetting);
10757
+ if (markerElement.length === 0) {
10758
+ layerElement.appendChild(this.markerSVGObject);
10759
+ }
10539
10760
  }
10540
10761
  else {
10541
- isMarkersClustered = clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, this.markerSVGObject, layerElement, true, false);
10762
+ isMarkersClustered = clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, markerIndex, this.markerSVGObject, layerElement, true, false, translatePoint, allowInnerClusterSetting);
10542
10763
  }
10543
10764
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10544
10765
  maps.renderReactTemplates();
10545
10766
  }
10546
10767
  }
10547
- if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
10548
- getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
10768
+ const markerTemplateGroup = (markerSettings.clusterSettings.allowClustering ||
10769
+ (currentLayer.markerClusterSettings.allowClustering && currentLayer.markerSettings.length > 1))
10770
+ ? markerTemplateEle.querySelectorAll(`[id*='LayerIndex_${layerIndex}_MarkerIndex_${markerIndex}']:not([id*='_Group'])`)
10771
+ : markerTemplateEle.childNodes;
10772
+ if (markerTemplateGroup.length === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
10773
+ if (!isMarkerTemplateNewCreation) {
10774
+ getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
10775
+ }
10549
10776
  if (maps.checkInitialRender) {
10550
- if (currentLayer.markerClusterSettings.allowClustering && !isMarkersClustered) {
10551
- clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, this.markerSVGObject, layerElement, false, false);
10777
+ if ((markerSettings.clusterSettings.allowClustering || !allowInnerClusterSetting &&
10778
+ currentLayer.markerClusterSettings.allowClustering) && !isMarkersClustered) {
10779
+ clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, markerIndex, this.markerSVGObject, layerElement, false, false, translatePoint, allowInnerClusterSetting);
10552
10780
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10553
10781
  maps.renderReactTemplates();
10554
10782
  }
10555
10783
  }
10784
+ if (currentLayer.markerClusterSettings.allowClustering && markerElement.length > 0) {
10785
+ const layerCollectionEle = getElementByID(maps.element.id + '_Layer_Collections');
10786
+ layerCollectionEle.appendChild(layerElement);
10787
+ }
10556
10788
  }
10557
10789
  });
10558
10790
  });
@@ -10833,16 +11065,18 @@ class Marker {
10833
11065
  const markCollection = [];
10834
11066
  const clusterCollection = [];
10835
11067
  let marker;
10836
- this.maps.markerClusterExpand = layer.markerClusterSettings.allowClusterExpand;
10837
11068
  if (target.indexOf('_MarkerIndex_') > -1) {
10838
11069
  const markerIndex = parseInt(id[1].split('_MarkerIndex_')[1].split('_')[0], 10);
10839
11070
  const dataIndex = parseInt(id[1].split('_dataIndex_')[1].split('_')[0], 10);
10840
11071
  marker = layer.markerSettings[markerIndex];
11072
+ const allowInnerClusterSetting = this.allowInnerClusterSetting(layer);
11073
+ this.maps.markerClusterExpand = !allowInnerClusterSetting && layer.markerClusterSettings.allowClustering ?
11074
+ layer.markerClusterSettings.allowClusterExpand : marker.clusterSettings.allowClusterExpand;
10841
11075
  if (!isNaN(markerIndex)) {
10842
11076
  data = marker.dataSource[dataIndex];
10843
11077
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10844
11078
  let collection = [];
10845
- if (!marker.template && (target.indexOf('_cluster_') > -1) && (this.maps.layers[index].markerClusterSettings.allowClusterExpand)) {
11079
+ if (!marker.template && (target.indexOf('_cluster_') > -1) && this.maps.markerClusterExpand) {
10846
11080
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10847
11081
  Array.prototype.forEach.call(marker.dataSource, (location, index) => {
10848
11082
  if (location['latitude'] === data['latitude'] && location['longitude'] === data['longitude']) {
@@ -10852,8 +11086,10 @@ class Marker {
10852
11086
  }
10853
11087
  if ((target.indexOf('_cluster_') > -1)) {
10854
11088
  let isClusterSame = false;
10855
- const 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);
10856
- const indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].textContent.split(',').map(Number) : clusterElement.textContent.split(',').map(Number);
11089
+ const cluster = !allowInnerClusterSetting && layer.markerClusterSettings.allowClustering ?
11090
+ layer.markerClusterSettings : layer.markerSettings[markerIndex].clusterSettings;
11091
+ const 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);
11092
+ const indexes = cluster.shape === 'Balloon' ? clusterElement.children[0].textContent.split(',').map(Number) : clusterElement.textContent.split(',').map(Number);
10857
11093
  collection = [];
10858
11094
  for (const i of indexes) {
10859
11095
  collection.push({ data: marker.dataSource[i], index: i });
@@ -10922,6 +11158,23 @@ class Marker {
10922
11158
  };
10923
11159
  this.maps.trigger(markerClusterMouseMove, eventArgs);
10924
11160
  }
11161
+ /**
11162
+ * This method is used to return whether the clustering is enabled in any marker settings.
11163
+ *
11164
+ * @param {LayerSettings} layer - Specifies the layer settings
11165
+ * @returns {boolean} - Specifies whether the clustering is enabled in any marker settings.
11166
+ * @private
11167
+ */
11168
+ allowInnerClusterSetting(layer) {
11169
+ let allowInnerClusterSetting = false;
11170
+ for (let markerIndex = 0; markerIndex < layer.markerSettings.length; markerIndex++) {
11171
+ if (layer.markerSettings[markerIndex].clusterSettings.allowClustering) {
11172
+ allowInnerClusterSetting = true;
11173
+ break;
11174
+ }
11175
+ }
11176
+ return allowInnerClusterSetting;
11177
+ }
10925
11178
  /**
10926
11179
  * @private
10927
11180
  * @returns {void}
@@ -10948,7 +11201,6 @@ class Marker {
10948
11201
  */
10949
11202
  destroy() {
10950
11203
  this.maps = null;
10951
- this.trackElements = [];
10952
11204
  this.markerSVGObject = null;
10953
11205
  this.sameMarkerData = [];
10954
11206
  this.initialMarkerCluster = [];
@@ -11811,6 +12063,13 @@ class Legend {
11811
12063
  else {
11812
12064
  legendText = '';
11813
12065
  }
12066
+ if (legend.position === 'Left' || legend.position === 'Right') {
12067
+ for (let i = 0; i < this.legendCollection.length; i++) {
12068
+ const legendItem = this.legendCollection[i];
12069
+ const legendTextSize = measureText(legendItem['text'], legend.textStyle);
12070
+ this.textMaxWidth = Math.max(this.textMaxWidth, legendTextSize.width);
12071
+ }
12072
+ }
11814
12073
  maxTextHeight = Math.max(maxTextHeight, itemTextSize.height);
11815
12074
  maxTextWidth = Math.max(maxTextWidth, itemTextSize.width);
11816
12075
  if (itemTextSize.width > 0 && itemTextSize.height > 0) {
@@ -11820,26 +12079,26 @@ class Legend {
11820
12079
  (startY - textPadding);
11821
12080
  }
11822
12081
  else {
11823
- textX = (position === 'After') ? startX - (itemTextSize.width / 2) - textPadding
11824
- : (startX + rectWidth + itemTextSize.width / 2) + textPadding;
12082
+ textX = (position === 'After') ? startX - (this.textMaxWidth / 2) - textPadding
12083
+ : (startX + rectWidth + this.textMaxWidth / 2) + textPadding;
11825
12084
  textY = startY + (rectHeight / 2) + (itemTextSize.height / 4);
11826
12085
  }
11827
12086
  }
11828
12087
  if (i === 0) {
11829
12088
  itemStartX = (arrangement === 'Horizontal') ? startX : (position === 'After') ?
11830
- textX - (itemTextSize.width / 2) : startX;
12089
+ textX - (this.textMaxWidth / 2) : startX;
11831
12090
  itemStartY = (arrangement === 'Horizontal') ? (position === 'After') ? startY :
11832
12091
  textY - (itemTextSize.height / 2) : startY;
11833
12092
  if (this.legendCollection.length === 1) {
11834
12093
  legendWidth = (arrangement === 'Horizontal') ? Math.abs((startX + rectWidth) - itemStartX) :
11835
- (rectWidth + maxTextWidth + textPadding);
12094
+ (rectWidth + this.textMaxWidth + textPadding);
11836
12095
  legendHeight = (arrangement === 'Horizontal') ? (rectHeight + (maxTextHeight / 2) + textPadding) :
11837
12096
  Math.abs((startY + rectHeight) - itemStartY);
11838
12097
  }
11839
12098
  }
11840
12099
  else if (i === this.legendCollection.length - 1) {
11841
12100
  legendWidth = (arrangement === 'Horizontal') ? Math.abs((startX + rectWidth) - itemStartX) :
11842
- (rectWidth + maxTextWidth + textPadding);
12101
+ (rectWidth + this.textMaxWidth + textPadding);
11843
12102
  legendHeight = (arrangement === 'Horizontal') ? (rectHeight + (maxTextHeight / 2) + textPadding) :
11844
12103
  Math.abs((startY + rectHeight) - itemStartY);
11845
12104
  }
@@ -11851,8 +12110,8 @@ class Legend {
11851
12110
  shapeBorder: this.legendCollection[i]['shapeBorder']
11852
12111
  });
11853
12112
  }
11854
- if (this.legendCollection.length === 1 && !(map.theme === 'Fluent2HighContrast' && legend.position === 'Bottom')) {
11855
- legendHeight = rectHeight;
12113
+ if (this.legendCollection.length === 1) {
12114
+ legendHeight = maxTextHeight + textPadding;
11856
12115
  legendWidth = rectWidth;
11857
12116
  }
11858
12117
  this.legendItemRect = { x: itemStartX, y: itemStartY, width: legendWidth, height: legendHeight };
@@ -12335,13 +12594,13 @@ class Legend {
12335
12594
  && idIndex === i) {
12336
12595
  const layer = this.maps.layers[collection[i]['data'][0]['layerIndex']];
12337
12596
  let enable;
12338
- let module;
12597
+ let legendModule;
12339
12598
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12340
12599
  let data;
12341
12600
  if (!isNullOrUndefined(layer)) {
12342
12601
  enable = (value === 'selection') ? layer.selectionSettings.enable : layer.highlightSettings.enable;
12343
- module = void 0;
12344
- module = (value === 'selection') ? layer.selectionSettings : layer.highlightSettings;
12602
+ legendModule = void 0;
12603
+ legendModule = (value === 'selection') ? layer.selectionSettings : layer.highlightSettings;
12345
12604
  data = collection[i]['data'];
12346
12605
  }
12347
12606
  if (enable) {
@@ -12385,12 +12644,12 @@ class Legend {
12385
12644
  const shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
12386
12645
  const shapeOldFillOpacity = this.legendHighlightCollection[length - 1]['shapeOldOpacity'];
12387
12646
  this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
12388
- this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
12389
- this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
12647
+ this.setColor(shapeElement, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : shapeOldColor, isNullOrUndefined(legendModule.opacity) ? shapeOldFillOpacity : legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'highlight');
12648
+ this.setColor(targetElement, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendHighlightColor, isNullOrUndefined(legendModule.opacity) ? shapeOldFillOpacity : legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'highlight');
12390
12649
  }
12391
12650
  else if (value === 'selection') {
12392
12651
  this.legendHighlightCollection = [];
12393
- this.maps.legendSelectionClass = module;
12652
+ this.maps.legendSelectionClass = legendModule;
12394
12653
  if (j === 0) {
12395
12654
  this.pushCollection(targetElement, this.maps.legendSelectionCollection, collection[i], layer.shapeSettings);
12396
12655
  if (multiSelectEnable) {
@@ -12410,8 +12669,8 @@ class Legend {
12410
12669
  const legendSelectionColor = this.maps.legendSelectionCollection[selectLength - 1]['legendOldFill'];
12411
12670
  this.maps.legendSelectionCollection[selectLength - 1]['MapShapeCollection']['Elements'].push(shapeElement);
12412
12671
  this.maps.legendSelectionCollection[selectLength - 1]['shapeOldFillColor'] = this.shapePreviousColor;
12413
- this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
12414
- this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : legendSelectionColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
12672
+ this.setColor(targetElement, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendSelectionColor, legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'selection');
12673
+ this.setColor(shapeElement, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendSelectionColor, legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'selection');
12415
12674
  if (this.maps.selectedElementId.indexOf(shapeElement.getAttribute('id')) === -1) {
12416
12675
  this.maps.selectedElementId.push(shapeElement.getAttribute('id'));
12417
12676
  }
@@ -12509,7 +12768,7 @@ class Legend {
12509
12768
  }
12510
12769
  }
12511
12770
  }
12512
- shapeHighLightAndSelection(targetElement, data, module, getValue, layerIndex) {
12771
+ shapeHighLightAndSelection(targetElement, data, legendModule, getValue, layerIndex) {
12513
12772
  if (data !== undefined) {
12514
12773
  this.updateLegendElement();
12515
12774
  this.shapeToggled = true;
@@ -12555,7 +12814,7 @@ class Legend {
12555
12814
  const selectionIndex = this.maps.selectedLegendElementId.indexOf(indexes['actualIndex']);
12556
12815
  if (selectionIndex === -1) {
12557
12816
  this.maps.selectedLegendElementId.push(indexes['actualIndex']);
12558
- this.maps.legendSelectionClass = module;
12817
+ this.maps.legendSelectionClass = legendModule;
12559
12818
  }
12560
12819
  else {
12561
12820
  if ((checkSelection <= 1) && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
@@ -12621,13 +12880,13 @@ class Legend {
12621
12880
  }
12622
12881
  else if (j === length - 1) {
12623
12882
  this.removeShapeHighlightCollection();
12624
- this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
12883
+ this.setColor(legendShape, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendShape.getAttribute('fill'), legendModule.opacity.toString(), legendModule.border.color, legendModule.border.width.toString(), 'highlight');
12625
12884
  }
12626
12885
  }
12627
12886
  }
12628
12887
  else {
12629
12888
  this.removeShapeHighlightCollection();
12630
- this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(module.opacity) ? module.opacity.toString() : '1', module.border.color, module.border.width.toString(), 'highlight');
12889
+ this.setColor(legendShape, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(legendModule.opacity) ? legendModule.opacity.toString() : '1', legendModule.border.color, legendModule.border.width.toString(), 'highlight');
12631
12890
  }
12632
12891
  }
12633
12892
  else if (getValue === 'selection') {
@@ -12637,7 +12896,7 @@ class Legend {
12637
12896
  let j = 0;
12638
12897
  while (j < this.maps.legendSelectionCollection.length) {
12639
12898
  if (shapeElement['LegendEle'] !== this.maps.legendSelectionCollection[j]['legendElement'] &&
12640
- !module.enableMultiSelect) {
12899
+ !legendModule.enableMultiSelect) {
12641
12900
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12642
12901
  const element = this.maps.legendSelectionCollection[j];
12643
12902
  const selectedLegendIndex = this.maps.selectedLegendElementId.indexOf(indexes['actualIndex']);
@@ -12655,14 +12914,14 @@ class Legend {
12655
12914
  if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
12656
12915
  || targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
12657
12916
  let multiSelection = 0;
12658
- if (module.enableMultiSelect) {
12917
+ if (legendModule.enableMultiSelect) {
12659
12918
  for (let i = 0; i < shapeElement['Elements'].length; i++) {
12660
12919
  if (targetElement.getAttribute('class') === shapeElement['Elements'][i].getAttribute('class')) {
12661
12920
  multiSelection++;
12662
12921
  }
12663
12922
  }
12664
12923
  }
12665
- if (multiSelection <= 1 && (!module.enableMultiSelect ?
12924
+ if (multiSelection <= 1 && (!legendModule.enableMultiSelect ?
12666
12925
  this.maps.legendSelection : true)) {
12667
12926
  this.maps.selectedLegendElementId.splice(this.maps.selectedLegendElementId.indexOf(indexes['actualIndex']), 1);
12668
12927
  if (!isNullOrUndefined(shapeElement['LegendEle'])) {
@@ -12689,10 +12948,10 @@ class Legend {
12689
12948
  if (addId) {
12690
12949
  this.maps.selectedLegendElementId.push(indexes['actualIndex']);
12691
12950
  }
12692
- this.maps.legendSelectionClass = module;
12951
+ this.maps.legendSelectionClass = legendModule;
12693
12952
  this.removeLegend(this.shapeHighlightCollection);
12694
12953
  if (!isNullOrUndefined(legendShape)) {
12695
- this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(module.opacity) ? module.opacity.toString() : '1', module.border.color, module.border.width.toString(), 'selection');
12954
+ this.setColor(legendShape, !isNullOrUndefined(legendModule.fill) ? legendModule.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(legendModule.opacity) ? legendModule.opacity.toString() : '1', legendModule.border.color, legendModule.border.width.toString(), 'selection');
12696
12955
  const legendSelectionIndex = this.getIndexofLegend(this.maps.legendSelectionCollection, legendShape);
12697
12956
  this.maps.legendSelectionCollection[legendSelectionIndex]['MapShapeCollection']['Elements'].push(targetElement);
12698
12957
  }
@@ -12919,18 +13178,7 @@ class Legend {
12919
13178
  const spacing = 10;
12920
13179
  const trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
12921
13180
  const textSize = measureText(trimTitle, textStyle);
12922
- let sameTextWidth = false;
12923
- for (let i = 0; i < this.legendRenderingCollections.length; i++) {
12924
- if (this.legendRenderingCollections[i].textWidth !== this.legendRenderingCollections[0].textWidth) {
12925
- sameTextWidth = false;
12926
- break;
12927
- }
12928
- else {
12929
- sameTextWidth = true;
12930
- }
12931
- }
12932
- this.legendBorderRect = new Rect((map.theme === 'Fluent2HighContrast' && !sameTextWidth && (legend.position === 'Left' || legend.position === 'Right') && legend.mode === 'Interactive')
12933
- ? (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 +
13181
+ 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 +
12934
13182
  (legend.mode === 'Interactive' ? 0 : (this.page !== 0) ? spacing : 0));
12935
13183
  const legendBorder = {
12936
13184
  color: legend.border.color || this.maps.themeStyle.legendBorderColor, opacity: legend.border.opacity,
@@ -13842,6 +14090,12 @@ class Legend {
13842
14090
  this.maps.off(Browser.touchMoveEvent, this.interactiveHandler);
13843
14091
  this.maps.off(Browser.touchEndEvent, this.interactiveHandler);
13844
14092
  this.maps.off(click, this.legendClick);
14093
+ const pagingElement = document.getElementById(this.maps.element.id + '_Legend_Paging_Group');
14094
+ if (pagingElement) {
14095
+ for (let i = 0; i < pagingElement.childElementCount; i++) {
14096
+ EventHandler.remove(pagingElement.childNodes[i], Browser.touchStartEvent, this.changeNextPage);
14097
+ }
14098
+ }
13845
14099
  }
13846
14100
  getLegendData(
13847
14101
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -15043,6 +15297,8 @@ class MapsTooltip {
15043
15297
  destroy() {
15044
15298
  if (!isNullOrUndefined(this.svgTooltip)) {
15045
15299
  this.svgTooltip.destroy();
15300
+ this.svgTooltip.controlInstance = null;
15301
+ removeElement(this.maps.element.id + '_mapsTooltip');
15046
15302
  }
15047
15303
  this.svgTooltip = null;
15048
15304
  this.maps = null;
@@ -15359,6 +15615,7 @@ class Zoom {
15359
15615
  let zoomCalculationFactor = this.pinchFactor;
15360
15616
  let isZoomCancelled;
15361
15617
  const prevTilePoint = map.tileTranslatePoint;
15618
+ this.maps.mergeCluster();
15362
15619
  if (!map.isTileMap) {
15363
15620
  const availSize = map.mapAreaRect;
15364
15621
  map.isMarkerZoomCompleted = false;
@@ -15557,6 +15814,17 @@ class Zoom {
15557
15814
  if (document.getElementById(maps.element.id + '_mapsTooltip')) {
15558
15815
  removeElement(maps.element.id + '_mapsTooltip');
15559
15816
  }
15817
+ if (maps.isTileMap) {
15818
+ const element = document.getElementById(maps.element.id + '_svg');
15819
+ if (element) {
15820
+ for (let k = 0; k < maps.layers.length; k++) {
15821
+ const layerElement = element.querySelector('#' + maps.element.id + '_LayerIndex_' + k);
15822
+ if (layerElement) {
15823
+ element.removeChild(layerElement);
15824
+ }
15825
+ }
15826
+ }
15827
+ }
15560
15828
  if (this.layerCollectionEle) {
15561
15829
  for (let i = 0; i < this.layerCollectionEle.childElementCount; i++) {
15562
15830
  const layerElement = this.layerCollectionEle.childNodes[i];
@@ -15566,6 +15834,7 @@ class Zoom {
15566
15834
  this.currentLayer = maps.layersCollection[this.index];
15567
15835
  const factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
15568
15836
  const elementCount = layerElement.childElementCount;
15837
+ const templateElement = document.getElementById(maps.element.id + '_LayerIndex_' + this.index + '_Markers_Template_Group');
15569
15838
  for (let j = 0; j < elementCount; j++) {
15570
15839
  let currentEle = layerElement.childNodes[j];
15571
15840
  if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
@@ -15599,17 +15868,16 @@ class Zoom {
15599
15868
  }
15600
15869
  }
15601
15870
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
15602
- if ((!this.isPanModeEnabled || !isPanning) && !isNullOrUndefined(currentEle.childNodes[0])) {
15603
- this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement);
15871
+ if ((!this.isPanModeEnabled || !isPanning) && (!isNullOrUndefined(currentEle.childNodes[0]) || !isNullOrUndefined(templateElement.childNodes[0]))) {
15872
+ const processElement = (!isNullOrUndefined(currentEle.childNodes[0]) ? currentEle.childNodes[0] : templateElement.childNodes[0]);
15873
+ this.markerTranslates(processElement, factor, x, y, scale, 'Marker', layerElement);
15604
15874
  }
15605
15875
  currentEle = layerElement.childNodes[j];
15606
- let markerAnimation;
15607
15876
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
15608
15877
  Array.prototype.forEach.call(currentEle.childNodes, (childNode, k) => {
15609
15878
  this.markerTranslate(childNode, factor, x, y, scale, 'Marker', animate);
15610
15879
  const dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
15611
15880
  const markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
15612
- markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
15613
15881
  if (this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length > 0) {
15614
15882
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15615
15883
  const markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
@@ -15623,13 +15891,7 @@ class Zoom {
15623
15891
  }
15624
15892
  }
15625
15893
  if (((this.currentLayer.animationDuration > 0 || animationMode === 'Enable') || ((maps.layersCollection[0].animationDuration > 0 || animationMode === 'Enable') && this.currentLayer.type === 'SubLayer')) && !this.isPanModeEnabled) {
15626
- if (maps.isTileMap) {
15627
- const groupElement = document.querySelector('.GroupElement');
15628
- if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
15629
- groupElement.style.display = 'none';
15630
- }
15631
- }
15632
- else {
15894
+ if (!maps.isTileMap) {
15633
15895
  markerStyle = 'visibility:hidden';
15634
15896
  currentEle.style.cssText = markerStyle;
15635
15897
  }
@@ -15769,92 +16031,111 @@ class Zoom {
15769
16031
  removeElement(markerTemplateElements.id);
15770
16032
  }
15771
16033
  const currentLayers = this.maps.layersCollection[layerIndex];
16034
+ const allowInnerClusterSetting = this.maps.markerModule.allowInnerClusterSetting(currentLayers);
15772
16035
  Array.prototype.forEach.call(currentLayers.markerSettings, (markerSettings, markerIndex) => {
16036
+ markerTemplateCounts = 0;
16037
+ markerCounts = 0;
15773
16038
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15774
16039
  const markerDatas = markerSettings.dataSource;
15775
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15776
- Array.prototype.forEach.call(markerDatas, (data, dataIndex) => {
15777
- this.maps.markerNullCount = markerIndex >= 0 && dataIndex === 0 ? 0 : this.maps.markerNullCount;
15778
- let eventArgs = {
15779
- template: markerSettings.template, data: data, maps: this.maps, marker: markerSettings,
15780
- cancel: false, name: markerRendering, fill: markerSettings.fill, colorValuePath: markerSettings.colorValuePath,
15781
- shapeValuePath: markerSettings.shapeValuePath, height: markerSettings.height,
15782
- width: markerSettings.width, imageUrl: markerSettings.imageUrl, imageUrlValuePath: markerSettings.imageUrlValuePath, shape: markerSettings.shape,
15783
- border: markerSettings.border
15784
- };
15785
- eventArgs = markerShapeChoose(eventArgs, data);
15786
- eventArgs = markerColorChoose(eventArgs, data);
15787
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
15788
- this.maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
15789
- if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
15790
- eventArgs = markerShapeChoose(eventArgs, data);
15791
- }
15792
- if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
15793
- eventArgs = markerColorChoose(eventArgs, data);
15794
- }
15795
- const lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
15796
- Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
15797
- parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
15798
- const long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
15799
- Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
15800
- parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
15801
- const offset = markerSettings.offset;
15802
- if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
15803
- const markerID = this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
15804
- + markerIndex + '_dataIndex_' + dataIndex;
15805
- const location = (this.maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(long, lati), this.maps.tileZoomLevel, this.maps.tileTranslatePoint, true) : convertGeoToPoint(lati, long, factor, currentLayers, this.maps);
15806
- const transPoint = { x: x, y: y };
15807
- if (eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
15808
- markerTemplateCounts++;
15809
- markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateElements, location, transPoint, scale, offset, this.maps);
16040
+ if (!isNullOrUndefined(markerDatas)) {
16041
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
16042
+ Array.prototype.forEach.call(markerDatas, (data, dataIndex) => {
16043
+ this.maps.markerNullCount = markerIndex >= 0 && dataIndex === 0 ? 0 : this.maps.markerNullCount;
16044
+ let eventArgs = {
16045
+ template: markerSettings.template, data: data, maps: this.maps, marker: markerSettings,
16046
+ cancel: false, name: markerRendering, fill: markerSettings.fill, colorValuePath: markerSettings.colorValuePath,
16047
+ shapeValuePath: markerSettings.shapeValuePath,
16048
+ height: !isNullOrUndefined(markerSettings.heightValuePath) && !isNullOrUndefined(data[markerSettings.heightValuePath])
16049
+ ? data[markerSettings.heightValuePath] : markerSettings.height,
16050
+ width: !isNullOrUndefined(markerSettings.widthValuePath) && !isNullOrUndefined(data[markerSettings.widthValuePath])
16051
+ ? data[markerSettings.widthValuePath] : markerSettings.width,
16052
+ imageUrl: markerSettings.imageUrl, imageUrlValuePath: markerSettings.imageUrlValuePath, shape: markerSettings.shape,
16053
+ border: markerSettings.border
16054
+ };
16055
+ eventArgs = markerShapeChoose(eventArgs, data);
16056
+ eventArgs = markerColorChoose(eventArgs, data);
16057
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
16058
+ this.maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
16059
+ if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
16060
+ eventArgs = markerShapeChoose(eventArgs, data);
15810
16061
  }
15811
- else if (!eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
15812
- markerCounts++;
15813
- marker(eventArgs, markerSettings, markerDatas, dataIndex, location, transPoint, markerID, offset, scale, this.maps, markerSVGObject);
16062
+ if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
16063
+ eventArgs = markerColorChoose(eventArgs, data);
15814
16064
  }
15815
- }
15816
- nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
15817
- markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
15818
- markerCounts += (eventArgs.cancel) ? 1 : 0;
15819
- this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
15820
- ? this.maps.markerNullCount + 1 : this.maps.markerNullCount;
15821
- const markerDataLength = markerDatas.length - this.maps.markerNullCount;
15822
- let isMarkersClustered = false;
15823
- if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
15824
- if (this.maps.isTileMap) {
15825
- const polygonsElement = document.getElementById(this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group');
15826
- const polygonElement = document.getElementById(this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygon_Group');
15827
- if (!isNullOrUndefined(polygonsElement)) {
15828
- polygonsElement.insertAdjacentElement('afterend', markerSVGObject);
16065
+ const lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
16066
+ Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
16067
+ parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
16068
+ const long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
16069
+ Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
16070
+ parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
16071
+ const offset = markerSettings.offset;
16072
+ if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
16073
+ const markerID = this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
16074
+ + markerIndex + '_dataIndex_' + dataIndex;
16075
+ const location = (this.maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(long, lati), this.maps.tileZoomLevel, this.maps.tileTranslatePoint, true) : convertGeoToPoint(lati, long, factor, currentLayers, this.maps);
16076
+ const transPoint = { x: x, y: y };
16077
+ if (eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
16078
+ markerTemplateCounts++;
16079
+ markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateElements, location, transPoint, scale, offset, this.maps);
15829
16080
  }
15830
- else {
15831
- if (!isNullOrUndefined(polygonElement)) {
15832
- polygonElement.insertAdjacentElement('afterend', markerSVGObject);
16081
+ else if (!eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
16082
+ markerCounts++;
16083
+ marker(eventArgs, markerSettings, markerDatas, dataIndex, location, transPoint, markerID, offset, scale, this.maps, markerSVGObject);
16084
+ }
16085
+ }
16086
+ nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
16087
+ markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
16088
+ markerCounts += (eventArgs.cancel) ? 1 : 0;
16089
+ this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
16090
+ ? this.maps.markerNullCount + 1 : this.maps.markerNullCount;
16091
+ const markerDataLength = markerDatas.length - this.maps.markerNullCount;
16092
+ let isMarkersClustered = false;
16093
+ const markerGroup = (markerSettings.clusterSettings.allowClustering
16094
+ || (currentLayers.markerClusterSettings.allowClustering && currentLayers.markerSettings.length > 1))
16095
+ ? markerSVGObject.querySelectorAll(`[id*='LayerIndex_${layerIndex}_MarkerIndex_${markerIndex}']:not([id*='_Group'])`)
16096
+ : markerSVGObject.childNodes;
16097
+ if (markerGroup.length === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
16098
+ if (this.maps.isTileMap) {
16099
+ const polygonsElement = document.getElementById(this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group');
16100
+ const polygonElement = document.getElementById(this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygon_Group');
16101
+ if (!isNullOrUndefined(polygonsElement)) {
16102
+ polygonsElement.insertAdjacentElement('afterend', markerSVGObject);
15833
16103
  }
15834
16104
  else {
15835
- layerElement.insertBefore(markerSVGObject, layerElement.firstElementChild);
16105
+ if (!isNullOrUndefined(polygonElement)) {
16106
+ polygonElement.insertAdjacentElement('afterend', markerSVGObject);
16107
+ }
16108
+ else {
16109
+ layerElement.insertBefore(markerSVGObject, layerElement.firstElementChild);
16110
+ }
15836
16111
  }
15837
16112
  }
16113
+ else {
16114
+ layerElement.appendChild(markerSVGObject);
16115
+ }
16116
+ if (currentLayers.markerSettings[markerIndex].clusterSettings.allowClustering ||
16117
+ !allowInnerClusterSetting && currentLayers.markerClusterSettings.allowClustering) {
16118
+ this.maps.svgObject.appendChild(markerSVGObject);
16119
+ this.maps.element.appendChild(this.maps.svgObject);
16120
+ isMarkersClustered = clusterTemplate(currentLayers, markerSVGObject, this.maps, layerIndex, markerIndex, markerSVGObject, layerElement, true, true, null, allowInnerClusterSetting);
16121
+ }
15838
16122
  }
15839
- else {
15840
- layerElement.appendChild(markerSVGObject);
15841
- }
15842
- if (currentLayers.markerClusterSettings.allowClustering) {
15843
- this.maps.svgObject.appendChild(markerSVGObject);
15844
- this.maps.element.appendChild(this.maps.svgObject);
15845
- isMarkersClustered = clusterTemplate(currentLayers, markerSVGObject, this.maps, layerIndex, markerSVGObject, layerElement, true, true);
15846
- }
15847
- }
15848
- if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(this.maps.element.id + '_Secondary_Element')) {
15849
- getElementByID(this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
15850
- if (scale >= 1) {
15851
- if (currentLayers.markerClusterSettings.allowClustering && !isMarkersClustered) {
15852
- clusterTemplate(currentLayers, markerTemplateElements, this.maps, layerIndex, markerSVGObject, layerElement, false, true);
16123
+ const markerTemplateGroup = (markerSettings.clusterSettings.allowClustering
16124
+ || (currentLayers.markerClusterSettings.allowClustering && currentLayers.markerSettings.length > 1))
16125
+ ? markerTemplateElements.querySelectorAll(`[id*='LayerIndex_${layerIndex}_MarkerIndex_${markerIndex}']:not([id*='_Group'])`)
16126
+ : markerTemplateElements.childNodes;
16127
+ if (markerTemplateGroup.length === (markerDataLength - markerCounts - nullCount) && getElementByID(this.maps.element.id + '_Secondary_Element')) {
16128
+ getElementByID(this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
16129
+ if (scale >= 1) {
16130
+ if ((markerSettings.clusterSettings.allowClustering || !allowInnerClusterSetting &&
16131
+ currentLayers.markerClusterSettings.allowClustering) && !isMarkersClustered) {
16132
+ clusterTemplate(currentLayers, markerTemplateElements, this.maps, layerIndex, markerIndex, markerSVGObject, layerElement, false, true, null, allowInnerClusterSetting);
16133
+ }
15853
16134
  }
15854
16135
  }
15855
- }
16136
+ });
15856
16137
  });
15857
- });
16138
+ }
15858
16139
  });
15859
16140
  }
15860
16141
  /**
@@ -16049,6 +16330,18 @@ class Zoom {
16049
16330
  }
16050
16331
  }
16051
16332
  }
16333
+ /**
16334
+ *
16335
+ * @param {Element | HTMLElement} element - Specifies the marker element.
16336
+ * @param {number} factor - Specifies scale factor.
16337
+ * @param {number} x - Specifies the x location of the marker element.
16338
+ * @param {number} y - Specifies the y location of the marker element.
16339
+ * @param {number} scale - Specifies scale factor.
16340
+ * @param {number} type - Specifies the type of the marker processing.
16341
+ * @param {number} animate - Specifies whether the animation is enabled or not.
16342
+ * @returns {void}
16343
+ * @private
16344
+ */
16052
16345
  markerTranslate(element, factor, x, y, scale, type, animate = false) {
16053
16346
  const layerIndex = parseInt(element.id.split('_LayerIndex_')[1].split('_')[0], 10);
16054
16347
  const markerIndex = parseInt(element.id.split('_MarkerIndex_')[1].split('_')[0], 10);
@@ -16068,9 +16361,8 @@ class Zoom {
16068
16361
  const location = (this.maps.isTileMap) ? convertTileLatLongToPoint(new Point(lng, lat), this.maps.tileZoomLevel, this.maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, layer, this.maps);
16069
16362
  if (this.maps.isTileMap) {
16070
16363
  if (type === 'Template') {
16071
- const templateOffset = element.getBoundingClientRect();
16072
- element.style.left = ((location.x - (templateOffset.width / 2)) + marker.offset.x) + 'px';
16073
- element.style.top = ((location.y - (templateOffset.height / 2)) + marker.offset.y) + 'px';
16364
+ element.style.left = (location.x + marker.offset.x) + 'px';
16365
+ element.style.top = (location.y + marker.offset.y) + 'px';
16074
16366
  }
16075
16367
  else {
16076
16368
  location.x += marker.offset.x;
@@ -16090,9 +16382,8 @@ class Zoom {
16090
16382
  element.style.transform = 'translate(-50%, -50%)';
16091
16383
  }
16092
16384
  else {
16093
- const elementOffset = element.getBoundingClientRect();
16094
- element.style.left = ((location.x + x) * scale) + marker.offset.x - this.maps.mapAreaRect.x - (elementOffset.width / 2) + 'px';
16095
- element.style.top = ((location.y + y) * scale) + marker.offset.y - this.maps.mapAreaRect.y - (elementOffset.height / 2) + 'px';
16385
+ element.style.left = ((location.x + x) * scale) + marker.offset.x - this.maps.mapAreaRect.x + 'px';
16386
+ element.style.top = ((location.y + y) * scale) + marker.offset.y - this.maps.mapAreaRect.y + 'px';
16096
16387
  }
16097
16388
  }
16098
16389
  else {
@@ -16245,6 +16536,7 @@ class Zoom {
16245
16536
  const size = map.mapAreaRect;
16246
16537
  const translatePoint = map.previousPoint = map.translatePoint;
16247
16538
  const prevTilePoint = map.tileTranslatePoint;
16539
+ this.maps.mergeCluster();
16248
16540
  map.previousProjection = type === 'Reset' ? undefined : map.projectionType;
16249
16541
  zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
16250
16542
  zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
@@ -16922,6 +17214,7 @@ class Zoom {
16922
17214
  const delta = 1;
16923
17215
  const staticMaxZoomLevel = map.zoomSettings.maxZoom;
16924
17216
  const value = (map.isTileMap) ? prevLevel : prevScale;
17217
+ this.maps.mergeCluster();
16925
17218
  if (((position.x > map.mapAreaRect.x) && (position.x < (map.mapAreaRect.x + map.mapAreaRect.width))) &&
16926
17219
  (position.y > map.mapAreaRect.y) && position.y < (map.mapAreaRect.y + map.mapAreaRect.height)) {
16927
17220
  e.preventDefault();
@@ -17115,7 +17408,8 @@ class Zoom {
17115
17408
  this.lastScale = 1;
17116
17409
  this.maps.element.style.cursor = 'auto';
17117
17410
  if (this.isPanModeEnabled && this.maps.zoomSettings.enablePanning && !isNullOrUndefined(this.maps.previousPoint) &&
17118
- (this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)) {
17411
+ (!this.maps.isTileMap ? (this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)
17412
+ : this.isPanningInProgress)) {
17119
17413
  let pageX;
17120
17414
  let pageY;
17121
17415
  let layerX = 0;
@@ -17167,6 +17461,7 @@ class Zoom {
17167
17461
  this.maps.trigger('panComplete', panCompleteEventArgs);
17168
17462
  }
17169
17463
  this.isPanModeEnabled = false;
17464
+ this.isPanningInProgress = false;
17170
17465
  const zoomRectElement = getElementByID(this.maps.element.id + '_Selection_Rect_Zooming');
17171
17466
  if (zoomRectElement && this.maps.zoomSettings.enable && this.maps.zoomSettings.enableSelectionZooming) {
17172
17467
  remove(zoomRectElement);
@@ -17271,6 +17566,16 @@ class Zoom {
17271
17566
  this.maps.off(Browser.touchStartEvent, this.mouseDownHandler);
17272
17567
  this.maps.off(Browser.touchEndEvent, this.mouseUpHandler);
17273
17568
  EventHandler.remove(this.maps.element, this.cancelEvent, this.mouseCancelHandler);
17569
+ const toolbarElement = document.getElementById(this.maps.element.id + '_Zooming_KitCollection');
17570
+ if (toolbarElement) {
17571
+ for (let i = 0; i < toolbarElement.childNodes.length; i++) {
17572
+ if (toolbarElement.childNodes[i].tagName === 'g') {
17573
+ EventHandler.add(toolbarElement.childNodes[i], Browser.touchStartEvent, this.performToolBarAction);
17574
+ EventHandler.add(toolbarElement.childNodes[i], 'mouseover', this.showTooltip);
17575
+ EventHandler.add(toolbarElement.childNodes[i], 'mouseout', this.removeTooltip);
17576
+ }
17577
+ }
17578
+ }
17274
17579
  }
17275
17580
  /**
17276
17581
  * Get module name.
@@ -17305,7 +17610,6 @@ class Zoom {
17305
17610
  this.layerCollectionEle = null;
17306
17611
  this.currentLayer = null;
17307
17612
  this.pinchDistance = null;
17308
- this.maps = null;
17309
17613
  }
17310
17614
  }
17311
17615
 
@@ -17361,12 +17665,12 @@ class Print {
17361
17665
  backgroundElement = backgroundElement.childNodes[0];
17362
17666
  if (!isNullOrUndefined(backgroundElement)) {
17363
17667
  const backgroundColor = backgroundElement.getAttribute('fill');
17364
- if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
17668
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Tailwind3' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
17365
17669
  maps.theme === 'Fluent2')
17366
17670
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17367
17671
  backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
17368
17672
  }
17369
- else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
17673
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Tailwind3Dark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
17370
17674
  maps.theme === 'Fluent2Dark' || maps.theme === 'Fluent2HighContrast')
17371
17675
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17372
17676
  backgroundElement.setAttribute('fill', 'rgba(0, 0, 0, 1)');
@@ -17470,11 +17774,11 @@ class ImageExport {
17470
17774
  const svgObject = getElementByID(maps.element.id + '_svg').cloneNode(true);
17471
17775
  const backgroundElement = svgObject.childNodes[0];
17472
17776
  const backgroundColor = backgroundElement.getAttribute('fill');
17473
- if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' || maps.theme === 'Fluent2')
17777
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Tailwind3' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' || maps.theme === 'Fluent2')
17474
17778
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17475
17779
  svgObject.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
17476
17780
  }
17477
- else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
17781
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Tailwind3Dark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
17478
17782
  maps.theme === 'Fluent2Dark' || maps.theme === 'Fluent2HighContrast')
17479
17783
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17480
17784
  svgObject.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
@@ -17530,8 +17834,8 @@ class ImageExport {
17530
17834
  const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
17531
17835
  const exportTileImg = new Image();
17532
17836
  exportTileImg.crossOrigin = 'Anonymous';
17533
- const 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' :
17534
- (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
17837
+ const 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' :
17838
+ (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';
17535
17839
  ctxt.fillStyle = background;
17536
17840
  ctxt.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
17537
17841
  ctxt.font = maps.titleSettings.textStyle.size + ' Arial';
@@ -17656,12 +17960,12 @@ class PdfExport {
17656
17960
  const exportElement = maps.svgObject.cloneNode(true);
17657
17961
  const backgroundElement = exportElement.childNodes[0];
17658
17962
  const backgroundColor = backgroundElement.getAttribute('fill');
17659
- if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
17963
+ if ((maps.theme === 'Tailwind' || maps.theme === 'Tailwind3' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
17660
17964
  maps.theme === 'Fluent2')
17661
17965
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17662
17966
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
17663
17967
  }
17664
- else if ((maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
17968
+ else if ((maps.theme === 'TailwindDark' || maps.theme === 'Tailwind3Dark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark' ||
17665
17969
  maps.theme === 'Fluent2Dark' || maps.theme === 'Fluent2HighContrast')
17666
17970
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
17667
17971
  exportElement.childNodes[0].setAttribute('fill', 'rgba(0, 0, 0, 1)');
@@ -17701,8 +18005,8 @@ class PdfExport {
17701
18005
  const tile = document.getElementById(maps.element.id + '_tile_' + (i - 1));
17702
18006
  const tileImg = new Image();
17703
18007
  tileImg.crossOrigin = 'Anonymous';
17704
- const 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' :
17705
- (maps.theme === 'TailwindDark' || maps.theme === 'Bootstrap5Dark' || maps.theme === 'FluentDark' || maps.theme === 'Material3Dark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent') ? '#000000' : '#ffffff';
18008
+ const 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' :
18009
+ (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';
17706
18010
  ctx.fillStyle = background;
17707
18011
  ctx.fillRect(0, 0, maps.availableSize.width, maps.availableSize.height);
17708
18012
  ctx.font = maps.titleSettings.textStyle.size + ' Arial';
@@ -17783,5 +18087,5 @@ class PdfExport {
17783
18087
  destroy() { }
17784
18088
  }
17785
18089
 
17786
- 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 };
18090
+ 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 };
17787
18091
  //# sourceMappingURL=ej2-maps.es2015.js.map