@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
@@ -45,13 +45,15 @@ function calculateSize(maps) {
45
45
  const containerHeight = maps.element.clientHeight;
46
46
  const containerElementWidth = stringToNumber(maps.element.style.width, containerWidth);
47
47
  const containerElementHeight = stringToNumber(maps.element.style.height, containerHeight);
48
+ let availableSize = new Size(0, 0);
48
49
  if (maps.width === '0px' || maps.width === '0%' || maps.height === '0%' || maps.height === '0px') {
49
- maps.availableSize = new Size(0, 0);
50
+ availableSize = new Size(0, 0);
50
51
  }
51
52
  else {
52
- maps.availableSize = new Size(stringToNumber(maps.width, containerWidth) || containerWidth || containerElementWidth || 600, stringToNumber(maps.height, containerHeight) || containerHeight || containerElementHeight || (maps.isDevice ?
53
+ availableSize = new Size(stringToNumber(maps.width, containerWidth) || containerWidth || containerElementWidth || 600, stringToNumber(maps.height, containerHeight) || containerHeight || containerElementHeight || (maps.isDevice ?
53
54
  Math.min(window.innerWidth, window.innerHeight) : 450));
54
55
  }
56
+ return availableSize;
55
57
  }
56
58
  /**
57
59
  * Method to create svg for maps.
@@ -61,7 +63,7 @@ function calculateSize(maps) {
61
63
  */
62
64
  function createSvg(maps) {
63
65
  maps.renderer = new SvgRenderer(maps.element.id);
64
- calculateSize(maps);
66
+ maps.availableSize = calculateSize(maps);
65
67
  maps.svgObject = maps.renderer.createSvg({
66
68
  id: maps.element.id + '_svg',
67
69
  width: maps.availableSize.width,
@@ -804,17 +806,19 @@ function markerShapeChoose(eventArgs, data) {
804
806
  const shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
805
807
  (getValueFromObject(data, eventArgs.shapeValuePath).toString()) :
806
808
  data[eventArgs.shapeValuePath]);
807
- eventArgs.shape = shape;
809
+ eventArgs.shape = (shape.toString() !== "") ? shape : eventArgs.shape;
808
810
  if (data[eventArgs.shapeValuePath] === 'Image') {
809
- eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath) &&
810
- !isNullOrUndefined(data[eventArgs.imageUrlValuePath])) ?
811
- ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : data[eventArgs.imageUrlValuePath]) : eventArgs.imageUrl;
811
+ eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
812
+ ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
813
+ data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
812
814
  }
813
815
  }
814
816
  else {
815
817
  const shapes = (!isNullOrUndefined(eventArgs.shapeValuePath)) ? ((eventArgs.shapeValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.shapeValuePath).toString() : eventArgs.shape) : eventArgs.shape;
816
- eventArgs.shape = shapes;
817
- const shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ? ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? (getValueFromObject(data, eventArgs.imageUrlValuePath)).toString() : eventArgs.imageUrl) : eventArgs.imageUrl;
818
+ eventArgs.shape = (shapes.toString() !== "") ? shapes : eventArgs.shape;
819
+ const shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
820
+ ((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
821
+ data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
818
822
  eventArgs.imageUrl = shapeImage;
819
823
  }
820
824
  return eventArgs;
@@ -1192,6 +1196,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
1192
1196
  * @param {number} markerIndex - Specifies the marker index
1193
1197
  * @param {HTMLElement} markerTemplate - Specifies the marker template element
1194
1198
  * @param {Point} location - Specifies the location
1199
+ * @param {Point} transPoint - Specifies the translate point.
1195
1200
  * @param {number} scale - Specifies the scale value
1196
1201
  * @param {Point} offset - Specifies the offset value
1197
1202
  * @param {Maps} maps - Specifies the instance of the maps
@@ -1373,7 +1378,7 @@ function calculateShapes(maps, shape, options, size, location, markerEle) {
1373
1378
  let tempGroup;
1374
1379
  switch (shape) {
1375
1380
  case 'Balloon':
1376
- tempGroup = drawBalloon(maps, options, size, location, markerEle);
1381
+ tempGroup = drawBalloon(maps, options, size, location, 'Marker', markerEle);
1377
1382
  break;
1378
1383
  case 'Cross':
1379
1384
  options.d = 'M ' + location.x + ' ' + (location.y - size.height / 2) + ' L ' + location.x + ' ' + (location.y + size.height
@@ -1531,9 +1536,10 @@ function drawStar(maps, options, size, location, element) {
1531
1536
  * @returns {Element} - Returns the element
1532
1537
  * @private
1533
1538
  */
1534
- function drawBalloon(maps, options, size, location, element) {
1539
+ function drawBalloon(maps, options, size, location, type, element) {
1535
1540
  const width = size.width;
1536
1541
  const height = size.height;
1542
+ let pathElement;
1537
1543
  location.x -= width / 2;
1538
1544
  location.y -= height;
1539
1545
  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' +
@@ -1542,9 +1548,15 @@ function drawBalloon(maps, options, size, location, element) {
1542
1548
  const x = size.width / 30;
1543
1549
  const y = size.height / 30;
1544
1550
  balloon.setAttribute('transform', 'translate(' + location.x + ', ' + location.y + ') scale(' + x + ', ' + y + ')');
1545
- const g = maps.renderer.createGroup({ id: options.id });
1546
- appendShape(balloon, g);
1547
- return appendShape(g, element);
1551
+ if (type === 'Marker') {
1552
+ const g = maps.renderer.createGroup({ id: options.id });
1553
+ appendShape(balloon, g);
1554
+ pathElement = appendShape(g, element);
1555
+ }
1556
+ else {
1557
+ pathElement = balloon;
1558
+ }
1559
+ return pathElement;
1548
1560
  }
1549
1561
  /**
1550
1562
  * Internal rendering of Pattern
@@ -1683,6 +1695,7 @@ function getRatioOfBubble(min, max, value, minValue, maxValue) {
1683
1695
  *
1684
1696
  * @param {MapLocation[]} points - Specifies the points
1685
1697
  * @param {string} type - Specifies the type
1698
+ * @param {string} geometryType - Specified the type of the geometry
1686
1699
  * @returns {any} - Specifies the object
1687
1700
  */
1688
1701
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -1901,9 +1914,9 @@ function getTranslate(mapObject, layer, animate) {
1901
1914
  mapObject.mapScaleValue = scaleFactor = zoomFactorValue = mapObject.scaleOfGivenLocation;
1902
1915
  }
1903
1916
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1904
- const min = mapObject.baseMapRectBounds['min'];
1917
+ const min = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['min'] : null;
1905
1918
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1906
- const max = mapObject.baseMapRectBounds['max'];
1919
+ const max = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['max'] : null;
1907
1920
  const zoomFactor = animate ? 1 : mapObject.mapScaleValue;
1908
1921
  if (isNullOrUndefined(mapObject.currentShapeDataLength)) {
1909
1922
  mapObject.currentShapeDataLength = !isNullOrUndefined(layer.shapeData['features'])
@@ -1913,111 +1926,113 @@ function getTranslate(mapObject, layer, animate) {
1913
1926
  const availSize = mapObject.availableSize;
1914
1927
  let x;
1915
1928
  let y;
1916
- let mapWidth = Math.abs(max['x'] - min['x']);
1917
- let mapHeight = Math.abs(min['y'] - max['y']);
1918
- const factor = animate ? 1 : mapObject.markerZoomFactor === 1 ? mapObject.mapScaleValue : zoomFactorValue;
1919
- center = mapObject.zoomSettings.shouldZoomInitially
1920
- && mapObject.markerZoomedState && !mapObject.zoomPersistence ? mapObject.markerZoomCenterPoint :
1921
- mapObject.centerPosition;
1922
- if ((!isNullOrUndefined(centerLongitude) && !isNullOrUndefined(centerLatitude)) || checkMethodeZoom) {
1923
- const leftPosition = (((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) + mapObject.mapAreaRect.x) / factor;
1924
- const topPosition = (((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) + mapObject.mapAreaRect.y) / factor;
1925
- const point = checkMethodeZoom ? calculateCenterFromPixel(mapObject, layer) :
1926
- convertGeoToPoint(centerLatitude, centerLongitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
1927
- if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
1928
- x = -point.x + leftPosition;
1929
- y = -point.y + topPosition;
1930
- scaleFactor = zoomFactor;
1931
- }
1932
- else {
1933
- if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
1929
+ if (!isNullOrUndefined(min) && !isNullOrUndefined(max)) {
1930
+ let mapWidth = Math.abs(max['x'] - min['x']);
1931
+ let mapHeight = Math.abs(min['y'] - max['y']);
1932
+ const factor = animate ? 1 : mapObject.markerZoomFactor === 1 ? mapObject.mapScaleValue : zoomFactorValue;
1933
+ center = mapObject.zoomSettings.shouldZoomInitially
1934
+ && mapObject.markerZoomedState && !mapObject.zoomPersistence ? mapObject.markerZoomCenterPoint :
1935
+ mapObject.centerPosition;
1936
+ if ((!isNullOrUndefined(centerLongitude) && !isNullOrUndefined(centerLatitude)) || checkMethodeZoom) {
1937
+ const leftPosition = (((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) + mapObject.mapAreaRect.x) / factor;
1938
+ const topPosition = (((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) + mapObject.mapAreaRect.y) / factor;
1939
+ const point = checkMethodeZoom ? calculateCenterFromPixel(mapObject, layer) :
1940
+ convertGeoToPoint(centerLatitude, centerLongitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
1941
+ if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
1934
1942
  x = -point.x + leftPosition;
1935
1943
  y = -point.y + topPosition;
1944
+ scaleFactor = zoomFactor;
1936
1945
  }
1937
1946
  else {
1938
- if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
1947
+ if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
1939
1948
  x = -point.x + leftPosition;
1940
1949
  y = -point.y + topPosition;
1941
- scaleFactor = zoomFactor;
1942
1950
  }
1943
1951
  else {
1944
- x = mapObject.zoomTranslatePoint.x;
1945
- y = mapObject.zoomTranslatePoint.y;
1952
+ if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
1953
+ x = -point.x + leftPosition;
1954
+ y = -point.y + topPosition;
1955
+ scaleFactor = zoomFactor;
1956
+ }
1957
+ else {
1958
+ x = mapObject.zoomTranslatePoint.x;
1959
+ y = mapObject.zoomTranslatePoint.y;
1960
+ }
1946
1961
  }
1962
+ scaleFactor = mapObject.mapScaleValue;
1947
1963
  }
1948
- scaleFactor = mapObject.mapScaleValue;
1949
- }
1950
- }
1951
- else {
1952
- if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
1953
- scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
1954
- mapWidth *= scaleFactor;
1955
- mapHeight *= scaleFactor;
1956
- const widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
1957
- x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))) - widthDiff;
1958
- y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
1959
- mapObject.previousTranslate = new Point(x, y);
1960
1964
  }
1961
1965
  else {
1962
- if (!mapObject.zoomSettings.shouldZoomInitially && mapObject.markerZoomFactor === 1 && mapObject.mapScaleValue === 1) {
1966
+ if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
1963
1967
  scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
1964
- mapHeight *= scaleFactor;
1965
1968
  mapWidth *= scaleFactor;
1969
+ mapHeight *= scaleFactor;
1970
+ const widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
1971
+ x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))) - widthDiff;
1966
1972
  y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
1967
- x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
1973
+ mapObject.previousTranslate = new Point(x, y);
1968
1974
  }
1969
1975
  else {
1970
- scaleFactor = mapObject.mapScaleValue < 1 ? mapObject.mapScaleValue + 1 : mapObject.mapScaleValue;
1971
- mapObject.mapScaleValue = mapObject.zoomSettings.enable && mapObject.mapScaleValue !== 1 ? mapObject.mapScaleValue : 1;
1972
- if ((mapObject.currentShapeDataLength !== (!isNullOrUndefined(layer.shapeData['features'])
1973
- ? layer.shapeData['features'].length : layer.shapeData['geometries'].length)) && layer.type !== 'SubLayer') {
1974
- const scale = parseFloat(Math.min(size.height / mapHeight, size.width / mapWidth).toFixed(2));
1975
- mapHeight *= scale;
1976
- mapWidth *= scale;
1977
- y = size.y + ((-(min['y'])) + ((size.height / 2)
1978
- - (mapHeight / 2)));
1979
- scaleFactor = scale;
1980
- x = size.x + ((-(min['x']))
1981
- + ((size.width / 2) - (mapWidth / 2)));
1982
- }
1983
- else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width) {
1984
- const cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
1985
- let cmapWidth = mapWidth;
1986
- cmapWidth *= cscaleFactor;
1987
- let cmapHeight = mapHeight;
1988
- cmapHeight *= cscaleFactor;
1989
- const x1 = size.x + ((-(min['x'])) + ((size.width / 2) - (cmapWidth / 2)));
1990
- const y1 = size.y + ((-(min['y'])) + ((size.height / 2) - (cmapHeight / 2)));
1991
- const xdiff = (mapObject.translatePoint.x - mapObject.previousTranslate.x) / (mapObject.widthBeforeRefresh);
1992
- const ydiff = (mapObject.translatePoint.y - mapObject.previousTranslate.y) / (mapObject.heightBeforeRefresh);
1993
- const actxdiff = xdiff * (mapObject.availableSize.width);
1994
- const actydiff = ydiff * (mapObject.availableSize.height);
1995
- x = x1 + actxdiff;
1996
- y = y1 + actydiff;
1997
- mapObject.previousTranslate = new Point(x1, y1);
1998
- mapObject.zoomTranslatePoint.x = x;
1999
- mapObject.zoomTranslatePoint.y = y;
1976
+ if (!mapObject.zoomSettings.shouldZoomInitially && mapObject.markerZoomFactor === 1 && mapObject.mapScaleValue === 1) {
1977
+ scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
1978
+ mapHeight *= scaleFactor;
1979
+ mapWidth *= scaleFactor;
1980
+ y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
1981
+ x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2000
1982
  }
2001
1983
  else {
2002
- if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
2003
- scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2004
- mapWidth *= scaleFactor;
2005
- x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2006
- mapHeight *= scaleFactor;
2007
- y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
1984
+ scaleFactor = mapObject.mapScaleValue < 1 ? mapObject.mapScaleValue + 1 : mapObject.mapScaleValue;
1985
+ mapObject.mapScaleValue = mapObject.zoomSettings.enable && mapObject.mapScaleValue !== 1 ? mapObject.mapScaleValue : 1;
1986
+ if ((mapObject.currentShapeDataLength !== (!isNullOrUndefined(layer.shapeData['features'])
1987
+ ? layer.shapeData['features'].length : layer.shapeData['geometries'].length)) && layer.type !== 'SubLayer') {
1988
+ const scale = parseFloat(Math.min(size.height / mapHeight, size.width / mapWidth).toFixed(2));
1989
+ mapHeight *= scale;
1990
+ mapWidth *= scale;
1991
+ y = size.y + ((-(min['y'])) + ((size.height / 2)
1992
+ - (mapHeight / 2)));
1993
+ scaleFactor = scale;
1994
+ x = size.x + ((-(min['x']))
1995
+ + ((size.width / 2) - (mapWidth / 2)));
1996
+ }
1997
+ else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width) {
1998
+ const cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
1999
+ let cmapWidth = mapWidth;
2000
+ cmapWidth *= cscaleFactor;
2001
+ let cmapHeight = mapHeight;
2002
+ cmapHeight *= cscaleFactor;
2003
+ const x1 = size.x + ((-(min['x'])) + ((size.width / 2) - (cmapWidth / 2)));
2004
+ const y1 = size.y + ((-(min['y'])) + ((size.height / 2) - (cmapHeight / 2)));
2005
+ const xdiff = (mapObject.translatePoint.x - mapObject.previousTranslate.x) / (mapObject.widthBeforeRefresh);
2006
+ const ydiff = (mapObject.translatePoint.y - mapObject.previousTranslate.y) / (mapObject.heightBeforeRefresh);
2007
+ const actxdiff = xdiff * (mapObject.availableSize.width);
2008
+ const actydiff = ydiff * (mapObject.availableSize.height);
2009
+ x = x1 + actxdiff;
2010
+ y = y1 + actydiff;
2011
+ mapObject.previousTranslate = new Point(x1, y1);
2012
+ mapObject.zoomTranslatePoint.x = x;
2013
+ mapObject.zoomTranslatePoint.y = y;
2008
2014
  }
2009
2015
  else {
2010
- x = mapObject.zoomTranslatePoint.x;
2011
- y = mapObject.zoomTranslatePoint.y;
2012
- scaleFactor = mapObject.scale;
2016
+ if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
2017
+ scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
2018
+ mapWidth *= scaleFactor;
2019
+ x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
2020
+ mapHeight *= scaleFactor;
2021
+ y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
2022
+ }
2023
+ else {
2024
+ x = mapObject.zoomTranslatePoint.x;
2025
+ y = mapObject.zoomTranslatePoint.y;
2026
+ scaleFactor = mapObject.scale;
2027
+ }
2013
2028
  }
2014
2029
  }
2015
2030
  }
2016
2031
  }
2017
- }
2018
- if (!isNullOrUndefined(mapObject.translatePoint)) {
2019
- x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
2020
- y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
2032
+ if (!isNullOrUndefined(mapObject.translatePoint)) {
2033
+ x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
2034
+ y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
2035
+ }
2021
2036
  }
2022
2037
  scaleFactor = (mapObject.enablePersistence) ? ((mapObject.mapScaleValue >= 1) ? mapObject.mapScaleValue : 1) : scaleFactor;
2023
2038
  mapObject.widthBeforeRefresh = mapObject.availableSize.width;
@@ -2453,6 +2468,12 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius = 0)
2453
2468
  delay: delay,
2454
2469
  progress: (args) => {
2455
2470
  if (args.timeStamp > args.delay) {
2471
+ if (maps.isTileMap && height === 0) {
2472
+ const layerGroupElement = document.querySelector('.GroupElement');
2473
+ if (!isNullOrUndefined(layerGroupElement)) {
2474
+ layerGroupElement.style.display = 'block';
2475
+ }
2476
+ }
2456
2477
  height = ((args.timeStamp - args.delay) / args.duration);
2457
2478
  element.setAttribute('transform', 'translate( ' + (centerX - (radius * height)) + ' ' + (centerY - (radius * height)) +
2458
2479
  ' ) scale(' + height + ')');
@@ -2652,6 +2673,8 @@ function renderLegendShape(location, size, shape, options, url) {
2652
2673
  const shapeY = location.y;
2653
2674
  const x = location.x + (-shapeWidth / 2);
2654
2675
  const y = location.y + (-shapeHeight / 2);
2676
+ options['stroke'] = (shape === 'HorizontalLine' || shape === 'VerticalLine' || shape === 'Cross') ? options['fill'] : options['stroke'];
2677
+ options['stroke-width'] = (options['stroke-width'] === 0 && (shape === 'HorizontalLine' || shape === 'VerticalLine' || shape === 'Cross')) ? 1 : options['stroke-width'];
2655
2678
  switch (shape) {
2656
2679
  case 'Circle':
2657
2680
  case 'Bubble':
@@ -2663,6 +2686,11 @@ function renderLegendShape(location, size, shape, options, url) {
2663
2686
  + (shapeY + (-shapeHeight / 2));
2664
2687
  merge(options, { 'd': renderPath });
2665
2688
  break;
2689
+ case 'HorizontalLine':
2690
+ renderPath = 'M' + ' ' + shapeX + ' ' + shapeY + ' ' + 'L' + ' ' + (shapeX + (shapeWidth / 2)) + ' '
2691
+ + shapeY;
2692
+ merge(options, { 'd': renderPath });
2693
+ break;
2666
2694
  case 'Diamond':
2667
2695
  renderPath = 'M' + ' ' + x + ' ' + shapeY + ' ' +
2668
2696
  'L' + ' ' + shapeX + ' ' + (shapeY + (-shapeHeight / 2)) + ' ' +
@@ -2787,6 +2815,7 @@ function changeBorderWidth(element, index, scale, maps) {
2787
2815
  let value = 0;
2788
2816
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2789
2817
  const borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
2818
+ const borderWidth = maps.layersCollection[index].shapeSettings.border.width;
2790
2819
  if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
2791
2820
  value = checkShapeDataFields(
2792
2821
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2796,14 +2825,17 @@ function changeBorderWidth(element, index, scale, maps) {
2796
2825
  currentStroke = maps.layersCollection[index].dataSource[value][borderWidthValue];
2797
2826
  }
2798
2827
  else {
2799
- currentStroke = (maps.layersCollection[index].shapeSettings.border.width);
2828
+ currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2800
2829
  }
2801
2830
  }
2802
2831
  }
2803
2832
  else {
2804
- currentStroke = (maps.layersCollection[index].shapeSettings.border.width);
2833
+ currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
2805
2834
  }
2806
2835
  childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
2836
+ if (element.id.indexOf('_LineString') > -1 && isNullOrUndefined(currentStroke)) {
2837
+ childNode.setAttribute('stroke-width', (1 / scale).toString());
2838
+ }
2807
2839
  }
2808
2840
  }
2809
2841
  }
@@ -3165,15 +3197,15 @@ var Theme;
3165
3197
  fontWeight: 'Regular',
3166
3198
  color: null,
3167
3199
  fontStyle: 'Regular',
3168
- fontFamily: 'Roboto'
3200
+ fontFamily: null
3169
3201
  };
3170
3202
  /** @private */
3171
3203
  Theme.legendTitleFont = {
3172
- size: '14px',
3173
- fontWeight: 'Regular',
3204
+ size: '12px',
3205
+ fontWeight: 'Medium',
3174
3206
  color: null,
3175
- fontStyle: 'Regular',
3176
- fontFamily: 'Roboto, Noto, Sans-serif'
3207
+ fontStyle: 'Medium',
3208
+ fontFamily: null
3177
3209
  };
3178
3210
  /** @private */
3179
3211
  Theme.legendLabelFont = {
@@ -3322,6 +3354,14 @@ function getShapeColor(theme) {
3322
3354
  themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
3323
3355
  '#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
3324
3356
  break;
3357
+ case 'fluentui':
3358
+ themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
3359
+ '#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
3360
+ break;
3361
+ case 'fluentuidark':
3362
+ themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
3363
+ '#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
3364
+ break;
3325
3365
  default:
3326
3366
  themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
3327
3367
  '#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
@@ -3467,6 +3507,7 @@ function getThemeStyle(theme) {
3467
3507
  tooltipFillColor: '#363F4C',
3468
3508
  zoomFillColor: '#FFFFFF',
3469
3509
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3510
+ fontFamily: 'Roboto, Noto, Sans-serif',
3470
3511
  titleFontWeight: 'Medium',
3471
3512
  zoomSelectionColor: '#e61576',
3472
3513
  shapeFill: '#A6A6A6'
@@ -3484,6 +3525,7 @@ function getThemeStyle(theme) {
3484
3525
  tooltipFontColor: '#000000',
3485
3526
  tooltipFillColor: '#ffffff',
3486
3527
  zoomFillColor: '#FFFFFF',
3528
+ fontFamily: 'Roboto, Noto, Sans-serif',
3487
3529
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3488
3530
  titleFontWeight: 'Medium',
3489
3531
  zoomSelectionColor: '#e61576',
@@ -3605,6 +3647,52 @@ function getThemeStyle(theme) {
3605
3647
  shapeFill: '#495057'
3606
3648
  };
3607
3649
  break;
3650
+ case 'fluentui':
3651
+ style = {
3652
+ backgroundColor: 'rgba(255,255,255, 0.0)',
3653
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
3654
+ titleFontColor: '#201F1E',
3655
+ subTitleFontColor: '#201F1E',
3656
+ legendTitleFontColor: '#201F1E',
3657
+ legendTextColor: '#201F1E',
3658
+ dataLabelFontColor: '#201F1E',
3659
+ tooltipFontColor: '#323130',
3660
+ tooltipFillColor: '#FFFFFF',
3661
+ zoomFillColor: '#A19F9D',
3662
+ fontFamily: 'Segoe UI',
3663
+ titleFontSize: '14px',
3664
+ legendFontSize: '12px',
3665
+ tooltipFillOpacity: 1,
3666
+ tooltipTextOpacity: 1,
3667
+ labelFontFamily: 'Segoe UI',
3668
+ titleFontWeight: '600',
3669
+ zoomSelectionColor: '#323130',
3670
+ shapeFill: '#F3F2F1'
3671
+ };
3672
+ break;
3673
+ case 'fluentuidark':
3674
+ style = {
3675
+ backgroundColor: 'rgba(255,255,255, 0.0)',
3676
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
3677
+ titleFontColor: '#F3F2F1',
3678
+ subTitleFontColor: '#F3F2F1',
3679
+ legendTitleFontColor: '#F3F2F1',
3680
+ legendTextColor: '#F3F2F1',
3681
+ dataLabelFontColor: '#F3F2F1',
3682
+ tooltipFontColor: '#F3F2F1',
3683
+ tooltipFillColor: '#252423',
3684
+ zoomFillColor: '#484644',
3685
+ fontFamily: 'Segoe UI',
3686
+ titleFontSize: '14px',
3687
+ legendFontSize: '12px',
3688
+ tooltipFillOpacity: 1,
3689
+ tooltipTextOpacity: 1,
3690
+ labelFontFamily: 'Segoe UI',
3691
+ titleFontWeight: '600',
3692
+ zoomSelectionColor: '#F3F2F1',
3693
+ shapeFill: '#252423'
3694
+ };
3695
+ break;
3608
3696
  default:
3609
3697
  style = {
3610
3698
  backgroundColor: '#FFFFFF',
@@ -3618,6 +3706,7 @@ function getThemeStyle(theme) {
3618
3706
  tooltipFillColor: '#000000',
3619
3707
  zoomFillColor: '#737373',
3620
3708
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3709
+ fontFamily: 'Roboto, Noto, Sans-serif',
3621
3710
  titleFontWeight: 'Medium',
3622
3711
  zoomSelectionColor: '#e61576',
3623
3712
  shapeFill: '#A6A6A6'
@@ -4133,6 +4222,9 @@ __decorate$1([
4133
4222
  */
4134
4223
  class LegendSettings extends ChildProperty {
4135
4224
  }
4225
+ __decorate$1([
4226
+ Property(false)
4227
+ ], LegendSettings.prototype, "useMarkerShape", void 0);
4136
4228
  __decorate$1([
4137
4229
  Property(false)
4138
4230
  ], LegendSettings.prototype, "toggleVisibility", void 0);
@@ -4185,7 +4277,7 @@ __decorate$1([
4185
4277
  Complex({}, CommonTitleSettings)
4186
4278
  ], LegendSettings.prototype, "title", void 0);
4187
4279
  __decorate$1([
4188
- Complex({}, Font)
4280
+ Complex(Theme.legendTitleFont, Font)
4189
4281
  ], LegendSettings.prototype, "titleStyle", void 0);
4190
4282
  __decorate$1([
4191
4283
  Property('Bottom')
@@ -4273,7 +4365,7 @@ __decorate$1([
4273
4365
  Property(5)
4274
4366
  ], ShapeSettings.prototype, "circleRadius", void 0);
4275
4367
  __decorate$1([
4276
- Complex({ width: 0, color: '#000000' }, Border)
4368
+ Complex({ width: null, color: '#000000' }, Border)
4277
4369
  ], ShapeSettings.prototype, "border", void 0);
4278
4370
  __decorate$1([
4279
4371
  Property('')
@@ -4542,15 +4634,9 @@ class Marker {
4542
4634
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
4543
4635
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
4544
4636
  };
4545
- eventArgs = markerColorChoose(eventArgs, data);
4546
- eventArgs = markerShapeChoose(eventArgs, data);
4547
4637
  this.maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
4548
- if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
4549
- eventArgs = markerColorChoose(eventArgs, data);
4550
- }
4551
- if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
4552
- eventArgs = markerShapeChoose(eventArgs, data);
4553
- }
4638
+ eventArgs = markerColorChoose(eventArgs, data);
4639
+ eventArgs = markerShapeChoose(eventArgs, data);
4554
4640
  const lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
4555
4641
  Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
4556
4642
  parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : 0;
@@ -4770,7 +4856,7 @@ class Marker {
4770
4856
  if (isNullOrUndefined(options)) {
4771
4857
  return;
4772
4858
  }
4773
- let eventArgs = {
4859
+ const eventArgs = {
4774
4860
  cancel: false, name: markerClick, data: options.data, maps: this.maps,
4775
4861
  marker: options.marker, target: target, x: e.clientX, y: e.clientY,
4776
4862
  latitude: options.data['latitude'] || options.data['Latitude'],
@@ -5416,7 +5502,8 @@ class LayerPanel {
5416
5502
  else {
5417
5503
  this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption(this.mapObject.element.id + '_MapArea_ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
5418
5504
  x: this.mapObject.isTileMap ? 0 : areaRect.x, y: this.mapObject.isTileMap ? 0 : areaRect.y,
5419
- width: areaRect.width, height: (areaRect.height < 0) ? 0 : areaRect.height
5505
+ width: areaRect.width, height: (areaRect.height < 0) ? 0 : !isNullOrUndefined(this.mapObject.legendModule) &&
5506
+ this.mapObject.legendModule.totalPages.length > 0 ? this.mapObject.legendModule.legendTotalRect.height : areaRect.height
5420
5507
  }));
5421
5508
  }
5422
5509
  this.layerGroup.appendChild(this.clipRectElement);
@@ -5538,7 +5625,7 @@ class LayerPanel {
5538
5625
  if (this.mapObject.zoomSettings.resetToInitial && this.mapObject.initialCheck && !isNullOrUndefined(panel.mapObject.height)
5539
5626
  && this.mapObject.availableSize.height > 512) {
5540
5627
  this.mapObject.applyZoomReset = true;
5541
- this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512) + 1;
5628
+ this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512);
5542
5629
  const padding = this.mapObject.layers[this.mapObject.baseLayerIndex].layerType !== 'GoogleStaticMap' ?
5543
5630
  20 : 0;
5544
5631
  const totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
@@ -5579,7 +5666,7 @@ class LayerPanel {
5579
5666
  }
5580
5667
  }
5581
5668
  }
5582
- let eventArgs = {
5669
+ const eventArgs = {
5583
5670
  cancel: false, name: layerRendering, index: layerIndex,
5584
5671
  layer: layer, maps: this.mapObject, visible: layer.visible
5585
5672
  };
@@ -5619,6 +5706,9 @@ class LayerPanel {
5619
5706
  proxy.mapObject['bingMap'] = bing;
5620
5707
  proxy.renderTileLayer(proxy, layer, layerIndex, bing);
5621
5708
  this.mapObject.arrangeTemplate();
5709
+ if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
5710
+ this.mapObject.zoomModule.applyTransform(true);
5711
+ }
5622
5712
  };
5623
5713
  ajax.send();
5624
5714
  }
@@ -5696,9 +5786,7 @@ class LayerPanel {
5696
5786
  const data = geometryData['geometry'];
5697
5787
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5698
5788
  const properties = geometryData['properties'];
5699
- if (type !== 'LineString') {
5700
- this.generatePoints(type, coords, data, properties);
5701
- }
5789
+ this.generatePoints(type, coords, data, properties);
5702
5790
  }
5703
5791
  });
5704
5792
  this.currentLayer.rectBounds = this.rectBounds;
@@ -5726,11 +5814,9 @@ class LayerPanel {
5726
5814
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5727
5815
  const currentShapeData = this.currentLayer.layerData[i];
5728
5816
  let pathOptions;
5729
- let polyLineOptions;
5730
5817
  let circleOptions;
5731
5818
  let groupElement;
5732
5819
  let path = '';
5733
- let points = '';
5734
5820
  let fill = (shapeSettings.autofill) ? colors[i % colors.length] :
5735
5821
  (shapeSettings.fill || this.mapObject.themeStyle.shapeFill);
5736
5822
  if (shapeSettings.colorValuePath !== null && !isNullOrUndefined(currentShapeData['property'])) {
@@ -5773,7 +5859,7 @@ class LayerPanel {
5773
5859
  }
5774
5860
  const opacity = (Object.prototype.toString.call(getShapeColor$$1) === '[object Object]'
5775
5861
  && !isNullOrUndefined(getShapeColor$$1['opacity'])) ? getShapeColor$$1['opacity'] : shapeSettings.opacity;
5776
- let eventArgs = {
5862
+ const eventArgs = {
5777
5863
  cancel: false, name: shapeRendering, index: i,
5778
5864
  data: this.currentLayer.dataSource ? this.currentLayer.dataSource[k] : null,
5779
5865
  maps: this.mapObject,
@@ -5794,7 +5880,7 @@ class LayerPanel {
5794
5880
  if (isNullOrUndefined(shapeSettings.borderColorValuePath)) {
5795
5881
  this.mapObject.layers[layerIndex].shapeSettings.border.color = eventArgs.border.color;
5796
5882
  }
5797
- else if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
5883
+ if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
5798
5884
  this.mapObject.layers[layerIndex].shapeSettings.border.width = eventArgs.border.width;
5799
5885
  }
5800
5886
  }
@@ -5848,17 +5934,21 @@ class LayerPanel {
5848
5934
  }
5849
5935
  break;
5850
5936
  case 'LineString':
5937
+ path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
5851
5938
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5852
5939
  currentShapeData.map((lineData) => {
5853
- points += lineData['point']['x'] + ' , ' + lineData['point']['y'] + ' ';
5940
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
5854
5941
  });
5855
- polyLineOptions = new PolylineOption(shapeID, points, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray);
5856
- pathEle = this.mapObject.renderer.drawPolyline(polyLineOptions);
5942
+ if (path.length > 3) {
5943
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
5944
+ pathEle = this.mapObject.renderer.drawPath(pathOptions);
5945
+ }
5857
5946
  break;
5858
5947
  case 'Point':
5859
5948
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5860
5949
  const pointData = currentShapeData['point'];
5861
- circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], shapeSettings.circleRadius, null);
5950
+ const circleRadius = (this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / this.currentFactor;
5951
+ circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, null);
5862
5952
  pathEle = this.mapObject.renderer.drawCircle(circleOptions);
5863
5953
  break;
5864
5954
  case 'Path':
@@ -5879,7 +5969,10 @@ class LayerPanel {
5879
5969
  }
5880
5970
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
5881
5971
  (currentShapeData['property'][properties]) : ''));
5882
- pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + i + 2).toString());
5972
+ pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + i + 3).toString());
5973
+ if (drawingType === 'LineString') {
5974
+ pathEle.setAttribute('style', 'outline:none');
5975
+ }
5883
5976
  maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
5884
5977
  if (this.mapObject.toggledShapeElementId) {
5885
5978
  for (let j = 0; j < this.mapObject.toggledShapeElementId.length; j++) {
@@ -6088,11 +6181,14 @@ class LayerPanel {
6088
6181
  this.currentLayer.layerData.push(multiPolygonDatas);
6089
6182
  break;
6090
6183
  case 'linestring':
6184
+ const extraSpace = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6185
+ this.currentLayer.shapeSettings.border.width : 1;
6091
6186
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6092
6187
  coordinates.map((points, index) => {
6093
6188
  latitude = points[1];
6094
6189
  longitude = points[0];
6095
6190
  const point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6191
+ this.calculateBox(point, extraSpace);
6096
6192
  newData.push({
6097
6193
  point: point, lat: latitude, lng: longitude
6098
6194
  });
@@ -6103,6 +6199,8 @@ class LayerPanel {
6103
6199
  break;
6104
6200
  case 'point': {
6105
6201
  let arrayCollections = false;
6202
+ const extraSpace = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6203
+ this.currentLayer.shapeSettings.border.width : 1) + (this.currentLayer.shapeSettings.circleRadius * 2);
6106
6204
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6107
6205
  coordinates.map((points, index) => {
6108
6206
  if (Object.prototype.toString.call(points) === '[object Array]') {
@@ -6119,6 +6217,7 @@ class LayerPanel {
6119
6217
  latitude = coordinates[1];
6120
6218
  longitude = coordinates[0];
6121
6219
  const point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6220
+ this.calculateBox(point, extraSpace);
6122
6221
  this.currentLayer.layerData.push({
6123
6222
  point: point, type: type, lat: latitude, lng: longitude, property: properties
6124
6223
  });
@@ -6132,6 +6231,17 @@ class LayerPanel {
6132
6231
  break;
6133
6232
  }
6134
6233
  }
6234
+ calculateBox(point, extraSpace) {
6235
+ if (isNullOrUndefined(this.rectBounds)) {
6236
+ this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
6237
+ }
6238
+ else {
6239
+ this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
6240
+ this.rectBounds['min']['y'] = Math.min(this.rectBounds['min']['y'], point.y - extraSpace);
6241
+ this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x);
6242
+ this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
6243
+ }
6244
+ }
6135
6245
  calculateFactor(layer) {
6136
6246
  let horFactor;
6137
6247
  let verFactor = 1;
@@ -6239,6 +6349,15 @@ class LayerPanel {
6239
6349
  this.calculateRectBox(point[0]);
6240
6350
  });
6241
6351
  break;
6352
+ case 'linestring':
6353
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6354
+ coordinates.map((point, index) => {
6355
+ this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
6356
+ });
6357
+ break;
6358
+ case 'point':
6359
+ this.calculateRectBox(coordinates, 'point');
6360
+ break;
6242
6361
  }
6243
6362
  }
6244
6363
  });
@@ -6274,19 +6393,32 @@ class LayerPanel {
6274
6393
  return newData;
6275
6394
  }
6276
6395
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6277
- calculateRectBox(coordinates) {
6278
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6279
- Array.prototype.forEach.call(coordinates, (currentCoords) => {
6280
- if (isNullOrUndefined(this.mapObject.baseMapBounds)) {
6281
- this.mapObject.baseMapBounds = new GeoLocation({ min: currentCoords[1], max: currentCoords[1] }, { min: currentCoords[0], max: currentCoords[0] });
6396
+ calculateRectBox(coordinates, type, isFirstItem) {
6397
+ if (type !== 'LineString' && type !== 'point') {
6398
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6399
+ Array.prototype.forEach.call(coordinates, (currentCoords) => {
6400
+ if (isNullOrUndefined(this.mapObject.baseMapBounds)) {
6401
+ this.mapObject.baseMapBounds = new GeoLocation({ min: currentCoords[1], max: currentCoords[1] }, { min: currentCoords[0], max: currentCoords[0] });
6402
+ }
6403
+ else {
6404
+ this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
6405
+ this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
6406
+ this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
6407
+ this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, currentCoords[0]);
6408
+ }
6409
+ });
6410
+ }
6411
+ else {
6412
+ if ((isFirstItem || type === 'point') && isNullOrUndefined(this.mapObject.baseMapBounds)) {
6413
+ this.mapObject.baseMapBounds = new GeoLocation({ min: coordinates[1], max: coordinates[1] }, { min: coordinates[0], max: coordinates[0] });
6282
6414
  }
6283
6415
  else {
6284
- this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
6285
- this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
6286
- this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
6287
- this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, currentCoords[0]);
6416
+ this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, coordinates[1]);
6417
+ this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, coordinates[1]);
6418
+ this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, coordinates[0]);
6419
+ this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, coordinates[0]);
6288
6420
  }
6289
- });
6421
+ }
6290
6422
  }
6291
6423
  generateTiles(zoomLevel, tileTranslatePoint, zoomType, bing, position) {
6292
6424
  const userLang = this.mapObject.locale;
@@ -6373,15 +6505,17 @@ class LayerPanel {
6373
6505
  }
6374
6506
  }
6375
6507
  }
6376
- this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
6508
+ if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset) {
6509
+ this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
6510
+ }
6377
6511
  }
6378
6512
  arrangeTiles(type, x, y) {
6379
6513
  const element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6380
6514
  const element1 = document.getElementById(this.mapObject.element.id + '_tiles');
6381
6515
  let timeOut;
6382
- if (!isNullOrUndefined(type) && type !== 'Pan' && type !== 'Reset' && type.indexOf('ZoomOut') === -1) {
6516
+ if (!isNullOrUndefined(type) && type !== 'Pan') {
6383
6517
  this.tileAnimation(type, x, y);
6384
- timeOut = 250;
6518
+ timeOut = this.mapObject.layersCollection[0].animationDuration;
6385
6519
  }
6386
6520
  else {
6387
6521
  timeOut = 0;
@@ -6396,7 +6530,6 @@ class LayerPanel {
6396
6530
  }
6397
6531
  if (element1) {
6398
6532
  element1.style.zIndex = '0';
6399
- element1.style.visibility = 'hidden';
6400
6533
  }
6401
6534
  let animateElement;
6402
6535
  if (!document.getElementById(this.mapObject.element.id + '_animated_tiles') && element) {
@@ -6454,35 +6587,23 @@ class LayerPanel {
6454
6587
  * @returns {void}
6455
6588
  */
6456
6589
  tileAnimation(zoomType, translateX, translateY) {
6457
- const element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6458
- let element1 = document.getElementById('animated_tiles');
6459
- const ele = document.getElementById(this.mapObject.element.id + '_tiles');
6590
+ const tileParent = document.getElementById(this.mapObject.element.id + '_tile_parent');
6591
+ const animatedTiles = document.getElementById(this.mapObject.element.id + '_animated_tiles');
6592
+ const tileElement = document.getElementById(this.mapObject.element.id + '_tiles');
6460
6593
  let scaleValue = '2';
6461
- if (zoomType.indexOf('ZoomOut') === 0) {
6462
- ele.style.zIndex = '1';
6463
- element.style.zIndex = '0';
6464
- // element1 = ele.children[ele.childElementCount - 1] as HTMLElement;
6465
- while (ele.childElementCount >= 1) {
6466
- ele.removeChild(ele.children[0]);
6594
+ if (zoomType.indexOf('ZoomOut') === 0 || zoomType === 'Reset') {
6595
+ tileElement.style.zIndex = '1';
6596
+ tileParent.style.zIndex = '0';
6597
+ while (tileElement.childElementCount >= 1) {
6598
+ tileElement.removeChild(tileElement.children[0]);
6467
6599
  }
6468
6600
  translateX = 0;
6469
- translateY = 128 - 23;
6470
- scaleValue = '0.5';
6601
+ translateY = document.getElementById(this.mapObject.element.id + '_tile_parent').getClientRects()[0].height / 4;
6602
+ scaleValue = zoomType.indexOf('ZoomOut') === 0 ? '0.5' : '0.2';
6471
6603
  }
6472
- else if (zoomType === 'Reset') {
6473
- ele.style.zIndex = '1';
6474
- element.style.zIndex = '0';
6475
- while (!(ele.childElementCount === 1) && !(ele.childElementCount === 0)) {
6476
- ele.removeChild(ele.children[1]);
6477
- }
6478
- element1 = ele.children[0];
6479
- translateX = 0;
6480
- translateY = 0;
6481
- scaleValue = '1';
6482
- }
6483
- if (!isNullOrUndefined(element1)) {
6484
- element1.style.transition = '250ms';
6485
- element1.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
6604
+ if (!isNullOrUndefined(animatedTiles)) {
6605
+ animatedTiles.style.transition = this.mapObject.layersCollection[0].animationDuration + 'ms';
6606
+ animatedTiles.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
6486
6607
  }
6487
6608
  }
6488
6609
  /**
@@ -7066,7 +7187,15 @@ let Maps = class Maps extends Component {
7066
7187
  }
7067
7188
  this.mapLayerPanel.measureLayerPanel();
7068
7189
  this.element.appendChild(this.svgObject);
7190
+ const position = this.getExtraPosition();
7069
7191
  for (let i = 0; i < this.layers.length; i++) {
7192
+ if (position.x !== 0 || position.y !== 0) {
7193
+ let markerTemplate$$1 = document.getElementById(this.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
7194
+ if (!isNullOrUndefined(markerTemplate$$1)) {
7195
+ markerTemplate$$1.style.top = this.mapAreaRect.y + position.y + 'px';
7196
+ markerTemplate$$1.style.left = this.mapAreaRect.x + position.x + 'px';
7197
+ }
7198
+ }
7070
7199
  if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
7071
7200
  this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
7072
7201
  const checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
@@ -7465,7 +7594,6 @@ let Maps = class Maps extends Component {
7465
7594
  const titleBounds = new Rect(location.x, location.y, elementSize.width, elementSize.height);
7466
7595
  const element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
7467
7596
  element.setAttribute('aria-label', this.description || title.text);
7468
- element.setAttribute('tabindex', (this.tabIndex + (type === 'title' ? 1 : 2)).toString());
7469
7597
  if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
7470
7598
  height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
7471
7599
  this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
@@ -7524,6 +7652,8 @@ let Maps = class Maps extends Component {
7524
7652
  EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap, this);
7525
7653
  EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEndOnMap, this);
7526
7654
  EventHandler.add(this.element, 'pointerleave mouseleave', this.mouseLeaveOnMap, this);
7655
+ EventHandler.add(this.element, 'keydown', this.keyDownHandler, this);
7656
+ EventHandler.add(this.element, 'keyup', this.keyUpHandler, this);
7527
7657
  // EventHandler.add(this.element, cancelEvent, this.mouseLeaveOnMap, this);
7528
7658
  window.addEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.mapsOnResize.bind(this));
7529
7659
  }
@@ -7541,6 +7671,8 @@ let Maps = class Maps extends Component {
7541
7671
  EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap);
7542
7672
  EventHandler.remove(this.element, Browser.touchEndEvent, this.mouseEndOnMap);
7543
7673
  EventHandler.remove(this.element, 'pointerleave mouseleave', this.mouseLeaveOnMap);
7674
+ EventHandler.remove(this.element, 'keydown', this.keyDownHandler);
7675
+ EventHandler.remove(this.element, 'keyup', this.keyUpHandler);
7544
7676
  //EventHandler.remove(this.element, cancelEvent, this.mouseLeaveOnMap);
7545
7677
  window.removeEventListener((Browser.isTouch && ('orientation' in window && 'onorientationchange' in window)) ? 'orientationchange' : 'resize', this.mapsOnResize);
7546
7678
  }
@@ -7556,6 +7688,96 @@ let Maps = class Maps extends Component {
7556
7688
  removeClass(document.getElementsByClassName('highlightMapStyle')[0]);
7557
7689
  }
7558
7690
  }
7691
+ keyUpHandler(event) {
7692
+ const id = event.target['id'];
7693
+ if (event.code === 'Tab' && id.indexOf('_LayerIndex_') > -1 && id.indexOf('shapeIndex') > -1) {
7694
+ this.keyboardHighlightSelection(id, event.type);
7695
+ }
7696
+ else if (id.indexOf('_LayerIndex_') === -1 && id.indexOf('shapeIndex') === -1 &&
7697
+ getElementsByClassName('highlightMapStyle').length > 0) {
7698
+ removeClass(getElementsByClassName('highlightMapStyle')[0]);
7699
+ if (this.legendSettings.visible && this.legendModule) {
7700
+ this.legendModule.removeShapeHighlightCollection();
7701
+ }
7702
+ }
7703
+ }
7704
+ keyboardHighlightSelection(id, key) {
7705
+ const layerIndex = parseInt(id.split('_LayerIndex_')[1].split('_')[0], 10);
7706
+ const shapeIndex = parseInt(id.split('_shapeIndex_')[1].split('_')[0], 10);
7707
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7708
+ const shapeData = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
7709
+ this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
7710
+ const dataIndex = parseInt(id.split('_dataIndex_')[1].split('_')[0], 10);
7711
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7712
+ const data = isNullOrUndefined(dataIndex) ? null : this.layers[layerIndex].dataSource[dataIndex];
7713
+ if (this.layers[layerIndex].selectionSettings.enable && key === 'keydown' && this.selectionModule) {
7714
+ this.selectionModule.selectionsettings = this.layers[layerIndex].selectionSettings;
7715
+ this.selectionModule.selectionType = 'Shape';
7716
+ this.selectionModule.selectElement(event.target, layerIndex, data, shapeData);
7717
+ }
7718
+ else if (this.highlightModule && (this.layers[layerIndex].highlightSettings.enable && key === 'keyup' &&
7719
+ !event.target.classList.contains('ShapeselectionMapStyle'))) {
7720
+ this.highlightModule.highlightSettings = this.layers[layerIndex].highlightSettings;
7721
+ this.highlightModule.handleHighlight(event.target, layerIndex, data, shapeData);
7722
+ }
7723
+ }
7724
+ keyDownHandler(event) {
7725
+ const zoom = this.zoomModule;
7726
+ if ((event.key === '+' || event.code === 'Equal') && zoom) {
7727
+ zoom.performZoomingByToolBar('zoomin');
7728
+ }
7729
+ else if ((event.key === '-' || event.code === 'Minus') && zoom) {
7730
+ zoom.performZoomingByToolBar('zoomout');
7731
+ }
7732
+ else if (event['keyCode'] === 82 && zoom) {
7733
+ zoom.performZoomingByToolBar('reset');
7734
+ }
7735
+ else if ((event.code === 'ArrowUp' || event.code === 'ArrowDown') && zoom) {
7736
+ event.preventDefault();
7737
+ zoom.mouseDownLatLong['x'] = 0;
7738
+ zoom.mouseMoveLatLong['y'] = this.mapAreaRect.height / 7;
7739
+ zoom.panning('None', zoom.mouseDownLatLong['x'], event.code === 'ArrowUp' ? -(zoom.mouseMoveLatLong['y']) :
7740
+ zoom.mouseMoveLatLong['y'], event);
7741
+ zoom.mouseDownLatLong['y'] = zoom.mouseMoveLatLong['y'];
7742
+ }
7743
+ else if ((event.code === 'ArrowLeft' || event.code === 'ArrowRight') && zoom) {
7744
+ event.preventDefault();
7745
+ zoom.mouseDownLatLong['y'] = 0;
7746
+ zoom.mouseMoveLatLong['x'] = this.mapAreaRect.width / 7;
7747
+ zoom.panning('None', event.code === 'ArrowLeft' ? -(zoom.mouseMoveLatLong['x']) : zoom.mouseMoveLatLong['x'], zoom.mouseDownLatLong['y'], event);
7748
+ zoom.mouseDownLatLong['x'] = zoom.mouseMoveLatLong['x'];
7749
+ }
7750
+ else if (event.code === 'Enter') {
7751
+ const id = event.target['id'];
7752
+ event.preventDefault();
7753
+ if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
7754
+ this.legendModule.currentPage = (id.indexOf('_Left_Page_') > -1) ? (this.legendModule.currentPage - 1) :
7755
+ (this.legendModule.currentPage + 1);
7756
+ this.legendModule.legendGroup = this.renderer.createGroup({ id: this.element.id + '_Legend_Group' });
7757
+ this.legendModule.drawLegendItem(this.legendModule.currentPage);
7758
+ const textContent = (document.getElementById(this.element.id + '_Paging_Text')).textContent;
7759
+ const text = textContent.split('/').map(Number);
7760
+ if (id.indexOf('_Left_Page_Rect') > -1) {
7761
+ if (text[0] !== 1) {
7762
+ event.target.focus();
7763
+ }
7764
+ event.target.style.outlineColor = text[0] - 1 !== text[1] ? '' : 'transparent';
7765
+ }
7766
+ else if (id.indexOf('_Right_Page_Rect') > -1) {
7767
+ if (text[0] !== text[1]) {
7768
+ event.target.focus();
7769
+ }
7770
+ event.target.style.outlineColor = text[0] !== text[1] + 1 ? '' : 'transparent';
7771
+ }
7772
+ if (querySelector(this.element.id + '_Legend_Border', this.element.id)) {
7773
+ querySelector(this.element.id + '_Legend_Border', this.element.id).style.pointerEvents = 'none';
7774
+ }
7775
+ }
7776
+ if (id.indexOf('shapeIndex') > -1) {
7777
+ this.keyboardHighlightSelection(id, event.type);
7778
+ }
7779
+ }
7780
+ }
7559
7781
  /**
7560
7782
  * Gets the selected element to be maintained or not.
7561
7783
  *
@@ -7889,26 +8111,28 @@ let Maps = class Maps extends Component {
7889
8111
  * @param e - Specifies the arguments of window resize event.
7890
8112
  */
7891
8113
  mapsOnResize(e) {
7892
- this.isResize = true;
8114
+ this.isResize = this.isReset = true;
7893
8115
  const args = {
8116
+ cancel: false,
7894
8117
  name: resize,
7895
8118
  previousSize: this.availableSize,
7896
- currentSize: new Size(0, 0),
8119
+ currentSize: calculateSize(this),
7897
8120
  maps: this
7898
8121
  };
7899
- if (this.resizeTo) {
7900
- clearTimeout(this.resizeTo);
7901
- }
7902
- if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
7903
- this.resizeTo = setTimeout(() => {
7904
- this.unWireEVents();
7905
- this.createSVG();
7906
- this.refreshing = true;
7907
- this.wireEVents();
7908
- args.currentSize = this.availableSize;
7909
- this.trigger(resize, args);
7910
- this.render();
7911
- }, 500);
8122
+ this.trigger(resize, args);
8123
+ if (!args.cancel) {
8124
+ if (this.resizeTo) {
8125
+ clearTimeout(this.resizeTo);
8126
+ }
8127
+ if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
8128
+ this.resizeTo = setTimeout(() => {
8129
+ this.unWireEVents();
8130
+ this.createSVG();
8131
+ this.refreshing = true;
8132
+ this.wireEVents();
8133
+ this.render();
8134
+ }, 500);
8135
+ }
7912
8136
  }
7913
8137
  return false;
7914
8138
  }
@@ -8492,6 +8716,26 @@ let Maps = class Maps extends Component {
8492
8716
  });
8493
8717
  return isVisible;
8494
8718
  }
8719
+ /**
8720
+ * To find space between the secondary element and svg element.
8721
+ * @private
8722
+ */
8723
+ getExtraPosition() {
8724
+ let top = 0;
8725
+ let left = 0;
8726
+ const svgElement = getElement(this.element.id + '_svg');
8727
+ if (!isNullOrUndefined(svgElement)) {
8728
+ const svgClientRects = svgElement.getClientRects();
8729
+ const mapsClientRects = (getElement(this.element.id + '_Secondary_Element')).getClientRects();
8730
+ if (svgClientRects.length !== 0 && mapsClientRects.length !== 0) {
8731
+ const svgClientRect = svgClientRects[0];
8732
+ const mapsClientRect = mapsClientRects[0];
8733
+ top = svgClientRect.top - mapsClientRect.top;
8734
+ left = svgClientRect.left - mapsClientRect.left;
8735
+ }
8736
+ }
8737
+ return new Point(left, top);
8738
+ }
8495
8739
  /**
8496
8740
  * To find marker visibility
8497
8741
  */
@@ -8855,6 +9099,8 @@ class Bubble {
8855
9099
  // eslint-disable-next-line valid-jsdoc
8856
9100
  /**
8857
9101
  * To render bubble
9102
+ *
9103
+ * @private
8858
9104
  */
8859
9105
  renderBubble(
8860
9106
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -8899,7 +9145,7 @@ class Bubble {
8899
9145
  isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
8900
9146
  const shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
8901
9147
  ? shape[shapePath].toLowerCase() : shape[shapePath];
8902
- if (shapeDataLayerPathValue === shapePathValue) {
9148
+ if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
8903
9149
  if (layerData[i]['type'] === 'Point') {
8904
9150
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8905
9151
  shapePoints.push(this.getPoints(layerData[i], []));
@@ -9030,6 +9276,8 @@ class Bubble {
9030
9276
  // eslint-disable-next-line valid-jsdoc
9031
9277
  /**
9032
9278
  * To check and trigger bubble click event
9279
+ *
9280
+ * @private
9033
9281
  */
9034
9282
  bubbleClick(e) {
9035
9283
  const target = e.target.id;
@@ -9041,7 +9289,7 @@ class Bubble {
9041
9289
  if (isNullOrUndefined(data)) {
9042
9290
  return;
9043
9291
  }
9044
- let eventArgs = {
9292
+ const eventArgs = {
9045
9293
  cancel: false, name: bubbleClick, data: data, maps: this.maps,
9046
9294
  target: target, x: e.clientX, y: e.clientY
9047
9295
  };
@@ -9073,6 +9321,8 @@ class Bubble {
9073
9321
  // eslint-disable-next-line valid-jsdoc
9074
9322
  /**
9075
9323
  * To check and trigger bubble move event
9324
+ *
9325
+ * @private
9076
9326
  */
9077
9327
  bubbleMove(e) {
9078
9328
  const target = e.target.id;
@@ -9084,7 +9334,7 @@ class Bubble {
9084
9334
  if (isNullOrUndefined(data)) {
9085
9335
  return;
9086
9336
  }
9087
- let eventArgs = {
9337
+ const eventArgs = {
9088
9338
  cancel: false, name: bubbleMouseMove, data: data, maps: this.maps,
9089
9339
  target: target, x: e.clientX, y: e.clientY
9090
9340
  };
@@ -9313,7 +9563,7 @@ class DataLabel {
9313
9563
  }
9314
9564
  }
9315
9565
  }
9316
- let eventargs = {
9566
+ const eventargs = {
9317
9567
  name: dataLabelRendering, maps: this.maps, cancel: false, border: { color: dataLabel.border.color,
9318
9568
  width: dataLabel.border.width, opacity: dataLabel.border.opacity }, datalabel: dataLabel,
9319
9569
  fill: dataLabel.fill, template: dataLabel.template, text: text
@@ -9372,7 +9622,8 @@ class DataLabel {
9372
9622
  }
9373
9623
  else {
9374
9624
  if (dataLabelSettings.smartLabelMode === 'Trim') {
9375
- let textType = typeof text === 'number' ? text.toString() : text;
9625
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9626
+ const textType = typeof text === 'number' ? text.toString() : text;
9376
9627
  trimmedLable = textTrim(width, textType, style);
9377
9628
  elementSize = measureText(trimmedLable, style);
9378
9629
  options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', trimmedLable, '', '');
@@ -9681,7 +9932,14 @@ class NavigationLine {
9681
9932
  */
9682
9933
  class Legend {
9683
9934
  constructor(maps) {
9935
+ /**
9936
+ * @private
9937
+ */
9684
9938
  this.legendBorderRect = new Rect(0, 0, 0, 0);
9939
+ /**
9940
+ * @private
9941
+ */
9942
+ this.legendTotalRect = new Rect(0, 0, 0, 0);
9685
9943
  /**
9686
9944
  * @private
9687
9945
  */
@@ -9698,12 +9956,27 @@ class Legend {
9698
9956
  this.textMaxWidth = 0;
9699
9957
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9700
9958
  this.shapeHighlightCollection = [];
9959
+ /**
9960
+ * @private
9961
+ */
9701
9962
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9702
9963
  this.legendHighlightCollection = [];
9964
+ /**
9965
+ * @private
9966
+ */
9703
9967
  this.shapePreviousColor = [];
9968
+ /**
9969
+ * @private
9970
+ */
9704
9971
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9705
9972
  this.selectedNonLegendShapes = [];
9973
+ /**
9974
+ * @private
9975
+ */
9706
9976
  this.shapeToggled = true;
9977
+ /**
9978
+ * @private
9979
+ */
9707
9980
  this.legendElement = null;
9708
9981
  this.maps = maps;
9709
9982
  this.addEventListener();
@@ -10082,6 +10355,11 @@ class Legend {
10082
10355
  this.drawLegendItem(this.currentPage);
10083
10356
  }
10084
10357
  }
10358
+ /**
10359
+ * @param {string} page - Specifies the legend page.
10360
+ * @returns {void}
10361
+ * @private
10362
+ */
10085
10363
  drawLegendItem(page) {
10086
10364
  const map = this.maps;
10087
10365
  const legend = map.legendSettings;
@@ -10089,6 +10367,7 @@ class Legend {
10089
10367
  const shapeSize = new Size(legend.shapeWidth, legend.shapeHeight);
10090
10368
  let textOptions;
10091
10369
  const render = map.renderer;
10370
+ let legendShape = legend.shape;
10092
10371
  if (page >= 0 && page < this.totalPages.length) {
10093
10372
  if (querySelector(this.legendGroup.id, this.maps.element.id)) {
10094
10373
  remove(querySelector(this.legendGroup.id, this.maps.element.id));
@@ -10098,8 +10377,9 @@ class Legend {
10098
10377
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10099
10378
  const collection = this.totalPages[page]['Collection'][i];
10100
10379
  const shapeBorder = collection['shapeBorder'];
10101
- const legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
10380
+ let legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
10102
10381
  let legendText = collection['DisplayText'];
10382
+ const pagingArrowPadding = 4;
10103
10383
  const shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
10104
10384
  legend.shape : 'Image') : collection['legendShape']);
10105
10385
  const strokeColor = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
@@ -10109,25 +10389,39 @@ class Legend {
10109
10389
  1 : shapeBorder.width : shapeBorder.width;
10110
10390
  const shapeId = map.element.id + '_Legend_Shape_Index_' + collection['idIndex'];
10111
10391
  const textId = map.element.id + '_Legend_Text_Index_' + collection['idIndex'];
10112
- const shapeLocation = collection['Shape'];
10113
- const textLocation = collection['Text'];
10392
+ const shapeLocation = new Point(collection['Shape']['x'], (collection['Shape']['y'] - pagingArrowPadding));
10393
+ const textLocation = new Point(collection['Text']['x'], (collection['Text']['y'] - pagingArrowPadding));
10114
10394
  const imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
10115
10395
  const renderOptions = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
10116
- legend.textStyle.color = (legend.textStyle.color !== null) ? legend.textStyle.color :
10396
+ const legendTextStyle = {
10397
+ fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
10398
+ fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color, opacity: legend.textStyle.opacity
10399
+ };
10400
+ legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
10117
10401
  this.maps.themeStyle.legendTextColor;
10118
- legend.textStyle.fontFamily = map.themeStyle.fontFamily || legend.textStyle.fontFamily;
10119
- legend.textStyle.size = map.themeStyle.legendFontSize || legend.textStyle.size;
10402
+ legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
10403
+ legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
10120
10404
  if (i === 0) {
10121
10405
  this.renderLegendBorder();
10122
10406
  }
10123
- legendElement.appendChild(drawSymbol(shapeLocation, shape, shapeSize, collection['ImageSrc'], renderOptions));
10407
+ if (legend.type === 'Markers' && legend.useMarkerShape) {
10408
+ const legendShapeData = this.legendCollection[collection['idIndex']].data[0];
10409
+ const marker$$1 = map.layers[legendShapeData['layerIndex']].markerSettings[legendShapeData['markerIndex']];
10410
+ 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;
10411
+ }
10412
+ if (legendShape === "Balloon") {
10413
+ legendElement.appendChild(drawBalloon(map, renderOptions, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
10414
+ }
10415
+ else {
10416
+ legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions));
10417
+ }
10124
10418
  const legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
10125
10419
  if (legendRectSize > this.legendBorderRect.width) {
10126
- const trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legend.textStyle, legendRectSize);
10420
+ const trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legendTextStyle, legendRectSize);
10127
10421
  legendText = trimmedText;
10128
10422
  }
10129
10423
  textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
10130
- renderTextElement(textOptions, legend.textStyle, legend.textStyle.color, legendElement);
10424
+ renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
10131
10425
  this.legendGroup.appendChild(legendElement);
10132
10426
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10133
10427
  if (i === (this.totalPages[page]['Collection'].length - 1)) {
@@ -10139,10 +10433,10 @@ class Legend {
10139
10433
  const pagingFont = legend.textStyle;
10140
10434
  const pagingTextSize = measureText(pagingText, pagingFont);
10141
10435
  const leftPageX = (this.legendItemRect.x + this.legendItemRect.width) - pagingTextSize.width -
10142
- (width * 2) - spacing;
10436
+ (width * 2) - (spacing * 2) + (pagingArrowPadding / 2);
10143
10437
  const rightPageX = (this.legendItemRect.x + this.legendItemRect.width);
10438
+ const pageTextX = rightPageX - width - (pagingTextSize.width / 2) - (spacing / 2) - pagingArrowPadding;
10144
10439
  const locY = (this.legendItemRect.y + this.legendItemRect.height) + (height / 2) + spacing;
10145
- const pageTextX = rightPageX - width - (pagingTextSize.width / 2) - (spacing / 2);
10146
10440
  pagingGroup = render.createGroup({ id: map.element.id + '_Legend_Paging_Group' });
10147
10441
  const leftPageElement = render.createGroup({ id: map.element.id + '_Legend_Left_Paging_Group' });
10148
10442
  const rightPageElement = render.createGroup({ id: map.element.id + '_Legend_Right_Paging_Group' });
@@ -10150,15 +10444,19 @@ class Legend {
10150
10444
  ' L ' + (rightPageX - width) + ' ' + (locY + height) + ' z ';
10151
10445
  const leftPath = ' M ' + leftPageX + ' ' + locY + ' L ' + (leftPageX + width) + ' ' + (locY - height) +
10152
10446
  ' L ' + (leftPageX + width) + ' ' + (locY + height) + ' z ';
10153
- const leftPageOptions = new PathOption(map.element.id + '_Left_Page', '#a6a6a6', 0, '#a6a6a6', 1, 1, '', leftPath);
10447
+ const leftPageOptions = new PathOption(map.element.id + '_Left_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === 1 ? 0.5 : 1), 1, '', leftPath);
10154
10448
  leftPageElement.appendChild(render.drawPath(leftPageOptions));
10155
10449
  const 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, '', '');
10156
- leftPageElement.appendChild(render.drawRectangle(leftRectPageOptions));
10450
+ let pathEle = render.drawRectangle(leftRectPageOptions);
10451
+ pathEle.setAttribute('tabindex', ((page + 1) === 1 ? -1 : map.tabIndex + 1).toString());
10452
+ leftPageElement.appendChild(pathEle);
10157
10453
  this.wireEvents(leftPageElement);
10158
- const rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', 1, 1, '', rightPath);
10454
+ const rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
10159
10455
  rightPageElement.appendChild(render.drawPath(rightPageOptions));
10160
- const rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect((rightPageX - width), (locY - height), width, spacing), null, null, '', '');
10161
- rightPageElement.appendChild(render.drawRectangle(rightRectPageOptions));
10456
+ const 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, '', '');
10457
+ pathEle = render.drawRectangle(rightRectPageOptions);
10458
+ pathEle.setAttribute('tabindex', ((page + 1) === this.totalPages.length ? -1 : map.tabIndex + 2).toString());
10459
+ rightPageElement.appendChild(pathEle);
10162
10460
  this.wireEvents(rightPageElement);
10163
10461
  pagingGroup.appendChild(leftPageElement);
10164
10462
  pagingGroup.appendChild(rightPageElement);
@@ -10808,7 +11106,10 @@ class Legend {
10808
11106
  const map = this.maps;
10809
11107
  const legend = map.legendSettings;
10810
11108
  const legendTitle = legend.title.text;
10811
- const textStyle = legend.titleStyle;
11109
+ const textStyle = {
11110
+ fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
11111
+ fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color, opacity: legend.titleStyle.opacity
11112
+ };
10812
11113
  let textOptions;
10813
11114
  const spacing = 10;
10814
11115
  const trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
@@ -10827,6 +11128,7 @@ class Legend {
10827
11128
  map.svgObject.appendChild(this.legendGroup);
10828
11129
  if (legendTitle) {
10829
11130
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
11131
+ textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
10830
11132
  textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
10831
11133
  renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
10832
11134
  }
@@ -10892,13 +11194,13 @@ class Legend {
10892
11194
  break;
10893
11195
  }
10894
11196
  if ((legend.height || legend.width) && legend.mode !== 'Interactive') {
10895
- map.totalRect = totalRect;
11197
+ this.legendTotalRect = map.totalRect = totalRect;
10896
11198
  }
10897
11199
  else {
10898
11200
  if ((legend.height || legend.width) && legend.mode === 'Interactive') {
10899
11201
  map.totalRect = totalRect;
10900
11202
  }
10901
- map.mapAreaRect = totalRect;
11203
+ this.legendTotalRect = map.mapAreaRect = totalRect;
10902
11204
  }
10903
11205
  this.translate = new Point(x, y);
10904
11206
  }
@@ -10932,20 +11234,24 @@ class Legend {
10932
11234
  }
10933
11235
  else {
10934
11236
  newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
10935
- shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
11237
+ 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) });
10936
11238
  this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
10937
11239
  }
10938
11240
  }
10939
11241
  });
10940
11242
  });
10941
11243
  }
11244
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10942
11245
  getMarkerLegendData(layerIndex, text, legendFill) {
11246
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10943
11247
  const legendData = [];
10944
11248
  this.maps.layers[layerIndex].markerSettings.map((markerSettings, markerIndex) => {
11249
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10945
11250
  const markerData = markerSettings.dataSource;
11251
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10946
11252
  Array.prototype.forEach.call(markerData, (data, dataIndex) => {
10947
- let marker$$1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
10948
- if ((text === data[marker$$1.legendText] || text === '') && legendFill == data[marker$$1.colorValuePath]) {
11253
+ const marker$$1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
11254
+ if ((text === data[marker$$1.legendText] || text === '') && legendFill === data[marker$$1.colorValuePath]) {
10949
11255
  legendData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
10950
11256
  shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
10951
11257
  }
@@ -11294,7 +11600,7 @@ class Legend {
11294
11600
  shape = this.legendCollection[legendIndex]['data'][i];
11295
11601
  mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11296
11602
  '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11297
- '_MarkerIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11603
+ '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11298
11604
  if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
11299
11605
  mapElement = mapElement.children[0];
11300
11606
  }
@@ -11303,7 +11609,7 @@ class Legend {
11303
11609
  mapElement.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
11304
11610
  mapElement.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
11305
11611
  mapElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11306
- mapElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11612
+ mapElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11307
11613
  mapElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11308
11614
  this.maps.layers[k].shapeSettings.opacity :
11309
11615
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11318,6 +11624,9 @@ class Legend {
11318
11624
  if (targetEle !== null) {
11319
11625
  legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
11320
11626
  legendShapeId.setAttribute('fill', '#E5E5E5');
11627
+ if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
11628
+ legendShapeId.setAttribute('stroke', '#E5E5E5');
11629
+ }
11321
11630
  legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
11322
11631
  legendTextId.setAttribute('fill', '#E5E5E5');
11323
11632
  }
@@ -11332,6 +11641,9 @@ class Legend {
11332
11641
  if (targetEle !== null) {
11333
11642
  legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
11334
11643
  legendShapeId.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
11644
+ if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
11645
+ legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
11646
+ }
11335
11647
  legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
11336
11648
  legendTextId.setAttribute('fill', '#757575');
11337
11649
  }
@@ -11366,7 +11678,7 @@ class Legend {
11366
11678
  layerElement.setAttribute('fill', this.maps.layers[j].shapeSettings.fill);
11367
11679
  layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
11368
11680
  layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
11369
- layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
11681
+ layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
11370
11682
  layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
11371
11683
  this.maps.layers[j].shapeSettings.opacity :
11372
11684
  this.maps.layers[j].shapeSettings.border.opacity).toString());
@@ -11396,7 +11708,7 @@ class Legend {
11396
11708
  layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
11397
11709
  this.maps.layers[j].shapeSettings.opacity :
11398
11710
  this.maps.layers[j].shapeSettings.border.opacity).toString());
11399
- layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
11711
+ layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
11400
11712
  layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
11401
11713
  layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
11402
11714
  if (targetEle !== null) {
@@ -11416,7 +11728,7 @@ class Legend {
11416
11728
  targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendSettings.visible &&
11417
11729
  targetEle.id.indexOf('_Text') === -1) {
11418
11730
  let LegendInteractive;
11419
- const legendIndex = parseFloat(targetEle.id.substr((this.maps.element.id + '_Legend_Index_').length));
11731
+ const legendIndex = parseFloat(targetEle.id.split(this.maps.element.id + '_Legend_Index_')[1]);
11420
11732
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11421
11733
  let mapdata;
11422
11734
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -11437,7 +11749,7 @@ class Legend {
11437
11749
  if (this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
11438
11750
  LegendInteractive.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
11439
11751
  LegendInteractive.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
11440
- LegendInteractive.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11752
+ LegendInteractive.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11441
11753
  LegendInteractive.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11442
11754
  this.maps.layers[k].shapeSettings.opacity :
11443
11755
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11501,7 +11813,7 @@ class Legend {
11501
11813
  mapLegendElement.setAttribute('fill', this.maps.layers[0].shapeSettings.fill);
11502
11814
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
11503
11815
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11504
- mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11816
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11505
11817
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11506
11818
  this.maps.layers[k].shapeSettings.opacity :
11507
11819
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11528,7 +11840,7 @@ class Legend {
11528
11840
  this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
11529
11841
  }
11530
11842
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11531
- mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11843
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11532
11844
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
11533
11845
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11534
11846
  this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11747,14 +12059,7 @@ class Highlight {
11747
12059
  this.highlightSettings = this.maps.layers[layerIndex].navigationLineSettings[index].highlightSettings;
11748
12060
  }
11749
12061
  if (this.highlightSettings.enable) {
11750
- if (this.maps.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1) {
11751
- this.maps.legendModule.shapeHighLightAndSelection(targetEle, data, this.highlightSettings, 'highlight', layerIndex);
11752
- }
11753
- const selectHighLight = targetEle.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible ?
11754
- this.maps.legendModule.shapeToggled : true;
11755
- if (selectHighLight) {
11756
- this.mapHighlight(targetEle, shapeData, data);
11757
- }
12062
+ this.handleHighlight(targetEle, layerIndex, data, shapeData);
11758
12063
  }
11759
12064
  else {
11760
12065
  const element = document.getElementsByClassName('highlightMapStyle')[0];
@@ -11778,21 +12083,35 @@ class Highlight {
11778
12083
  targetEle.setAttribute('stroke', this.maps.layers[layerIndex].navigationLineSettings[index].color);
11779
12084
  }
11780
12085
  removeClass(targetEle);
11781
- if (this.maps.legendSettings.visible) {
12086
+ if (this.maps.legendSettings.visible && this.maps.legendModule) {
11782
12087
  this.maps.legendModule.removeShapeHighlightCollection();
11783
12088
  }
11784
12089
  }
11785
12090
  else if ((targetEle.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') !== -1 ||
11786
- targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) &&
12091
+ targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendModule &&
11787
12092
  this.maps.legendSettings.visible && targetEle.id.indexOf('_Text') === -1) {
11788
12093
  this.maps.legendModule.legendHighLightAndSelection(targetEle, 'highlight');
11789
12094
  }
11790
12095
  else {
11791
- if (this.maps.legendSettings.visible) {
12096
+ if (this.maps.legendSettings.visible && this.maps.legendModule) {
11792
12097
  this.maps.legendModule.removeLegendHighlightCollection();
11793
12098
  }
11794
12099
  }
11795
12100
  }
12101
+ /**
12102
+ * @private
12103
+ */
12104
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12105
+ handleHighlight(targetElement, layerIndex, data, shapeData) {
12106
+ if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule) {
12107
+ this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.highlightSettings, 'highlight', layerIndex);
12108
+ }
12109
+ const selectHighLight = targetElement.id.indexOf('shapeIndex') > -1 && (this.maps.legendSettings.visible && this.maps.legendModule) ?
12110
+ this.maps.legendModule.shapeToggled : true;
12111
+ if (selectHighLight) {
12112
+ this.mapHighlight(targetElement, shapeData, data);
12113
+ }
12114
+ }
11796
12115
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11797
12116
  mapHighlight(targetEle, shapeData, data) {
11798
12117
  const layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
@@ -11802,14 +12121,14 @@ class Highlight {
11802
12121
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
11803
12122
  }
11804
12123
  const border = {
11805
- color: this.highlightSettings.border.color,
11806
- width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
12124
+ color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
12125
+ width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
11807
12126
  opacity: this.highlightSettings.border.opacity
11808
12127
  };
11809
- let eventArgs = {
12128
+ const eventArgs = {
11810
12129
  opacity: this.highlightSettings.opacity,
11811
- fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
11812
- ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
12130
+ fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
12131
+ ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
11813
12132
  border: border,
11814
12133
  name: itemHighlight,
11815
12134
  target: targetEle.id,
@@ -11949,24 +12268,31 @@ class Selection {
11949
12268
  this.selectionType = 'navigationline';
11950
12269
  }
11951
12270
  if (this.selectionsettings.enable) {
11952
- this.maps.mapSelect = targetElement ? true : false;
11953
- if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
11954
- this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
11955
- }
11956
- const shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible) ?
11957
- this.maps.legendModule.shapeToggled : true;
11958
- if (shapeToggled) {
11959
- this.selectMap(targetElement, shapeData, data);
11960
- }
12271
+ this.selectElement(targetElement, layerIndex, data, shapeData);
11961
12272
  }
11962
12273
  }
11963
- else if (this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable &&
12274
+ else if ((this.maps.legendSettings.visible && !this.maps.legendSettings.toggleLegendSettings.enable && this.maps.legendModule) &&
11964
12275
  !isNullOrUndefined(targetElement.id) && targetElement.id.indexOf('_Text') === -1 &&
11965
12276
  (targetElement.id.indexOf(this.maps.element.id + '_Legend_Shape_Index') > -1 ||
11966
12277
  targetElement.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1)) {
11967
12278
  this.maps.legendModule.legendHighLightAndSelection(targetElement, 'selection');
11968
12279
  }
11969
12280
  }
12281
+ /**
12282
+ * @private
12283
+ */
12284
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12285
+ selectElement(targetElement, layerIndex, data, shapeData) {
12286
+ this.maps.mapSelect = targetElement ? true : false;
12287
+ if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
12288
+ this.maps.legendModule.shapeHighLightAndSelection(targetElement, data, this.selectionsettings, 'selection', layerIndex);
12289
+ }
12290
+ const shapeToggled = (targetElement.id.indexOf('shapeIndex') > -1 && this.maps.legendSettings.visible && this.maps.legendModule) ?
12291
+ this.maps.legendModule.shapeToggled : true;
12292
+ if (shapeToggled) {
12293
+ this.selectMap(targetElement, shapeData, data);
12294
+ }
12295
+ }
11970
12296
  // eslint-disable-next-line valid-jsdoc
11971
12297
  /**
11972
12298
  * Public method for selection
@@ -11990,15 +12316,16 @@ class Selection {
11990
12316
  */
11991
12317
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11992
12318
  selectMap(targetElement, shapeData, data) {
12319
+ const layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
11993
12320
  const selectionsettings = this.selectionsettings;
11994
12321
  const border = {
11995
- color: this.selectionsettings.border.color,
11996
- width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
12322
+ color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
12323
+ 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),
11997
12324
  opacity: this.selectionsettings.border.opacity
11998
12325
  };
11999
- let eventArgs = {
12326
+ const eventArgs = {
12000
12327
  opacity: this.selectionsettings.opacity,
12001
- fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
12328
+ fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
12002
12329
  border: border,
12003
12330
  name: itemSelection,
12004
12331
  target: targetElement.id,
@@ -12190,8 +12517,6 @@ class MapsTooltip {
12190
12517
  if (istooltipRender) {
12191
12518
  if (targetId.indexOf('_shapeIndex_') > -1) {
12192
12519
  option = layer.tooltipSettings;
12193
- option.textStyle.fontFamily = this.maps.themeStyle.fontFamily || option.textStyle.fontFamily;
12194
- option.textStyle.opacity = this.maps.themeStyle.tooltipTextOpacity || option.textStyle.opacity;
12195
12520
  const shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
12196
12521
  if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
12197
12522
  return;
@@ -12308,9 +12633,13 @@ class MapsTooltip {
12308
12633
  option.template = option.template[Object.keys(option.template)[0]];
12309
12634
  }
12310
12635
  templateData = this.setTooltipContent(option, templateData);
12636
+ const tooltipTextStyle = {
12637
+ color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
12638
+ fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
12639
+ };
12311
12640
  const tooltipOption = {
12312
12641
  location: location, text: tooltipContent, data: templateData,
12313
- textStyle: option.textStyle,
12642
+ textStyle: tooltipTextStyle,
12314
12643
  template: option.template
12315
12644
  };
12316
12645
  tooltipArgs = {
@@ -12326,6 +12655,10 @@ class MapsTooltip {
12326
12655
  this.maps['isProtectedOnChange'] = true;
12327
12656
  tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
12328
12657
  || this.maps.themeStyle.tooltipFontColor;
12658
+ tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
12659
+ || this.maps.themeStyle.fontFamily;
12660
+ tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
12661
+ || this.maps.themeStyle.tooltipTextOpacity;
12329
12662
  if (tooltipArgs.cancel) {
12330
12663
  this.svgTooltip = new Tooltip({
12331
12664
  enable: true,
@@ -12604,8 +12937,10 @@ class Zoom {
12604
12937
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
12605
12938
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
12606
12939
  }
12940
+ this.markerLineAnimation(map);
12607
12941
  map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
12608
12942
  const element1 = document.getElementById(this.maps.element.id + '_tiles');
12943
+ const animationDuration = this.maps.layersCollection[0].animationDuration;
12609
12944
  setTimeout(() => {
12610
12945
  // if (type === 'ZoomOut') {
12611
12946
  // element1.removeChild(element1.children[element1.childElementCount - 1]);
@@ -12619,7 +12954,7 @@ class Zoom {
12619
12954
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
12620
12955
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
12621
12956
  }
12622
- }, 250);
12957
+ }, animationDuration);
12623
12958
  }
12624
12959
  this.maps.zoomNotApplied = false;
12625
12960
  }
@@ -12793,11 +13128,13 @@ class Zoom {
12793
13128
  */
12794
13129
  animateTransform(element, animate$$1, x, y, scale) {
12795
13130
  const duration = this.currentLayer.animationDuration;
12796
- if (!animate$$1 || duration === 0) {
13131
+ if (!animate$$1 || duration === 0 || this.maps.isTileMap) {
12797
13132
  element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
12798
13133
  return;
12799
13134
  }
12800
- zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13135
+ if (!this.maps.isTileMap) {
13136
+ zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13137
+ }
12801
13138
  }
12802
13139
  applyTransform(animate$$1) {
12803
13140
  let layerIndex;
@@ -12844,12 +13181,14 @@ class Zoom {
12844
13181
  this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
12845
13182
  }
12846
13183
  currentEle = layerElement.childNodes[j];
13184
+ let markerAnimation;
12847
13185
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
12848
13186
  for (let k = 0; k < currentEle.childElementCount; k++) {
12849
13187
  this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate$$1);
12850
13188
  const layerIndex = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
12851
13189
  const dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
12852
13190
  const markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
13191
+ markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
12853
13192
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12854
13193
  const markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
12855
13194
  for (let x = 0; x < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x++) {
@@ -12860,9 +13199,17 @@ class Zoom {
12860
13199
  this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
12861
13200
  }
12862
13201
  }
12863
- if (!this.maps.isTileMap && this.currentLayer.animationDuration > 0) {
12864
- markerStyle = 'visibility:hidden';
12865
- currentEle.setAttribute('style', markerStyle);
13202
+ if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
13203
+ if (this.maps.isTileMap) {
13204
+ const groupElement = document.querySelector('.GroupElement');
13205
+ if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
13206
+ groupElement.style.display = 'none';
13207
+ }
13208
+ }
13209
+ else {
13210
+ markerStyle = 'visibility:hidden';
13211
+ currentEle.setAttribute('style', markerStyle);
13212
+ }
12866
13213
  }
12867
13214
  }
12868
13215
  if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
@@ -12961,7 +13308,7 @@ class Zoom {
12961
13308
  this.maps.arrangeTemplate();
12962
13309
  }
12963
13310
  if (!isNullOrUndefined(this.currentLayer)) {
12964
- if (!animate$$1 || this.currentLayer.animationDuration === 0) {
13311
+ if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
12965
13312
  this.processTemplate(x, y, scale, this.maps);
12966
13313
  }
12967
13314
  }
@@ -13078,7 +13425,6 @@ class Zoom {
13078
13425
  */
13079
13426
  processTemplate(x, y, scale, maps) {
13080
13427
  for (let i = 0; i < this.templateCount; i++) {
13081
- this.currentLayer = maps.layersCollection[i];
13082
13428
  const factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
13083
13429
  const markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
13084
13430
  i + '_Markers_Template_Group');
@@ -13307,6 +13653,23 @@ class Zoom {
13307
13653
  }
13308
13654
  }
13309
13655
  }
13656
+ markerLineAnimation(map) {
13657
+ if (map.isTileMap) {
13658
+ for (let i = 0; i < map.layersCollection.length; i++) {
13659
+ const markerTemplateElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
13660
+ const lineElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_line_Group');
13661
+ if (!isNullOrUndefined(markerTemplateElement)) {
13662
+ markerTemplateElement.style.visibility = 'hidden';
13663
+ }
13664
+ if (!isNullOrUndefined(lineElement)) {
13665
+ lineElement.style.visibility = 'hidden';
13666
+ }
13667
+ }
13668
+ }
13669
+ }
13670
+ /**
13671
+ * @private
13672
+ */
13310
13673
  panning(direction, xDifference, yDifference, mouseLocation) {
13311
13674
  const map = this.maps;
13312
13675
  let panArgs;
@@ -13325,6 +13688,8 @@ class Zoom {
13325
13688
  yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
13326
13689
  this.maps.mergeCluster();
13327
13690
  if (!map.isTileMap) {
13691
+ const legendElement = document.getElementById(map.element.id + '_Legend_Group');
13692
+ const legendHeight = !isNullOrUndefined(legendElement) ? legendElement.getClientRects()[0].height : 0;
13328
13693
  x = translatePoint.x - xDifference / scale;
13329
13694
  y = translatePoint.y - yDifference / scale;
13330
13695
  const layerRect = getElementByID(map.element.id + '_Layer_Collections').getBoundingClientRect();
@@ -13332,7 +13697,7 @@ class Zoom {
13332
13697
  const panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
13333
13698
  ((layerRect.left + layerRect.width) >= (elementRect.left + elementRect.width) + map.mapAreaRect.x + map.margin.left)));
13334
13699
  const panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
13335
- ((layerRect.top + layerRect.height + map.margin.top) >= (elementRect.top + elementRect.height))));
13700
+ ((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
13336
13701
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13337
13702
  const location = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
13338
13703
  panArgs = {
@@ -13438,41 +13803,45 @@ class Zoom {
13438
13803
  let tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
13439
13804
  map.scale = Math.pow(2, tileZoomFactor - 1);
13440
13805
  map.tileZoomLevel = tileZoomFactor;
13441
- map.zoomSettings.zoomFactor = zoomFactor;
13442
- const position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
13443
- this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
13444
- if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
13445
- map.initialCheck = true;
13446
- map.zoomPersistence = false;
13447
- map.tileTranslatePoint.x = map.initialTileTranslate.x;
13448
- map.tileTranslatePoint.y = map.initialTileTranslate.y;
13449
- tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
13450
- }
13451
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
13452
- map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
13453
- map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
13454
- if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13455
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
13456
- }
13457
- if (document.querySelector('.GroupElement')) {
13458
- document.querySelector('.GroupElement').style.display = 'none';
13459
- }
13460
- map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
13461
- const element1 = document.getElementById(this.maps.element.id + '_tiles');
13462
- setTimeout(() => {
13463
- this.applyTransform(true);
13806
+ if (map.previousScale !== map.scale || map.isReset) {
13807
+ map.zoomSettings.zoomFactor = zoomFactor;
13808
+ const position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
13809
+ this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
13810
+ if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
13811
+ map.initialCheck = true;
13812
+ map.zoomPersistence = false;
13813
+ map.tileTranslatePoint.x = map.initialTileTranslate.x;
13814
+ map.tileTranslatePoint.y = map.initialTileTranslate.y;
13815
+ tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
13816
+ }
13817
+ this.triggerZoomEvent(prevTilePoint, prevLevel, type);
13818
+ map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
13819
+ map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
13464
13820
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13465
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13821
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
13466
13822
  }
13467
- }, 250);
13823
+ if (document.querySelector('.GroupElement')) {
13824
+ document.querySelector('.GroupElement').style.display = 'none';
13825
+ }
13826
+ this.markerLineAnimation(map);
13827
+ map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
13828
+ const element1 = document.getElementById(this.maps.element.id + '_tiles');
13829
+ const animationDuration = this.maps.layersCollection[0].animationDuration;
13830
+ setTimeout(() => {
13831
+ this.applyTransform(true);
13832
+ if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13833
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13834
+ }
13835
+ }, animationDuration);
13836
+ }
13837
+ this.maps.zoomNotApplied = false;
13468
13838
  }
13469
- this.maps.zoomNotApplied = false;
13470
13839
  }
13471
13840
  createZoomingToolbars() {
13472
13841
  const map = this.maps;
13473
13842
  this.toolBarGroup = map.renderer.createGroup({
13474
13843
  id: map.element.id + '_Zooming_KitCollection',
13475
- opacity: 0.3
13844
+ opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
13476
13845
  });
13477
13846
  const kitHeight = 16;
13478
13847
  const kitWidth = 16;
@@ -13730,8 +14099,9 @@ class Zoom {
13730
14099
  x = (size.width - toolBarSize.width) - padding;
13731
14100
  break;
13732
14101
  }
13733
- element.style.left = x + 'px';
13734
- element.style.top = y + 'px';
14102
+ let extraPosition = map.getExtraPosition();
14103
+ element.style.left = x + extraPosition.x + 'px';
14104
+ element.style.top = y + extraPosition.y + 'px';
13735
14105
  const color = this.maps.zoomSettings.highlightColor || this.maps.themeStyle.zoomSelectionColor;
13736
14106
  const css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
13737
14107
  '.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
@@ -13875,14 +14245,14 @@ class Zoom {
13875
14245
  if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
13876
14246
  if (!this.maps.zoomSettings.enablePanning) {
13877
14247
  if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
13878
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '0.3');
13879
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '0.3');
14248
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14249
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
13880
14250
  }
13881
14251
  }
13882
14252
  }
13883
14253
  }
13884
14254
  else {
13885
- getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '0.3');
14255
+ getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
13886
14256
  if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
13887
14257
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
13888
14258
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');