@syncfusion/ej2-maps 19.4.55 → 20.1.48

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.
@@ -82,8 +82,13 @@ var Zoom = /** @class */ (function () {
82
82
  translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
83
83
  map.translatePoint = new Point(translatePointX, translatePointY);
84
84
  map.scale = newZoomFactor;
85
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
86
- this.applyTransform();
85
+ if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
86
+ map.translatePoint = map.previousPoint;
87
+ map.scale = map.previousScale;
88
+ }
89
+ else {
90
+ this.applyTransform();
91
+ }
87
92
  }
88
93
  else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
89
94
  this.getTileTranslatePosition(prevLevel, newZoomFactor, position, type);
@@ -100,31 +105,38 @@ var Zoom = /** @class */ (function () {
100
105
  }
101
106
  map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
102
107
  map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
103
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
104
- if (document.querySelector('.GroupElement')) {
105
- document.querySelector('.GroupElement').style.display = 'none';
108
+ if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
109
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
110
+ map.scale = map.previousScale;
111
+ map.tileZoomLevel = prevLevel;
112
+ map.zoomSettings.zoomFactor = map.previousScale;
106
113
  }
107
- if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
108
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
109
- }
110
- this.markerLineAnimation(map);
111
- map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
112
- var element1 = document.getElementById(this.maps.element.id + '_tiles');
113
- var animationDuration = this.maps.layersCollection[0].animationDuration;
114
- setTimeout(function () {
115
- // if (type === 'ZoomOut') {
116
- // element1.removeChild(element1.children[element1.childElementCount - 1]);
117
- // if (element1.childElementCount) {
118
- // element1.removeChild(element1.children[element1.childElementCount - 1]);
119
- // } else {
120
- // element1 = element1;
121
- // }
122
- // }
123
- _this.applyTransform();
124
- if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
125
- document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
114
+ else {
115
+ if (document.querySelector('.GroupElement')) {
116
+ document.querySelector('.GroupElement').style.display = 'none';
117
+ }
118
+ if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
119
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
126
120
  }
127
- }, animationDuration);
121
+ this.markerLineAnimation(map);
122
+ map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
123
+ var element1 = document.getElementById(this.maps.element.id + '_tiles');
124
+ var animationDuration = this.maps.layersCollection[0].animationDuration;
125
+ setTimeout(function () {
126
+ // if (type === 'ZoomOut') {
127
+ // element1.removeChild(element1.children[element1.childElementCount - 1]);
128
+ // if (element1.childElementCount) {
129
+ // element1.removeChild(element1.children[element1.childElementCount - 1]);
130
+ // } else {
131
+ // element1 = element1;
132
+ // }
133
+ // }
134
+ _this.applyTransform();
135
+ if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
136
+ document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
137
+ }
138
+ }, animationDuration);
139
+ }
128
140
  }
129
141
  this.maps.zoomNotApplied = false;
130
142
  };
@@ -146,6 +158,7 @@ var Zoom = /** @class */ (function () {
146
158
  };
147
159
  }
148
160
  map.trigger('zoom', zoomArgs);
161
+ return zoomArgs.cancel;
149
162
  };
150
163
  Zoom.prototype.getTileTranslatePosition = function (prevLevel, currentLevel, position, type) {
151
164
  var map = this.maps;
@@ -171,6 +184,7 @@ var Zoom = /** @class */ (function () {
171
184
  var zoomRect = this.zoomingRect;
172
185
  var maxZoom = map.zoomSettings.maxZoom;
173
186
  var minZoom = map.zoomSettings.minZoom;
187
+ var isZoomCancelled;
174
188
  if (zoomRect.height > 0 && zoomRect.width > 0) {
175
189
  var x = this.zoomingRect.x + (this.zoomingRect.width / 2);
176
190
  var y = this.zoomingRect.y + (this.zoomingRect.height / 2);
@@ -183,7 +197,11 @@ var Zoom = /** @class */ (function () {
183
197
  var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
184
198
  map.translatePoint = new Point(translatePointX, translatePointY);
185
199
  map.scale = zoomCalculationFactor;
186
- this.triggerZoomEvent(prevTilePoint, prevLevel, '');
200
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
201
+ if (isZoomCancelled) {
202
+ map.translatePoint = map.previousPoint;
203
+ map.scale = map.previousScale;
204
+ }
187
205
  }
188
206
  else {
189
207
  zoomCalculationFactor = prevLevel + (Math.round(prevLevel + (((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2)));
@@ -196,13 +214,21 @@ var Zoom = /** @class */ (function () {
196
214
  map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, zoomCalculationFactor))) /
197
215
  (Math.pow(2, zoomCalculationFactor));
198
216
  map.scale = (Math.pow(2, zoomCalculationFactor));
199
- this.triggerZoomEvent(prevTilePoint, prevLevel, '');
200
- map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
217
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
218
+ if (isZoomCancelled) {
219
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
220
+ map.scale = map.tileZoomLevel = map.zoomSettings.zoomFactor = prevLevel;
221
+ }
222
+ else {
223
+ map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
224
+ }
225
+ }
226
+ if (!isZoomCancelled) {
227
+ map.mapScaleValue = zoomCalculationFactor;
228
+ this.applyTransform(true);
229
+ this.maps.zoomNotApplied = false;
230
+ this.zoomingRect = null;
201
231
  }
202
- map.mapScaleValue = zoomCalculationFactor;
203
- this.applyTransform(true);
204
- this.maps.zoomNotApplied = false;
205
- this.zoomingRect = null;
206
232
  }
207
233
  };
208
234
  Zoom.prototype.setInteraction = function (newInteraction) {
@@ -232,6 +258,7 @@ var Zoom = /** @class */ (function () {
232
258
  this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
233
259
  var zoomCalculationFactor = this.pinchFactor;
234
260
  var zoomArgs;
261
+ var isZoomCancelled;
235
262
  if (!map.isTileMap) {
236
263
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
237
264
  var minBounds = map.baseMapRectBounds['min'];
@@ -247,7 +274,11 @@ var Zoom = /** @class */ (function () {
247
274
  translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
248
275
  map.translatePoint = new Point(translatePointX, translatePointY);
249
276
  map.scale = zoomCalculationFactor;
250
- this.triggerZoomEvent(prevTilePoint, prevLevel, '');
277
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
278
+ if (isZoomCancelled) {
279
+ map.translatePoint = map.previousPoint;
280
+ map.scale = map.previousScale;
281
+ }
251
282
  }
252
283
  else {
253
284
  var newTileFactor = zoomCalculationFactor;
@@ -258,10 +289,20 @@ var Zoom = /** @class */ (function () {
258
289
  map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
259
290
  (Math.pow(2, newTileFactor));
260
291
  map.scale = (Math.pow(2, newTileFactor));
261
- this.triggerZoomEvent(prevTilePoint, prevLevel, '');
262
- map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
292
+ isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
293
+ if (isZoomCancelled) {
294
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
295
+ map.scale = map.previousScale;
296
+ map.tileZoomLevel = prevLevel;
297
+ map.zoomSettings.zoomFactor = map.previousScale;
298
+ }
299
+ else {
300
+ map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
301
+ }
302
+ }
303
+ if (!isZoomCancelled) {
304
+ this.applyTransform();
263
305
  }
264
- this.applyTransform();
265
306
  };
266
307
  Zoom.prototype.drawZoomRectangle = function () {
267
308
  var map = this.maps;
@@ -545,10 +586,10 @@ var Zoom = /** @class */ (function () {
545
586
  }
546
587
  var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
547
588
  Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
548
- parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : 0;
589
+ parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
549
590
  var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
550
591
  Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
551
- parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : 0;
592
+ parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
552
593
  var offset = markerSettings.offset;
553
594
  if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
554
595
  var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
@@ -568,10 +609,10 @@ var Zoom = /** @class */ (function () {
568
609
  nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
569
610
  markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
570
611
  markerCounts += (eventArgs.cancel) ? 1 : 0;
571
- _this.maps.markerNullCount = (!isNullOrUndefined(lati) || !isNullOrUndefined(long))
572
- ? _this.maps.markerNullCount : _this.maps.markerNullCount + 1;
612
+ _this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
613
+ ? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
573
614
  var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
574
- if (markerSVGObject.childElementCount === (markerDatas.length - markerTemplateCounts - nullCount) && (type !== 'Template')) {
615
+ if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
575
616
  layerElement.appendChild(markerSVGObject);
576
617
  if (currentLayers.markerClusterSettings.allowClustering) {
577
618
  _this.maps.svgObject.appendChild(markerSVGObject);
@@ -579,7 +620,7 @@ var Zoom = /** @class */ (function () {
579
620
  clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
580
621
  }
581
622
  }
582
- if (markerTemplateElements.childElementCount === (markerDatas.length - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
623
+ if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
583
624
  getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
584
625
  if (scale >= 1) {
585
626
  if (currentLayers.markerClusterSettings.allowClustering) {
@@ -978,8 +1019,13 @@ var Zoom = /** @class */ (function () {
978
1019
  map.translatePoint = new Point(translatePointX, translatePointY);
979
1020
  map.zoomTranslatePoint = map.translatePoint;
980
1021
  map.scale = zoomFactor;
981
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
982
- this.applyTransform(true);
1022
+ if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
1023
+ map.translatePoint = map.zoomTranslatePoint = map.previousPoint;
1024
+ map.scale = map.previousScale;
1025
+ }
1026
+ else {
1027
+ this.applyTransform(true);
1028
+ }
983
1029
  }
984
1030
  else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
985
1031
  var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
@@ -996,29 +1042,36 @@ var Zoom = /** @class */ (function () {
996
1042
  map.tileTranslatePoint.y = map.initialTileTranslate.y;
997
1043
  tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
998
1044
  }
999
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
1000
- map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
1001
- map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
1002
- if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
1003
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
1045
+ if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
1046
+ map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
1047
+ map.scale = map.previousScale;
1048
+ map.tileZoomLevel = prevLevel;
1049
+ map.zoomSettings.zoomFactor = map.previousScale;
1004
1050
  }
1005
- if (document.querySelector('.GroupElement')) {
1006
- document.querySelector('.GroupElement').style.display = 'none';
1007
- }
1008
- this.markerLineAnimation(map);
1009
- map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
1010
- var element1 = document.getElementById(this.maps.element.id + '_tiles');
1011
- var animationDuration = this.maps.layersCollection[0].animationDuration;
1012
- setTimeout(function () {
1013
- if (type === 'ZoomOut' || type === 'Reset') {
1014
- // element1.removeChild(element1.children[element1.childElementCount - 1]);
1015
- // element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
1051
+ else {
1052
+ map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
1053
+ map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
1054
+ if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
1055
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
1016
1056
  }
1017
- _this.applyTransform(true);
1018
- if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
1019
- document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
1057
+ if (document.querySelector('.GroupElement')) {
1058
+ document.querySelector('.GroupElement').style.display = 'none';
1020
1059
  }
1021
- }, animationDuration);
1060
+ this.markerLineAnimation(map);
1061
+ map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
1062
+ var element1 = document.getElementById(this.maps.element.id + '_tiles');
1063
+ var animationDuration = this.maps.layersCollection[0].animationDuration;
1064
+ setTimeout(function () {
1065
+ if (type === 'ZoomOut' || type === 'Reset') {
1066
+ // element1.removeChild(element1.children[element1.childElementCount - 1]);
1067
+ // element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
1068
+ }
1069
+ _this.applyTransform(true);
1070
+ if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
1071
+ document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
1072
+ }
1073
+ }, animationDuration);
1074
+ }
1022
1075
  }
1023
1076
  this.maps.zoomNotApplied = false;
1024
1077
  }
@@ -1027,7 +1080,7 @@ var Zoom = /** @class */ (function () {
1027
1080
  var map = this.maps;
1028
1081
  this.toolBarGroup = map.renderer.createGroup({
1029
1082
  id: map.element.id + '_Zooming_KitCollection',
1030
- opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
1083
+ opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
1031
1084
  });
1032
1085
  var kitHeight = 16;
1033
1086
  var kitWidth = 16;
@@ -1437,14 +1490,14 @@ var Zoom = /** @class */ (function () {
1437
1490
  if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
1438
1491
  if (!this.maps.zoomSettings.enablePanning) {
1439
1492
  if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
1440
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
1441
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
1493
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
1494
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
1442
1495
  }
1443
1496
  }
1444
1497
  }
1445
1498
  }
1446
1499
  else {
1447
- getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
1500
+ getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
1448
1501
  if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
1449
1502
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
1450
1503
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
@@ -40,7 +40,11 @@ export declare type MapsTheme =
40
40
  /** Renders a map with Bootstrap5 theme. */
41
41
  'Bootstrap5' |
42
42
  /** Render a map with Bootstrap5 dark theme. */
43
- 'Bootstrap5Dark';
43
+ 'Bootstrap5Dark' |
44
+ /** Renders a map with Fluent theme. */
45
+ 'Fluent' |
46
+ /** Render a map with Fluent dark theme. */
47
+ 'FluentDark';
44
48
  /**
45
49
  * Defines the position of the legend.
46
50
  */
@@ -818,6 +818,14 @@ export declare function fixInitialScaleForTile(map: Maps): void;
818
818
  * @returns {Element} - Returns the element
819
819
  */
820
820
  export declare function getElementByID(id: string): Element;
821
+ /**
822
+ * Function to get clientElement from id.
823
+ *
824
+ * @param {string} id - Specifies the id
825
+ * @returns {Element} - Returns the element
826
+ * @private
827
+ */
828
+ export declare function getClientElement(id: string): ClientRect;
821
829
  /**
822
830
  * To apply internalization
823
831
  *
@@ -833,7 +841,7 @@ export declare function Internalize(maps: Maps, value: number): string;
833
841
  * @returns {Function} - Returns the function
834
842
  * @private
835
843
  */
836
- export declare function getTemplateFunction(template: string): any;
844
+ export declare function getTemplateFunction(template: string, maps: Maps): any;
837
845
  /**
838
846
  * Function to get element from id.
839
847
  *
@@ -1276,7 +1276,7 @@ export function marker(eventArgs, markerSettings, markerData, dataIndex, locatio
1276
1276
  */
1277
1277
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1278
1278
  export function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
1279
- templateFn = getTemplateFunction(eventArgs.template);
1279
+ templateFn = getTemplateFunction(eventArgs.template, maps);
1280
1280
  if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
1281
1281
  var templateElement = templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false);
1282
1282
  var markerElement = convertElement(templateElement, markerID, data, markerIndex, maps);
@@ -1312,8 +1312,10 @@ export function maintainSelection(elementId, elementClass, element, className) {
1312
1312
  if (elementId) {
1313
1313
  for (var index = 0; index < elementId.length; index++) {
1314
1314
  if (element.getAttribute('id') === elementId[index]) {
1315
- if (isNullOrUndefined(getElement(elementClass.id)) || index === 0) {
1316
- document.body.appendChild(elementClass);
1315
+ if (index === 0 || element.tagName === 'g') {
1316
+ if (!isNullOrUndefined(elementClass) && !isNullOrUndefined(elementClass.id)) {
1317
+ document.body.appendChild(elementClass);
1318
+ }
1317
1319
  if (element.id.indexOf('_MarkerIndex_') > -1 && element.childElementCount > 0) {
1318
1320
  element.children[0].setAttribute('class', className);
1319
1321
  }
@@ -2274,6 +2276,22 @@ export function fixInitialScaleForTile(map) {
2274
2276
  export function getElementByID(id) {
2275
2277
  return document.getElementById(id);
2276
2278
  }
2279
+ /**
2280
+ * Function to get clientElement from id.
2281
+ *
2282
+ * @param {string} id - Specifies the id
2283
+ * @returns {Element} - Returns the element
2284
+ * @private
2285
+ */
2286
+ export function getClientElement(id) {
2287
+ var element = document.getElementById(id);
2288
+ if (!isNullOrUndefined(element)) {
2289
+ return element.getClientRects()[0];
2290
+ }
2291
+ else {
2292
+ return null;
2293
+ }
2294
+ }
2277
2295
  /**
2278
2296
  * To apply internalization
2279
2297
  *
@@ -2294,7 +2312,7 @@ export function Internalize(maps, value) {
2294
2312
  * @private
2295
2313
  */
2296
2314
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2297
- export function getTemplateFunction(template) {
2315
+ export function getTemplateFunction(template, maps) {
2298
2316
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2299
2317
  var templateFn = null;
2300
2318
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2303,6 +2321,9 @@ export function getTemplateFunction(template) {
2303
2321
  if (document.querySelectorAll(template).length) {
2304
2322
  templateFn = templateComplier(document.querySelector(template).innerHTML.trim());
2305
2323
  }
2324
+ else if (maps.isVue || maps.isVue3) {
2325
+ templateFn = templateComplier(template);
2326
+ }
2306
2327
  }
2307
2328
  catch (e) {
2308
2329
  templateFn = templateComplier(template);
@@ -2707,6 +2728,7 @@ export function createTooltip(id, text, top, left, fontSize) {
2707
2728
  'left:' + left.toString() + 'px;' +
2708
2729
  'color: #000000; ' +
2709
2730
  'background:' + '#FFFFFF' + ';' +
2731
+ 'z-index: 2;' +
2710
2732
  'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
2711
2733
  if (!tooltip) {
2712
2734
  tooltip = createElement('div', {
@@ -2908,6 +2930,9 @@ export function changeBorderWidth(element, index, scale, maps) {
2908
2930
  currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2909
2931
  }
2910
2932
  }
2933
+ else {
2934
+ currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2935
+ }
2911
2936
  }
2912
2937
  else {
2913
2938
  currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);