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