@syncfusion/ej2-maps 20.3.47 → 20.3.56

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.
@@ -667,9 +667,9 @@ function renderTextElement(option, style, color, parent, isMinus) {
667
667
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
668
668
  function convertElement(element, markerId, data, index, mapObj) {
669
669
  var childElement = createElement('div', {
670
- id: markerId,
671
- styles: 'position: absolute;pointer-events: auto;'
670
+ id: markerId
672
671
  });
672
+ childElement.style.cssText = 'position: absolute;pointer-events: auto;';
673
673
  var elementLength = element.length;
674
674
  while (elementLength > 0) {
675
675
  childElement.appendChild(element[0]);
@@ -755,11 +755,12 @@ function convertElementFromLabel(element, labelId, data, index, mapObj) {
755
755
  // eslint-disable-next-line @typescript-eslint/ban-types
756
756
  templateHtml = templateHtml.replace(new RegExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
757
757
  }
758
- return createElement('div', {
758
+ var templateEle = createElement('div', {
759
759
  id: labelId,
760
- innerHTML: templateHtml,
761
- styles: 'position: absolute'
760
+ innerHTML: templateHtml
762
761
  });
762
+ templateEle.style.position = 'absolute';
763
+ return templateEle;
763
764
  }
764
765
  /**
765
766
  *
@@ -1690,7 +1691,7 @@ function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, la
1690
1691
  dataSource[i][dataPath]);
1691
1692
  var shapePath = checkPropertyPath(shapeDataPath, propertyPath, properties);
1692
1693
  var shapeDataPathValue = !isNullOrUndefined(shapeDataPath) && isNaN(properties[shapePath])
1693
- ? shapeDataPath.toLowerCase() : shapeDataPath;
1694
+ ? (typeof shapeDataPath === 'string' ? shapeDataPath.toLowerCase() : shapeDataPath) : shapeDataPath;
1694
1695
  var propertiesShapePathValue = !isNullOrUndefined(properties[shapePath]) && isNaN(properties[shapePath])
1695
1696
  ? properties[shapePath].toLowerCase() : properties[shapePath];
1696
1697
  if (shapeDataPathValue === propertiesShapePathValue) {
@@ -1714,7 +1715,8 @@ function checkPropertyPath(shapeData, shapePropertyPath, shape) {
1714
1715
  var properties = (Object.prototype.toString.call(shapePropertyPath) === '[object Array]' ?
1715
1716
  shapePropertyPath : [shapePropertyPath]);
1716
1717
  for (var i = 0; i < properties.length; i++) {
1717
- var shapeDataValue = !isNullOrUndefined(shapeData) ? shapeData.toLowerCase() : shapeData;
1718
+ var shapeDataValue = !isNullOrUndefined(shapeData) && typeof shapeData === 'string' ?
1719
+ shapeData.toLowerCase() : shapeData;
1718
1720
  var shapePropertiesValue = !isNullOrUndefined(shape[properties[i]])
1719
1721
  && isNaN(shape[properties[i]])
1720
1722
  ? shape[properties[i]].toLowerCase() : shape[properties[i]];
@@ -2159,7 +2161,7 @@ function getZoomTranslate(mapObject, layer, animate) {
2159
2161
  mapObject.zoomSettings.zoomFactor ===
2160
2162
  mapObject.mapScaleValue ? mapObject.zoomSettings.zoomFactor :
2161
2163
  mapObject.zoomSettings.zoomFactor !== mapObject.mapScaleValue && !mapObject.centerPositionChanged ? mapObject.mapScaleValue : mapObject.zoomSettings.zoomFactor;
2162
- if (mapObject.zoomSettings.shouldZoomInitially) {
2164
+ if (mapObject.zoomSettings.shouldZoomInitially && !mapObject.isZoomByPosition) {
2163
2165
  mapObject.mapScaleValue = zoomFactorValue = scaleFactor = ((mapObject.enablePersistence || mapObject.zoomSettings.shouldZoomInitially) && mapObject.scale === 1)
2164
2166
  ? mapObject.scale : (isNullOrUndefined(mapObject.markerZoomFactor)) ? mapObject.mapScaleValue : mapObject.markerZoomFactor;
2165
2167
  zoomFactorValue = mapObject.mapScaleValue;
@@ -2193,6 +2195,10 @@ function getZoomTranslate(mapObject, layer, animate) {
2193
2195
  y = -point.y + topPosition;
2194
2196
  }
2195
2197
  else {
2198
+ if (mapObject.isZoomByPosition) {
2199
+ mapObject.zoomTranslatePoint.x = -point.x + leftPosition;
2200
+ mapObject.zoomTranslatePoint.y = -point.y + topPosition;
2201
+ }
2196
2202
  x = mapObject.zoomTranslatePoint.x;
2197
2203
  y = mapObject.zoomTranslatePoint.y;
2198
2204
  zoomFactorValue = zoomFactor;
@@ -2400,7 +2406,7 @@ function triggerShapeEvent(targetId, selection, maps, eventName) {
2400
2406
  target: targetId,
2401
2407
  maps: maps
2402
2408
  };
2403
- maps.trigger(eventName, eventArgs, function (observedArgs) {
2409
+ maps.trigger(eventName, eventArgs, function () {
2404
2410
  eventArgs.border.opacity = isNullOrUndefined(eventArgs.border.opacity) ? eventArgs.opacity : eventArgs.border.opacity;
2405
2411
  });
2406
2412
  return eventArgs;
@@ -2628,11 +2634,11 @@ function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element, isTou
2628
2634
  }
2629
2635
  if (!tooltip) {
2630
2636
  tooltip = createElement('div', {
2631
- id: id,
2632
- styles: 'background-color: rgb(255, 255, 255) !important; color:black !important; ' +
2633
- 'position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;' +
2634
- 'font-size:12px; font-family: "Segoe UI"; text-align:center'
2637
+ id: id
2635
2638
  });
2639
+ tooltip.style.cssText = 'background-color: rgb(255, 255, 255) !important; color:black !important; ' +
2640
+ 'position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;' +
2641
+ 'font-size:12px; font-family: "Segoe UI"; text-align:center';
2636
2642
  }
2637
2643
  if (x < (areaWidth - width)) {
2638
2644
  // eslint-disable-next-line no-self-assign
@@ -2730,13 +2736,14 @@ function createTooltip(id, text, top, left, fontSize) {
2730
2736
  'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
2731
2737
  if (!tooltip) {
2732
2738
  tooltip = createElement('div', {
2733
- id: id, innerHTML: '&nbsp;' + text + '&nbsp;', styles: style
2739
+ id: id, innerHTML: '&nbsp;' + text + '&nbsp;'
2734
2740
  });
2741
+ tooltip.style.cssText = style;
2735
2742
  document.body.appendChild(tooltip);
2736
2743
  }
2737
2744
  else {
2738
- tooltip.setAttribute('innerHTML', '&nbsp;' + text + '&nbsp;');
2739
- tooltip.setAttribute('styles', style);
2745
+ tooltip.innerHTML = '&nbsp;' + text + '&nbsp;';
2746
+ tooltip.style.cssText = style;
2740
2747
  }
2741
2748
  }
2742
2749
  /**
@@ -3133,7 +3140,7 @@ function animate(element, delay, duration, process, end) {
3133
3140
  end.call(_this, { element: element });
3134
3141
  if (element.id.indexOf('Marker') > -1) {
3135
3142
  var markerElement = getElementByID(element.id.split('_Layer')[0] + '_Markers_Group');
3136
- markerElement.setAttribute('style', markerStyle);
3143
+ markerElement.style.cssText = markerStyle;
3137
3144
  }
3138
3145
  }
3139
3146
  };
@@ -4404,7 +4411,7 @@ var ZoomSettings = /** @__PURE__ @class */ (function (_super) {
4404
4411
  Property(false)
4405
4412
  ], ZoomSettings.prototype, "doubleClickZoom", void 0);
4406
4413
  __decorate$1([
4407
- Property(false)
4414
+ Property(true)
4408
4415
  ], ZoomSettings.prototype, "pinchZooming", void 0);
4409
4416
  __decorate$1([
4410
4417
  Property(false)
@@ -4880,18 +4887,18 @@ var Marker = /** @__PURE__ @class */ (function () {
4880
4887
  var currentLayer = maps.layersCollection[layerIndex];
4881
4888
  this.markerSVGObject = maps.renderer.createGroup({
4882
4889
  id: maps.element.id + '_Markers_Group',
4883
- class: 'GroupElement',
4884
- style: 'pointer-events: auto;'
4890
+ class: 'GroupElement'
4885
4891
  });
4892
+ this.markerSVGObject.style.pointerEvents = 'auto';
4886
4893
  var markerTemplateEle = createElement('div', {
4887
4894
  id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
4888
- className: maps.element.id + '_template',
4889
- styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
4890
- 'top:' + maps.mapAreaRect.y + 'px;' +
4891
- 'left:' + maps.mapAreaRect.x + 'px;' +
4892
- 'height:' + maps.mapAreaRect.height + 'px;' +
4893
- 'width:' + maps.mapAreaRect.width + 'px;'
4895
+ className: maps.element.id + '_template'
4894
4896
  });
4897
+ markerTemplateEle.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
4898
+ 'top:' + maps.mapAreaRect.y + 'px;' +
4899
+ 'left:' + maps.mapAreaRect.x + 'px;' +
4900
+ 'height:' + maps.mapAreaRect.height + 'px;' +
4901
+ 'width:' + maps.mapAreaRect.width + 'px;';
4895
4902
  currentLayer.markerSettings.map(function (markerSettings, markerIndex) {
4896
4903
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4897
4904
  var markerData = markerSettings.dataSource;
@@ -5108,7 +5115,8 @@ var Marker = /** @__PURE__ @class */ (function () {
5108
5115
  }
5109
5116
  if (this.maps.isTileMap && !this.maps.enablePersistence
5110
5117
  && this.maps.mapScaleValue <= 1) {
5111
- this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ? 1 : this.maps.mapScaleValue;
5118
+ this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ? (this.maps.isZoomByPosition ? this.maps.tileZoomLevel : 1)
5119
+ : this.maps.mapScaleValue;
5112
5120
  if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1) {
5113
5121
  this.maps.tileTranslatePoint.x = 0;
5114
5122
  this.maps.tileTranslatePoint.y = 0;
@@ -5256,7 +5264,7 @@ var Marker = /** @__PURE__ @class */ (function () {
5256
5264
  }
5257
5265
  var options = this.getMarker(targetId);
5258
5266
  if (this.maps.markerClusterExpand) {
5259
- e.target.setAttribute('style', 'cursor: pointer');
5267
+ e.target.style.cursor = 'pointer';
5260
5268
  }
5261
5269
  if (isNullOrUndefined(options)) {
5262
5270
  return;
@@ -5777,10 +5785,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5777
5785
  height: areaRect.height
5778
5786
  });
5779
5787
  var parentElement = createElement('div', {
5780
- id: this.mapObject.element.id + '_Tile_SVG_Parent', styles: 'position: absolute; height: ' +
5781
- (areaRect.height) + 'px; width: '
5782
- + (areaRect.width) + 'px;'
5788
+ id: this.mapObject.element.id + '_Tile_SVG_Parent'
5783
5789
  });
5790
+ parentElement.style.cssText = 'position: absolute; height: ' + (areaRect.height) + 'px; width: ' +
5791
+ (areaRect.width) + 'px;';
5784
5792
  parentElement.appendChild(this.tileSvgObject);
5785
5793
  secondaryEle.appendChild(parentElement);
5786
5794
  }
@@ -5834,13 +5842,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5834
5842
  (!isNullOrUndefined(panel.mapObject.tileZoomLevel) && panel.mapObject.tileZoomLevel !== 1)) ?
5835
5843
  false : true;
5836
5844
  if (isNullOrUndefined(panel.mapObject.previousCenterLatitude) &&
5837
- isNullOrUndefined(panel.mapObject.previousCenterLongitude)) {
5845
+ isNullOrUndefined(panel.mapObject.previousCenterLongitude) && !panel.mapObject.isZoomByPosition) {
5838
5846
  panel.mapObject.previousCenterLatitude = panel.mapObject.centerPosition.latitude;
5839
5847
  panel.mapObject.previousCenterLongitude = panel.mapObject.centerPosition.longitude;
5840
5848
  }
5841
- else if (panel.mapObject.previousCenterLatitude !==
5849
+ else if ((panel.mapObject.previousCenterLatitude !==
5842
5850
  panel.mapObject.centerPosition.latitude && panel.mapObject.previousCenterLongitude !==
5843
- panel.mapObject.centerPosition.longitude) {
5851
+ panel.mapObject.centerPosition.longitude) || panel.mapObject.isZoomByPosition) {
5844
5852
  panel.mapObject.centerPositionChanged = true;
5845
5853
  panel.mapObject.previousCenterLatitude = panel.mapObject.centerPosition.latitude;
5846
5854
  panel.mapObject.previousCenterLongitude = panel.mapObject.centerPosition.longitude;
@@ -5852,7 +5860,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5852
5860
  var centerTileMap = center;
5853
5861
  if ((this.mapObject.isTileMap && panel.mapObject.markerModule) && panel.mapObject.zoomSettings.enable) {
5854
5862
  panel.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);
5855
- if (!isNullOrUndefined(this.mapObject.markerCenterLatitude) && !isNullOrUndefined(this.mapObject.markerCenterLongitude)) {
5863
+ if (!isNullOrUndefined(this.mapObject.markerCenterLatitude) && !isNullOrUndefined(this.mapObject.markerCenterLongitude)
5864
+ && !panel.mapObject.isZoomByPosition) {
5856
5865
  centerTileMap = new Point(panel.mapObject.markerCenterLongitude, panel.mapObject.markerCenterLatitude);
5857
5866
  }
5858
5867
  }
@@ -5868,7 +5877,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5868
5877
  else {
5869
5878
  center = { x: null, y: null };
5870
5879
  }
5871
- var zoomFactorValue = panel.mapObject.zoomSettings.shouldZoomInitially ?
5880
+ var zoomFactorValue = (panel.mapObject.zoomSettings.shouldZoomInitially && !panel.mapObject.isZoomByPosition) ?
5872
5881
  isNullOrUndefined(panel.mapObject.markerZoomFactor) ? 1 :
5873
5882
  panel.mapObject.markerZoomFactor : panel.mapObject.zoomSettings.zoomFactor;
5874
5883
  zoomFactorValue = (panel.mapObject.enablePersistence) ? ((isNullOrUndefined(panel.mapObject.mapScaleValue))
@@ -6124,13 +6133,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6124
6133
  var colors = shapeSettings.palette.length > 1 ? shapeSettings.palette : getShapeColor(this.mapObject.theme);
6125
6134
  var labelTemplateEle = createElement('div', {
6126
6135
  id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_Label_Template_Group',
6127
- className: this.mapObject.element.id + '_template',
6128
- styles: 'pointer-events: none; overflow: hidden; position: absolute;' +
6129
- 'top:' + this.mapObject.mapAreaRect.y + 'px;' +
6130
- 'left:' + this.mapObject.mapAreaRect.x + 'px;' +
6131
- 'height:' + this.mapObject.mapAreaRect.height + 'px;' +
6132
- 'width:' + this.mapObject.mapAreaRect.width + 'px;'
6136
+ className: this.mapObject.element.id + '_template'
6133
6137
  });
6138
+ labelTemplateEle.style.cssText = 'pointer-events: none; overflow: hidden; position: absolute;' +
6139
+ 'top:' + this.mapObject.mapAreaRect.y + 'px;' +
6140
+ 'left:' + this.mapObject.mapAreaRect.x + 'px;' +
6141
+ 'height:' + this.mapObject.mapAreaRect.height + 'px;' +
6142
+ 'width:' + this.mapObject.mapAreaRect.width + 'px;';
6134
6143
  if (this.currentLayer.layerData.length !== 0) {
6135
6144
  var _loop_1 = function (i) {
6136
6145
  var k = void 0;
@@ -6362,10 +6371,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6362
6371
  }
6363
6372
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6364
6373
  (currentShapeData['property'][properties]) : ''));
6365
- pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + index + 3).toString());
6374
+ pathEle.tabIndex = this.mapObject.tabIndex + index + 3;
6366
6375
  pathEle.setAttribute('role', '');
6367
6376
  if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
6368
- pathEle.setAttribute('style', 'outline:none');
6377
+ pathEle.style.cssText = 'outline:none';
6369
6378
  }
6370
6379
  maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
6371
6380
  if (this.mapObject.toggledShapeElementId) {
@@ -6424,9 +6433,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6424
6433
  this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);
6425
6434
  }
6426
6435
  var group = (this.mapObject.renderer.createGroup({
6427
- id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_dataLableIndex_Group',
6428
- style: 'pointer-events: none;'
6436
+ id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_dataLableIndex_Group'
6429
6437
  }));
6438
+ group.style.pointerEvents = 'none';
6430
6439
  if (this.mapObject.dataLabelModule && this.currentLayer.dataLabelSettings.visible) {
6431
6440
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6432
6441
  var intersect_1 = [];
@@ -6948,7 +6957,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6948
6957
  }
6949
6958
  }
6950
6959
  }
6951
- if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset) {
6960
+ if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset || this.mapObject.isZoomByPosition
6961
+ || this.mapObject.zoomNotApplied) {
6952
6962
  this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
6953
6963
  }
6954
6964
  };
@@ -7236,8 +7246,9 @@ var Annotations = /** @__PURE__ @class */ (function () {
7236
7246
  var availSize = map.availableSize;
7237
7247
  var id = map.element.id + '_Annotation_' + annotationIndex;
7238
7248
  var childElement = createElement('div', {
7239
- id: map.element.id + '_Annotation_' + annotationIndex, styles: 'position: absolute; z-index:' + annotation.zIndex + ';'
7249
+ id: map.element.id + '_Annotation_' + annotationIndex
7240
7250
  });
7251
+ childElement.style.cssText = 'position: absolute; z-index:' + annotation.zIndex + ';';
7241
7252
  var argsData = {
7242
7253
  cancel: false, name: annotationRendering, content: annotation.content,
7243
7254
  annotation: annotation
@@ -7783,7 +7794,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7783
7794
  }
7784
7795
  }
7785
7796
  this.zoomingChange();
7786
- this.trigger(loaded, { maps: this, isResized: this.isResize });
7797
+ if (!this.isZoomByPosition && !this.zoomNotApplied) {
7798
+ this.trigger(loaded, { maps: this, isResized: this.isResize });
7799
+ }
7787
7800
  this.isResize = false;
7788
7801
  };
7789
7802
  /**
@@ -7877,7 +7890,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7877
7890
  Maps.prototype.addTabIndex = function () {
7878
7891
  this.element.setAttribute('aria-label', this.description || 'Maps Element');
7879
7892
  this.element.setAttribute('role', '');
7880
- this.element.setAttribute('tabindex', this.tabIndex.toString());
7893
+ this.element.tabIndex = this.tabIndex;
7881
7894
  };
7882
7895
  // private setSecondaryElementPosition(): void {
7883
7896
  // if (!this.isTileMap) {
@@ -7940,7 +7953,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7940
7953
  }
7941
7954
  }
7942
7955
  }
7943
- if (this.zoomModule && (this.previousScale !== this.scale)) {
7956
+ if (this.zoomModule && ((this.previousScale !== this.scale) || this.zoomNotApplied || this.isZoomByPosition)) {
7944
7957
  this.zoomModule.applyTransform(this, true);
7945
7958
  }
7946
7959
  }
@@ -7948,9 +7961,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7948
7961
  Maps.prototype.createSecondaryElement = function () {
7949
7962
  if (isNullOrUndefined(document.getElementById(this.element.id + '_Secondary_Element'))) {
7950
7963
  var secondaryElement = createElement('div', {
7951
- id: this.element.id + '_Secondary_Element',
7952
- styles: 'position: absolute;z-index:2;'
7964
+ id: this.element.id + '_Secondary_Element'
7953
7965
  });
7966
+ secondaryElement.style.cssText = 'position: absolute;z-index:2;';
7954
7967
  this.element.appendChild(secondaryElement);
7955
7968
  }
7956
7969
  };
@@ -8004,18 +8017,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8004
8017
  removeElement(this.element.id + '_tiles');
8005
8018
  removeElement('animated_tiles');
8006
8019
  var ele = createElement('div', {
8007
- id: this.element.id + '_tile_parent', styles: 'position: absolute; left: ' +
8008
- (this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
8009
- + (this.mapAreaRect.y + padding) + 'px; height: ' +
8010
- (this.mapAreaRect.height) + 'px; width: '
8011
- + (this.mapAreaRect.width) + 'px; overflow: hidden;'
8020
+ id: this.element.id + '_tile_parent'
8012
8021
  });
8022
+ ele.style.cssText = 'position: absolute; left: ' +
8023
+ (this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
8024
+ + (this.mapAreaRect.y + padding) + 'px; height: ' +
8025
+ (this.mapAreaRect.height) + 'px; width: '
8026
+ + (this.mapAreaRect.width) + 'px; overflow: hidden;';
8013
8027
  var ele1 = createElement('div', {
8014
- id: this.element.id + '_tiles', styles: 'position: absolute; left: ' +
8015
- (this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
8016
- + (this.mapAreaRect.y + padding) + 'px; height: ' + (this.mapAreaRect.height) + 'px; width: '
8017
- + (this.mapAreaRect.width) + 'px; overflow: hidden;'
8028
+ id: this.element.id + '_tiles'
8018
8029
  });
8030
+ ele1.style.cssText = 'position: absolute; left: ' +
8031
+ (this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
8032
+ + (this.mapAreaRect.y + padding) + 'px; height: ' + (this.mapAreaRect.height) + 'px; width: '
8033
+ + (this.mapAreaRect.width) + 'px; overflow: hidden;';
8019
8034
  this.element.appendChild(ele);
8020
8035
  this.element.appendChild(ele1);
8021
8036
  }
@@ -8499,9 +8514,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8499
8514
  var markerModule = this.markerModule;
8500
8515
  if (element.id.indexOf('shapeIndex') > -1 || element.id.indexOf('Tile') > -1) {
8501
8516
  this.mergeCluster();
8502
- if (element.id.indexOf('shapeIndex') > -1) {
8503
- this.triggerShapeSelection(element);
8504
- }
8505
8517
  }
8506
8518
  if (markerModule) {
8507
8519
  markerModule.markerClick(e);
@@ -8682,32 +8694,30 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8682
8694
  * @returns {void}
8683
8695
  */
8684
8696
  Maps.prototype.zoomByPosition = function (centerPosition, zoomFactor) {
8685
- var factor = this.mapLayerPanel.calculateFactor(this.layersCollection[0]);
8686
- var position;
8687
- var size = this.mapAreaRect;
8697
+ this.zoomNotApplied = false;
8698
+ var isRefresh = this.zoomSettings.zoomFactor == zoomFactor;
8688
8699
  if (!this.isTileMap && this.zoomModule) {
8689
8700
  if (!isNullOrUndefined(centerPosition)) {
8690
- position = convertGeoToPoint(centerPosition.latitude, centerPosition.longitude, factor, this.layersCollection[0], this);
8691
- var mapRect = document.getElementById(this.element.id + '_Layer_Collections').getBoundingClientRect();
8692
- var svgRect = this.svgObject.getBoundingClientRect();
8693
- var xDiff = Math.abs(mapRect.left - svgRect.left) / this.scale;
8694
- var yDiff = Math.abs(mapRect.top - svgRect.top) / this.scale;
8695
- var x = this.translatePoint.x + xDiff;
8696
- var y = this.translatePoint.y + yDiff;
8697
- this.scale = zoomFactor;
8698
- this.translatePoint.x = ((mapRect.left < svgRect.left ? x : 0) + (size.width / 2) - (position.x * zoomFactor)) / zoomFactor;
8699
- this.translatePoint.y = ((mapRect.top < svgRect.top ? y : 0) + (size.height / 2) - (position.y * zoomFactor)) / zoomFactor;
8700
- this.zoomModule.applyTransform(this);
8701
+ this.zoomSettings.zoomFactor = zoomFactor;
8702
+ isRefresh = this.centerPosition.latitude === centerPosition.latitude && this.centerPosition.longitude === centerPosition.longitude ? true : isRefresh;
8703
+ this.centerPosition = centerPosition;
8704
+ this.isZoomByPosition = true;
8705
+ this.mapScaleValue = null;
8701
8706
  }
8702
8707
  else {
8703
- position = { x: size.width / 2, y: size.height / 2 };
8704
- this.zoomModule.performZooming(position, zoomFactor, zoomFactor > this.scale ? 'ZoomIn' : 'ZoomOut');
8708
+ this.zoomSettings.zoomFactor = zoomFactor;
8709
+ this.isZoomByPosition = true;
8710
+ this.mapScaleValue = null;
8705
8711
  }
8706
8712
  }
8707
8713
  else if (this.zoomModule) {
8708
- this.tileZoomLevel = zoomFactor;
8709
- this.tileTranslatePoint = this.mapLayerPanel['panTileMap'](this.availableSize.width, this.availableSize.height, { x: centerPosition.longitude, y: centerPosition.latitude });
8710
- this.mapLayerPanel.generateTiles(zoomFactor, this.tileTranslatePoint, null, new BingMap(this));
8714
+ this.tileZoomLevel = this.zoomSettings.zoomFactor = zoomFactor;
8715
+ isRefresh = this.centerPosition.latitude === centerPosition.latitude && this.centerPosition.longitude === centerPosition.longitude ? true : isRefresh;
8716
+ this.centerPosition = centerPosition;
8717
+ this.isZoomByPosition = true;
8718
+ }
8719
+ if (isRefresh) {
8720
+ this.refresh();
8711
8721
  }
8712
8722
  };
8713
8723
  /**
@@ -8821,7 +8831,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8821
8831
  var propertyName_1 = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
8822
8832
  && isNaN(shapeData[i]['properties'][popertyNameArray[j]]) ?
8823
8833
  shapeData[i]['properties'][popertyNameArray[j]].toLowerCase() : shapeData[i]['properties'][popertyNameArray[j]];
8824
- var shapeName = !isNullOrUndefined(name) ? name.toLowerCase() : name;
8834
+ var shapeName = !isNullOrUndefined(name) && typeof name === 'string' ? name.toLowerCase() : name;
8825
8835
  var k = void 0;
8826
8836
  if (propertyName_1 === shapeName) {
8827
8837
  if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
@@ -8900,6 +8910,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8900
8910
  var centerLatitude;
8901
8911
  var centerLongtitude;
8902
8912
  var isTwoCoordinates = false;
8913
+ this.centerPosition = {
8914
+ latitude: null,
8915
+ longitude: null
8916
+ };
8917
+ this.isZoomByPosition = false;
8903
8918
  if (isNullOrUndefined(maxLatitude) && isNullOrUndefined(maxLongitude)
8904
8919
  || isNullOrUndefined(minLatitude) && isNullOrUndefined(minLongitude)) {
8905
8920
  minLatitude = isNullOrUndefined(minLatitude) ? 0 : minLatitude;
@@ -9969,10 +9984,10 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9969
9984
  for (var i = 0; i < dataSource.length; i++) {
9970
9985
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9971
9986
  var data = dataSource[i];
9972
- var dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) ?
9973
- data[shapeDataPath].toLowerCase() : data[shapeDataPath];
9974
- shapeName = !isNullOrUndefined(shapeName) ? shapeName.toString() : shapeName;
9975
- shapeNameValue = !isNullOrUndefined(shapeName) ? shapeName.toLowerCase() : shapeName;
9987
+ var dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) &&
9988
+ typeof data[shapeDataPath] === 'string' ? data[shapeDataPath].toLowerCase() : data[shapeDataPath];
9989
+ shapeName = !isNullOrUndefined(shapeName) && typeof shapeName === 'string' ? shapeName.toString() : shapeName;
9990
+ shapeNameValue = !isNullOrUndefined(shapeName) && typeof shapeName === 'string' ? shapeName.toLowerCase() : shapeName;
9976
9991
  if ((dataShapePathValue) === shapeNameValue) {
9977
9992
  text = data;
9978
9993
  break;
@@ -10194,8 +10209,14 @@ var DataLabel = /** @__PURE__ @class */ (function () {
10194
10209
  datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
10195
10210
  templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
10196
10211
  labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties'], index, _this.maps);
10197
- labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
10198
- labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
10212
+ if (_this.maps.isTileMap) {
10213
+ labelElement.style.left = (((location['x'] + transPoint['x']) * scale) - (textSize['width'] / 2)) + 'px';
10214
+ labelElement.style.top = (((location['y'] + transPoint['y']) * scale) - textSize['height']) + 'px';
10215
+ }
10216
+ else {
10217
+ labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
10218
+ labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
10219
+ }
10199
10220
  labelTemplateElement.appendChild(labelElement);
10200
10221
  }
10201
10222
  else {
@@ -10436,51 +10457,49 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
10436
10457
  direction = 0;
10437
10458
  }
10438
10459
  }
10439
- if (point[j]['x'] !== point[j + 1]['x']) {
10440
- if (showArrow) {
10441
- arrowColor = arrowSettings['properties']['color'];
10442
- arrowSize = arrowSettings['properties']['size'];
10443
- offSetValue = (arrowSettings['properties']['offSet'] === undefined) ? 0 : arrowSettings['properties']['offSet'];
10444
- var divide = (Math.round(arrowSize / 2));
10445
- arrowPosition = arrowSettings['properties']['position'];
10446
- startArrow = (arrowPosition === 'Start') ? 'url(#triangle' + i + ')' : null;
10447
- endArrow = (arrowPosition === 'End') ? 'url(#triangle' + i + ')' : null;
10448
- if (offSet !== 0 && angle === 0) {
10449
- offSet = (arrowPosition === 'Start') ? offSetValue : -(offSetValue);
10450
- }
10451
- offSet = (isNullOrUndefined(offSet)) ? 0 : offSet;
10452
- var triId = this.maps.element.id + '_triangle';
10453
- var defElement = this.maps.renderer.createDefs();
10454
- defElement.innerHTML += '<marker id="' + 'triangle' + i + '"></marker>';
10455
- var markerEle = defElement.querySelector('#' + 'triangle' + i);
10456
- markerEle.setAttribute('markerWidth', (arrowSize.toString()));
10457
- markerEle.setAttribute('markerHeight', (arrowSize.toString()));
10458
- markerEle.setAttribute('refX', (divide - offSet).toString());
10459
- markerEle.setAttribute('refY', divide.toString());
10460
- markerEle.setAttribute('orient', 'auto');
10461
- var d2 = 'M 0,0 L 0,' + arrowSize + ' L ' + divide + ', ' + divide + ' Z';
10462
- pathOption = new PathOption(triId, arrowColor, width, color, 1, 1, dashArray, d2);
10463
- navigationEle = this.maps.renderer.drawPath(pathOption);
10464
- markerEle.appendChild(navigationEle);
10465
- defElement.appendChild(markerEle);
10466
- navigationGroup.appendChild(defElement);
10467
- }
10468
- angle = Math.abs(angle);
10469
- d = (angle === 0) ? 'M ' + point[j]['x'] + ',' + point[j]['y'] + 'L ' + point[j + 1]['x']
10470
- + ',' + point[j + 1]['y'] + ' ' :
10471
- 'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) +
10472
- ' ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
10473
- + direction + ' , ' + point[j + 1]['x'] + ',' + point[j + 1]['y'] + ' ';
10474
- pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
10460
+ if (showArrow) {
10461
+ arrowColor = arrowSettings['properties']['color'];
10462
+ arrowSize = arrowSettings['properties']['size'];
10463
+ offSetValue = (arrowSettings['properties']['offSet'] === undefined) ? 0 : arrowSettings['properties']['offSet'];
10464
+ var divide = (Math.round(arrowSize / 2));
10465
+ arrowPosition = arrowSettings['properties']['position'];
10466
+ startArrow = (arrowPosition === 'Start') ? 'url(#triangle' + i + ')' : null;
10467
+ endArrow = (arrowPosition === 'End') ? 'url(#triangle' + i + ')' : null;
10468
+ if (offSet !== 0 && angle === 0) {
10469
+ offSet = (arrowPosition === 'Start') ? offSetValue : -(offSetValue);
10470
+ }
10471
+ offSet = (isNullOrUndefined(offSet)) ? 0 : offSet;
10472
+ var triId = this.maps.element.id + '_triangle';
10473
+ var defElement = this.maps.renderer.createDefs();
10474
+ defElement.innerHTML += '<marker id="' + 'triangle' + i + '"></marker>';
10475
+ var markerEle = defElement.querySelector('#' + 'triangle' + i);
10476
+ markerEle.setAttribute('markerWidth', (arrowSize.toString()));
10477
+ markerEle.setAttribute('markerHeight', (arrowSize.toString()));
10478
+ markerEle.setAttribute('refX', (divide - offSet).toString());
10479
+ markerEle.setAttribute('refY', divide.toString());
10480
+ markerEle.setAttribute('orient', 'auto');
10481
+ var d2 = 'M 0,0 L 0,' + arrowSize + ' L ' + divide + ', ' + divide + ' Z';
10482
+ pathOption = new PathOption(triId, arrowColor, width, color, 1, 1, dashArray, d2);
10475
10483
  navigationEle = this.maps.renderer.drawPath(pathOption);
10476
- if (!isNullOrUndefined(arrowPosition)) {
10477
- var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
10478
- : navigationEle.setAttribute('marker-end', endArrow);
10479
- }
10480
- maintainSelection(this.maps.selectedNavigationElementId, this.maps.navigationSelectionClass, navigationEle, 'navigationlineselectionMapStyle');
10481
- navigationGroup.appendChild(navigationEle);
10482
- group.appendChild(navigationGroup);
10483
- }
10484
+ markerEle.appendChild(navigationEle);
10485
+ defElement.appendChild(markerEle);
10486
+ navigationGroup.appendChild(defElement);
10487
+ }
10488
+ angle = Math.abs(angle);
10489
+ d = (angle === 0) ? 'M ' + point[j]['x'] + ',' + point[j]['y'] + 'L ' + point[j + 1]['x']
10490
+ + ',' + point[j + 1]['y'] + ' ' :
10491
+ 'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) +
10492
+ ' ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
10493
+ + direction + ' , ' + point[j + 1]['x'] + ',' + point[j + 1]['y'] + ' ';
10494
+ pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
10495
+ navigationEle = this.maps.renderer.drawPath(pathOption);
10496
+ if (!isNullOrUndefined(arrowPosition)) {
10497
+ var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
10498
+ : navigationEle.setAttribute('marker-end', endArrow);
10499
+ }
10500
+ maintainSelection(this.maps.selectedNavigationElementId, this.maps.navigationSelectionClass, navigationEle, 'navigationlineselectionMapStyle');
10501
+ navigationGroup.appendChild(navigationEle);
10502
+ group.appendChild(navigationGroup);
10484
10503
  }
10485
10504
  point = [];
10486
10505
  }
@@ -11049,14 +11068,14 @@ var Legend = /** @__PURE__ @class */ (function () {
11049
11068
  leftPageElement.appendChild(render.drawPath(leftPageOptions));
11050
11069
  var leftRectPageOptions = new RectOption(map.element.id + '_Left_Page_Rect', 'transparent', {}, 1, new Rect(leftPageX - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
11051
11070
  var pathEle = render.drawRectangle(leftRectPageOptions);
11052
- pathEle.setAttribute('tabindex', ((page + 1) === 1 ? -1 : map.tabIndex + 1).toString());
11071
+ pathEle.tabIndex = (page + 1) === 1 ? -1 : (map.tabIndex + 1);
11053
11072
  leftPageElement.appendChild(pathEle);
11054
11073
  this.wireEvents(leftPageElement);
11055
11074
  var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
11056
11075
  rightPageElement.appendChild(render.drawPath(rightPageOptions));
11057
11076
  var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect(rightPageX - spacing - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
11058
11077
  pathEle = render.drawRectangle(rightRectPageOptions);
11059
- pathEle.setAttribute('tabindex', ((page + 1) === this.totalPages.length ? -1 : map.tabIndex + 2).toString());
11078
+ pathEle.tabIndex = (page + 1) === this.totalPages.length ? -1 : (map.tabIndex + 2);
11060
11079
  rightPageElement.appendChild(pathEle);
11061
11080
  this.wireEvents(rightPageElement);
11062
11081
  pagingGroup.appendChild(leftPageElement);
@@ -11077,7 +11096,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11077
11096
  'dominant-baseline': ''
11078
11097
  };
11079
11098
  var pagingTextElement = render.createText(pageTextOptions, pagingText);
11080
- pagingTextElement.setAttribute('style', 'user-select: none;');
11099
+ pagingTextElement.style.cssText = 'user-select: none;';
11081
11100
  pagingGroup.appendChild(pagingTextElement);
11082
11101
  this.legendGroup.appendChild(pagingGroup);
11083
11102
  }
@@ -11211,11 +11230,14 @@ var Legend = /** @__PURE__ @class */ (function () {
11211
11230
  this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeElement);
11212
11231
  var shapeItemCount = this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].length - 1;
11213
11232
  var shapeOldFillColor = shapeElement.getAttribute('fill');
11233
+ var shapeOldOpacity = shapeElement.getAttribute('fill-opacity');
11214
11234
  this.legendHighlightCollection[length - 1]['shapeOldFillColor'].push(shapeOldFillColor);
11235
+ this.legendHighlightCollection[length - 1]['shapeOldOpacity'] = shapeOldOpacity;
11215
11236
  var shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
11237
+ var shapeOldFillOpacity = this.legendHighlightCollection[length - 1]['shapeOldOpacity'];
11216
11238
  this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
11217
- this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11218
- this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11239
+ this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11240
+ this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
11219
11241
  }
11220
11242
  else if (value === 'selection') {
11221
11243
  this.legendHighlightCollection = [];
@@ -11280,6 +11302,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11280
11302
  var length = collection.length;
11281
11303
  collection[length - 1]['MapShapeCollection'] = { Elements: [] };
11282
11304
  collection[length - 1]['shapeOldFillColor'] = [];
11305
+ collection[length - 1]['shapeOldOpacity'] = null;
11283
11306
  };
11284
11307
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11285
11308
  Legend.prototype.removeLegend = function (collection) {
@@ -11291,7 +11314,8 @@ var Legend = /** @__PURE__ @class */ (function () {
11291
11314
  for (var j = 0; j < dataCount; j++) {
11292
11315
  var shapeFillColor = item['legendOldFill'].indexOf('url') !== -1
11293
11316
  ? item['shapeOldFillColor'][j] : item['legendOldFill'];
11294
- this.setColor(item['MapShapeCollection']['Elements'][j], shapeFillColor, item['shapeOpacity'], item['shapeOldBorderColor'], item['shapeOldBorderWidth'], 'highlight');
11317
+ var shapeOpacity = !isNullOrUndefined(item['shapeOldOpacity']) ? item['shapeOldOpacity'] : item['shapeOpacity'];
11318
+ this.setColor(item['MapShapeCollection']['Elements'][j], shapeFillColor, shapeOpacity, item['shapeOldBorderColor'], item['shapeOldBorderWidth'], 'highlight');
11295
11319
  }
11296
11320
  }
11297
11321
  };
@@ -12588,10 +12612,11 @@ var Legend = /** @__PURE__ @class */ (function () {
12588
12612
  var shapeData = layerData[i];
12589
12613
  var dataPathValue = (dataPath.indexOf('.') > -1) ? getValueFromObject(data, dataPath) : data[dataPath];
12590
12614
  var shapePath = checkPropertyPath(data[dataPath], shapePropertyPath, shapeData['properties']);
12591
- var dataPathValueCase = !isNullOrUndefined(dataPathValue)
12592
- ? dataPathValue.toLowerCase() : dataPathValue;
12615
+ var dataPathValueCase = !isNullOrUndefined(dataPathValue) &&
12616
+ typeof dataPathValue === 'string' ? dataPathValue.toLowerCase() : dataPathValue;
12593
12617
  var shapeDataValueCase = !isNullOrUndefined(shapeData['properties'][shapePath])
12594
- && isNaN(shapeData['properties'][shapePath]) ? shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12618
+ && isNaN(shapeData['properties'][shapePath]) ?
12619
+ shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
12595
12620
  if (shapeDataValueCase === dataPathValueCase) {
12596
12621
  if (shapeData['geometry']['type'] != 'MultiPoint') {
12597
12622
  legendData.push({
@@ -12837,16 +12862,34 @@ var Highlight = /** @__PURE__ @class */ (function () {
12837
12862
  var marker$$1 = parseInt(targetEle.id.split('_MarkerIndex_')[1].split('_')[0], 10);
12838
12863
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
12839
12864
  }
12840
- var border = {
12841
- color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color),
12842
- width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
12843
- opacity: this.highlightSettings.border.opacity
12844
- };
12865
+ var borderColor = (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color);
12866
+ var borderWidth = (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale);
12867
+ var borderOpacity = isNullOrUndefined(this.highlightSettings.border.opacity) ? this.highlightSettings.opacity : this.highlightSettings.border.opacity;
12845
12868
  var eventArgs = {
12846
12869
  opacity: this.highlightSettings.opacity,
12847
12870
  fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
12848
12871
  ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
12849
- border: border,
12872
+ border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
12873
+ cancel: false
12874
+ };
12875
+ var shapeEventArgs = {
12876
+ opacity: eventArgs.opacity,
12877
+ fill: eventArgs.fill,
12878
+ border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
12879
+ name: shapeHighlight,
12880
+ target: targetEle.id,
12881
+ cancel: false,
12882
+ shapeData: shapeData,
12883
+ data: data,
12884
+ maps: this.maps
12885
+ };
12886
+ if (targetEle.id.indexOf('shapeIndex') > -1) {
12887
+ this.maps.trigger(shapeHighlight, shapeEventArgs, function () { });
12888
+ }
12889
+ var itemEventArgs = {
12890
+ opacity: eventArgs.opacity,
12891
+ fill: eventArgs.fill,
12892
+ border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
12850
12893
  name: itemHighlight,
12851
12894
  target: targetEle.id,
12852
12895
  cancel: false,
@@ -12854,13 +12897,18 @@ var Highlight = /** @__PURE__ @class */ (function () {
12854
12897
  data: data,
12855
12898
  maps: this.maps
12856
12899
  };
12857
- this.maps.trigger(itemHighlight, eventArgs, function () {
12858
- eventArgs.border.opacity = isNullOrUndefined(_this.highlightSettings.border.opacity) ? _this.highlightSettings.opacity : _this.highlightSettings.border.opacity;
12859
- _this.highlightMap(targetEle, eventArgs);
12900
+ this.maps.trigger(itemHighlight, itemEventArgs, function () {
12901
+ itemEventArgs.cancel = eventArgs.cancel !== itemEventArgs.cancel ? itemEventArgs.cancel : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.cancel : eventArgs.cancel;
12902
+ itemEventArgs.fill = eventArgs.fill !== itemEventArgs.fill ? itemEventArgs.fill : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.fill : eventArgs.fill;
12903
+ itemEventArgs.opacity = eventArgs.opacity !== itemEventArgs.opacity ? itemEventArgs.opacity : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.opacity : eventArgs.opacity;
12904
+ itemEventArgs.border.color = eventArgs.border.color !== itemEventArgs.border.color ? itemEventArgs.border.color : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.color : eventArgs.border.color;
12905
+ itemEventArgs.border.width = eventArgs.border.width !== itemEventArgs.border.width ? itemEventArgs.border.width : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.width : eventArgs.border.width;
12906
+ itemEventArgs.border.opacity = eventArgs.border.opacity !== itemEventArgs.border.opacity ? itemEventArgs.border.opacity : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.opacity : eventArgs.border.opacity;
12907
+ _this.highlightMap(targetEle, itemEventArgs);
12860
12908
  });
12861
12909
  };
12862
12910
  Highlight.prototype.highlightMap = function (targetEle, eventArgs) {
12863
- if (targetEle.getAttribute('class') === 'highlightMapStyle') {
12911
+ if (targetEle.getAttribute('class') === 'highlightMapStyle' || eventArgs.cancel) {
12864
12912
  return;
12865
12913
  }
12866
12914
  else {
@@ -13366,9 +13414,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13366
13414
  else {
13367
13415
  tooltipEle = createElement('div', {
13368
13416
  id: this.maps.element.id + '_mapsTooltip',
13369
- className: 'EJ2-maps-Tooltip',
13370
- styles: 'position: absolute;pointer-events:none;'
13417
+ className: 'EJ2-maps-Tooltip'
13371
13418
  });
13419
+ tooltipEle.style.cssText = 'position: absolute;pointer-events:none;';
13372
13420
  document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
13373
13421
  }
13374
13422
  if (option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
@@ -13446,7 +13494,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
13446
13494
  && tooltipTemplateElement.innerHTML.indexOf('</a>') !== -1) {
13447
13495
  var templateStyle = tooltipTemplateElement.getAttribute('style');
13448
13496
  templateStyle = templateStyle.replace('pointer-events: none;', 'position-events:all;');
13449
- tooltipTemplateElement.setAttribute('style', templateStyle);
13497
+ tooltipTemplateElement.style.cssText = templateStyle;
13450
13498
  }
13451
13499
  }
13452
13500
  else {
@@ -14038,7 +14086,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
14038
14086
  }
14039
14087
  else {
14040
14088
  markerStyle = 'visibility:hidden';
14041
- currentEle.setAttribute('style', markerStyle);
14089
+ currentEle.style.cssText = markerStyle;
14042
14090
  }
14043
14091
  }
14044
14092
  }
@@ -14156,22 +14204,22 @@ var Zoom = /** @__PURE__ @class */ (function () {
14156
14204
  var layerIndex = parseInt((element ? element : layerElement).id.split('_LayerIndex_')[1].split('_')[0], 10);
14157
14205
  var markerSVGObject = this.maps.renderer.createGroup({
14158
14206
  id: this.maps.element.id + '_Markers_Group',
14159
- class: 'GroupElement',
14160
- style: 'pointer-events: auto;'
14207
+ class: 'GroupElement'
14161
14208
  });
14209
+ markerSVGObject.style.pointerEvents = 'auto';
14162
14210
  if (document.getElementById(markerSVGObject.id)) {
14163
14211
  removeElement(markerSVGObject.id);
14164
14212
  }
14165
14213
  var mapsAreaRect = this.maps.mapAreaRect;
14166
14214
  var markerTemplateElements = createElement('div', {
14167
14215
  id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
14168
- className: 'template',
14169
- styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
14170
- 'top:' + mapsAreaRect.y + 'px;' +
14171
- 'left:' + mapsAreaRect.x + 'px;' +
14172
- 'height:' + mapsAreaRect.height + 'px;' +
14173
- 'width:' + mapsAreaRect.width + 'px;'
14216
+ className: 'template'
14174
14217
  });
14218
+ markerTemplateElements.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
14219
+ 'top:' + mapsAreaRect.y + 'px;' +
14220
+ 'left:' + mapsAreaRect.x + 'px;' +
14221
+ 'height:' + mapsAreaRect.height + 'px;' +
14222
+ 'width:' + mapsAreaRect.width + 'px;';
14175
14223
  if (document.getElementById(markerTemplateElements.id)) {
14176
14224
  removeElement(markerTemplateElements.id);
14177
14225
  }
@@ -14303,16 +14351,26 @@ var Zoom = /** @__PURE__ @class */ (function () {
14303
14351
  var labelX = label['location']['x'];
14304
14352
  var labelY = label['location']['y'];
14305
14353
  if (type === 'Template') {
14306
- var layerEle = getElementByID(this.maps.element.id + '_Layer_Collections');
14307
- labelX = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - labelX)) * scale);
14308
- labelY = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - labelY)) * scale);
14309
- var templateOffset = element.getBoundingClientRect();
14310
- var layerOffset = layerEle.getBoundingClientRect();
14311
- var elementOffset = element.parentElement.getBoundingClientRect();
14312
- var x_3 = ((labelX) + (layerOffset.left - elementOffset.left) - (templateOffset.width / 2));
14313
- var y_2 = ((labelY) + (layerOffset.top - elementOffset.top) - (templateOffset.height / 2));
14314
- element.style.left = x_3 + 'px';
14315
- element.style.top = y_2 + 'px';
14354
+ var locationX = 0;
14355
+ var locationY = 0;
14356
+ if (this.maps.isTileMap) {
14357
+ zoomtext = label['dataLabelText'];
14358
+ zoomtextSize = measureText(zoomtext, style);
14359
+ locationX = ((labelX + x) * scale) - (zoomtextSize['width'] / 2);
14360
+ locationY = ((labelY + y) * scale) - (zoomtextSize['height']);
14361
+ }
14362
+ else {
14363
+ var layerEle = getElementByID(this.maps.element.id + '_Layer_Collections');
14364
+ labelX = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - labelX)) * scale);
14365
+ labelY = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - labelY)) * scale);
14366
+ var templateOffset = element.getBoundingClientRect();
14367
+ var layerOffset = layerEle.getBoundingClientRect();
14368
+ var elementOffset = element.parentElement.getBoundingClientRect();
14369
+ locationX = ((labelX) + (layerOffset.left - elementOffset.left));
14370
+ locationY = ((labelY) + (layerOffset.top - elementOffset.top));
14371
+ }
14372
+ element.style.left = locationX + 'px';
14373
+ element.style.top = locationY + 'px';
14316
14374
  }
14317
14375
  else {
14318
14376
  labelX = ((labelX + x) * scale);
@@ -14444,10 +14502,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
14444
14502
  if (element['style']['display'] !== 'none') {
14445
14503
  if ((staticMapOffset['x'] > templateOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < templateOffset['x'] + templateOffset['width'])
14446
14504
  && (staticMapOffset['y'] > templateOffset['y'] || staticMapOffset['y'] + staticMapOffset['height'] < templateOffset['y'] + templateOffset['height'])) {
14447
- element['style']['display'] = 'none';
14505
+ element.style.display = 'none';
14448
14506
  }
14449
14507
  else if ((staticMapOffset['x'] > templateOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < templateOffset['x'] + templateOffset['width'])) {
14450
- element['style']['display'] = 'none';
14508
+ element.style.display = 'none';
14451
14509
  }
14452
14510
  }
14453
14511
  }
@@ -14584,7 +14642,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
14584
14642
  }
14585
14643
  map.zoomTranslatePoint = map.translatePoint;
14586
14644
  this.mouseDownPoints = this.mouseMovePoints;
14587
- this.maps.zoomNotApplied = false;
14588
14645
  this.isSingleClick = false;
14589
14646
  };
14590
14647
  Zoom.prototype.toAlignSublayer = function () {
@@ -14925,7 +14982,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
14925
14982
  Zoom.prototype.alignToolBar = function () {
14926
14983
  var map = this.maps;
14927
14984
  var padding = 10;
14928
- var element = createElement('div', { id: map.element.id + '_ToolBar', styles: 'position:absolute;z-index:2' });
14985
+ var element = createElement('div', { id: map.element.id + '_ToolBar' });
14986
+ element.style.cssText = 'position:absolute;z-index:2';
14929
14987
  var rectSVGObject = map.renderer.createSvg({
14930
14988
  id: map.element.id + '_Zooming_ToolBar', width: 10, height: 10
14931
14989
  });