@syncfusion/ej2-maps 24.1.41 → 24.2.3
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.
- package/CHANGELOG.md +10 -0
- package/README.md +1 -1
- package/dist/ej2-maps.min.js +2 -2
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +110 -103
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +160 -140
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/marker.js +30 -16
- package/src/maps/model/base-model.d.ts +9 -0
- package/src/maps/model/base.d.ts +8 -0
- package/src/maps/model/base.js +3 -0
- package/src/maps/user-interaction/zoom.js +57 -47
- package/src/maps/utils/helper.d.ts +1 -1
- package/src/maps/utils/helper.js +70 -77
|
@@ -922,45 +922,49 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
922
922
|
width: clusters.width, imageUrl: clusters.imageUrl, shape: clusters.shape,
|
|
923
923
|
data: data, maps: maps, cluster: clusters, border: clusters.border
|
|
924
924
|
};
|
|
925
|
+
const containerRect = maps.element.getBoundingClientRect();
|
|
926
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
927
|
+
const translatePoint = (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
|
|
928
|
+
let factor;
|
|
929
|
+
if (!maps.isTileMap) {
|
|
930
|
+
factor = maps.mapLayerPanel.calculateFactor(currentLayer);
|
|
931
|
+
}
|
|
932
|
+
let isClusteringCompleted = false;
|
|
925
933
|
maps.trigger('markerClusterRendering', eventArg, (clusterargs) => {
|
|
926
|
-
|
|
934
|
+
Array.prototype.forEach.call(markerTemplate.childNodes, (markerElement, o) => {
|
|
927
935
|
indexCollection = [];
|
|
928
|
-
if (
|
|
929
|
-
tempElement =
|
|
936
|
+
if (markerElement['style']['visibility'] !== 'hidden') {
|
|
937
|
+
tempElement = markerElement;
|
|
930
938
|
bounds1 = tempElement.getBoundingClientRect();
|
|
931
939
|
indexCollection.push(o);
|
|
932
940
|
if (!isNullOrUndefined(bounds1)) {
|
|
933
|
-
|
|
934
|
-
if (
|
|
935
|
-
tempElement =
|
|
941
|
+
Array.prototype.forEach.call(markerTemplate.childNodes, (otherMarkerElement, p) => {
|
|
942
|
+
if (p >= o + 1 && otherMarkerElement['style']['visibility'] !== 'hidden') {
|
|
943
|
+
tempElement = otherMarkerElement;
|
|
936
944
|
bounds2 = tempElement.getBoundingClientRect();
|
|
937
945
|
if (!isNullOrUndefined(bounds2)) {
|
|
938
946
|
if (!(bounds1.left > bounds2.right || bounds1.right < bounds2.left
|
|
939
947
|
|| bounds1.top > bounds2.bottom || bounds1.bottom < bounds2.top)) {
|
|
940
948
|
colloideBounds.push(bounds2);
|
|
941
|
-
|
|
949
|
+
otherMarkerElement['style']['visibility'] = 'hidden';
|
|
942
950
|
indexCollection.push(p);
|
|
943
951
|
}
|
|
944
952
|
}
|
|
945
953
|
}
|
|
946
|
-
}
|
|
954
|
+
});
|
|
947
955
|
tempX = bounds1.left + bounds1.width / 2;
|
|
948
956
|
tempY = bounds1.top + bounds1.height;
|
|
949
957
|
if (colloideBounds.length > 0) {
|
|
950
958
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
951
959
|
indexCollection = indexCollection.filter((item, index, value) => value.indexOf(item) === index);
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
const translate = (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
|
|
958
|
-
const dataIndex = parseInt(markerTemplate.childNodes[o]['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
959
|
-
const markerIndex = parseInt(markerTemplate.childNodes[o]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
960
|
+
tempX = tempX - containerRect['left'];
|
|
961
|
+
tempY = (tempY - ((maps.availableSize.height <= containerRect['height']) ?
|
|
962
|
+
containerRect['top'] : (containerRect['bottom'] - containerRect['top'])));
|
|
963
|
+
const dataIndex = parseInt(markerElement['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
964
|
+
const markerIndex = parseInt(markerElement['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
960
965
|
const markerSetting = currentLayer.markerSettings[markerIndex];
|
|
961
966
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
962
967
|
const markerData = markerSetting.dataSource[dataIndex];
|
|
963
|
-
let factor;
|
|
964
968
|
let location;
|
|
965
969
|
const longitude = (!isNullOrUndefined(markerSetting.longitudeValuePath)) ?
|
|
966
970
|
Number(getValueFromObject(markerData, markerSetting.longitudeValuePath)) :
|
|
@@ -971,44 +975,29 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
971
975
|
!isNullOrUndefined(markerData['latitude']) ? parseFloat(markerData['latitude']) :
|
|
972
976
|
!isNullOrUndefined(markerData['Latitude']) ? parseFloat(markerData['Latitude']) : 0;
|
|
973
977
|
if (!maps.isTileMap) {
|
|
974
|
-
factor = maps.mapLayerPanel.calculateFactor(currentLayer);
|
|
975
978
|
location = convertGeoToPoint(latitude, longitude, factor, currentLayer, maps);
|
|
976
979
|
}
|
|
977
980
|
else if (maps.isTileMap && !maps.zoomSettings.enable) {
|
|
978
981
|
location = convertTileLatLongToPoint(new Point(longitude, latitude), maps.tileZoomLevel, maps.tileTranslatePoint, true);
|
|
979
982
|
}
|
|
980
|
-
|
|
981
|
-
const clusters = currentLayer.markerClusterSettings;
|
|
983
|
+
markerElement['style']['visibility'] = 'hidden';
|
|
982
984
|
if (eventArg.cancel) {
|
|
983
985
|
shapeCustom = {
|
|
984
986
|
size: new Size(clusters.width, clusters.height),
|
|
985
987
|
fill: clusters.fill, borderColor: clusters.border.color,
|
|
986
988
|
borderWidth: clusters.border.width, opacity: clusters.opacity,
|
|
987
|
-
dashArray: clusters.dashArray
|
|
989
|
+
dashArray: clusters.dashArray, imageUrl: clusters.imageUrl, shape: clusters.shape
|
|
988
990
|
};
|
|
989
|
-
shapeCustom['fill'] = clusters.fill;
|
|
990
|
-
shapeCustom['size']['width'] = clusters.width;
|
|
991
|
-
shapeCustom['size']['height'] = clusters.height;
|
|
992
|
-
shapeCustom['imageUrl'] = clusters.imageUrl;
|
|
993
|
-
shapeCustom['shape'] = clusters.shape;
|
|
994
|
-
shapeCustom['borderColor'] = clusters.border.color;
|
|
995
|
-
shapeCustom['borderWidth'] = clusters.border.width;
|
|
996
991
|
shapeCustom['borderOpacity'] = isNullOrUndefined(clusters.border.opacity) ? clusters.opacity : clusters.border.opacity;
|
|
997
992
|
}
|
|
998
993
|
else {
|
|
999
994
|
shapeCustom = {
|
|
1000
|
-
size: new Size(
|
|
1001
|
-
fill:
|
|
1002
|
-
borderWidth:
|
|
1003
|
-
dashArray: clusters.dashArray
|
|
995
|
+
size: new Size(eventArg.width, eventArg.height),
|
|
996
|
+
fill: eventArg.fill, borderColor: eventArg.border.color,
|
|
997
|
+
borderWidth: eventArg.border.width, opacity: clusters.opacity,
|
|
998
|
+
dashArray: clusters.dashArray, imageUrl: eventArg.imageUrl,
|
|
999
|
+
shape: eventArg.shape
|
|
1004
1000
|
};
|
|
1005
|
-
shapeCustom['fill'] = eventArg.fill;
|
|
1006
|
-
shapeCustom['size']['width'] = eventArg.width;
|
|
1007
|
-
shapeCustom['size']['height'] = eventArg.height;
|
|
1008
|
-
shapeCustom['imageUrl'] = eventArg.imageUrl;
|
|
1009
|
-
shapeCustom['shape'] = eventArg.shape;
|
|
1010
|
-
shapeCustom['borderColor'] = eventArg.border.color;
|
|
1011
|
-
shapeCustom['borderWidth'] = eventArg.border.width;
|
|
1012
1001
|
shapeCustom['borderOpacity'] = isNullOrUndefined(eventArg.border.opacity) ? clusters.opacity : eventArg.border.opacity;
|
|
1013
1002
|
}
|
|
1014
1003
|
tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX : tempX + postionY - (eventArg.width / 2);
|
|
@@ -1037,48 +1026,51 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1037
1026
|
}
|
|
1038
1027
|
colloideBounds = [];
|
|
1039
1028
|
}
|
|
1040
|
-
|
|
1029
|
+
isClusteringCompleted = true;
|
|
1030
|
+
});
|
|
1041
1031
|
layerElement.appendChild(clusterGroup);
|
|
1042
1032
|
maps.svgObject.appendChild(layerElement);
|
|
1043
1033
|
maps.element.appendChild(maps.svgObject);
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
if (!(
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1034
|
+
if (clusters.allowDeepClustering) {
|
|
1035
|
+
Array.prototype.forEach.call(clusterGroup.childNodes, (clusterElement, o) => {
|
|
1036
|
+
if (clusterElement['style']['visibility'] !== 'hidden') {
|
|
1037
|
+
tempElement = clusterElement;
|
|
1038
|
+
bounds1 = tempElement.getBoundingClientRect();
|
|
1039
|
+
if (!isNullOrUndefined(bounds1) && !(tempElement.id.indexOf('_datalabel_') > -1)) {
|
|
1040
|
+
for (let p = o + 1; p < clusterGroup.childElementCount; p++) {
|
|
1041
|
+
if (clusterGroup.childNodes[p]['style']['visibility'] !== 'hidden') {
|
|
1042
|
+
tempElement1 = clusterGroup.childNodes[p];
|
|
1043
|
+
bounds2 = tempElement1.getBoundingClientRect();
|
|
1044
|
+
if (!isNullOrUndefined(bounds2) && !(tempElement1.id.indexOf('_datalabel_') > -1)) {
|
|
1045
|
+
if (!(bounds1.left > bounds2.right || bounds1.right < bounds2.left
|
|
1046
|
+
|| bounds1.top > bounds2.bottom || bounds1.bottom < bounds2.top)) {
|
|
1047
|
+
clusterColloideBounds.push(tempElement1);
|
|
1048
|
+
clusterColloideBounds.push(clusterGroup.childNodes[p - 1]);
|
|
1049
|
+
clusterGroup.childNodes[p]['style']['visibility'] = 'hidden';
|
|
1050
|
+
clusterGroup.childNodes[p - 1]['style']['visibility'] = 'hidden';
|
|
1051
|
+
indexCollection.push(p);
|
|
1052
|
+
}
|
|
1061
1053
|
}
|
|
1062
1054
|
}
|
|
1063
1055
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1056
|
+
if (clusterColloideBounds.length > 0) {
|
|
1057
|
+
tempElement = clusterElement;
|
|
1058
|
+
for (let i = 0; i < clusterColloideBounds.length; i++) {
|
|
1059
|
+
if (tempElement.tagName === 'g') {
|
|
1060
|
+
tempElement.childNodes[0].textContent = tempElement.childNodes[0].textContent + ',' +
|
|
1061
|
+
clusterColloideBounds[i].textContent;
|
|
1062
|
+
}
|
|
1063
|
+
else {
|
|
1064
|
+
tempElement.textContent = tempElement.textContent + ',' + clusterColloideBounds[i].textContent;
|
|
1065
|
+
}
|
|
1066
|
+
clusterGroup.childNodes[o - 1].textContent = ((+(clusterGroup.childNodes[o - 1].textContent)) + (+(clusterColloideBounds[i + 1].textContent))).toString();
|
|
1067
|
+
i++;
|
|
1074
1068
|
}
|
|
1075
|
-
clusterGroup.childNodes[o - 1].textContent = ((+(clusterGroup.childNodes[o - 1].textContent)) + (+(clusterColloideBounds[i + 1].textContent))).toString();
|
|
1076
|
-
i++;
|
|
1077
1069
|
}
|
|
1070
|
+
clusterColloideBounds = [];
|
|
1078
1071
|
}
|
|
1079
|
-
clusterColloideBounds = [];
|
|
1080
1072
|
}
|
|
1081
|
-
}
|
|
1073
|
+
});
|
|
1082
1074
|
}
|
|
1083
1075
|
while (0 < clusterGroup.childNodes.length) {
|
|
1084
1076
|
markerCollection.insertBefore(clusterGroup.childNodes[0], markerCollection.firstChild);
|
|
@@ -1120,6 +1112,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1120
1112
|
}
|
|
1121
1113
|
}
|
|
1122
1114
|
});
|
|
1115
|
+
return isClusteringCompleted;
|
|
1123
1116
|
}
|
|
1124
1117
|
/**
|
|
1125
1118
|
*
|
|
@@ -4329,6 +4322,9 @@ class MarkerClusterSettings extends ChildProperty {
|
|
|
4329
4322
|
__decorate$1([
|
|
4330
4323
|
Property(false)
|
|
4331
4324
|
], MarkerClusterSettings.prototype, "allowClustering", void 0);
|
|
4325
|
+
__decorate$1([
|
|
4326
|
+
Property(true)
|
|
4327
|
+
], MarkerClusterSettings.prototype, "allowDeepClustering", void 0);
|
|
4332
4328
|
__decorate$1([
|
|
4333
4329
|
Complex({ color: 'transparent', width: 1 }, Border)
|
|
4334
4330
|
], MarkerClusterSettings.prototype, "border", void 0);
|
|
@@ -10120,11 +10116,21 @@ class Marker {
|
|
|
10120
10116
|
'left:' + maps.mapAreaRect.x + 'px;' +
|
|
10121
10117
|
'height:' + maps.mapAreaRect.height + 'px;' +
|
|
10122
10118
|
'width:' + maps.mapAreaRect.width + 'px;';
|
|
10123
|
-
currentLayer.
|
|
10119
|
+
const allowAnimation = (currentLayer.animationDuration !== 0 || animationMode === 'Enable') || isNullOrUndefined(maps.zoomModule);
|
|
10120
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10121
|
+
let translatePoint;
|
|
10122
|
+
if (!maps.isTileMap) {
|
|
10123
|
+
translatePoint = !isNullOrUndefined(maps.zoomModule) && maps.zoomSettings.zoomFactor > 1 ?
|
|
10124
|
+
getZoomTranslate(maps, currentLayer, allowAnimation) :
|
|
10125
|
+
getTranslate(maps, currentLayer, allowAnimation);
|
|
10126
|
+
}
|
|
10127
|
+
for (let markerIndex = 0; markerIndex < currentLayer.markerSettings.length; markerIndex++) {
|
|
10128
|
+
let markerSettings = currentLayer.markerSettings[markerIndex];
|
|
10124
10129
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10125
10130
|
const markerData = markerSettings.dataSource;
|
|
10126
10131
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10127
|
-
|
|
10132
|
+
for (let dataIndex = 0; dataIndex < markerData.length; dataIndex++) {
|
|
10133
|
+
let data = markerData[dataIndex];
|
|
10128
10134
|
maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
|
|
10129
10135
|
let eventArgs = {
|
|
10130
10136
|
cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
|
|
@@ -10147,14 +10153,11 @@ class Marker {
|
|
|
10147
10153
|
const markerID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
10148
10154
|
+ markerIndex + '_dataIndex_' + dataIndex;
|
|
10149
10155
|
let location = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
getTranslate(maps, currentLayer, animate$$1);
|
|
10156
|
-
const scale = type === 'AddMarker' ? maps.scale : translate['scale'];
|
|
10157
|
-
const transPoint = type === 'AddMarker' ? maps.translatePoint : translate['location'];
|
|
10156
|
+
if (maps.isTileMap) {
|
|
10157
|
+
translatePoint = (currentLayer.type === 'SubLayer' && isNullOrUndefined(maps.zoomModule)) ? location = convertTileLatLongToPoint(new MapLocation(lng, lat), maps.tileZoomLevel, maps.tileTranslatePoint, true) : new Object();
|
|
10158
|
+
}
|
|
10159
|
+
const scale = type === 'AddMarker' ? maps.scale : translatePoint['scale'];
|
|
10160
|
+
const transPoint = type === 'AddMarker' ? maps.translatePoint : translatePoint['location'];
|
|
10158
10161
|
if (eventArgs.template && (!isNaN(location.x) && !isNaN(location.y))) {
|
|
10159
10162
|
markerTemplateCount++;
|
|
10160
10163
|
markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location, transPoint, scale, offset, maps);
|
|
@@ -10172,6 +10175,7 @@ class Marker {
|
|
|
10172
10175
|
maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ?
|
|
10173
10176
|
maps.markerNullCount + 1 : maps.markerNullCount;
|
|
10174
10177
|
const markerDataLength = markerData.length - maps.markerNullCount;
|
|
10178
|
+
let isMarkersClustered = false;
|
|
10175
10179
|
if (this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
|
|
10176
10180
|
layerElement.appendChild(this.markerSVGObject);
|
|
10177
10181
|
if (currentLayer.markerClusterSettings.allowClustering) {
|
|
@@ -10179,11 +10183,11 @@ class Marker {
|
|
|
10179
10183
|
maps.element.appendChild(maps.svgObject);
|
|
10180
10184
|
if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
|
|
10181
10185
|
&& maps.zoomSettings.enable) {
|
|
10182
|
-
clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, this.markerSVGObject, layerElement, true, false);
|
|
10186
|
+
isMarkersClustered = clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, this.markerSVGObject, layerElement, true, false);
|
|
10183
10187
|
layerElement.appendChild(this.markerSVGObject);
|
|
10184
10188
|
}
|
|
10185
10189
|
else {
|
|
10186
|
-
clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, this.markerSVGObject, layerElement, true, false);
|
|
10190
|
+
isMarkersClustered = clusterTemplate(currentLayer, this.markerSVGObject, maps, layerIndex, this.markerSVGObject, layerElement, true, false);
|
|
10187
10191
|
}
|
|
10188
10192
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10189
10193
|
maps.renderReactTemplates();
|
|
@@ -10192,7 +10196,7 @@ class Marker {
|
|
|
10192
10196
|
if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
|
|
10193
10197
|
getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
|
|
10194
10198
|
if (maps.checkInitialRender) {
|
|
10195
|
-
if (currentLayer.markerClusterSettings.allowClustering) {
|
|
10199
|
+
if (currentLayer.markerClusterSettings.allowClustering && !isMarkersClustered) {
|
|
10196
10200
|
clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, this.markerSVGObject, layerElement, false, false);
|
|
10197
10201
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10198
10202
|
maps.renderReactTemplates();
|
|
@@ -10200,8 +10204,8 @@ class Marker {
|
|
|
10200
10204
|
}
|
|
10201
10205
|
}
|
|
10202
10206
|
});
|
|
10203
|
-
}
|
|
10204
|
-
}
|
|
10207
|
+
}
|
|
10208
|
+
}
|
|
10205
10209
|
}
|
|
10206
10210
|
/**
|
|
10207
10211
|
* To find zoom level for individual layers like India, USA.
|
|
@@ -14930,20 +14934,22 @@ class Zoom {
|
|
|
14930
14934
|
currentEle = layerElement.childNodes[j];
|
|
14931
14935
|
let markerAnimation;
|
|
14932
14936
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
14933
|
-
|
|
14934
|
-
this.markerTranslate(
|
|
14935
|
-
const layerIndex = parseInt(
|
|
14936
|
-
const dataIndex = parseInt(
|
|
14937
|
-
const markerIndex = parseInt(
|
|
14937
|
+
Array.prototype.forEach.call(currentEle.childNodes, (childNode, k) => {
|
|
14938
|
+
this.markerTranslate(childNode, factor, x, y, scale, 'Marker', animate$$1);
|
|
14939
|
+
const layerIndex = parseInt(childNode['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
14940
|
+
const dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
14941
|
+
const markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
14938
14942
|
markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
|
|
14943
|
-
|
|
14944
|
-
|
|
14945
|
-
|
|
14946
|
-
|
|
14943
|
+
if (this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length > 0) {
|
|
14944
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14945
|
+
const markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
|
|
14946
|
+
for (let x = 0; x < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x++) {
|
|
14947
|
+
if (this.currentLayer.markerSettings[markerIndex].initialMarkerSelection[x]['latitude'] ===
|
|
14948
|
+
markerSelectionValues['latitude'] ||
|
|
14949
|
+
this.currentLayer.markerSettings[markerIndex].initialMarkerSelection[x]['longitude'] ===
|
|
14950
|
+
markerSelectionValues['longitude']) {
|
|
14951
|
+
maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
|
|
14952
|
+
}
|
|
14947
14953
|
}
|
|
14948
14954
|
}
|
|
14949
14955
|
if (((this.currentLayer.animationDuration > 0 || animationMode === 'Enable') || ((maps.layersCollection[0].animationDuration > 0 || animationMode === 'Enable') && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
|
|
@@ -14958,7 +14964,7 @@ class Zoom {
|
|
|
14958
14964
|
currentEle.style.cssText = markerStyle;
|
|
14959
14965
|
}
|
|
14960
14966
|
}
|
|
14961
|
-
}
|
|
14967
|
+
});
|
|
14962
14968
|
if (this.isPanning && maps.markerModule.sameMarkerData.length > 0) {
|
|
14963
14969
|
clusterSeparate(maps.markerModule.sameMarkerData, maps, currentEle, true);
|
|
14964
14970
|
}
|
|
@@ -15090,7 +15096,7 @@ class Zoom {
|
|
|
15090
15096
|
removeElement(markerTemplateElements.id);
|
|
15091
15097
|
}
|
|
15092
15098
|
const currentLayers = this.maps.layersCollection[layerIndex];
|
|
15093
|
-
currentLayers.markerSettings
|
|
15099
|
+
Array.prototype.forEach.call(currentLayers.markerSettings, (markerSettings, markerIndex) => {
|
|
15094
15100
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15095
15101
|
const markerDatas = markerSettings.dataSource;
|
|
15096
15102
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -15139,6 +15145,7 @@ class Zoom {
|
|
|
15139
15145
|
this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
|
|
15140
15146
|
? this.maps.markerNullCount + 1 : this.maps.markerNullCount;
|
|
15141
15147
|
const markerDataLength = markerDatas.length - this.maps.markerNullCount;
|
|
15148
|
+
let isMarkersClustered = false;
|
|
15142
15149
|
if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
|
|
15143
15150
|
if (this.maps.isTileMap) {
|
|
15144
15151
|
const polygonsElement = document.getElementById(this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group');
|
|
@@ -15161,13 +15168,13 @@ class Zoom {
|
|
|
15161
15168
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
15162
15169
|
this.maps.svgObject.appendChild(markerSVGObject);
|
|
15163
15170
|
this.maps.element.appendChild(this.maps.svgObject);
|
|
15164
|
-
clusterTemplate(currentLayers, markerSVGObject, this.maps, layerIndex, markerSVGObject, layerElement, true, true);
|
|
15171
|
+
isMarkersClustered = clusterTemplate(currentLayers, markerSVGObject, this.maps, layerIndex, markerSVGObject, layerElement, true, true);
|
|
15165
15172
|
}
|
|
15166
15173
|
}
|
|
15167
15174
|
if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(this.maps.element.id + '_Secondary_Element')) {
|
|
15168
15175
|
getElementByID(this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
|
|
15169
15176
|
if (scale >= 1) {
|
|
15170
|
-
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
15177
|
+
if (currentLayers.markerClusterSettings.allowClustering && !isMarkersClustered) {
|
|
15171
15178
|
clusterTemplate(currentLayers, markerTemplateElements, this.maps, layerIndex, markerSVGObject, layerElement, false, true);
|
|
15172
15179
|
}
|
|
15173
15180
|
}
|