@syncfusion/ej2-maps 19.3.53 → 19.4.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.
Files changed (40) hide show
  1. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
  2. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
  3. package/CHANGELOG.md +42 -1
  4. package/README.md +1 -1
  5. package/dist/ej2-maps.umd.min.js +2 -2
  6. package/dist/ej2-maps.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-maps.es2015.js +663 -293
  8. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  9. package/dist/es6/ej2-maps.es5.js +659 -289
  10. package/dist/es6/ej2-maps.es5.js.map +1 -1
  11. package/dist/global/ej2-maps.min.js +2 -2
  12. package/dist/global/ej2-maps.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +12 -12
  15. package/src/maps/layers/bubble.d.ts +6 -0
  16. package/src/maps/layers/bubble.js +7 -1
  17. package/src/maps/layers/data-label.js +1 -0
  18. package/src/maps/layers/layer-panel.d.ts +2 -1
  19. package/src/maps/layers/layer-panel.js +89 -52
  20. package/src/maps/layers/legend.d.ts +41 -2
  21. package/src/maps/layers/legend.js +90 -29
  22. package/src/maps/layers/marker.js +2 -8
  23. package/src/maps/maps-model.d.ts +1 -1
  24. package/src/maps/maps.d.ts +8 -0
  25. package/src/maps/maps.js +142 -19
  26. package/src/maps/model/base-model.d.ts +7 -0
  27. package/src/maps/model/base.d.ts +6 -0
  28. package/src/maps/model/base.js +5 -2
  29. package/src/maps/model/interface.d.ts +1 -3
  30. package/src/maps/model/theme.js +62 -5
  31. package/src/maps/user-interaction/highlight.d.ts +9 -1
  32. package/src/maps/user-interaction/highlight.js +22 -15
  33. package/src/maps/user-interaction/selection.d.ts +9 -1
  34. package/src/maps/user-interaction/selection.js +27 -19
  35. package/src/maps/user-interaction/tooltip.js +9 -3
  36. package/src/maps/user-interaction/zoom.d.ts +5 -1
  37. package/src/maps/user-interaction/zoom.js +82 -45
  38. package/src/maps/utils/enum.d.ts +3 -1
  39. package/src/maps/utils/helper.d.ts +4 -2
  40. package/src/maps/utils/helper.js +130 -98
@@ -59,13 +59,15 @@ function calculateSize(maps) {
59
59
  var containerHeight = maps.element.clientHeight;
60
60
  var containerElementWidth = stringToNumber(maps.element.style.width, containerWidth);
61
61
  var containerElementHeight = stringToNumber(maps.element.style.height, containerHeight);
62
+ var availableSize = new Size(0, 0);
62
63
  if (maps.width === '0px' || maps.width === '0%' || maps.height === '0%' || maps.height === '0px') {
63
- maps.availableSize = new Size(0, 0);
64
+ availableSize = new Size(0, 0);
64
65
  }
65
66
  else {
66
- maps.availableSize = new Size(stringToNumber(maps.width, containerWidth) || containerWidth || containerElementWidth || 600, stringToNumber(maps.height, containerHeight) || containerHeight || containerElementHeight || (maps.isDevice ?
67
+ availableSize = new Size(stringToNumber(maps.width, containerWidth) || containerWidth || containerElementWidth || 600, stringToNumber(maps.height, containerHeight) || containerHeight || containerElementHeight || (maps.isDevice ?
67
68
  Math.min(window.innerWidth, window.innerHeight) : 450));
68
69
  }
70
+ return availableSize;
69
71
  }
70
72
  /**
71
73
  * Method to create svg for maps.
@@ -75,7 +77,7 @@ function calculateSize(maps) {
75
77
  */
76
78
  function createSvg(maps) {
77
79
  maps.renderer = new SvgRenderer(maps.element.id);
78
- calculateSize(maps);
80
+ maps.availableSize = calculateSize(maps);
79
81
  maps.svgObject = maps.renderer.createSvg({
80
82
  id: maps.element.id + '_svg',
81
83
  width: maps.availableSize.width,
@@ -857,17 +859,19 @@ function markerShapeChoose(eventArgs, data) {
857
859
  var shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
858
860
  (getValueFromObject(data, eventArgs.shapeValuePath).toString()) :
859
861
  data[eventArgs.shapeValuePath]);
860
- eventArgs.shape = shape;
862
+ eventArgs.shape = (shape.toString() !== "") ? shape : eventArgs.shape;
861
863
  if (data[eventArgs.shapeValuePath] === 'Image') {
862
- eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath) &&
863
- !isNullOrUndefined(data[eventArgs.imageUrlValuePath])) ?
864
- ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : data[eventArgs.imageUrlValuePath]) : eventArgs.imageUrl;
864
+ eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
865
+ ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
866
+ data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
865
867
  }
866
868
  }
867
869
  else {
868
870
  var shapes = (!isNullOrUndefined(eventArgs.shapeValuePath)) ? ((eventArgs.shapeValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.shapeValuePath).toString() : eventArgs.shape) : eventArgs.shape;
869
- eventArgs.shape = shapes;
870
- var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ? ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? (getValueFromObject(data, eventArgs.imageUrlValuePath)).toString() : eventArgs.imageUrl) : eventArgs.imageUrl;
871
+ eventArgs.shape = (shapes.toString() !== "") ? shapes : eventArgs.shape;
872
+ var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
873
+ ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
874
+ data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
871
875
  eventArgs.imageUrl = shapeImage;
872
876
  }
873
877
  return eventArgs;
@@ -1245,6 +1249,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
1245
1249
  * @param {number} markerIndex - Specifies the marker index
1246
1250
  * @param {HTMLElement} markerTemplate - Specifies the marker template element
1247
1251
  * @param {Point} location - Specifies the location
1252
+ * @param {Point} transPoint - Specifies the translate point.
1248
1253
  * @param {number} scale - Specifies the scale value
1249
1254
  * @param {Point} offset - Specifies the offset value
1250
1255
  * @param {Maps} maps - Specifies the instance of the maps
@@ -1426,7 +1431,7 @@ function calculateShapes(maps, shape, options, size, location, markerEle) {
1426
1431
  var tempGroup;
1427
1432
  switch (shape) {
1428
1433
  case 'Balloon':
1429
- tempGroup = drawBalloon(maps, options, size, location, markerEle);
1434
+ tempGroup = drawBalloon(maps, options, size, location, 'Marker', markerEle);
1430
1435
  break;
1431
1436
  case 'Cross':
1432
1437
  options.d = 'M ' + location.x + ' ' + (location.y - size.height / 2) + ' L ' + location.x + ' ' + (location.y + size.height
@@ -1584,9 +1589,10 @@ function drawStar(maps, options, size, location, element) {
1584
1589
  * @returns {Element} - Returns the element
1585
1590
  * @private
1586
1591
  */
1587
- function drawBalloon(maps, options, size, location, element) {
1592
+ function drawBalloon(maps, options, size, location, type, element) {
1588
1593
  var width = size.width;
1589
1594
  var height = size.height;
1595
+ var pathElement;
1590
1596
  location.x -= width / 2;
1591
1597
  location.y -= height;
1592
1598
  options.d = 'M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16' +
@@ -1595,9 +1601,15 @@ function drawBalloon(maps, options, size, location, element) {
1595
1601
  var x = size.width / 30;
1596
1602
  var y = size.height / 30;
1597
1603
  balloon.setAttribute('transform', 'translate(' + location.x + ', ' + location.y + ') scale(' + x + ', ' + y + ')');
1598
- var g = maps.renderer.createGroup({ id: options.id });
1599
- appendShape(balloon, g);
1600
- return appendShape(g, element);
1604
+ if (type === 'Marker') {
1605
+ var g = maps.renderer.createGroup({ id: options.id });
1606
+ appendShape(balloon, g);
1607
+ pathElement = appendShape(g, element);
1608
+ }
1609
+ else {
1610
+ pathElement = balloon;
1611
+ }
1612
+ return pathElement;
1601
1613
  }
1602
1614
  /**
1603
1615
  * Internal rendering of Pattern
@@ -1739,6 +1751,7 @@ function getRatioOfBubble(min, max, value, minValue, maxValue) {
1739
1751
  *
1740
1752
  * @param {MapLocation[]} points - Specifies the points
1741
1753
  * @param {string} type - Specifies the type
1754
+ * @param {string} geometryType - Specified the type of the geometry
1742
1755
  * @returns {any} - Specifies the object
1743
1756
  */
1744
1757
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1957,9 +1970,9 @@ function getTranslate(mapObject, layer, animate) {
1957
1970
  mapObject.mapScaleValue = scaleFactor = zoomFactorValue = mapObject.scaleOfGivenLocation;
1958
1971
  }
1959
1972
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1960
- var min = mapObject.baseMapRectBounds['min'];
1973
+ var min = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['min'] : null;
1961
1974
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1962
- var max = mapObject.baseMapRectBounds['max'];
1975
+ var max = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['max'] : null;
1963
1976
  var zoomFactor = animate ? 1 : mapObject.mapScaleValue;
1964
1977
  if (isNullOrUndefined(mapObject.currentShapeDataLength)) {
1965
1978
  mapObject.currentShapeDataLength = !isNullOrUndefined(layer.shapeData['features'])
@@ -1969,111 +1982,113 @@ function getTranslate(mapObject, layer, animate) {
1969
1982
  var availSize = mapObject.availableSize;
1970
1983
  var x;
1971
1984
  var y;
1972
- var mapWidth = Math.abs(max['x'] - min['x']);
1973
- var mapHeight = Math.abs(min['y'] - max['y']);
1974
- var factor = animate ? 1 : mapObject.markerZoomFactor === 1 ? mapObject.mapScaleValue : zoomFactorValue;
1975
- center = mapObject.zoomSettings.shouldZoomInitially
1976
- && mapObject.markerZoomedState && !mapObject.zoomPersistence ? mapObject.markerZoomCenterPoint :
1977
- mapObject.centerPosition;
1978
- if ((!isNullOrUndefined(centerLongitude) && !isNullOrUndefined(centerLatitude)) || checkMethodeZoom) {
1979
- var leftPosition = (((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) + mapObject.mapAreaRect.x) / factor;
1980
- var topPosition = (((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) + mapObject.mapAreaRect.y) / factor;
1981
- var point = checkMethodeZoom ? calculateCenterFromPixel(mapObject, layer) :
1982
- convertGeoToPoint(centerLatitude, centerLongitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
1983
- if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
1984
- x = -point.x + leftPosition;
1985
- y = -point.y + topPosition;
1986
- scaleFactor = zoomFactor;
1987
- }
1988
- else {
1989
- if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
1985
+ if (!isNullOrUndefined(min) && !isNullOrUndefined(max)) {
1986
+ var mapWidth = Math.abs(max['x'] - min['x']);
1987
+ var mapHeight = Math.abs(min['y'] - max['y']);
1988
+ var factor = animate ? 1 : mapObject.markerZoomFactor === 1 ? mapObject.mapScaleValue : zoomFactorValue;
1989
+ center = mapObject.zoomSettings.shouldZoomInitially
1990
+ && mapObject.markerZoomedState && !mapObject.zoomPersistence ? mapObject.markerZoomCenterPoint :
1991
+ mapObject.centerPosition;
1992
+ if ((!isNullOrUndefined(centerLongitude) && !isNullOrUndefined(centerLatitude)) || checkMethodeZoom) {
1993
+ var leftPosition = (((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) + mapObject.mapAreaRect.x) / factor;
1994
+ var topPosition = (((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) + mapObject.mapAreaRect.y) / factor;
1995
+ var point = checkMethodeZoom ? calculateCenterFromPixel(mapObject, layer) :
1996
+ convertGeoToPoint(centerLatitude, centerLongitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
1997
+ if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
1990
1998
  x = -point.x + leftPosition;
1991
1999
  y = -point.y + topPosition;
2000
+ scaleFactor = zoomFactor;
1992
2001
  }
1993
2002
  else {
1994
- if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
2003
+ if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
1995
2004
  x = -point.x + leftPosition;
1996
2005
  y = -point.y + topPosition;
1997
- scaleFactor = zoomFactor;
1998
2006
  }
1999
2007
  else {
2000
- x = mapObject.zoomTranslatePoint.x;
2001
- y = mapObject.zoomTranslatePoint.y;
2008
+ if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
2009
+ x = -point.x + leftPosition;
2010
+ y = -point.y + topPosition;
2011
+ scaleFactor = zoomFactor;
2012
+ }
2013
+ else {
2014
+ x = mapObject.zoomTranslatePoint.x;
2015
+ y = mapObject.zoomTranslatePoint.y;
2016
+ }
2002
2017
  }
2018
+ scaleFactor = mapObject.mapScaleValue;
2003
2019
  }
2004
- scaleFactor = mapObject.mapScaleValue;
2005
- }
2006
- }
2007
- else {
2008
- if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
2009
- scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2010
- mapWidth *= scaleFactor;
2011
- mapHeight *= scaleFactor;
2012
- var widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
2013
- x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))) - widthDiff;
2014
- y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
2015
- mapObject.previousTranslate = new Point(x, y);
2016
2020
  }
2017
2021
  else {
2018
- if (!mapObject.zoomSettings.shouldZoomInitially && mapObject.markerZoomFactor === 1 && mapObject.mapScaleValue === 1) {
2022
+ if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
2019
2023
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2020
- mapHeight *= scaleFactor;
2021
2024
  mapWidth *= scaleFactor;
2025
+ mapHeight *= scaleFactor;
2026
+ var widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
2027
+ x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))) - widthDiff;
2022
2028
  y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
2023
- x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2029
+ mapObject.previousTranslate = new Point(x, y);
2024
2030
  }
2025
2031
  else {
2026
- scaleFactor = mapObject.mapScaleValue < 1 ? mapObject.mapScaleValue + 1 : mapObject.mapScaleValue;
2027
- mapObject.mapScaleValue = mapObject.zoomSettings.enable && mapObject.mapScaleValue !== 1 ? mapObject.mapScaleValue : 1;
2028
- if ((mapObject.currentShapeDataLength !== (!isNullOrUndefined(layer.shapeData['features'])
2029
- ? layer.shapeData['features'].length : layer.shapeData['geometries'].length)) && layer.type !== 'SubLayer') {
2030
- var scale = parseFloat(Math.min(size.height / mapHeight, size.width / mapWidth).toFixed(2));
2031
- mapHeight *= scale;
2032
- mapWidth *= scale;
2033
- y = size.y + ((-(min['y'])) + ((size.height / 2)
2034
- - (mapHeight / 2)));
2035
- scaleFactor = scale;
2036
- x = size.x + ((-(min['x']))
2037
- + ((size.width / 2) - (mapWidth / 2)));
2038
- }
2039
- else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width) {
2040
- var cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2041
- var cmapWidth = mapWidth;
2042
- cmapWidth *= cscaleFactor;
2043
- var cmapHeight = mapHeight;
2044
- cmapHeight *= cscaleFactor;
2045
- var x1 = size.x + ((-(min['x'])) + ((size.width / 2) - (cmapWidth / 2)));
2046
- var y1 = size.y + ((-(min['y'])) + ((size.height / 2) - (cmapHeight / 2)));
2047
- var xdiff = (mapObject.translatePoint.x - mapObject.previousTranslate.x) / (mapObject.widthBeforeRefresh);
2048
- var ydiff = (mapObject.translatePoint.y - mapObject.previousTranslate.y) / (mapObject.heightBeforeRefresh);
2049
- var actxdiff = xdiff * (mapObject.availableSize.width);
2050
- var actydiff = ydiff * (mapObject.availableSize.height);
2051
- x = x1 + actxdiff;
2052
- y = y1 + actydiff;
2053
- mapObject.previousTranslate = new Point(x1, y1);
2054
- mapObject.zoomTranslatePoint.x = x;
2055
- mapObject.zoomTranslatePoint.y = y;
2032
+ if (!mapObject.zoomSettings.shouldZoomInitially && mapObject.markerZoomFactor === 1 && mapObject.mapScaleValue === 1) {
2033
+ scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2034
+ mapHeight *= scaleFactor;
2035
+ mapWidth *= scaleFactor;
2036
+ y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
2037
+ x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2056
2038
  }
2057
2039
  else {
2058
- if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
2059
- scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2060
- mapWidth *= scaleFactor;
2061
- x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2062
- mapHeight *= scaleFactor;
2063
- y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
2040
+ scaleFactor = mapObject.mapScaleValue < 1 ? mapObject.mapScaleValue + 1 : mapObject.mapScaleValue;
2041
+ mapObject.mapScaleValue = mapObject.zoomSettings.enable && mapObject.mapScaleValue !== 1 ? mapObject.mapScaleValue : 1;
2042
+ if ((mapObject.currentShapeDataLength !== (!isNullOrUndefined(layer.shapeData['features'])
2043
+ ? layer.shapeData['features'].length : layer.shapeData['geometries'].length)) && layer.type !== 'SubLayer') {
2044
+ var scale = parseFloat(Math.min(size.height / mapHeight, size.width / mapWidth).toFixed(2));
2045
+ mapHeight *= scale;
2046
+ mapWidth *= scale;
2047
+ y = size.y + ((-(min['y'])) + ((size.height / 2)
2048
+ - (mapHeight / 2)));
2049
+ scaleFactor = scale;
2050
+ x = size.x + ((-(min['x']))
2051
+ + ((size.width / 2) - (mapWidth / 2)));
2052
+ }
2053
+ else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width) {
2054
+ var cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2055
+ var cmapWidth = mapWidth;
2056
+ cmapWidth *= cscaleFactor;
2057
+ var cmapHeight = mapHeight;
2058
+ cmapHeight *= cscaleFactor;
2059
+ var x1 = size.x + ((-(min['x'])) + ((size.width / 2) - (cmapWidth / 2)));
2060
+ var y1 = size.y + ((-(min['y'])) + ((size.height / 2) - (cmapHeight / 2)));
2061
+ var xdiff = (mapObject.translatePoint.x - mapObject.previousTranslate.x) / (mapObject.widthBeforeRefresh);
2062
+ var ydiff = (mapObject.translatePoint.y - mapObject.previousTranslate.y) / (mapObject.heightBeforeRefresh);
2063
+ var actxdiff = xdiff * (mapObject.availableSize.width);
2064
+ var actydiff = ydiff * (mapObject.availableSize.height);
2065
+ x = x1 + actxdiff;
2066
+ y = y1 + actydiff;
2067
+ mapObject.previousTranslate = new Point(x1, y1);
2068
+ mapObject.zoomTranslatePoint.x = x;
2069
+ mapObject.zoomTranslatePoint.y = y;
2064
2070
  }
2065
2071
  else {
2066
- x = mapObject.zoomTranslatePoint.x;
2067
- y = mapObject.zoomTranslatePoint.y;
2068
- scaleFactor = mapObject.scale;
2072
+ if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
2073
+ scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2074
+ mapWidth *= scaleFactor;
2075
+ x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2076
+ mapHeight *= scaleFactor;
2077
+ y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
2078
+ }
2079
+ else {
2080
+ x = mapObject.zoomTranslatePoint.x;
2081
+ y = mapObject.zoomTranslatePoint.y;
2082
+ scaleFactor = mapObject.scale;
2083
+ }
2069
2084
  }
2070
2085
  }
2071
2086
  }
2072
2087
  }
2073
- }
2074
- if (!isNullOrUndefined(mapObject.translatePoint)) {
2075
- x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
2076
- y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
2088
+ if (!isNullOrUndefined(mapObject.translatePoint)) {
2089
+ x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
2090
+ y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
2091
+ }
2077
2092
  }
2078
2093
  scaleFactor = (mapObject.enablePersistence) ? ((mapObject.mapScaleValue >= 1) ? mapObject.mapScaleValue : 1) : scaleFactor;
2079
2094
  mapObject.widthBeforeRefresh = mapObject.availableSize.width;
@@ -2510,6 +2525,12 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius) {
2510
2525
  delay: delay,
2511
2526
  progress: function (args) {
2512
2527
  if (args.timeStamp > args.delay) {
2528
+ if (maps.isTileMap && height === 0) {
2529
+ var layerGroupElement = document.querySelector('.GroupElement');
2530
+ if (!isNullOrUndefined(layerGroupElement)) {
2531
+ layerGroupElement.style.display = 'block';
2532
+ }
2533
+ }
2513
2534
  height = ((args.timeStamp - args.delay) / args.duration);
2514
2535
  element.setAttribute('transform', 'translate( ' + (centerX - (radius * height)) + ' ' + (centerY - (radius * height)) +
2515
2536
  ' ) scale(' + height + ')');
@@ -2709,6 +2730,8 @@ function renderLegendShape(location, size, shape, options, url) {
2709
2730
  var shapeY = location.y;
2710
2731
  var x = location.x + (-shapeWidth / 2);
2711
2732
  var y = location.y + (-shapeHeight / 2);
2733
+ options['stroke'] = (shape === 'HorizontalLine' || shape === 'VerticalLine' || shape === 'Cross') ? options['fill'] : options['stroke'];
2734
+ options['stroke-width'] = (options['stroke-width'] === 0 && (shape === 'HorizontalLine' || shape === 'VerticalLine' || shape === 'Cross')) ? 1 : options['stroke-width'];
2712
2735
  switch (shape) {
2713
2736
  case 'Circle':
2714
2737
  case 'Bubble':
@@ -2720,6 +2743,11 @@ function renderLegendShape(location, size, shape, options, url) {
2720
2743
  + (shapeY + (-shapeHeight / 2));
2721
2744
  merge(options, { 'd': renderPath });
2722
2745
  break;
2746
+ case 'HorizontalLine':
2747
+ renderPath = 'M' + ' ' + shapeX + ' ' + shapeY + ' ' + 'L' + ' ' + (shapeX + (shapeWidth / 2)) + ' '
2748
+ + shapeY;
2749
+ merge(options, { 'd': renderPath });
2750
+ break;
2723
2751
  case 'Diamond':
2724
2752
  renderPath = 'M' + ' ' + x + ' ' + shapeY + ' ' +
2725
2753
  'L' + ' ' + shapeX + ' ' + (shapeY + (-shapeHeight / 2)) + ' ' +
@@ -2844,6 +2872,7 @@ function changeBorderWidth(element, index, scale, maps) {
2844
2872
  var value = 0;
2845
2873
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2846
2874
  var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
2875
+ var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
2847
2876
  if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
2848
2877
  value = checkShapeDataFields(
2849
2878
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2853,14 +2882,17 @@ function changeBorderWidth(element, index, scale, maps) {
2853
2882
  currentStroke = maps.layersCollection[index].dataSource[value][borderWidthValue];
2854
2883
  }
2855
2884
  else {
2856
- currentStroke = (maps.layersCollection[index].shapeSettings.border.width);
2885
+ currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2857
2886
  }
2858
2887
  }
2859
2888
  }
2860
2889
  else {
2861
- currentStroke = (maps.layersCollection[index].shapeSettings.border.width);
2890
+ currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2862
2891
  }
2863
2892
  childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
2893
+ if (element.id.indexOf('_LineString') > -1 && isNullOrUndefined(currentStroke)) {
2894
+ childNode.setAttribute('stroke-width', (1 / scale).toString());
2895
+ }
2864
2896
  }
2865
2897
  }
2866
2898
  }
@@ -3224,15 +3256,15 @@ var Theme;
3224
3256
  fontWeight: 'Regular',
3225
3257
  color: null,
3226
3258
  fontStyle: 'Regular',
3227
- fontFamily: 'Roboto'
3259
+ fontFamily: null
3228
3260
  };
3229
3261
  /** @private */
3230
3262
  Theme.legendTitleFont = {
3231
- size: '14px',
3232
- fontWeight: 'Regular',
3263
+ size: '12px',
3264
+ fontWeight: 'Medium',
3233
3265
  color: null,
3234
- fontStyle: 'Regular',
3235
- fontFamily: 'Roboto, Noto, Sans-serif'
3266
+ fontStyle: 'Medium',
3267
+ fontFamily: null
3236
3268
  };
3237
3269
  /** @private */
3238
3270
  Theme.legendLabelFont = {
@@ -3381,6 +3413,14 @@ function getShapeColor(theme) {
3381
3413
  themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
3382
3414
  '#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
3383
3415
  break;
3416
+ case 'fluentui':
3417
+ themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
3418
+ '#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
3419
+ break;
3420
+ case 'fluentuidark':
3421
+ themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
3422
+ '#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
3423
+ break;
3384
3424
  default:
3385
3425
  themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
3386
3426
  '#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
@@ -3526,6 +3566,7 @@ function getThemeStyle(theme) {
3526
3566
  tooltipFillColor: '#363F4C',
3527
3567
  zoomFillColor: '#FFFFFF',
3528
3568
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3569
+ fontFamily: 'Roboto, Noto, Sans-serif',
3529
3570
  titleFontWeight: 'Medium',
3530
3571
  zoomSelectionColor: '#e61576',
3531
3572
  shapeFill: '#A6A6A6'
@@ -3543,6 +3584,7 @@ function getThemeStyle(theme) {
3543
3584
  tooltipFontColor: '#000000',
3544
3585
  tooltipFillColor: '#ffffff',
3545
3586
  zoomFillColor: '#FFFFFF',
3587
+ fontFamily: 'Roboto, Noto, Sans-serif',
3546
3588
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3547
3589
  titleFontWeight: 'Medium',
3548
3590
  zoomSelectionColor: '#e61576',
@@ -3664,6 +3706,52 @@ function getThemeStyle(theme) {
3664
3706
  shapeFill: '#495057'
3665
3707
  };
3666
3708
  break;
3709
+ case 'fluentui':
3710
+ style = {
3711
+ backgroundColor: 'rgba(255,255,255, 0.0)',
3712
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
3713
+ titleFontColor: '#201F1E',
3714
+ subTitleFontColor: '#201F1E',
3715
+ legendTitleFontColor: '#201F1E',
3716
+ legendTextColor: '#201F1E',
3717
+ dataLabelFontColor: '#201F1E',
3718
+ tooltipFontColor: '#323130',
3719
+ tooltipFillColor: '#FFFFFF',
3720
+ zoomFillColor: '#A19F9D',
3721
+ fontFamily: 'Segoe UI',
3722
+ titleFontSize: '14px',
3723
+ legendFontSize: '12px',
3724
+ tooltipFillOpacity: 1,
3725
+ tooltipTextOpacity: 1,
3726
+ labelFontFamily: 'Segoe UI',
3727
+ titleFontWeight: '600',
3728
+ zoomSelectionColor: '#323130',
3729
+ shapeFill: '#F3F2F1'
3730
+ };
3731
+ break;
3732
+ case 'fluentuidark':
3733
+ style = {
3734
+ backgroundColor: 'rgba(255,255,255, 0.0)',
3735
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
3736
+ titleFontColor: '#F3F2F1',
3737
+ subTitleFontColor: '#F3F2F1',
3738
+ legendTitleFontColor: '#F3F2F1',
3739
+ legendTextColor: '#F3F2F1',
3740
+ dataLabelFontColor: '#F3F2F1',
3741
+ tooltipFontColor: '#F3F2F1',
3742
+ tooltipFillColor: '#252423',
3743
+ zoomFillColor: '#484644',
3744
+ fontFamily: 'Segoe UI',
3745
+ titleFontSize: '14px',
3746
+ legendFontSize: '12px',
3747
+ tooltipFillOpacity: 1,
3748
+ tooltipTextOpacity: 1,
3749
+ labelFontFamily: 'Segoe UI',
3750
+ titleFontWeight: '600',
3751
+ zoomSelectionColor: '#F3F2F1',
3752
+ shapeFill: '#252423'
3753
+ };
3754
+ break;
3667
3755
  default:
3668
3756
  style = {
3669
3757
  backgroundColor: '#FFFFFF',
@@ -3677,6 +3765,7 @@ function getThemeStyle(theme) {
3677
3765
  tooltipFillColor: '#000000',
3678
3766
  zoomFillColor: '#737373',
3679
3767
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3768
+ fontFamily: 'Roboto, Noto, Sans-serif',
3680
3769
  titleFontWeight: 'Medium',
3681
3770
  zoomSelectionColor: '#e61576',
3682
3771
  shapeFill: '#A6A6A6'
@@ -4318,6 +4407,9 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
4318
4407
  function LegendSettings() {
4319
4408
  return _super !== null && _super.apply(this, arguments) || this;
4320
4409
  }
4410
+ __decorate$1([
4411
+ Property(false)
4412
+ ], LegendSettings.prototype, "useMarkerShape", void 0);
4321
4413
  __decorate$1([
4322
4414
  Property(false)
4323
4415
  ], LegendSettings.prototype, "toggleVisibility", void 0);
@@ -4370,7 +4462,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
4370
4462
  Complex({}, CommonTitleSettings)
4371
4463
  ], LegendSettings.prototype, "title", void 0);
4372
4464
  __decorate$1([
4373
- Complex({}, Font)
4465
+ Complex(Theme.legendTitleFont, Font)
4374
4466
  ], LegendSettings.prototype, "titleStyle", void 0);
4375
4467
  __decorate$1([
4376
4468
  Property('Bottom')
@@ -4468,7 +4560,7 @@ var ShapeSettings = /** @__PURE__ @class */ (function (_super) {
4468
4560
  Property(5)
4469
4561
  ], ShapeSettings.prototype, "circleRadius", void 0);
4470
4562
  __decorate$1([
4471
- Complex({ width: 0, color: '#000000' }, Border)
4563
+ Complex({ width: null, color: '#000000' }, Border)
4472
4564
  ], ShapeSettings.prototype, "border", void 0);
4473
4565
  __decorate$1([
4474
4566
  Property('')
@@ -4761,15 +4853,9 @@ var Marker = /** @__PURE__ @class */ (function () {
4761
4853
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
4762
4854
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
4763
4855
  };
4764
- eventArgs = markerColorChoose(eventArgs, data);
4765
- eventArgs = markerShapeChoose(eventArgs, data);
4766
4856
  _this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
4767
- if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
4768
- eventArgs = markerColorChoose(eventArgs, data);
4769
- }
4770
- if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
4771
- eventArgs = markerShapeChoose(eventArgs, data);
4772
- }
4857
+ eventArgs = markerColorChoose(eventArgs, data);
4858
+ eventArgs = markerShapeChoose(eventArgs, data);
4773
4859
  var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
4774
4860
  Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
4775
4861
  parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : 0;
@@ -5641,7 +5727,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5641
5727
  else {
5642
5728
  this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption(this.mapObject.element.id + '_MapArea_ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
5643
5729
  x: this.mapObject.isTileMap ? 0 : areaRect.x, y: this.mapObject.isTileMap ? 0 : areaRect.y,
5644
- width: areaRect.width, height: (areaRect.height < 0) ? 0 : areaRect.height
5730
+ width: areaRect.width, height: (areaRect.height < 0) ? 0 : !isNullOrUndefined(this.mapObject.legendModule) &&
5731
+ this.mapObject.legendModule.totalPages.length > 0 ? this.mapObject.legendModule.legendTotalRect.height : areaRect.height
5645
5732
  }));
5646
5733
  }
5647
5734
  this.layerGroup.appendChild(this.clipRectElement);
@@ -5763,7 +5850,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5763
5850
  if (this.mapObject.zoomSettings.resetToInitial && this.mapObject.initialCheck && !isNullOrUndefined(panel.mapObject.height)
5764
5851
  && this.mapObject.availableSize.height > 512) {
5765
5852
  this.mapObject.applyZoomReset = true;
5766
- this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512) + 1;
5853
+ this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512);
5767
5854
  var padding = this.mapObject.layers[this.mapObject.baseLayerIndex].layerType !== 'GoogleStaticMap' ?
5768
5855
  20 : 0;
5769
5856
  var totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
@@ -5845,6 +5932,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5845
5932
  proxy_1.mapObject['bingMap'] = bing_1;
5846
5933
  proxy_1.renderTileLayer(proxy_1, layer, layerIndex, bing_1);
5847
5934
  _this.mapObject.arrangeTemplate();
5935
+ if (_this.mapObject.zoomModule && (_this.mapObject.previousScale !== _this.mapObject.scale)) {
5936
+ _this.mapObject.zoomModule.applyTransform(true);
5937
+ }
5848
5938
  };
5849
5939
  ajax.send();
5850
5940
  }
@@ -5923,9 +6013,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5923
6013
  var data = geometryData['geometry'];
5924
6014
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5925
6015
  var properties = geometryData['properties'];
5926
- if (type !== 'LineString') {
5927
- _this.generatePoints(type, coords, data, properties);
5928
- }
6016
+ _this.generatePoints(type, coords, data, properties);
5929
6017
  }
5930
6018
  });
5931
6019
  this.currentLayer.rectBounds = this.rectBounds;
@@ -5953,11 +6041,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
5953
6041
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5954
6042
  var currentShapeData = this_1.currentLayer.layerData[i];
5955
6043
  var pathOptions;
5956
- var polyLineOptions;
5957
6044
  var circleOptions;
5958
6045
  var groupElement;
5959
6046
  var path = '';
5960
- var points = '';
5961
6047
  var fill = (shapeSettings.autofill) ? colors[i % colors.length] :
5962
6048
  (shapeSettings.fill || this_1.mapObject.themeStyle.shapeFill);
5963
6049
  if (shapeSettings.colorValuePath !== null && !isNullOrUndefined(currentShapeData['property'])) {
@@ -6021,7 +6107,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6021
6107
  if (isNullOrUndefined(shapeSettings.borderColorValuePath)) {
6022
6108
  _this.mapObject.layers[layerIndex].shapeSettings.border.color = eventArgs.border.color;
6023
6109
  }
6024
- else if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
6110
+ if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
6025
6111
  _this.mapObject.layers[layerIndex].shapeSettings.border.width = eventArgs.border.width;
6026
6112
  }
6027
6113
  }
@@ -6075,17 +6161,21 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6075
6161
  }
6076
6162
  break;
6077
6163
  case 'LineString':
6164
+ path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
6078
6165
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6079
6166
  currentShapeData.map(function (lineData) {
6080
- points += lineData['point']['x'] + ' , ' + lineData['point']['y'] + ' ';
6167
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
6081
6168
  });
6082
- polyLineOptions = new PolylineOption(shapeID, points, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray);
6083
- pathEle = _this.mapObject.renderer.drawPolyline(polyLineOptions);
6169
+ if (path.length > 3) {
6170
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
6171
+ pathEle = _this.mapObject.renderer.drawPath(pathOptions);
6172
+ }
6084
6173
  break;
6085
6174
  case 'Point':
6086
6175
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6087
6176
  var pointData = currentShapeData['point'];
6088
- circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], shapeSettings.circleRadius, null);
6177
+ var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / _this.currentFactor;
6178
+ circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, null);
6089
6179
  pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
6090
6180
  break;
6091
6181
  case 'Path':
@@ -6106,7 +6196,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6106
6196
  }
6107
6197
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
6108
6198
  (currentShapeData['property'][properties]) : ''));
6109
- pathEle.setAttribute('tabindex', (_this.mapObject.tabIndex + i + 2).toString());
6199
+ pathEle.setAttribute('tabindex', (_this.mapObject.tabIndex + i + 3).toString());
6200
+ if (drawingType === 'LineString') {
6201
+ pathEle.setAttribute('style', 'outline:none');
6202
+ }
6110
6203
  maintainSelection(_this.mapObject.selectedElementId, _this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
6111
6204
  if (_this.mapObject.toggledShapeElementId) {
6112
6205
  for (var j = 0; j < _this.mapObject.toggledShapeElementId.length; j++) {
@@ -6325,11 +6418,14 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6325
6418
  this.currentLayer.layerData.push(multiPolygonDatas);
6326
6419
  break;
6327
6420
  case 'linestring':
6421
+ var extraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6422
+ this.currentLayer.shapeSettings.border.width : 1;
6328
6423
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6329
6424
  coordinates.map(function (points, index) {
6330
6425
  latitude = points[1];
6331
6426
  longitude = points[0];
6332
6427
  var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
6428
+ _this.calculateBox(point, extraSpace_1);
6333
6429
  newData.push({
6334
6430
  point: point, lat: latitude, lng: longitude
6335
6431
  });
@@ -6340,6 +6436,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6340
6436
  break;
6341
6437
  case 'point': {
6342
6438
  var arrayCollections_1 = false;
6439
+ var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6440
+ this.currentLayer.shapeSettings.border.width : 1) + (this.currentLayer.shapeSettings.circleRadius * 2);
6343
6441
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6344
6442
  coordinates.map(function (points, index) {
6345
6443
  if (Object.prototype.toString.call(points) === '[object Array]') {
@@ -6356,6 +6454,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6356
6454
  latitude = coordinates[1];
6357
6455
  longitude = coordinates[0];
6358
6456
  var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6457
+ this.calculateBox(point, extraSpace_2);
6359
6458
  this.currentLayer.layerData.push({
6360
6459
  point: point, type: type, lat: latitude, lng: longitude, property: properties
6361
6460
  });
@@ -6369,6 +6468,17 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6369
6468
  break;
6370
6469
  }
6371
6470
  };
6471
+ LayerPanel.prototype.calculateBox = function (point, extraSpace) {
6472
+ if (isNullOrUndefined(this.rectBounds)) {
6473
+ this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
6474
+ }
6475
+ else {
6476
+ this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
6477
+ this.rectBounds['min']['y'] = Math.min(this.rectBounds['min']['y'], point.y - extraSpace);
6478
+ this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x);
6479
+ this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
6480
+ }
6481
+ };
6372
6482
  LayerPanel.prototype.calculateFactor = function (layer) {
6373
6483
  var horFactor;
6374
6484
  var verFactor = 1;
@@ -6477,6 +6587,15 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6477
6587
  _this.calculateRectBox(point[0]);
6478
6588
  });
6479
6589
  break;
6590
+ case 'linestring':
6591
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6592
+ coordinates.map(function (point, index) {
6593
+ _this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
6594
+ });
6595
+ break;
6596
+ case 'point':
6597
+ _this.calculateRectBox(coordinates, 'point');
6598
+ break;
6480
6599
  }
6481
6600
  }
6482
6601
  });
@@ -6513,20 +6632,33 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6513
6632
  return newData;
6514
6633
  };
6515
6634
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6516
- LayerPanel.prototype.calculateRectBox = function (coordinates) {
6635
+ LayerPanel.prototype.calculateRectBox = function (coordinates, type, isFirstItem) {
6517
6636
  var _this = this;
6518
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6519
- Array.prototype.forEach.call(coordinates, function (currentCoords) {
6520
- if (isNullOrUndefined(_this.mapObject.baseMapBounds)) {
6521
- _this.mapObject.baseMapBounds = new GeoLocation({ min: currentCoords[1], max: currentCoords[1] }, { min: currentCoords[0], max: currentCoords[0] });
6637
+ if (type !== 'LineString' && type !== 'point') {
6638
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6639
+ Array.prototype.forEach.call(coordinates, function (currentCoords) {
6640
+ if (isNullOrUndefined(_this.mapObject.baseMapBounds)) {
6641
+ _this.mapObject.baseMapBounds = new GeoLocation({ min: currentCoords[1], max: currentCoords[1] }, { min: currentCoords[0], max: currentCoords[0] });
6642
+ }
6643
+ else {
6644
+ _this.mapObject.baseMapBounds.latitude.min = Math.min(_this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
6645
+ _this.mapObject.baseMapBounds.latitude.max = Math.max(_this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
6646
+ _this.mapObject.baseMapBounds.longitude.min = Math.min(_this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
6647
+ _this.mapObject.baseMapBounds.longitude.max = Math.max(_this.mapObject.baseMapBounds.longitude.max, currentCoords[0]);
6648
+ }
6649
+ });
6650
+ }
6651
+ else {
6652
+ if ((isFirstItem || type === 'point') && isNullOrUndefined(this.mapObject.baseMapBounds)) {
6653
+ this.mapObject.baseMapBounds = new GeoLocation({ min: coordinates[1], max: coordinates[1] }, { min: coordinates[0], max: coordinates[0] });
6522
6654
  }
6523
6655
  else {
6524
- _this.mapObject.baseMapBounds.latitude.min = Math.min(_this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
6525
- _this.mapObject.baseMapBounds.latitude.max = Math.max(_this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
6526
- _this.mapObject.baseMapBounds.longitude.min = Math.min(_this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
6527
- _this.mapObject.baseMapBounds.longitude.max = Math.max(_this.mapObject.baseMapBounds.longitude.max, currentCoords[0]);
6656
+ this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, coordinates[1]);
6657
+ this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, coordinates[1]);
6658
+ this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, coordinates[0]);
6659
+ this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, coordinates[0]);
6528
6660
  }
6529
- });
6661
+ }
6530
6662
  };
6531
6663
  LayerPanel.prototype.generateTiles = function (zoomLevel, tileTranslatePoint, zoomType, bing, position) {
6532
6664
  var userLang = this.mapObject.locale;
@@ -6615,16 +6747,18 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6615
6747
  }
6616
6748
  }
6617
6749
  }
6618
- this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
6750
+ if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset) {
6751
+ this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
6752
+ }
6619
6753
  };
6620
6754
  LayerPanel.prototype.arrangeTiles = function (type, x, y) {
6621
6755
  var _this = this;
6622
6756
  var element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6623
6757
  var element1 = document.getElementById(this.mapObject.element.id + '_tiles');
6624
6758
  var timeOut;
6625
- if (!isNullOrUndefined(type) && type !== 'Pan' && type !== 'Reset' && type.indexOf('ZoomOut') === -1) {
6759
+ if (!isNullOrUndefined(type) && type !== 'Pan') {
6626
6760
  this.tileAnimation(type, x, y);
6627
- timeOut = 250;
6761
+ timeOut = this.mapObject.layersCollection[0].animationDuration;
6628
6762
  }
6629
6763
  else {
6630
6764
  timeOut = 0;
@@ -6639,7 +6773,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6639
6773
  }
6640
6774
  if (element1) {
6641
6775
  element1.style.zIndex = '0';
6642
- element1.style.visibility = 'hidden';
6643
6776
  }
6644
6777
  var animateElement;
6645
6778
  if (!document.getElementById(_this.mapObject.element.id + '_animated_tiles') && element) {
@@ -6701,35 +6834,23 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
6701
6834
  * @returns {void}
6702
6835
  */
6703
6836
  LayerPanel.prototype.tileAnimation = function (zoomType, translateX, translateY) {
6704
- var element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6705
- var element1 = document.getElementById('animated_tiles');
6706
- var ele = document.getElementById(this.mapObject.element.id + '_tiles');
6837
+ var tileParent = document.getElementById(this.mapObject.element.id + '_tile_parent');
6838
+ var animatedTiles = document.getElementById(this.mapObject.element.id + '_animated_tiles');
6839
+ var tileElement = document.getElementById(this.mapObject.element.id + '_tiles');
6707
6840
  var scaleValue = '2';
6708
- if (zoomType.indexOf('ZoomOut') === 0) {
6709
- ele.style.zIndex = '1';
6710
- element.style.zIndex = '0';
6711
- // element1 = ele.children[ele.childElementCount - 1] as HTMLElement;
6712
- while (ele.childElementCount >= 1) {
6713
- ele.removeChild(ele.children[0]);
6714
- }
6715
- translateX = 0;
6716
- translateY = 128 - 23;
6717
- scaleValue = '0.5';
6718
- }
6719
- else if (zoomType === 'Reset') {
6720
- ele.style.zIndex = '1';
6721
- element.style.zIndex = '0';
6722
- while (!(ele.childElementCount === 1) && !(ele.childElementCount === 0)) {
6723
- ele.removeChild(ele.children[1]);
6841
+ if (zoomType.indexOf('ZoomOut') === 0 || zoomType === 'Reset') {
6842
+ tileElement.style.zIndex = '1';
6843
+ tileParent.style.zIndex = '0';
6844
+ while (tileElement.childElementCount >= 1) {
6845
+ tileElement.removeChild(tileElement.children[0]);
6724
6846
  }
6725
- element1 = ele.children[0];
6726
6847
  translateX = 0;
6727
- translateY = 0;
6728
- scaleValue = '1';
6848
+ translateY = document.getElementById(this.mapObject.element.id + '_tile_parent').getClientRects()[0].height / 4;
6849
+ scaleValue = zoomType.indexOf('ZoomOut') === 0 ? '0.5' : '0.2';
6729
6850
  }
6730
- if (!isNullOrUndefined(element1)) {
6731
- element1.style.transition = '250ms';
6732
- element1.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
6851
+ if (!isNullOrUndefined(animatedTiles)) {
6852
+ animatedTiles.style.transition = this.mapObject.layersCollection[0].animationDuration + 'ms';
6853
+ animatedTiles.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
6733
6854
  }
6734
6855
  };
6735
6856
  /**
@@ -7345,7 +7466,15 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7345
7466
  }
7346
7467
  this.mapLayerPanel.measureLayerPanel();
7347
7468
  this.element.appendChild(this.svgObject);
7469
+ var position = this.getExtraPosition();
7348
7470
  for (var i = 0; i < this.layers.length; i++) {
7471
+ if (position.x !== 0 || position.y !== 0) {
7472
+ var markerTemplate$$1 = document.getElementById(this.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
7473
+ if (!isNullOrUndefined(markerTemplate$$1)) {
7474
+ markerTemplate$$1.style.top = this.mapAreaRect.y + position.y + 'px';
7475
+ markerTemplate$$1.style.left = this.mapAreaRect.x + position.x + 'px';
7476
+ }
7477
+ }
7349
7478
  if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
7350
7479
  this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
7351
7480
  var checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
@@ -7745,7 +7874,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7745
7874
  var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
7746
7875
  var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
7747
7876
  element.setAttribute('aria-label', this.description || title.text);
7748
- element.setAttribute('tabindex', (this.tabIndex + (type === 'title' ? 1 : 2)).toString());
7749
7877
  if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
7750
7878
  height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
7751
7879
  this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
@@ -7804,6 +7932,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7804
7932
  EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap, this);
7805
7933
  EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEndOnMap, this);
7806
7934
  EventHandler.add(this.element, 'pointerleave mouseleave', this.mouseLeaveOnMap, this);
7935
+ EventHandler.add(this.element, 'keydown', this.keyDownHandler, this);
7936
+ EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);
7807
7937
  // EventHandler.add(this.element, cancelEvent, this.mouseLeaveOnMap, this);
7808
7938
  window.addEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.mapsOnResize.bind(this));
7809
7939
  };
@@ -7821,6 +7951,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7821
7951
  EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap);
7822
7952
  EventHandler.remove(this.element, Browser.touchEndEvent, this.mouseEndOnMap);
7823
7953
  EventHandler.remove(this.element, 'pointerleave mouseleave', this.mouseLeaveOnMap);
7954
+ EventHandler.remove(this.element, 'keydown', this.keyDownHandler);
7955
+ EventHandler.remove(this.element, 'keyup', this.keyUpHandler);
7824
7956
  //EventHandler.remove(this.element, cancelEvent, this.mouseLeaveOnMap);
7825
7957
  window.removeEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.mapsOnResize);
7826
7958
  };
@@ -7836,6 +7968,96 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
7836
7968
  removeClass(document.getElementsByClassName('highlightMapStyle')[0]);
7837
7969
  }
7838
7970
  };
7971
+ Maps.prototype.keyUpHandler = function (event) {
7972
+ var id = event.target['id'];
7973
+ if (event.code === 'Tab' && id.indexOf('_LayerIndex_') > -1 && id.indexOf('shapeIndex') > -1) {
7974
+ this.keyboardHighlightSelection(id, event.type);
7975
+ }
7976
+ else if (id.indexOf('_LayerIndex_') === -1 && id.indexOf('shapeIndex') === -1 &&
7977
+ getElementsByClassName('highlightMapStyle').length > 0) {
7978
+ removeClass(getElementsByClassName('highlightMapStyle')[0]);
7979
+ if (this.legendSettings.visible && this.legendModule) {
7980
+ this.legendModule.removeShapeHighlightCollection();
7981
+ }
7982
+ }
7983
+ };
7984
+ Maps.prototype.keyboardHighlightSelection = function (id, key) {
7985
+ var layerIndex = parseInt(id.split('_LayerIndex_')[1].split('_')[0], 10);
7986
+ var shapeIndex = parseInt(id.split('_shapeIndex_')[1].split('_')[0], 10);
7987
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7988
+ var shapeData = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
7989
+ this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
7990
+ var dataIndex = parseInt(id.split('_dataIndex_')[1].split('_')[0], 10);
7991
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7992
+ var data = isNullOrUndefined(dataIndex) ? null : this.layers[layerIndex].dataSource[dataIndex];
7993
+ if (this.layers[layerIndex].selectionSettings.enable && key === 'keydown' && this.selectionModule) {
7994
+ this.selectionModule.selectionsettings = this.layers[layerIndex].selectionSettings;
7995
+ this.selectionModule.selectionType = 'Shape';
7996
+ this.selectionModule.selectElement(event.target, layerIndex, data, shapeData);
7997
+ }
7998
+ else if (this.highlightModule && (this.layers[layerIndex].highlightSettings.enable && key === 'keyup' &&
7999
+ !event.target.classList.contains('ShapeselectionMapStyle'))) {
8000
+ this.highlightModule.highlightSettings = this.layers[layerIndex].highlightSettings;
8001
+ this.highlightModule.handleHighlight(event.target, layerIndex, data, shapeData);
8002
+ }
8003
+ };
8004
+ Maps.prototype.keyDownHandler = function (event) {
8005
+ var zoom = this.zoomModule;
8006
+ if ((event.key === '+' || event.code === 'Equal') && zoom) {
8007
+ zoom.performZoomingByToolBar('zoomin');
8008
+ }
8009
+ else if ((event.key === '-' || event.code === 'Minus') && zoom) {
8010
+ zoom.performZoomingByToolBar('zoomout');
8011
+ }
8012
+ else if (event['keyCode'] === 82 && zoom) {
8013
+ zoom.performZoomingByToolBar('reset');
8014
+ }
8015
+ else if ((event.code === 'ArrowUp' || event.code === 'ArrowDown') && zoom) {
8016
+ event.preventDefault();
8017
+ zoom.mouseDownLatLong['x'] = 0;
8018
+ zoom.mouseMoveLatLong['y'] = this.mapAreaRect.height / 7;
8019
+ zoom.panning('None', zoom.mouseDownLatLong['x'], event.code === 'ArrowUp' ? -(zoom.mouseMoveLatLong['y']) :
8020
+ zoom.mouseMoveLatLong['y'], event);
8021
+ zoom.mouseDownLatLong['y'] = zoom.mouseMoveLatLong['y'];
8022
+ }
8023
+ else if ((event.code === 'ArrowLeft' || event.code === 'ArrowRight') && zoom) {
8024
+ event.preventDefault();
8025
+ zoom.mouseDownLatLong['y'] = 0;
8026
+ zoom.mouseMoveLatLong['x'] = this.mapAreaRect.width / 7;
8027
+ zoom.panning('None', event.code === 'ArrowLeft' ? -(zoom.mouseMoveLatLong['x']) : zoom.mouseMoveLatLong['x'], zoom.mouseDownLatLong['y'], event);
8028
+ zoom.mouseDownLatLong['x'] = zoom.mouseMoveLatLong['x'];
8029
+ }
8030
+ else if (event.code === 'Enter') {
8031
+ var id = event.target['id'];
8032
+ event.preventDefault();
8033
+ if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
8034
+ this.legendModule.currentPage = (id.indexOf('_Left_Page_') > -1) ? (this.legendModule.currentPage - 1) :
8035
+ (this.legendModule.currentPage + 1);
8036
+ this.legendModule.legendGroup = this.renderer.createGroup({ id: this.element.id + '_Legend_Group' });
8037
+ this.legendModule.drawLegendItem(this.legendModule.currentPage);
8038
+ var textContent = (document.getElementById(this.element.id + '_Paging_Text')).textContent;
8039
+ var text = textContent.split('/').map(Number);
8040
+ if (id.indexOf('_Left_Page_Rect') > -1) {
8041
+ if (text[0] !== 1) {
8042
+ event.target.focus();
8043
+ }
8044
+ event.target.style.outlineColor = text[0] - 1 !== text[1] ? '' : 'transparent';
8045
+ }
8046
+ else if (id.indexOf('_Right_Page_Rect') > -1) {
8047
+ if (text[0] !== text[1]) {
8048
+ event.target.focus();
8049
+ }
8050
+ event.target.style.outlineColor = text[0] !== text[1] + 1 ? '' : 'transparent';
8051
+ }
8052
+ if (querySelector(this.element.id + '_Legend_Border', this.element.id)) {
8053
+ querySelector(this.element.id + '_Legend_Border', this.element.id).style.pointerEvents = 'none';
8054
+ }
8055
+ }
8056
+ if (id.indexOf('shapeIndex') > -1) {
8057
+ this.keyboardHighlightSelection(id, event.type);
8058
+ }
8059
+ }
8060
+ };
7839
8061
  /**
7840
8062
  * Gets the selected element to be maintained or not.
7841
8063
  *
@@ -8171,26 +8393,28 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8171
8393
  */
8172
8394
  Maps.prototype.mapsOnResize = function (e) {
8173
8395
  var _this = this;
8174
- this.isResize = true;
8396
+ this.isResize = this.isReset = true;
8175
8397
  var args = {
8398
+ cancel: false,
8176
8399
  name: resize,
8177
8400
  previousSize: this.availableSize,
8178
- currentSize: new Size(0, 0),
8401
+ currentSize: calculateSize(this),
8179
8402
  maps: this
8180
8403
  };
8181
- if (this.resizeTo) {
8182
- clearTimeout(this.resizeTo);
8183
- }
8184
- if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
8185
- this.resizeTo = setTimeout(function () {
8186
- _this.unWireEVents();
8187
- _this.createSVG();
8188
- _this.refreshing = true;
8189
- _this.wireEVents();
8190
- args.currentSize = _this.availableSize;
8191
- _this.trigger(resize, args);
8192
- _this.render();
8193
- }, 500);
8404
+ this.trigger(resize, args);
8405
+ if (!args.cancel) {
8406
+ if (this.resizeTo) {
8407
+ clearTimeout(this.resizeTo);
8408
+ }
8409
+ if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
8410
+ this.resizeTo = setTimeout(function () {
8411
+ _this.unWireEVents();
8412
+ _this.createSVG();
8413
+ _this.refreshing = true;
8414
+ _this.wireEVents();
8415
+ _this.render();
8416
+ }, 500);
8417
+ }
8194
8418
  }
8195
8419
  return false;
8196
8420
  };
@@ -8778,6 +9002,26 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
8778
9002
  });
8779
9003
  return isVisible;
8780
9004
  };
9005
+ /**
9006
+ * To find space between the secondary element and svg element.
9007
+ * @private
9008
+ */
9009
+ Maps.prototype.getExtraPosition = function () {
9010
+ var top = 0;
9011
+ var left = 0;
9012
+ var svgElement = getElement(this.element.id + '_svg');
9013
+ if (!isNullOrUndefined(svgElement)) {
9014
+ var svgClientRects = svgElement.getClientRects();
9015
+ var mapsClientRects = (getElement(this.element.id + '_Secondary_Element')).getClientRects();
9016
+ if (svgClientRects.length !== 0 && mapsClientRects.length !== 0) {
9017
+ var svgClientRect = svgClientRects[0];
9018
+ var mapsClientRect = mapsClientRects[0];
9019
+ top = svgClientRect.top - mapsClientRect.top;
9020
+ left = svgClientRect.left - mapsClientRect.left;
9021
+ }
9022
+ }
9023
+ return new Point(left, top);
9024
+ };
8781
9025
  /**
8782
9026
  * To find marker visibility
8783
9027
  */
@@ -9154,6 +9398,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
9154
9398
  // eslint-disable-next-line valid-jsdoc
9155
9399
  /**
9156
9400
  * To render bubble
9401
+ *
9402
+ * @private
9157
9403
  */
9158
9404
  Bubble.prototype.renderBubble = function (
9159
9405
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -9199,7 +9445,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
9199
9445
  isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
9200
9446
  var shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
9201
9447
  ? shape[shapePath].toLowerCase() : shape[shapePath];
9202
- if (shapeDataLayerPathValue === shapePathValue) {
9448
+ if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
9203
9449
  if (layerData[i]['type'] === 'Point') {
9204
9450
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9205
9451
  shapePoints.push(this.getPoints(layerData[i], []));
@@ -9330,6 +9576,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
9330
9576
  // eslint-disable-next-line valid-jsdoc
9331
9577
  /**
9332
9578
  * To check and trigger bubble click event
9579
+ *
9580
+ * @private
9333
9581
  */
9334
9582
  Bubble.prototype.bubbleClick = function (e) {
9335
9583
  var target = e.target.id;
@@ -9373,6 +9621,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
9373
9621
  // eslint-disable-next-line valid-jsdoc
9374
9622
  /**
9375
9623
  * To check and trigger bubble move event
9624
+ *
9625
+ * @private
9376
9626
  */
9377
9627
  Bubble.prototype.bubbleMove = function (e) {
9378
9628
  var target = e.target.id;
@@ -9674,6 +9924,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
9674
9924
  }
9675
9925
  else {
9676
9926
  if (dataLabelSettings.smartLabelMode === 'Trim') {
9927
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9677
9928
  var textType = typeof text === 'number' ? text.toString() : text;
9678
9929
  trimmedLable = textTrim(width, textType, style);
9679
9930
  elementSize = measureText(trimmedLable, style);
@@ -9985,7 +10236,14 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
9985
10236
  */
9986
10237
  var Legend = /** @__PURE__ @class */ (function () {
9987
10238
  function Legend(maps) {
10239
+ /**
10240
+ * @private
10241
+ */
9988
10242
  this.legendBorderRect = new Rect(0, 0, 0, 0);
10243
+ /**
10244
+ * @private
10245
+ */
10246
+ this.legendTotalRect = new Rect(0, 0, 0, 0);
9989
10247
  /**
9990
10248
  * @private
9991
10249
  */
@@ -10002,12 +10260,27 @@ var Legend = /** @__PURE__ @class */ (function () {
10002
10260
  this.textMaxWidth = 0;
10003
10261
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10004
10262
  this.shapeHighlightCollection = [];
10263
+ /**
10264
+ * @private
10265
+ */
10005
10266
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10006
10267
  this.legendHighlightCollection = [];
10268
+ /**
10269
+ * @private
10270
+ */
10007
10271
  this.shapePreviousColor = [];
10272
+ /**
10273
+ * @private
10274
+ */
10008
10275
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10009
10276
  this.selectedNonLegendShapes = [];
10277
+ /**
10278
+ * @private
10279
+ */
10010
10280
  this.shapeToggled = true;
10281
+ /**
10282
+ * @private
10283
+ */
10011
10284
  this.legendElement = null;
10012
10285
  this.maps = maps;
10013
10286
  this.addEventListener();
@@ -10388,6 +10661,11 @@ var Legend = /** @__PURE__ @class */ (function () {
10388
10661
  this.drawLegendItem(this.currentPage);
10389
10662
  }
10390
10663
  };
10664
+ /**
10665
+ * @param {string} page - Specifies the legend page.
10666
+ * @returns {void}
10667
+ * @private
10668
+ */
10391
10669
  Legend.prototype.drawLegendItem = function (page) {
10392
10670
  var map = this.maps;
10393
10671
  var legend = map.legendSettings;
@@ -10395,6 +10673,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10395
10673
  var shapeSize = new Size(legend.shapeWidth, legend.shapeHeight);
10396
10674
  var textOptions;
10397
10675
  var render = map.renderer;
10676
+ var legendShape = legend.shape;
10398
10677
  if (page >= 0 && page < this.totalPages.length) {
10399
10678
  if (querySelector(this.legendGroup.id, this.maps.element.id)) {
10400
10679
  remove(querySelector(this.legendGroup.id, this.maps.element.id));
@@ -10406,6 +10685,7 @@ var Legend = /** @__PURE__ @class */ (function () {
10406
10685
  var shapeBorder = collection['shapeBorder'];
10407
10686
  var legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
10408
10687
  var legendText = collection['DisplayText'];
10688
+ var pagingArrowPadding = 4;
10409
10689
  var shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
10410
10690
  legend.shape : 'Image') : collection['legendShape']);
10411
10691
  var strokeColor = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
@@ -10415,25 +10695,39 @@ var Legend = /** @__PURE__ @class */ (function () {
10415
10695
  1 : shapeBorder.width : shapeBorder.width;
10416
10696
  var shapeId = map.element.id + '_Legend_Shape_Index_' + collection['idIndex'];
10417
10697
  var textId = map.element.id + '_Legend_Text_Index_' + collection['idIndex'];
10418
- var shapeLocation = collection['Shape'];
10419
- var textLocation = collection['Text'];
10698
+ var shapeLocation = new Point(collection['Shape']['x'], (collection['Shape']['y'] - pagingArrowPadding));
10699
+ var textLocation = new Point(collection['Text']['x'], (collection['Text']['y'] - pagingArrowPadding));
10420
10700
  var imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
10421
10701
  var renderOptions_1 = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
10422
- legend.textStyle.color = (legend.textStyle.color !== null) ? legend.textStyle.color :
10702
+ var legendTextStyle = {
10703
+ fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
10704
+ fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color, opacity: legend.textStyle.opacity
10705
+ };
10706
+ legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
10423
10707
  this.maps.themeStyle.legendTextColor;
10424
- legend.textStyle.fontFamily = map.themeStyle.fontFamily || legend.textStyle.fontFamily;
10425
- legend.textStyle.size = map.themeStyle.legendFontSize || legend.textStyle.size;
10708
+ legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
10709
+ legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
10426
10710
  if (i === 0) {
10427
10711
  this.renderLegendBorder();
10428
10712
  }
10429
- legendElement.appendChild(drawSymbol(shapeLocation, shape, shapeSize, collection['ImageSrc'], renderOptions_1));
10713
+ if (legend.type === 'Markers' && legend.useMarkerShape) {
10714
+ var legendShapeData = this.legendCollection[collection['idIndex']].data[0];
10715
+ var marker$$1 = map.layers[legendShapeData['layerIndex']].markerSettings[legendShapeData['markerIndex']];
10716
+ legendShape = !isNullOrUndefined(marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']]) && marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']] !== '' ? marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']] : marker$$1.shape;
10717
+ }
10718
+ if (legendShape === "Balloon") {
10719
+ legendElement.appendChild(drawBalloon(map, renderOptions_1, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
10720
+ }
10721
+ else {
10722
+ legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions_1));
10723
+ }
10430
10724
  var legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
10431
10725
  if (legendRectSize > this.legendBorderRect.width) {
10432
- var trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legend.textStyle, legendRectSize);
10726
+ var trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legendTextStyle, legendRectSize);
10433
10727
  legendText = trimmedText;
10434
10728
  }
10435
10729
  textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
10436
- renderTextElement(textOptions, legend.textStyle, legend.textStyle.color, legendElement);
10730
+ renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
10437
10731
  this.legendGroup.appendChild(legendElement);
10438
10732
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10439
10733
  if (i === (this.totalPages[page]['Collection'].length - 1)) {
@@ -10445,10 +10739,10 @@ var Legend = /** @__PURE__ @class */ (function () {
10445
10739
  var pagingFont = legend.textStyle;
10446
10740
  var pagingTextSize = measureText(pagingText, pagingFont);
10447
10741
  var leftPageX = (this.legendItemRect.x + this.legendItemRect.width) - pagingTextSize.width -
10448
- (width * 2) - spacing;
10742
+ (width * 2) - (spacing * 2) + (pagingArrowPadding / 2);
10449
10743
  var rightPageX = (this.legendItemRect.x + this.legendItemRect.width);
10744
+ var pageTextX = rightPageX - width - (pagingTextSize.width / 2) - (spacing / 2) - pagingArrowPadding;
10450
10745
  var locY = (this.legendItemRect.y + this.legendItemRect.height) + (height / 2) + spacing;
10451
- var pageTextX = rightPageX - width - (pagingTextSize.width / 2) - (spacing / 2);
10452
10746
  pagingGroup = render.createGroup({ id: map.element.id + '_Legend_Paging_Group' });
10453
10747
  var leftPageElement = render.createGroup({ id: map.element.id + '_Legend_Left_Paging_Group' });
10454
10748
  var rightPageElement = render.createGroup({ id: map.element.id + '_Legend_Right_Paging_Group' });
@@ -10456,15 +10750,19 @@ var Legend = /** @__PURE__ @class */ (function () {
10456
10750
  ' L ' + (rightPageX - width) + ' ' + (locY + height) + ' z ';
10457
10751
  var leftPath = ' M ' + leftPageX + ' ' + locY + ' L ' + (leftPageX + width) + ' ' + (locY - height) +
10458
10752
  ' L ' + (leftPageX + width) + ' ' + (locY + height) + ' z ';
10459
- var leftPageOptions = new PathOption(map.element.id + '_Left_Page', '#a6a6a6', 0, '#a6a6a6', 1, 1, '', leftPath);
10753
+ var leftPageOptions = new PathOption(map.element.id + '_Left_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === 1 ? 0.5 : 1), 1, '', leftPath);
10460
10754
  leftPageElement.appendChild(render.drawPath(leftPageOptions));
10461
10755
  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, '', '');
10462
- leftPageElement.appendChild(render.drawRectangle(leftRectPageOptions));
10756
+ var pathEle = render.drawRectangle(leftRectPageOptions);
10757
+ pathEle.setAttribute('tabindex', ((page + 1) === 1 ? -1 : map.tabIndex + 1).toString());
10758
+ leftPageElement.appendChild(pathEle);
10463
10759
  this.wireEvents(leftPageElement);
10464
- var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', 1, 1, '', rightPath);
10760
+ var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
10465
10761
  rightPageElement.appendChild(render.drawPath(rightPageOptions));
10466
- var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect((rightPageX - width), (locY - height), width, spacing), null, null, '', '');
10467
- rightPageElement.appendChild(render.drawRectangle(rightRectPageOptions));
10762
+ 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, '', '');
10763
+ pathEle = render.drawRectangle(rightRectPageOptions);
10764
+ pathEle.setAttribute('tabindex', ((page + 1) === this.totalPages.length ? -1 : map.tabIndex + 2).toString());
10765
+ rightPageElement.appendChild(pathEle);
10468
10766
  this.wireEvents(rightPageElement);
10469
10767
  pagingGroup.appendChild(leftPageElement);
10470
10768
  pagingGroup.appendChild(rightPageElement);
@@ -11114,7 +11412,10 @@ var Legend = /** @__PURE__ @class */ (function () {
11114
11412
  var map = this.maps;
11115
11413
  var legend = map.legendSettings;
11116
11414
  var legendTitle = legend.title.text;
11117
- var textStyle = legend.titleStyle;
11415
+ var textStyle = {
11416
+ fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
11417
+ fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color, opacity: legend.titleStyle.opacity
11418
+ };
11118
11419
  var textOptions;
11119
11420
  var spacing = 10;
11120
11421
  var trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
@@ -11133,6 +11434,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11133
11434
  map.svgObject.appendChild(this.legendGroup);
11134
11435
  if (legendTitle) {
11135
11436
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
11437
+ textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
11136
11438
  textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
11137
11439
  renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
11138
11440
  }
@@ -11198,13 +11500,13 @@ var Legend = /** @__PURE__ @class */ (function () {
11198
11500
  break;
11199
11501
  }
11200
11502
  if ((legend.height || legend.width) && legend.mode !== 'Interactive') {
11201
- map.totalRect = totalRect;
11503
+ this.legendTotalRect = map.totalRect = totalRect;
11202
11504
  }
11203
11505
  else {
11204
11506
  if ((legend.height || legend.width) && legend.mode === 'Interactive') {
11205
11507
  map.totalRect = totalRect;
11206
11508
  }
11207
- map.mapAreaRect = totalRect;
11509
+ this.legendTotalRect = map.mapAreaRect = totalRect;
11208
11510
  }
11209
11511
  this.translate = new Point(x, y);
11210
11512
  }
@@ -11239,21 +11541,25 @@ var Legend = /** @__PURE__ @class */ (function () {
11239
11541
  }
11240
11542
  else {
11241
11543
  newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
11242
- shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
11544
+ shape: (!isNullOrUndefined(marker$$1.shapeValuePath) && !isNullOrUndefined(data[marker$$1.shapeValuePath]) && data[marker$$1.shapeValuePath] !== '') ? data[marker$$1.shapeValuePath] : (_this.maps.legendSettings.useMarkerShape ? marker$$1.shape : _this.maps.legendSettings.shape) });
11243
11545
  _this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
11244
11546
  }
11245
11547
  }
11246
11548
  });
11247
11549
  });
11248
11550
  };
11551
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11249
11552
  Legend.prototype.getMarkerLegendData = function (layerIndex, text, legendFill) {
11250
11553
  var _this = this;
11554
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11251
11555
  var legendData = [];
11252
11556
  this.maps.layers[layerIndex].markerSettings.map(function (markerSettings, markerIndex) {
11557
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11253
11558
  var markerData = markerSettings.dataSource;
11559
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11254
11560
  Array.prototype.forEach.call(markerData, function (data, dataIndex) {
11255
11561
  var marker$$1 = _this.maps.layers[layerIndex].markerSettings[markerIndex];
11256
- if ((text === data[marker$$1.legendText] || text === '') && legendFill == data[marker$$1.colorValuePath]) {
11562
+ if ((text === data[marker$$1.legendText] || text === '') && legendFill === data[marker$$1.colorValuePath]) {
11257
11563
  legendData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
11258
11564
  shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
11259
11565
  }
@@ -11615,7 +11921,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11615
11921
  shape = this.legendCollection[legendIndex]['data'][i];
11616
11922
  mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11617
11923
  '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11618
- '_MarkerIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11924
+ '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11619
11925
  if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
11620
11926
  mapElement = mapElement.children[0];
11621
11927
  }
@@ -11624,7 +11930,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11624
11930
  mapElement.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
11625
11931
  mapElement.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
11626
11932
  mapElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11627
- mapElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11933
+ mapElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11628
11934
  mapElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11629
11935
  this.maps.layers[k].shapeSettings.opacity :
11630
11936
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11639,6 +11945,9 @@ var Legend = /** @__PURE__ @class */ (function () {
11639
11945
  if (targetEle !== null) {
11640
11946
  legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
11641
11947
  legendShapeId.setAttribute('fill', '#E5E5E5');
11948
+ if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
11949
+ legendShapeId.setAttribute('stroke', '#E5E5E5');
11950
+ }
11642
11951
  legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
11643
11952
  legendTextId.setAttribute('fill', '#E5E5E5');
11644
11953
  }
@@ -11653,6 +11962,9 @@ var Legend = /** @__PURE__ @class */ (function () {
11653
11962
  if (targetEle !== null) {
11654
11963
  legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
11655
11964
  legendShapeId.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
11965
+ if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
11966
+ legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
11967
+ }
11656
11968
  legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
11657
11969
  legendTextId.setAttribute('fill', '#757575');
11658
11970
  }
@@ -11687,7 +11999,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11687
11999
  layerElement.setAttribute('fill', this.maps.layers[j].shapeSettings.fill);
11688
12000
  layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
11689
12001
  layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
11690
- layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
12002
+ layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
11691
12003
  layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
11692
12004
  this.maps.layers[j].shapeSettings.opacity :
11693
12005
  this.maps.layers[j].shapeSettings.border.opacity).toString());
@@ -11717,7 +12029,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11717
12029
  layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
11718
12030
  this.maps.layers[j].shapeSettings.opacity :
11719
12031
  this.maps.layers[j].shapeSettings.border.opacity).toString());
11720
- layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
12032
+ layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
11721
12033
  layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
11722
12034
  layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
11723
12035
  if (targetEle !== null) {
@@ -11737,7 +12049,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11737
12049
  targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendSettings.visible &&
11738
12050
  targetEle.id.indexOf('_Text') === -1) {
11739
12051
  var LegendInteractive = void 0;
11740
- var legendIndex = parseFloat(targetEle.id.substr((this.maps.element.id + '_Legend_Index_').length));
12052
+ var legendIndex = parseFloat(targetEle.id.split(this.maps.element.id + '_Legend_Index_')[1]);
11741
12053
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11742
12054
  var mapdata = void 0;
11743
12055
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -11758,7 +12070,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11758
12070
  if (this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
11759
12071
  LegendInteractive.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
11760
12072
  LegendInteractive.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
11761
- LegendInteractive.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
12073
+ LegendInteractive.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11762
12074
  LegendInteractive.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11763
12075
  this.maps.layers[k].shapeSettings.opacity :
11764
12076
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11822,7 +12134,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11822
12134
  mapLegendElement.setAttribute('fill', this.maps.layers[0].shapeSettings.fill);
11823
12135
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
11824
12136
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11825
- mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
12137
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11826
12138
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11827
12139
  this.maps.layers[k].shapeSettings.opacity :
11828
12140
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11849,7 +12161,7 @@ var Legend = /** @__PURE__ @class */ (function () {
11849
12161
  this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
11850
12162
  }
11851
12163
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11852
- mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
12164
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11853
12165
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
11854
12166
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11855
12167
  this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -12069,14 +12381,7 @@ var Highlight = /** @__PURE__ @class */ (function () {
12069
12381
  this.highlightSettings = this.maps.layers[layerIndex].navigationLineSettings[index].highlightSettings;
12070
12382
  }
12071
12383
  if (this.highlightSettings.enable) {
12072
- if (this.maps.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1) {
12073
- this.maps.legendModule.shapeHighLightAndSelection(targetEle, data, this.highlightSettings, 'highlight', layerIndex);
12074
- }
12075
- var selectHighLight = targetEle.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible ?
12076
- this.maps.legendModule.shapeToggled : true;
12077
- if (selectHighLight) {
12078
- this.mapHighlight(targetEle, shapeData, data);
12079
- }
12384
+ this.handleHighlight(targetEle, layerIndex, data, shapeData);
12080
12385
  }
12081
12386
  else {
12082
12387
  var element = document.getElementsByClassName('highlightMapStyle')[0];
@@ -12100,21 +12405,35 @@ var Highlight = /** @__PURE__ @class */ (function () {
12100
12405
  targetEle.setAttribute('stroke', this.maps.layers[layerIndex].navigationLineSettings[index].color);
12101
12406
  }
12102
12407
  removeClass(targetEle);
12103
- if (this.maps.legendSettings.visible) {
12408
+ if (this.maps.legendSettings.visible && this.maps.legendModule) {
12104
12409
  this.maps.legendModule.removeShapeHighlightCollection();
12105
12410
  }
12106
12411
  }
12107
12412
  else if ((targetEle.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') !== -1 ||
12108
- targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) &&
12413
+ targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendModule &&
12109
12414
  this.maps.legendSettings.visible && targetEle.id.indexOf('_Text') === -1) {
12110
12415
  this.maps.legendModule.legendHighLightAndSelection(targetEle, 'highlight');
12111
12416
  }
12112
12417
  else {
12113
- if (this.maps.legendSettings.visible) {
12418
+ if (this.maps.legendSettings.visible && this.maps.legendModule) {
12114
12419
  this.maps.legendModule.removeLegendHighlightCollection();
12115
12420
  }
12116
12421
  }
12117
12422
  };
12423
+ /**
12424
+ * @private
12425
+ */
12426
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12427
+ Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
12428
+ if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule) {
12429
+ this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.highlightSettings, 'highlight', layerIndex);
12430
+ }
12431
+ var selectHighLight = targetElement.id.indexOf('shapeIndex') > -1 && (this.maps.legendSettings.visible && this.maps.legendModule) ?
12432
+ this.maps.legendModule.shapeToggled : true;
12433
+ if (selectHighLight) {
12434
+ this.mapHighlight(targetElement, shapeData, data);
12435
+ }
12436
+ };
12118
12437
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12119
12438
  Highlight.prototype.mapHighlight = function (targetEle, shapeData, data) {
12120
12439
  var _this = this;
@@ -12125,14 +12444,14 @@ var Highlight = /** @__PURE__ @class */ (function () {
12125
12444
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
12126
12445
  }
12127
12446
  var border = {
12128
- color: this.highlightSettings.border.color,
12129
- width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
12447
+ color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
12448
+ width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
12130
12449
  opacity: this.highlightSettings.border.opacity
12131
12450
  };
12132
12451
  var eventArgs = {
12133
12452
  opacity: this.highlightSettings.opacity,
12134
- fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
12135
- ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
12453
+ fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
12454
+ ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
12136
12455
  border: border,
12137
12456
  name: itemHighlight,
12138
12457
  target: targetEle.id,
@@ -12273,24 +12592,31 @@ var Selection = /** @__PURE__ @class */ (function () {
12273
12592
  this.selectionType = 'navigationline';
12274
12593
  }
12275
12594
  if (this.selectionsettings.enable) {
12276
- this.maps.mapSelect = targetElement ? true : false;
12277
- if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
12278
- this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
12279
- }
12280
- var shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible) ?
12281
- this.maps.legendModule.shapeToggled : true;
12282
- if (shapeToggled) {
12283
- this.selectMap(targetElement, shapeData, data);
12284
- }
12595
+ this.selectElement(targetElement, layerIndex, data, shapeData);
12285
12596
  }
12286
12597
  }
12287
- else if (this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable &&
12598
+ else if ((this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable && this.maps.legendModule) &&
12288
12599
  !isNullOrUndefined(targetElement.id) && targetElement.id.indexOf('_Text') === -1 &&
12289
12600
  (targetElement.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') > -1 ||
12290
12601
  targetElement.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1)) {
12291
12602
  this.maps.legendModule.legendHighLightAndSelection(targetElement, 'selection');
12292
12603
  }
12293
12604
  };
12605
+ /**
12606
+ * @private
12607
+ */
12608
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12609
+ Selection.prototype.selectElement = function (targetElement, layerIndex, data, shapeData) {
12610
+ this.maps.mapSelect = targetElement ? true : false;
12611
+ if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
12612
+ this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
12613
+ }
12614
+ var shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible && this.maps.legendModule) ?
12615
+ this.maps.legendModule.shapeToggled : true;
12616
+ if (shapeToggled) {
12617
+ this.selectMap(targetElement, shapeData, data);
12618
+ }
12619
+ };
12294
12620
  // eslint-disable-next-line valid-jsdoc
12295
12621
  /**
12296
12622
  * Public method for selection
@@ -12315,15 +12641,16 @@ var Selection = /** @__PURE__ @class */ (function () {
12315
12641
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12316
12642
  Selection.prototype.selectMap = function (targetElement, shapeData, data) {
12317
12643
  var _this = this;
12644
+ var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12318
12645
  var selectionsettings = this.selectionsettings;
12319
12646
  var border = {
12320
- color: this.selectionsettings.border.color,
12321
- width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
12647
+ color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
12648
+ width: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)) : (this.selectionsettings.border.width / this.maps.scale),
12322
12649
  opacity: this.selectionsettings.border.opacity
12323
12650
  };
12324
12651
  var eventArgs = {
12325
12652
  opacity: this.selectionsettings.opacity,
12326
- fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
12653
+ fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
12327
12654
  border: border,
12328
12655
  name: itemSelection,
12329
12656
  target: targetElement.id,
@@ -12346,9 +12673,9 @@ var Selection = /** @__PURE__ @class */ (function () {
12346
12673
  }
12347
12674
  if (targetElement.id.indexOf('NavigationIndex') > -1) {
12348
12675
  var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
12349
- var layerIndex = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12350
- targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex].navigationLineSettings[index].width.toString());
12351
- targetElement.setAttribute('stroke', _this.maps.layers[layerIndex].navigationLineSettings[index].color);
12676
+ var layerIndex_1 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12677
+ targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex_1].navigationLineSettings[index].width.toString());
12678
+ targetElement.setAttribute('stroke', _this.maps.layers[layerIndex_1].navigationLineSettings[index].color);
12352
12679
  }
12353
12680
  }
12354
12681
  else {
@@ -12374,9 +12701,9 @@ var Selection = /** @__PURE__ @class */ (function () {
12374
12701
  }
12375
12702
  if (ele.id.indexOf('NavigationIndex') > -1) {
12376
12703
  var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
12377
- var layerIndex = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12378
- ele.setAttribute('stroke-width', _this.maps.layers[layerIndex].navigationLineSettings[index].width.toString());
12379
- ele.setAttribute('stroke', _this.maps.layers[layerIndex].navigationLineSettings[index].color);
12704
+ var layerIndex_2 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12705
+ ele.setAttribute('stroke-width', _this.maps.layers[layerIndex_2].navigationLineSettings[index].width.toString());
12706
+ ele.setAttribute('stroke', _this.maps.layers[layerIndex_2].navigationLineSettings[index].color);
12380
12707
  }
12381
12708
  }
12382
12709
  if (!getElement(_this.selectionType + 'selectionMap')) {
@@ -12517,8 +12844,6 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
12517
12844
  if (istooltipRender) {
12518
12845
  if (targetId.indexOf('_shapeIndex_') > -1) {
12519
12846
  option = layer.tooltipSettings;
12520
- option.textStyle.fontFamily = this.maps.themeStyle.fontFamily || option.textStyle.fontFamily;
12521
- option.textStyle.opacity = this.maps.themeStyle.tooltipTextOpacity || option.textStyle.opacity;
12522
12847
  var shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
12523
12848
  if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
12524
12849
  return;
@@ -12635,9 +12960,13 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
12635
12960
  option.template = option.template[Object.keys(option.template)[0]];
12636
12961
  }
12637
12962
  templateData = this.setTooltipContent(option, templateData);
12963
+ var tooltipTextStyle = {
12964
+ color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
12965
+ fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
12966
+ };
12638
12967
  var tooltipOption = {
12639
12968
  location: location, text: tooltipContent, data: templateData,
12640
- textStyle: option.textStyle,
12969
+ textStyle: tooltipTextStyle,
12641
12970
  template: option.template
12642
12971
  };
12643
12972
  tooltipArgs = {
@@ -12653,6 +12982,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
12653
12982
  _this.maps['isProtectedOnChange'] = true;
12654
12983
  tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
12655
12984
  || _this.maps.themeStyle.tooltipFontColor;
12985
+ tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
12986
+ || _this.maps.themeStyle.fontFamily;
12987
+ tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
12988
+ || _this.maps.themeStyle.tooltipTextOpacity;
12656
12989
  if (tooltipArgs.cancel) {
12657
12990
  _this.svgTooltip = new Tooltip({
12658
12991
  enable: true,
@@ -12935,8 +13268,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
12935
13268
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
12936
13269
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
12937
13270
  }
13271
+ this.markerLineAnimation(map);
12938
13272
  map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
12939
13273
  var element1 = document.getElementById(this.maps.element.id + '_tiles');
13274
+ var animationDuration = this.maps.layersCollection[0].animationDuration;
12940
13275
  setTimeout(function () {
12941
13276
  // if (type === 'ZoomOut') {
12942
13277
  // element1.removeChild(element1.children[element1.childElementCount - 1]);
@@ -12950,7 +13285,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
12950
13285
  if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
12951
13286
  document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
12952
13287
  }
12953
- }, 250);
13288
+ }, animationDuration);
12954
13289
  }
12955
13290
  this.maps.zoomNotApplied = false;
12956
13291
  };
@@ -13124,11 +13459,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
13124
13459
  */
13125
13460
  Zoom.prototype.animateTransform = function (element, animate$$1, x, y, scale) {
13126
13461
  var duration = this.currentLayer.animationDuration;
13127
- if (!animate$$1 || duration === 0) {
13462
+ if (!animate$$1 || duration === 0 || this.maps.isTileMap) {
13128
13463
  element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
13129
13464
  return;
13130
13465
  }
13131
- zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13466
+ if (!this.maps.isTileMap) {
13467
+ zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13468
+ }
13132
13469
  };
13133
13470
  Zoom.prototype.applyTransform = function (animate$$1) {
13134
13471
  var layerIndex;
@@ -13175,12 +13512,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
13175
13512
  this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
13176
13513
  }
13177
13514
  currentEle = layerElement.childNodes[j];
13515
+ var markerAnimation = void 0;
13178
13516
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
13179
13517
  for (var k = 0; k < currentEle.childElementCount; k++) {
13180
13518
  this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate$$1);
13181
13519
  var layerIndex_1 = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
13182
13520
  var dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
13183
13521
  var markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
13522
+ markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
13184
13523
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13185
13524
  var markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
13186
13525
  for (var x_1 = 0; x_1 < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x_1++) {
@@ -13191,9 +13530,17 @@ var Zoom = /** @__PURE__ @class */ (function () {
13191
13530
  this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
13192
13531
  }
13193
13532
  }
13194
- if (!this.maps.isTileMap && this.currentLayer.animationDuration > 0) {
13195
- markerStyle = 'visibility:hidden';
13196
- currentEle.setAttribute('style', markerStyle);
13533
+ if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
13534
+ if (this.maps.isTileMap) {
13535
+ var groupElement = document.querySelector('.GroupElement');
13536
+ if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
13537
+ groupElement.style.display = 'none';
13538
+ }
13539
+ }
13540
+ else {
13541
+ markerStyle = 'visibility:hidden';
13542
+ currentEle.setAttribute('style', markerStyle);
13543
+ }
13197
13544
  }
13198
13545
  }
13199
13546
  if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
@@ -13292,7 +13639,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13292
13639
  this.maps.arrangeTemplate();
13293
13640
  }
13294
13641
  if (!isNullOrUndefined(this.currentLayer)) {
13295
- if (!animate$$1 || this.currentLayer.animationDuration === 0) {
13642
+ if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
13296
13643
  this.processTemplate(x, y, scale, this.maps);
13297
13644
  }
13298
13645
  }
@@ -13411,7 +13758,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
13411
13758
  */
13412
13759
  Zoom.prototype.processTemplate = function (x, y, scale, maps) {
13413
13760
  for (var i = 0; i < this.templateCount; i++) {
13414
- this.currentLayer = maps.layersCollection[i];
13415
13761
  var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
13416
13762
  var markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
13417
13763
  i + '_Markers_Template_Group');
@@ -13642,6 +13988,23 @@ var Zoom = /** @__PURE__ @class */ (function () {
13642
13988
  }
13643
13989
  }
13644
13990
  };
13991
+ Zoom.prototype.markerLineAnimation = function (map) {
13992
+ if (map.isTileMap) {
13993
+ for (var i = 0; i < map.layersCollection.length; i++) {
13994
+ var markerTemplateElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
13995
+ var lineElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_line_Group');
13996
+ if (!isNullOrUndefined(markerTemplateElement)) {
13997
+ markerTemplateElement.style.visibility = 'hidden';
13998
+ }
13999
+ if (!isNullOrUndefined(lineElement)) {
14000
+ lineElement.style.visibility = 'hidden';
14001
+ }
14002
+ }
14003
+ }
14004
+ };
14005
+ /**
14006
+ * @private
14007
+ */
13645
14008
  Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
13646
14009
  var map = this.maps;
13647
14010
  var panArgs;
@@ -13660,6 +14023,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
13660
14023
  yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
13661
14024
  this.maps.mergeCluster();
13662
14025
  if (!map.isTileMap) {
14026
+ var legendElement = document.getElementById(map.element.id + '_Legend_Group');
14027
+ var legendHeight = !isNullOrUndefined(legendElement) ? legendElement.getClientRects()[0].height : 0;
13663
14028
  x = translatePoint.x - xDifference / scale;
13664
14029
  y = translatePoint.y - yDifference / scale;
13665
14030
  var layerRect = getElementByID(map.element.id + '_Layer_Collections').getBoundingClientRect();
@@ -13667,7 +14032,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
13667
14032
  var panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
13668
14033
  ((layerRect.left + layerRect.width) >= (elementRect.left + elementRect.width) + map.mapAreaRect.x + map.margin.left)));
13669
14034
  var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
13670
- ((layerRect.top + layerRect.height + map.margin.top) >= (elementRect.top + elementRect.height))));
14035
+ ((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
13671
14036
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13672
14037
  var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
13673
14038
  panArgs = {
@@ -13774,41 +14139,45 @@ var Zoom = /** @__PURE__ @class */ (function () {
13774
14139
  var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
13775
14140
  map.scale = Math.pow(2, tileZoomFactor - 1);
13776
14141
  map.tileZoomLevel = tileZoomFactor;
13777
- map.zoomSettings.zoomFactor = zoomFactor;
13778
- var position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
13779
- this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
13780
- if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
13781
- map.initialCheck = true;
13782
- map.zoomPersistence = false;
13783
- map.tileTranslatePoint.x = map.initialTileTranslate.x;
13784
- map.tileTranslatePoint.y = map.initialTileTranslate.y;
13785
- tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
14142
+ if (map.previousScale !== map.scale || map.isReset) {
14143
+ map.zoomSettings.zoomFactor = zoomFactor;
14144
+ var position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
14145
+ this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
14146
+ if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
14147
+ map.initialCheck = true;
14148
+ map.zoomPersistence = false;
14149
+ map.tileTranslatePoint.x = map.initialTileTranslate.x;
14150
+ map.tileTranslatePoint.y = map.initialTileTranslate.y;
14151
+ tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
14152
+ }
14153
+ this.triggerZoomEvent(prevTilePoint, prevLevel, type);
14154
+ map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
14155
+ map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
14156
+ if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
14157
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
14158
+ }
14159
+ if (document.querySelector('.GroupElement')) {
14160
+ document.querySelector('.GroupElement').style.display = 'none';
14161
+ }
14162
+ this.markerLineAnimation(map);
14163
+ map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
14164
+ var element1 = document.getElementById(this.maps.element.id + '_tiles');
14165
+ var animationDuration = this.maps.layersCollection[0].animationDuration;
14166
+ setTimeout(function () {
14167
+ _this.applyTransform(true);
14168
+ if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
14169
+ document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
14170
+ }
14171
+ }, animationDuration);
13786
14172
  }
13787
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
13788
- map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
13789
- map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
13790
- if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13791
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
13792
- }
13793
- if (document.querySelector('.GroupElement')) {
13794
- document.querySelector('.GroupElement').style.display = 'none';
13795
- }
13796
- map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
13797
- var element1 = document.getElementById(this.maps.element.id + '_tiles');
13798
- setTimeout(function () {
13799
- _this.applyTransform(true);
13800
- if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
13801
- document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13802
- }
13803
- }, 250);
14173
+ this.maps.zoomNotApplied = false;
13804
14174
  }
13805
- this.maps.zoomNotApplied = false;
13806
14175
  };
13807
14176
  Zoom.prototype.createZoomingToolbars = function () {
13808
14177
  var map = this.maps;
13809
14178
  this.toolBarGroup = map.renderer.createGroup({
13810
14179
  id: map.element.id + '_Zooming_KitCollection',
13811
- opacity: 0.3
14180
+ opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
13812
14181
  });
13813
14182
  var kitHeight = 16;
13814
14183
  var kitWidth = 16;
@@ -14066,8 +14435,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
14066
14435
  x = (size.width - toolBarSize.width) - padding;
14067
14436
  break;
14068
14437
  }
14069
- element.style.left = x + 'px';
14070
- element.style.top = y + 'px';
14438
+ var extraPosition = map.getExtraPosition();
14439
+ element.style.left = x + extraPosition.x + 'px';
14440
+ element.style.top = y + extraPosition.y + 'px';
14071
14441
  var color = this.maps.zoomSettings.highlightColor || this.maps.themeStyle.zoomSelectionColor;
14072
14442
  var css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
14073
14443
  '.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
@@ -14211,14 +14581,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
14211
14581
  if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
14212
14582
  if (!this.maps.zoomSettings.enablePanning) {
14213
14583
  if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
14214
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '0.3');
14215
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '0.3');
14584
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14585
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14216
14586
  }
14217
14587
  }
14218
14588
  }
14219
14589
  }
14220
14590
  else {
14221
- getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '0.3');
14591
+ getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14222
14592
  if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
14223
14593
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
14224
14594
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');