@syncfusion/ej2-maps 24.1.41 → 24.1.47
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 +8 -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 +9 -9
- 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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 24.1.
|
|
3
|
+
* version : 24.1.47
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-maps@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-maps@
|
|
3
|
+
"_id": "@syncfusion/ej2-maps@24.1.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-c5WmN2YgV4LUYns8pho6Db9uQ2AOOcKtuwF50pEeJNEQGLk/iML8AG9Wm7CtxR9VvQkCt/PySZ0AkEMYv4NdXg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-maps",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-maps",
|
|
24
24
|
"/@syncfusion/ej2-vue-maps"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-24.1.41.tgz",
|
|
27
|
+
"_shasum": "a1dd14ef6bfbd226fe87c023a62bd8feedf1587d",
|
|
28
28
|
"_spec": "@syncfusion/ej2-maps@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~24.1.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~24.1.
|
|
38
|
+
"@syncfusion/ej2-base": "~24.1.46",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~24.1.46",
|
|
40
40
|
"@syncfusion/ej2-compression": "~24.1.41",
|
|
41
41
|
"@syncfusion/ej2-data": "~24.1.41",
|
|
42
42
|
"@syncfusion/ej2-file-utils": "~24.1.41",
|
|
43
|
-
"@syncfusion/ej2-pdf-export": "~24.1.
|
|
44
|
-
"@syncfusion/ej2-svg-base": "~24.1.
|
|
43
|
+
"@syncfusion/ej2-pdf-export": "~24.1.47",
|
|
44
|
+
"@syncfusion/ej2-svg-base": "~24.1.47"
|
|
45
45
|
},
|
|
46
46
|
"deprecated": false,
|
|
47
47
|
"description": "The Maps component is used to visualize the geographical data and represent the statistical data of a particular geographical area on earth with user interactivity, and provides various customizing options",
|
|
@@ -93,6 +93,6 @@
|
|
|
93
93
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
94
94
|
},
|
|
95
95
|
"typings": "index.d.ts",
|
|
96
|
-
"version": "24.1.
|
|
96
|
+
"version": "24.1.47",
|
|
97
97
|
"sideEffects": false
|
|
98
98
|
}
|
|
@@ -35,11 +35,20 @@ var Marker = /** @class */ (function () {
|
|
|
35
35
|
'left:' + maps.mapAreaRect.x + 'px;' +
|
|
36
36
|
'height:' + maps.mapAreaRect.height + 'px;' +
|
|
37
37
|
'width:' + maps.mapAreaRect.width + 'px;';
|
|
38
|
-
currentLayer.
|
|
38
|
+
var allowAnimation = (currentLayer.animationDuration !== 0 || animationMode === 'Enable') || isNullOrUndefined(maps.zoomModule);
|
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
|
+
var translatePoint;
|
|
41
|
+
if (!maps.isTileMap) {
|
|
42
|
+
translatePoint = !isNullOrUndefined(maps.zoomModule) && maps.zoomSettings.zoomFactor > 1 ?
|
|
43
|
+
getZoomTranslate(maps, currentLayer, allowAnimation) :
|
|
44
|
+
getTranslate(maps, currentLayer, allowAnimation);
|
|
45
|
+
}
|
|
46
|
+
var _loop_1 = function (markerIndex) {
|
|
47
|
+
var markerSettings = currentLayer.markerSettings[markerIndex];
|
|
39
48
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
49
|
var markerData = markerSettings.dataSource;
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
var _loop_2 = function (dataIndex) {
|
|
51
|
+
var data = markerData[dataIndex];
|
|
43
52
|
maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
|
|
44
53
|
var eventArgs = {
|
|
45
54
|
cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
|
|
@@ -62,14 +71,11 @@ var Marker = /** @class */ (function () {
|
|
|
62
71
|
var markerID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
63
72
|
+ markerIndex + '_dataIndex_' + dataIndex;
|
|
64
73
|
var location_1 = (maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, maps.tileTranslatePoint, true) : convertGeoToPoint(lat, lng, factor, currentLayer, maps);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
getTranslate(maps, currentLayer, animate);
|
|
71
|
-
var scale = type === 'AddMarker' ? maps.scale : translate['scale'];
|
|
72
|
-
var transPoint = type === 'AddMarker' ? maps.translatePoint : translate['location'];
|
|
74
|
+
if (maps.isTileMap) {
|
|
75
|
+
translatePoint = (currentLayer.type === 'SubLayer' && isNullOrUndefined(maps.zoomModule)) ? location_1 = convertTileLatLongToPoint(new MapLocation(lng, lat), maps.tileZoomLevel, maps.tileTranslatePoint, true) : new Object();
|
|
76
|
+
}
|
|
77
|
+
var scale = type === 'AddMarker' ? maps.scale : translatePoint['scale'];
|
|
78
|
+
var transPoint = type === 'AddMarker' ? maps.translatePoint : translatePoint['location'];
|
|
73
79
|
if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
|
|
74
80
|
markerTemplateCount++;
|
|
75
81
|
markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplateEle, location_1, transPoint, scale, offset, maps);
|
|
@@ -87,6 +93,7 @@ var Marker = /** @class */ (function () {
|
|
|
87
93
|
maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ?
|
|
88
94
|
maps.markerNullCount + 1 : maps.markerNullCount;
|
|
89
95
|
var markerDataLength = markerData.length - maps.markerNullCount;
|
|
96
|
+
var isMarkersClustered = false;
|
|
90
97
|
if (_this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
|
|
91
98
|
layerElement.appendChild(_this.markerSVGObject);
|
|
92
99
|
if (currentLayer.markerClusterSettings.allowClustering) {
|
|
@@ -94,11 +101,11 @@ var Marker = /** @class */ (function () {
|
|
|
94
101
|
maps.element.appendChild(maps.svgObject);
|
|
95
102
|
if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
|
|
96
103
|
&& maps.zoomSettings.enable) {
|
|
97
|
-
clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
|
|
104
|
+
isMarkersClustered = clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
|
|
98
105
|
layerElement.appendChild(_this.markerSVGObject);
|
|
99
106
|
}
|
|
100
107
|
else {
|
|
101
|
-
clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
|
|
108
|
+
isMarkersClustered = clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
|
|
102
109
|
}
|
|
103
110
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
104
111
|
maps.renderReactTemplates();
|
|
@@ -107,7 +114,7 @@ var Marker = /** @class */ (function () {
|
|
|
107
114
|
if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(maps.element.id + '_Secondary_Element')) {
|
|
108
115
|
getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
|
|
109
116
|
if (maps.checkInitialRender) {
|
|
110
|
-
if (currentLayer.markerClusterSettings.allowClustering) {
|
|
117
|
+
if (currentLayer.markerClusterSettings.allowClustering && !isMarkersClustered) {
|
|
111
118
|
clusterTemplate(currentLayer, markerTemplateEle, maps, layerIndex, _this.markerSVGObject, layerElement, false, false);
|
|
112
119
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
113
120
|
maps.renderReactTemplates();
|
|
@@ -115,8 +122,15 @@ var Marker = /** @class */ (function () {
|
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
});
|
|
118
|
-
}
|
|
119
|
-
|
|
125
|
+
};
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
127
|
+
for (var dataIndex = 0; dataIndex < markerData.length; dataIndex++) {
|
|
128
|
+
_loop_2(dataIndex);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
for (var markerIndex = 0; markerIndex < currentLayer.markerSettings.length; markerIndex++) {
|
|
132
|
+
_loop_1(markerIndex);
|
|
133
|
+
}
|
|
120
134
|
};
|
|
121
135
|
/**
|
|
122
136
|
* To find zoom level for individual layers like India, USA.
|
|
@@ -539,6 +539,15 @@ export interface MarkerClusterSettingsModel {
|
|
|
539
539
|
*/
|
|
540
540
|
allowClustering?: boolean;
|
|
541
541
|
|
|
542
|
+
/**
|
|
543
|
+
* Enables or disables intense marker clustering for improved accuracy.
|
|
544
|
+
* The default value is true, and clustering logic will be executed twice for improved accuracy.
|
|
545
|
+
* If set to false, the clustering logic will only be executed once, increasing performance while maintaining decent accuracy.
|
|
546
|
+
*
|
|
547
|
+
* @default true
|
|
548
|
+
*/
|
|
549
|
+
allowDeepClustering?: boolean;
|
|
550
|
+
|
|
542
551
|
/**
|
|
543
552
|
* Gets or sets the options for customizing the style properties of the border of the clusters in maps.
|
|
544
553
|
*/
|
package/src/maps/model/base.d.ts
CHANGED
|
@@ -461,6 +461,14 @@ export declare class MarkerClusterSettings extends ChildProperty<MarkerClusterSe
|
|
|
461
461
|
* @default false
|
|
462
462
|
*/
|
|
463
463
|
allowClustering: boolean;
|
|
464
|
+
/**
|
|
465
|
+
* Enables or disables intense marker clustering for improved accuracy.
|
|
466
|
+
* The default value is true, and clustering logic will be executed twice for improved accuracy.
|
|
467
|
+
* If set to false, the clustering logic will only be executed once, increasing performance while maintaining decent accuracy.
|
|
468
|
+
*
|
|
469
|
+
* @default true
|
|
470
|
+
*/
|
|
471
|
+
allowDeepClustering: boolean;
|
|
464
472
|
/**
|
|
465
473
|
* Gets or sets the options for customizing the style properties of the border of the clusters in maps.
|
|
466
474
|
*/
|
package/src/maps/model/base.js
CHANGED
|
@@ -357,6 +357,9 @@ var MarkerClusterSettings = /** @class */ (function (_super) {
|
|
|
357
357
|
__decorate([
|
|
358
358
|
Property(false)
|
|
359
359
|
], MarkerClusterSettings.prototype, "allowClustering", void 0);
|
|
360
|
+
__decorate([
|
|
361
|
+
Property(true)
|
|
362
|
+
], MarkerClusterSettings.prototype, "allowDeepClustering", void 0);
|
|
360
363
|
__decorate([
|
|
361
364
|
Complex({ color: 'transparent', width: 1 }, Border)
|
|
362
365
|
], MarkerClusterSettings.prototype, "border", void 0);
|
|
@@ -465,71 +465,73 @@ var Zoom = /** @class */ (function () {
|
|
|
465
465
|
removeElement(maps.element.id + '_mapsTooltip');
|
|
466
466
|
}
|
|
467
467
|
if (this.layerCollectionEle) {
|
|
468
|
-
|
|
469
|
-
var layerElement =
|
|
468
|
+
var _loop_1 = function (i_1) {
|
|
469
|
+
var layerElement = this_1.layerCollectionEle.childNodes[i_1];
|
|
470
470
|
if (layerElement.tagName === 'g') {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
var
|
|
471
|
+
this_1.templateCount++;
|
|
472
|
+
this_1.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
|
|
473
|
+
this_1.currentLayer = maps.layersCollection[this_1.index];
|
|
474
|
+
var factor_1 = maps.mapLayerPanel.calculateFactor(this_1.currentLayer);
|
|
475
475
|
var elementCount = layerElement.childElementCount;
|
|
476
|
-
|
|
476
|
+
var _loop_2 = function (j) {
|
|
477
477
|
var currentEle = layerElement.childNodes[j];
|
|
478
478
|
if (!(currentEle.id.indexOf('_Markers_Group') > -1) && (!(currentEle.id.indexOf('_bubble_Group') > -1))
|
|
479
479
|
&& (!(currentEle.id.indexOf('_dataLableIndex_Group') > -1))) {
|
|
480
480
|
if (maps.isTileMap && (currentEle.id.indexOf('_line_Group') > -1)) {
|
|
481
481
|
currentEle.remove();
|
|
482
482
|
if (layerElement.children.length > 0 && layerElement.children[0]) {
|
|
483
|
-
layerElement.insertBefore(maps.navigationLineModule.renderNavigation(
|
|
483
|
+
layerElement.insertBefore(maps.navigationLineModule.renderNavigation(this_1.currentLayer, maps.tileZoomLevel, this_1.index), layerElement.children[1]);
|
|
484
484
|
}
|
|
485
485
|
else {
|
|
486
|
-
layerElement.appendChild(maps.navigationLineModule.renderNavigation(
|
|
486
|
+
layerElement.appendChild(maps.navigationLineModule.renderNavigation(this_1.currentLayer, maps.tileZoomLevel, this_1.index));
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
else if (maps.isTileMap && (currentEle.id.indexOf('_Polygons_Group') > -1)) {
|
|
490
|
-
if (
|
|
491
|
-
|
|
490
|
+
if (this_1.currentLayer.polygonSettings.polygons.length > 0) {
|
|
491
|
+
this_1.currentLayer.polygonSettings.polygons.map(function (polygonSettings, polygonIndex) {
|
|
492
492
|
var markerData = polygonSettings.points;
|
|
493
493
|
var path = calculatePolygonPath(maps, maps.tileZoomLevel, _this.currentLayer, markerData);
|
|
494
494
|
var element = document.getElementById(maps.element.id + '_LayerIndex_' + _this.index + '_PolygonIndex_' + polygonIndex);
|
|
495
495
|
element.setAttribute('d', path);
|
|
496
496
|
});
|
|
497
|
-
document.getElementById(maps.element.id + '_LayerIndex_' +
|
|
497
|
+
document.getElementById(maps.element.id + '_LayerIndex_' + this_1.index + '_Polygons_Group').style.visibility = '';
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
else if (currentEle.id.indexOf('Legend') === -1) {
|
|
501
|
-
changeBorderWidth(currentEle,
|
|
501
|
+
changeBorderWidth(currentEle, this_1.index, scale, maps);
|
|
502
502
|
maps.zoomTranslatePoint = maps.translatePoint;
|
|
503
|
-
|
|
503
|
+
this_1.animateTransform(currentEle, animate, x, y, scale);
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
else if (currentEle.id.indexOf('_Markers_Group') > -1) {
|
|
507
|
-
if ((!
|
|
508
|
-
|
|
507
|
+
if ((!this_1.isPanning) && !isNullOrUndefined(currentEle.childNodes[0])) {
|
|
508
|
+
this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement, animate);
|
|
509
509
|
}
|
|
510
510
|
currentEle = layerElement.childNodes[j];
|
|
511
|
-
var
|
|
511
|
+
var markerAnimation_1;
|
|
512
512
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
var
|
|
516
|
-
var dataIndex = parseInt(
|
|
517
|
-
var markerIndex = parseInt(
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
513
|
+
Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
|
|
514
|
+
_this.markerTranslate(childNode, factor_1, x, y, scale, 'Marker', animate);
|
|
515
|
+
var layerIndex = parseInt(childNode['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
516
|
+
var dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
517
|
+
var markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
518
|
+
markerAnimation_1 = _this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
|
|
519
|
+
if (_this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length > 0) {
|
|
520
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
521
|
+
var markerSelectionValues = _this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
|
|
522
|
+
for (var x_1 = 0; x_1 < _this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x_1++) {
|
|
523
|
+
if (_this.currentLayer.markerSettings[markerIndex].initialMarkerSelection[x_1]['latitude'] ===
|
|
524
|
+
markerSelectionValues['latitude'] ||
|
|
525
|
+
_this.currentLayer.markerSettings[markerIndex].initialMarkerSelection[x_1]['longitude'] ===
|
|
526
|
+
markerSelectionValues['longitude']) {
|
|
527
|
+
maps.markerSelection(_this.currentLayer.markerSettings[markerIndex].selectionSettings, maps, currentEle.children[k], _this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
|
|
528
|
+
}
|
|
527
529
|
}
|
|
528
530
|
}
|
|
529
|
-
if (((
|
|
531
|
+
if (((_this.currentLayer.animationDuration > 0 || animationMode === 'Enable') || ((maps.layersCollection[0].animationDuration > 0 || animationMode === 'Enable') && _this.currentLayer.type === 'SubLayer')) && !_this.isPanning) {
|
|
530
532
|
if (maps.isTileMap) {
|
|
531
533
|
var groupElement = document.querySelector('.GroupElement');
|
|
532
|
-
if (groupElement && !(document.querySelector('.ClusterGroupElement')) &&
|
|
534
|
+
if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation_1) {
|
|
533
535
|
groupElement.style.display = 'none';
|
|
534
536
|
}
|
|
535
537
|
}
|
|
@@ -538,8 +540,8 @@ var Zoom = /** @class */ (function () {
|
|
|
538
540
|
currentEle.style.cssText = markerStyle;
|
|
539
541
|
}
|
|
540
542
|
}
|
|
541
|
-
}
|
|
542
|
-
if (
|
|
543
|
+
});
|
|
544
|
+
if (this_1.isPanning && maps.markerModule.sameMarkerData.length > 0) {
|
|
543
545
|
clusterSeparate(maps.markerModule.sameMarkerData, maps, currentEle, true);
|
|
544
546
|
}
|
|
545
547
|
else if (maps.markerModule.sameMarkerData.length > 0) {
|
|
@@ -549,7 +551,7 @@ var Zoom = /** @class */ (function () {
|
|
|
549
551
|
}
|
|
550
552
|
}
|
|
551
553
|
if (document.getElementById(maps.element.id + '_mapsTooltip') && maps.mapsTooltipModule.tooltipTargetID.indexOf('_MarkerIndex_')
|
|
552
|
-
&& !
|
|
554
|
+
&& !this_1.isPanning) {
|
|
553
555
|
var mapsTooltip = maps.mapsTooltipModule;
|
|
554
556
|
var tooltipElement = currentEle.querySelector('#' + mapsTooltip.tooltipTargetID);
|
|
555
557
|
if (!isNullOrUndefined(tooltipElement)) {
|
|
@@ -587,7 +589,7 @@ var Zoom = /** @class */ (function () {
|
|
|
587
589
|
var centerY = bubbleCollection['center']['y'];
|
|
588
590
|
var currentX = ((centerX + x) * scale);
|
|
589
591
|
var currentY = ((centerY + y) * scale);
|
|
590
|
-
var duration =
|
|
592
|
+
var duration = this_1.currentLayer.animationDuration === 0 && animationMode === 'Enable' ? 1000 : this_1.currentLayer.animationDuration;
|
|
591
593
|
if (!animate || duration === 0) {
|
|
592
594
|
childElement.setAttribute('transform', 'translate( ' + currentX + ' ' + currentY + ' )');
|
|
593
595
|
}
|
|
@@ -599,25 +601,25 @@ var Zoom = /** @class */ (function () {
|
|
|
599
601
|
}
|
|
600
602
|
}
|
|
601
603
|
}
|
|
602
|
-
else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(maps.layers[
|
|
603
|
-
|
|
604
|
+
else if (currentEle.id.indexOf('_dataLableIndex_Group') > -1 && !isNullOrUndefined(maps.layers[this_1.index])) {
|
|
605
|
+
this_1.intersect = [];
|
|
604
606
|
maps.zoomLabelPositions = [];
|
|
605
607
|
maps.zoomLabelPositions = maps.dataLabelModule.dataLabelCollections;
|
|
606
608
|
var labelAnimate = !maps.isTileMap && animate;
|
|
607
609
|
for (var k = 0; k < currentEle.childElementCount; k++) {
|
|
608
610
|
if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
|
|
609
611
|
var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
|
|
610
|
-
|
|
611
|
-
maps.zoomShapeCollection.push(
|
|
612
|
-
|
|
613
|
-
var dataLabel = maps.layers[
|
|
612
|
+
this_1.zoomshapewidth = currentEle.childNodes[k].getBoundingClientRect();
|
|
613
|
+
maps.zoomShapeCollection.push(this_1.zoomshapewidth);
|
|
614
|
+
this_1.dataLabelTranslate(currentEle.childNodes[k], factor_1, x, y, scale, 'DataLabel', labelAnimate);
|
|
615
|
+
var dataLabel = maps.layers[this_1.index].dataLabelSettings;
|
|
614
616
|
var border = dataLabel.border;
|
|
615
617
|
if (k > 0 && border['width'] > 1) {
|
|
616
618
|
if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1 && !isNullOrUndefined(maps.zoomLabelPositions[labelIndex])) {
|
|
617
619
|
var labelX = ((maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
|
|
618
620
|
var labelY = ((maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
|
|
619
621
|
var zoomtext = currentEle.childNodes[k]['textContent'];
|
|
620
|
-
var style = maps.layers[
|
|
622
|
+
var style = maps.layers[this_1.index].dataLabelSettings.textStyle;
|
|
621
623
|
var zoomtextSize = measureText(zoomtext, style);
|
|
622
624
|
var padding = 5;
|
|
623
625
|
var rectElement = currentEle.childNodes[k - 1];
|
|
@@ -630,9 +632,16 @@ var Zoom = /** @class */ (function () {
|
|
|
630
632
|
}
|
|
631
633
|
}
|
|
632
634
|
}
|
|
635
|
+
};
|
|
636
|
+
for (var j = 0; j < elementCount; j++) {
|
|
637
|
+
_loop_2(j);
|
|
633
638
|
}
|
|
634
639
|
}
|
|
635
640
|
maps.arrangeTemplate();
|
|
641
|
+
};
|
|
642
|
+
var this_1 = this;
|
|
643
|
+
for (var i_1 = 0; i_1 < this.layerCollectionEle.childElementCount; i_1++) {
|
|
644
|
+
_loop_1(i_1);
|
|
636
645
|
}
|
|
637
646
|
if (!isNullOrUndefined(this.currentLayer)) {
|
|
638
647
|
if (!animate || this.currentLayer.animationDuration === 0 || maps.isTileMap) {
|
|
@@ -672,7 +681,7 @@ var Zoom = /** @class */ (function () {
|
|
|
672
681
|
removeElement(markerTemplateElements.id);
|
|
673
682
|
}
|
|
674
683
|
var currentLayers = this.maps.layersCollection[layerIndex];
|
|
675
|
-
currentLayers.markerSettings
|
|
684
|
+
Array.prototype.forEach.call(currentLayers.markerSettings, function (markerSettings, markerIndex) {
|
|
676
685
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
677
686
|
var markerDatas = markerSettings.dataSource;
|
|
678
687
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -721,6 +730,7 @@ var Zoom = /** @class */ (function () {
|
|
|
721
730
|
_this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
|
|
722
731
|
? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
|
|
723
732
|
var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
|
|
733
|
+
var isMarkersClustered = false;
|
|
724
734
|
if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
|
|
725
735
|
if (_this.maps.isTileMap) {
|
|
726
736
|
var polygonsElement = document.getElementById(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group');
|
|
@@ -743,13 +753,13 @@ var Zoom = /** @class */ (function () {
|
|
|
743
753
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
744
754
|
_this.maps.svgObject.appendChild(markerSVGObject);
|
|
745
755
|
_this.maps.element.appendChild(_this.maps.svgObject);
|
|
746
|
-
clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
|
|
756
|
+
isMarkersClustered = clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
|
|
747
757
|
}
|
|
748
758
|
}
|
|
749
759
|
if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
|
|
750
760
|
getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
|
|
751
761
|
if (scale >= 1) {
|
|
752
|
-
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
762
|
+
if (currentLayers.markerClusterSettings.allowClustering && !isMarkersClustered) {
|
|
753
763
|
clusterTemplate(currentLayers, markerTemplateElements, _this.maps, layerIndex, markerSVGObject, layerElement, false, true);
|
|
754
764
|
}
|
|
755
765
|
}
|
|
@@ -483,7 +483,7 @@ export declare function markerShapeChoose(eventArgs: IMarkerRenderingEventArgs,
|
|
|
483
483
|
* @returns {void}
|
|
484
484
|
* @private
|
|
485
485
|
*/
|
|
486
|
-
export declare function clusterTemplate(currentLayer: LayerSettings, markerTemplate: HTMLElement | Element, maps: Maps, layerIndex: number, markerCollection: Element, layerElement: Element, check: boolean, zoomCheck: boolean):
|
|
486
|
+
export declare function clusterTemplate(currentLayer: LayerSettings, markerTemplate: HTMLElement | Element, maps: Maps, layerIndex: number, markerCollection: Element, layerElement: Element, check: boolean, zoomCheck: boolean): boolean;
|
|
487
487
|
/**
|
|
488
488
|
*
|
|
489
489
|
* @param {MarkerClusterData[]} sameMarkerData - Specifies the marker data
|