@syncfusion/ej2-maps 19.3.46 → 19.4.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) 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 +34 -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 +478 -257
  8. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  9. package/dist/es6/ej2-maps.es5.js +474 -253
  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 +86 -50
  20. package/src/maps/layers/legend.js +47 -18
  21. package/src/maps/layers/marker.js +2 -8
  22. package/src/maps/maps-model.d.ts +1 -1
  23. package/src/maps/maps.d.ts +5 -0
  24. package/src/maps/maps.js +42 -16
  25. package/src/maps/model/base-model.d.ts +7 -0
  26. package/src/maps/model/base.d.ts +6 -0
  27. package/src/maps/model/base.js +5 -2
  28. package/src/maps/model/interface.d.ts +1 -3
  29. package/src/maps/model/theme.js +62 -5
  30. package/src/maps/user-interaction/highlight.js +4 -4
  31. package/src/maps/user-interaction/selection.js +10 -9
  32. package/src/maps/user-interaction/tooltip.js +9 -3
  33. package/src/maps/user-interaction/zoom.d.ts +1 -0
  34. package/src/maps/user-interaction/zoom.js +76 -44
  35. package/src/maps/utils/enum.d.ts +3 -1
  36. package/src/maps/utils/helper.d.ts +4 -2
  37. 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'],
@@ -5538,7 +5624,7 @@ class LayerPanel {
5538
5624
  if (this.mapObject.zoomSettings.resetToInitial && this.mapObject.initialCheck && !isNullOrUndefined(panel.mapObject.height)
5539
5625
  && this.mapObject.availableSize.height > 512) {
5540
5626
  this.mapObject.applyZoomReset = true;
5541
- this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512) + 1;
5627
+ this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512);
5542
5628
  const padding = this.mapObject.layers[this.mapObject.baseLayerIndex].layerType !== 'GoogleStaticMap' ?
5543
5629
  20 : 0;
5544
5630
  const totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
@@ -5579,7 +5665,7 @@ class LayerPanel {
5579
5665
  }
5580
5666
  }
5581
5667
  }
5582
- let eventArgs = {
5668
+ const eventArgs = {
5583
5669
  cancel: false, name: layerRendering, index: layerIndex,
5584
5670
  layer: layer, maps: this.mapObject, visible: layer.visible
5585
5671
  };
@@ -5619,6 +5705,9 @@ class LayerPanel {
5619
5705
  proxy.mapObject['bingMap'] = bing;
5620
5706
  proxy.renderTileLayer(proxy, layer, layerIndex, bing);
5621
5707
  this.mapObject.arrangeTemplate();
5708
+ if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
5709
+ this.mapObject.zoomModule.applyTransform(true);
5710
+ }
5622
5711
  };
5623
5712
  ajax.send();
5624
5713
  }
@@ -5696,9 +5785,7 @@ class LayerPanel {
5696
5785
  const data = geometryData['geometry'];
5697
5786
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5698
5787
  const properties = geometryData['properties'];
5699
- if (type !== 'LineString') {
5700
- this.generatePoints(type, coords, data, properties);
5701
- }
5788
+ this.generatePoints(type, coords, data, properties);
5702
5789
  }
5703
5790
  });
5704
5791
  this.currentLayer.rectBounds = this.rectBounds;
@@ -5726,11 +5813,9 @@ class LayerPanel {
5726
5813
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5727
5814
  const currentShapeData = this.currentLayer.layerData[i];
5728
5815
  let pathOptions;
5729
- let polyLineOptions;
5730
5816
  let circleOptions;
5731
5817
  let groupElement;
5732
5818
  let path = '';
5733
- let points = '';
5734
5819
  let fill = (shapeSettings.autofill) ? colors[i % colors.length] :
5735
5820
  (shapeSettings.fill || this.mapObject.themeStyle.shapeFill);
5736
5821
  if (shapeSettings.colorValuePath !== null && !isNullOrUndefined(currentShapeData['property'])) {
@@ -5773,7 +5858,7 @@ class LayerPanel {
5773
5858
  }
5774
5859
  const opacity = (Object.prototype.toString.call(getShapeColor$$1) === '[object Object]'
5775
5860
  && !isNullOrUndefined(getShapeColor$$1['opacity'])) ? getShapeColor$$1['opacity'] : shapeSettings.opacity;
5776
- let eventArgs = {
5861
+ const eventArgs = {
5777
5862
  cancel: false, name: shapeRendering, index: i,
5778
5863
  data: this.currentLayer.dataSource ? this.currentLayer.dataSource[k] : null,
5779
5864
  maps: this.mapObject,
@@ -5794,7 +5879,7 @@ class LayerPanel {
5794
5879
  if (isNullOrUndefined(shapeSettings.borderColorValuePath)) {
5795
5880
  this.mapObject.layers[layerIndex].shapeSettings.border.color = eventArgs.border.color;
5796
5881
  }
5797
- else if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
5882
+ if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
5798
5883
  this.mapObject.layers[layerIndex].shapeSettings.border.width = eventArgs.border.width;
5799
5884
  }
5800
5885
  }
@@ -5848,17 +5933,21 @@ class LayerPanel {
5848
5933
  }
5849
5934
  break;
5850
5935
  case 'LineString':
5936
+ path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
5851
5937
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5852
5938
  currentShapeData.map((lineData) => {
5853
- points += lineData['point']['x'] + ' , ' + lineData['point']['y'] + ' ';
5939
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
5854
5940
  });
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);
5941
+ if (path.length > 3) {
5942
+ pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
5943
+ pathEle = this.mapObject.renderer.drawPath(pathOptions);
5944
+ }
5857
5945
  break;
5858
5946
  case 'Point':
5859
5947
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5860
5948
  const pointData = currentShapeData['point'];
5861
- circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], shapeSettings.circleRadius, null);
5949
+ const circleRadius = (this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / this.currentFactor;
5950
+ circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, null);
5862
5951
  pathEle = this.mapObject.renderer.drawCircle(circleOptions);
5863
5952
  break;
5864
5953
  case 'Path':
@@ -5880,6 +5969,9 @@ class LayerPanel {
5880
5969
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
5881
5970
  (currentShapeData['property'][properties]) : ''));
5882
5971
  pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + i + 2).toString());
5972
+ if (drawingType === 'LineString') {
5973
+ pathEle.setAttribute('style', 'outline:none');
5974
+ }
5883
5975
  maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
5884
5976
  if (this.mapObject.toggledShapeElementId) {
5885
5977
  for (let j = 0; j < this.mapObject.toggledShapeElementId.length; j++) {
@@ -6088,11 +6180,14 @@ class LayerPanel {
6088
6180
  this.currentLayer.layerData.push(multiPolygonDatas);
6089
6181
  break;
6090
6182
  case 'linestring':
6183
+ const extraSpace = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6184
+ this.currentLayer.shapeSettings.border.width : 1;
6091
6185
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6092
6186
  coordinates.map((points, index) => {
6093
6187
  latitude = points[1];
6094
6188
  longitude = points[0];
6095
6189
  const point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6190
+ this.calculateBox(point, extraSpace);
6096
6191
  newData.push({
6097
6192
  point: point, lat: latitude, lng: longitude
6098
6193
  });
@@ -6103,6 +6198,8 @@ class LayerPanel {
6103
6198
  break;
6104
6199
  case 'point': {
6105
6200
  let arrayCollections = false;
6201
+ const extraSpace = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6202
+ this.currentLayer.shapeSettings.border.width : 1) + (this.currentLayer.shapeSettings.circleRadius * 2);
6106
6203
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6107
6204
  coordinates.map((points, index) => {
6108
6205
  if (Object.prototype.toString.call(points) === '[object Array]') {
@@ -6119,6 +6216,7 @@ class LayerPanel {
6119
6216
  latitude = coordinates[1];
6120
6217
  longitude = coordinates[0];
6121
6218
  const point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6219
+ this.calculateBox(point, extraSpace);
6122
6220
  this.currentLayer.layerData.push({
6123
6221
  point: point, type: type, lat: latitude, lng: longitude, property: properties
6124
6222
  });
@@ -6132,6 +6230,17 @@ class LayerPanel {
6132
6230
  break;
6133
6231
  }
6134
6232
  }
6233
+ calculateBox(point, extraSpace) {
6234
+ if (isNullOrUndefined(this.rectBounds)) {
6235
+ this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
6236
+ }
6237
+ else {
6238
+ this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
6239
+ this.rectBounds['min']['y'] = Math.min(this.rectBounds['min']['y'], point.y - extraSpace);
6240
+ this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x);
6241
+ this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
6242
+ }
6243
+ }
6135
6244
  calculateFactor(layer) {
6136
6245
  let horFactor;
6137
6246
  let verFactor = 1;
@@ -6239,6 +6348,15 @@ class LayerPanel {
6239
6348
  this.calculateRectBox(point[0]);
6240
6349
  });
6241
6350
  break;
6351
+ case 'linestring':
6352
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6353
+ coordinates.map((point, index) => {
6354
+ this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
6355
+ });
6356
+ break;
6357
+ case 'point':
6358
+ this.calculateRectBox(coordinates, 'point');
6359
+ break;
6242
6360
  }
6243
6361
  }
6244
6362
  });
@@ -6274,19 +6392,32 @@ class LayerPanel {
6274
6392
  return newData;
6275
6393
  }
6276
6394
  // 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] });
6395
+ calculateRectBox(coordinates, type, isFirstItem) {
6396
+ if (type !== 'LineString' && type !== 'point') {
6397
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6398
+ Array.prototype.forEach.call(coordinates, (currentCoords) => {
6399
+ if (isNullOrUndefined(this.mapObject.baseMapBounds)) {
6400
+ this.mapObject.baseMapBounds = new GeoLocation({ min: currentCoords[1], max: currentCoords[1] }, { min: currentCoords[0], max: currentCoords[0] });
6401
+ }
6402
+ else {
6403
+ this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
6404
+ this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
6405
+ this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
6406
+ this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, currentCoords[0]);
6407
+ }
6408
+ });
6409
+ }
6410
+ else {
6411
+ if ((isFirstItem || type === 'point') && isNullOrUndefined(this.mapObject.baseMapBounds)) {
6412
+ this.mapObject.baseMapBounds = new GeoLocation({ min: coordinates[1], max: coordinates[1] }, { min: coordinates[0], max: coordinates[0] });
6282
6413
  }
6283
6414
  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]);
6415
+ this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, coordinates[1]);
6416
+ this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, coordinates[1]);
6417
+ this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, coordinates[0]);
6418
+ this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, coordinates[0]);
6288
6419
  }
6289
- });
6420
+ }
6290
6421
  }
6291
6422
  generateTiles(zoomLevel, tileTranslatePoint, zoomType, bing, position) {
6292
6423
  const userLang = this.mapObject.locale;
@@ -6373,15 +6504,17 @@ class LayerPanel {
6373
6504
  }
6374
6505
  }
6375
6506
  }
6376
- this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
6507
+ if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset) {
6508
+ this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
6509
+ }
6377
6510
  }
6378
6511
  arrangeTiles(type, x, y) {
6379
6512
  const element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6380
6513
  const element1 = document.getElementById(this.mapObject.element.id + '_tiles');
6381
6514
  let timeOut;
6382
- if (!isNullOrUndefined(type) && type !== 'Pan' && type !== 'Reset' && type.indexOf('ZoomOut') === -1) {
6515
+ if (!isNullOrUndefined(type) && type !== 'Pan') {
6383
6516
  this.tileAnimation(type, x, y);
6384
- timeOut = 250;
6517
+ timeOut = this.mapObject.layersCollection[0].animationDuration;
6385
6518
  }
6386
6519
  else {
6387
6520
  timeOut = 0;
@@ -6396,7 +6529,6 @@ class LayerPanel {
6396
6529
  }
6397
6530
  if (element1) {
6398
6531
  element1.style.zIndex = '0';
6399
- element1.style.visibility = 'hidden';
6400
6532
  }
6401
6533
  let animateElement;
6402
6534
  if (!document.getElementById(this.mapObject.element.id + '_animated_tiles') && element) {
@@ -6454,35 +6586,23 @@ class LayerPanel {
6454
6586
  * @returns {void}
6455
6587
  */
6456
6588
  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');
6589
+ const tileParent = document.getElementById(this.mapObject.element.id + '_tile_parent');
6590
+ const animatedTiles = document.getElementById(this.mapObject.element.id + '_animated_tiles');
6591
+ const tileElement = document.getElementById(this.mapObject.element.id + '_tiles');
6460
6592
  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]);
6467
- }
6468
- translateX = 0;
6469
- translateY = 128 - 23;
6470
- scaleValue = '0.5';
6471
- }
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]);
6593
+ if (zoomType.indexOf('ZoomOut') === 0 || zoomType === 'Reset') {
6594
+ tileElement.style.zIndex = '1';
6595
+ tileParent.style.zIndex = '0';
6596
+ while (tileElement.childElementCount >= 1) {
6597
+ tileElement.removeChild(tileElement.children[0]);
6477
6598
  }
6478
- element1 = ele.children[0];
6479
6599
  translateX = 0;
6480
- translateY = 0;
6481
- scaleValue = '1';
6600
+ translateY = document.getElementById(this.mapObject.element.id + '_tile_parent').getClientRects()[0].height / 4;
6601
+ scaleValue = zoomType.indexOf('ZoomOut') === 0 ? '0.5' : '0.2';
6482
6602
  }
6483
- if (!isNullOrUndefined(element1)) {
6484
- element1.style.transition = '250ms';
6485
- element1.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
6603
+ if (!isNullOrUndefined(animatedTiles)) {
6604
+ animatedTiles.style.transition = this.mapObject.layersCollection[0].animationDuration + 'ms';
6605
+ animatedTiles.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
6486
6606
  }
6487
6607
  }
6488
6608
  /**
@@ -7066,7 +7186,15 @@ let Maps = class Maps extends Component {
7066
7186
  }
7067
7187
  this.mapLayerPanel.measureLayerPanel();
7068
7188
  this.element.appendChild(this.svgObject);
7189
+ const position = this.getExtraPosition();
7069
7190
  for (let i = 0; i < this.layers.length; i++) {
7191
+ if (position.x !== 0 || position.y !== 0) {
7192
+ let markerTemplate$$1 = document.getElementById(this.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
7193
+ if (!isNullOrUndefined(markerTemplate$$1)) {
7194
+ markerTemplate$$1.style.top = this.mapAreaRect.y + position.y + 'px';
7195
+ markerTemplate$$1.style.left = this.mapAreaRect.x + position.x + 'px';
7196
+ }
7197
+ }
7070
7198
  if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
7071
7199
  this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
7072
7200
  const checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
@@ -7889,26 +8017,28 @@ let Maps = class Maps extends Component {
7889
8017
  * @param e - Specifies the arguments of window resize event.
7890
8018
  */
7891
8019
  mapsOnResize(e) {
7892
- this.isResize = true;
8020
+ this.isResize = this.isReset = true;
7893
8021
  const args = {
8022
+ cancel: false,
7894
8023
  name: resize,
7895
8024
  previousSize: this.availableSize,
7896
- currentSize: new Size(0, 0),
8025
+ currentSize: calculateSize(this),
7897
8026
  maps: this
7898
8027
  };
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);
8028
+ this.trigger(resize, args);
8029
+ if (!args.cancel) {
8030
+ if (this.resizeTo) {
8031
+ clearTimeout(this.resizeTo);
8032
+ }
8033
+ if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
8034
+ this.resizeTo = setTimeout(() => {
8035
+ this.unWireEVents();
8036
+ this.createSVG();
8037
+ this.refreshing = true;
8038
+ this.wireEVents();
8039
+ this.render();
8040
+ }, 500);
8041
+ }
7912
8042
  }
7913
8043
  return false;
7914
8044
  }
@@ -8492,6 +8622,22 @@ let Maps = class Maps extends Component {
8492
8622
  });
8493
8623
  return isVisible;
8494
8624
  }
8625
+ /**
8626
+ * To find space between the secondary element and svg element.
8627
+ * @private
8628
+ */
8629
+ getExtraPosition() {
8630
+ let top;
8631
+ let left;
8632
+ const svgElement = getElement(this.element.id + '_svg');
8633
+ if (!isNullOrUndefined(svgElement)) {
8634
+ const svgClientRect = svgElement.getClientRects()[0];
8635
+ const mapsClientRect = (getElement(this.element.id + '_Secondary_Element')).getClientRects()[0];
8636
+ top = svgClientRect.top - mapsClientRect.top;
8637
+ left = svgClientRect.left - mapsClientRect.left;
8638
+ }
8639
+ return new Point(left, top);
8640
+ }
8495
8641
  /**
8496
8642
  * To find marker visibility
8497
8643
  */
@@ -8855,6 +9001,8 @@ class Bubble {
8855
9001
  // eslint-disable-next-line valid-jsdoc
8856
9002
  /**
8857
9003
  * To render bubble
9004
+ *
9005
+ * @private
8858
9006
  */
8859
9007
  renderBubble(
8860
9008
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -8899,7 +9047,7 @@ class Bubble {
8899
9047
  isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
8900
9048
  const shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
8901
9049
  ? shape[shapePath].toLowerCase() : shape[shapePath];
8902
- if (shapeDataLayerPathValue === shapePathValue) {
9050
+ if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
8903
9051
  if (layerData[i]['type'] === 'Point') {
8904
9052
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8905
9053
  shapePoints.push(this.getPoints(layerData[i], []));
@@ -9030,6 +9178,8 @@ class Bubble {
9030
9178
  // eslint-disable-next-line valid-jsdoc
9031
9179
  /**
9032
9180
  * To check and trigger bubble click event
9181
+ *
9182
+ * @private
9033
9183
  */
9034
9184
  bubbleClick(e) {
9035
9185
  const target = e.target.id;
@@ -9041,7 +9191,7 @@ class Bubble {
9041
9191
  if (isNullOrUndefined(data)) {
9042
9192
  return;
9043
9193
  }
9044
- let eventArgs = {
9194
+ const eventArgs = {
9045
9195
  cancel: false, name: bubbleClick, data: data, maps: this.maps,
9046
9196
  target: target, x: e.clientX, y: e.clientY
9047
9197
  };
@@ -9073,6 +9223,8 @@ class Bubble {
9073
9223
  // eslint-disable-next-line valid-jsdoc
9074
9224
  /**
9075
9225
  * To check and trigger bubble move event
9226
+ *
9227
+ * @private
9076
9228
  */
9077
9229
  bubbleMove(e) {
9078
9230
  const target = e.target.id;
@@ -9084,7 +9236,7 @@ class Bubble {
9084
9236
  if (isNullOrUndefined(data)) {
9085
9237
  return;
9086
9238
  }
9087
- let eventArgs = {
9239
+ const eventArgs = {
9088
9240
  cancel: false, name: bubbleMouseMove, data: data, maps: this.maps,
9089
9241
  target: target, x: e.clientX, y: e.clientY
9090
9242
  };
@@ -9313,7 +9465,7 @@ class DataLabel {
9313
9465
  }
9314
9466
  }
9315
9467
  }
9316
- let eventargs = {
9468
+ const eventargs = {
9317
9469
  name: dataLabelRendering, maps: this.maps, cancel: false, border: { color: dataLabel.border.color,
9318
9470
  width: dataLabel.border.width, opacity: dataLabel.border.opacity }, datalabel: dataLabel,
9319
9471
  fill: dataLabel.fill, template: dataLabel.template, text: text
@@ -9372,7 +9524,8 @@ class DataLabel {
9372
9524
  }
9373
9525
  else {
9374
9526
  if (dataLabelSettings.smartLabelMode === 'Trim') {
9375
- let textType = typeof text === 'number' ? text.toString() : text;
9527
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9528
+ const textType = typeof text === 'number' ? text.toString() : text;
9376
9529
  trimmedLable = textTrim(width, textType, style);
9377
9530
  elementSize = measureText(trimmedLable, style);
9378
9531
  options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', trimmedLable, '', '');
@@ -10089,6 +10242,7 @@ class Legend {
10089
10242
  const shapeSize = new Size(legend.shapeWidth, legend.shapeHeight);
10090
10243
  let textOptions;
10091
10244
  const render = map.renderer;
10245
+ let legendShape = legend.shape;
10092
10246
  if (page >= 0 && page < this.totalPages.length) {
10093
10247
  if (querySelector(this.legendGroup.id, this.maps.element.id)) {
10094
10248
  remove(querySelector(this.legendGroup.id, this.maps.element.id));
@@ -10098,7 +10252,7 @@ class Legend {
10098
10252
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10099
10253
  const collection = this.totalPages[page]['Collection'][i];
10100
10254
  const shapeBorder = collection['shapeBorder'];
10101
- const legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
10255
+ let legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
10102
10256
  let legendText = collection['DisplayText'];
10103
10257
  const shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
10104
10258
  legend.shape : 'Image') : collection['legendShape']);
@@ -10113,21 +10267,35 @@ class Legend {
10113
10267
  const textLocation = collection['Text'];
10114
10268
  const imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
10115
10269
  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 :
10270
+ const legendTextStyle = {
10271
+ fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
10272
+ fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color, opacity: legend.textStyle.opacity
10273
+ };
10274
+ legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
10117
10275
  this.maps.themeStyle.legendTextColor;
10118
- legend.textStyle.fontFamily = map.themeStyle.fontFamily || legend.textStyle.fontFamily;
10119
- legend.textStyle.size = map.themeStyle.legendFontSize || legend.textStyle.size;
10276
+ legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
10277
+ legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
10120
10278
  if (i === 0) {
10121
10279
  this.renderLegendBorder();
10122
10280
  }
10123
- legendElement.appendChild(drawSymbol(shapeLocation, shape, shapeSize, collection['ImageSrc'], renderOptions));
10281
+ if (legend.type === 'Markers' && legend.useMarkerShape) {
10282
+ const legendShapeData = this.legendCollection[collection['idIndex']].data[0];
10283
+ const marker$$1 = map.layers[legendShapeData['layerIndex']].markerSettings[legendShapeData['markerIndex']];
10284
+ 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;
10285
+ }
10286
+ if (legendShape === "Balloon") {
10287
+ legendElement.appendChild(drawBalloon(map, renderOptions, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
10288
+ }
10289
+ else {
10290
+ legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions));
10291
+ }
10124
10292
  const legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
10125
10293
  if (legendRectSize > this.legendBorderRect.width) {
10126
- const trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legend.textStyle, legendRectSize);
10294
+ const trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legendTextStyle, legendRectSize);
10127
10295
  legendText = trimmedText;
10128
10296
  }
10129
10297
  textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
10130
- renderTextElement(textOptions, legend.textStyle, legend.textStyle.color, legendElement);
10298
+ renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
10131
10299
  this.legendGroup.appendChild(legendElement);
10132
10300
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10133
10301
  if (i === (this.totalPages[page]['Collection'].length - 1)) {
@@ -10808,7 +10976,10 @@ class Legend {
10808
10976
  const map = this.maps;
10809
10977
  const legend = map.legendSettings;
10810
10978
  const legendTitle = legend.title.text;
10811
- const textStyle = legend.titleStyle;
10979
+ const textStyle = {
10980
+ fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
10981
+ fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color, opacity: legend.titleStyle.opacity
10982
+ };
10812
10983
  let textOptions;
10813
10984
  const spacing = 10;
10814
10985
  const trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
@@ -10827,6 +10998,7 @@ class Legend {
10827
10998
  map.svgObject.appendChild(this.legendGroup);
10828
10999
  if (legendTitle) {
10829
11000
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
11001
+ textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
10830
11002
  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
11003
  renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
10832
11004
  }
@@ -10932,20 +11104,24 @@ class Legend {
10932
11104
  }
10933
11105
  else {
10934
11106
  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 });
11107
+ 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
11108
  this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
10937
11109
  }
10938
11110
  }
10939
11111
  });
10940
11112
  });
10941
11113
  }
11114
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10942
11115
  getMarkerLegendData(layerIndex, text, legendFill) {
11116
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10943
11117
  const legendData = [];
10944
11118
  this.maps.layers[layerIndex].markerSettings.map((markerSettings, markerIndex) => {
11119
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10945
11120
  const markerData = markerSettings.dataSource;
11121
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
10946
11122
  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]) {
11123
+ const marker$$1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
11124
+ if ((text === data[marker$$1.legendText] || text === '') && legendFill === data[marker$$1.colorValuePath]) {
10949
11125
  legendData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
10950
11126
  shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
10951
11127
  }
@@ -11294,7 +11470,7 @@ class Legend {
11294
11470
  shape = this.legendCollection[legendIndex]['data'][i];
11295
11471
  mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11296
11472
  '_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);
11473
+ '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11298
11474
  if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
11299
11475
  mapElement = mapElement.children[0];
11300
11476
  }
@@ -11303,7 +11479,7 @@ class Legend {
11303
11479
  mapElement.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
11304
11480
  mapElement.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
11305
11481
  mapElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11306
- mapElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11482
+ mapElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11307
11483
  mapElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11308
11484
  this.maps.layers[k].shapeSettings.opacity :
11309
11485
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11318,6 +11494,9 @@ class Legend {
11318
11494
  if (targetEle !== null) {
11319
11495
  legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
11320
11496
  legendShapeId.setAttribute('fill', '#E5E5E5');
11497
+ if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
11498
+ legendShapeId.setAttribute('stroke', '#E5E5E5');
11499
+ }
11321
11500
  legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
11322
11501
  legendTextId.setAttribute('fill', '#E5E5E5');
11323
11502
  }
@@ -11332,6 +11511,9 @@ class Legend {
11332
11511
  if (targetEle !== null) {
11333
11512
  legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
11334
11513
  legendShapeId.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
11514
+ if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
11515
+ legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
11516
+ }
11335
11517
  legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
11336
11518
  legendTextId.setAttribute('fill', '#757575');
11337
11519
  }
@@ -11366,7 +11548,7 @@ class Legend {
11366
11548
  layerElement.setAttribute('fill', this.maps.layers[j].shapeSettings.fill);
11367
11549
  layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
11368
11550
  layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
11369
- layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
11551
+ layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
11370
11552
  layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
11371
11553
  this.maps.layers[j].shapeSettings.opacity :
11372
11554
  this.maps.layers[j].shapeSettings.border.opacity).toString());
@@ -11396,7 +11578,7 @@ class Legend {
11396
11578
  layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
11397
11579
  this.maps.layers[j].shapeSettings.opacity :
11398
11580
  this.maps.layers[j].shapeSettings.border.opacity).toString());
11399
- layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
11581
+ layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
11400
11582
  layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
11401
11583
  layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
11402
11584
  if (targetEle !== null) {
@@ -11416,7 +11598,7 @@ class Legend {
11416
11598
  targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendSettings.visible &&
11417
11599
  targetEle.id.indexOf('_Text') === -1) {
11418
11600
  let LegendInteractive;
11419
- const legendIndex = parseFloat(targetEle.id.substr((this.maps.element.id + '_Legend_Index_').length));
11601
+ const legendIndex = parseFloat(targetEle.id.split(this.maps.element.id + '_Legend_Index_')[1]);
11420
11602
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11421
11603
  let mapdata;
11422
11604
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -11437,7 +11619,7 @@ class Legend {
11437
11619
  if (this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
11438
11620
  LegendInteractive.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
11439
11621
  LegendInteractive.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
11440
- LegendInteractive.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11622
+ LegendInteractive.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11441
11623
  LegendInteractive.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11442
11624
  this.maps.layers[k].shapeSettings.opacity :
11443
11625
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11501,7 +11683,7 @@ class Legend {
11501
11683
  mapLegendElement.setAttribute('fill', this.maps.layers[0].shapeSettings.fill);
11502
11684
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
11503
11685
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11504
- mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11686
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11505
11687
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11506
11688
  this.maps.layers[k].shapeSettings.opacity :
11507
11689
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11528,7 +11710,7 @@ class Legend {
11528
11710
  this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
11529
11711
  }
11530
11712
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11531
- mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11713
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11532
11714
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
11533
11715
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11534
11716
  this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11802,14 +11984,14 @@ class Highlight {
11802
11984
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
11803
11985
  }
11804
11986
  const border = {
11805
- color: this.highlightSettings.border.color,
11806
- width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
11987
+ color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
11988
+ width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
11807
11989
  opacity: this.highlightSettings.border.opacity
11808
11990
  };
11809
- let eventArgs = {
11991
+ const eventArgs = {
11810
11992
  opacity: this.highlightSettings.opacity,
11811
- fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
11812
- ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
11993
+ fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
11994
+ ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
11813
11995
  border: border,
11814
11996
  name: itemHighlight,
11815
11997
  target: targetEle.id,
@@ -11990,15 +12172,16 @@ class Selection {
11990
12172
  */
11991
12173
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11992
12174
  selectMap(targetElement, shapeData, data) {
12175
+ const layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
11993
12176
  const selectionsettings = this.selectionsettings;
11994
12177
  const border = {
11995
- color: this.selectionsettings.border.color,
11996
- width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
12178
+ color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
12179
+ 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
12180
  opacity: this.selectionsettings.border.opacity
11998
12181
  };
11999
- let eventArgs = {
12182
+ const eventArgs = {
12000
12183
  opacity: this.selectionsettings.opacity,
12001
- fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
12184
+ fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
12002
12185
  border: border,
12003
12186
  name: itemSelection,
12004
12187
  target: targetElement.id,
@@ -12190,8 +12373,6 @@ class MapsTooltip {
12190
12373
  if (istooltipRender) {
12191
12374
  if (targetId.indexOf('_shapeIndex_') > -1) {
12192
12375
  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
12376
  const shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
12196
12377
  if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
12197
12378
  return;
@@ -12308,9 +12489,13 @@ class MapsTooltip {
12308
12489
  option.template = option.template[Object.keys(option.template)[0]];
12309
12490
  }
12310
12491
  templateData = this.setTooltipContent(option, templateData);
12492
+ const tooltipTextStyle = {
12493
+ color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
12494
+ fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
12495
+ };
12311
12496
  const tooltipOption = {
12312
12497
  location: location, text: tooltipContent, data: templateData,
12313
- textStyle: option.textStyle,
12498
+ textStyle: tooltipTextStyle,
12314
12499
  template: option.template
12315
12500
  };
12316
12501
  tooltipArgs = {
@@ -12326,6 +12511,10 @@ class MapsTooltip {
12326
12511
  this.maps['isProtectedOnChange'] = true;
12327
12512
  tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
12328
12513
  || this.maps.themeStyle.tooltipFontColor;
12514
+ tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
12515
+ || this.maps.themeStyle.fontFamily;
12516
+ tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
12517
+ || this.maps.themeStyle.tooltipTextOpacity;
12329
12518
  if (tooltipArgs.cancel) {
12330
12519
  this.svgTooltip = new Tooltip({
12331
12520
  enable: true,
@@ -12604,8 +12793,10 @@ class Zoom {
12604
12793
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
12605
12794
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
12606
12795
  }
12796
+ this.markerLineAnimation(map);
12607
12797
  map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
12608
12798
  const element1 = document.getElementById(this.maps.element.id + '_tiles');
12799
+ const animationDuration = this.maps.layersCollection[0].animationDuration;
12609
12800
  setTimeout(() => {
12610
12801
  // if (type === 'ZoomOut') {
12611
12802
  // element1.removeChild(element1.children[element1.childElementCount - 1]);
@@ -12619,7 +12810,7 @@ class Zoom {
12619
12810
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
12620
12811
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
12621
12812
  }
12622
- }, 250);
12813
+ }, animationDuration);
12623
12814
  }
12624
12815
  this.maps.zoomNotApplied = false;
12625
12816
  }
@@ -12793,11 +12984,13 @@ class Zoom {
12793
12984
  */
12794
12985
  animateTransform(element, animate$$1, x, y, scale) {
12795
12986
  const duration = this.currentLayer.animationDuration;
12796
- if (!animate$$1 || duration === 0) {
12987
+ if (!animate$$1 || duration === 0 || this.maps.isTileMap) {
12797
12988
  element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
12798
12989
  return;
12799
12990
  }
12800
- zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
12991
+ if (!this.maps.isTileMap) {
12992
+ zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
12993
+ }
12801
12994
  }
12802
12995
  applyTransform(animate$$1) {
12803
12996
  let layerIndex;
@@ -12844,12 +13037,14 @@ class Zoom {
12844
13037
  this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
12845
13038
  }
12846
13039
  currentEle = layerElement.childNodes[j];
13040
+ let markerAnimation;
12847
13041
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
12848
13042
  for (let k = 0; k < currentEle.childElementCount; k++) {
12849
13043
  this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate$$1);
12850
13044
  const layerIndex = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
12851
13045
  const dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
12852
13046
  const markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
13047
+ markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
12853
13048
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12854
13049
  const markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
12855
13050
  for (let x = 0; x < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x++) {
@@ -12860,9 +13055,17 @@ class Zoom {
12860
13055
  this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
12861
13056
  }
12862
13057
  }
12863
- if (!this.maps.isTileMap && this.currentLayer.animationDuration > 0) {
12864
- markerStyle = 'visibility:hidden';
12865
- currentEle.setAttribute('style', markerStyle);
13058
+ if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
13059
+ if (this.maps.isTileMap) {
13060
+ const groupElement = document.querySelector('.GroupElement');
13061
+ if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
13062
+ groupElement.style.display = 'none';
13063
+ }
13064
+ }
13065
+ else {
13066
+ markerStyle = 'visibility:hidden';
13067
+ currentEle.setAttribute('style', markerStyle);
13068
+ }
12866
13069
  }
12867
13070
  }
12868
13071
  if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
@@ -12961,7 +13164,7 @@ class Zoom {
12961
13164
  this.maps.arrangeTemplate();
12962
13165
  }
12963
13166
  if (!isNullOrUndefined(this.currentLayer)) {
12964
- if (!animate$$1 || this.currentLayer.animationDuration === 0) {
13167
+ if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
12965
13168
  this.processTemplate(x, y, scale, this.maps);
12966
13169
  }
12967
13170
  }
@@ -13078,7 +13281,6 @@ class Zoom {
13078
13281
  */
13079
13282
  processTemplate(x, y, scale, maps) {
13080
13283
  for (let i = 0; i < this.templateCount; i++) {
13081
- this.currentLayer = maps.layersCollection[i];
13082
13284
  const factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
13083
13285
  const markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
13084
13286
  i + '_Markers_Template_Group');
@@ -13307,6 +13509,20 @@ class Zoom {
13307
13509
  }
13308
13510
  }
13309
13511
  }
13512
+ markerLineAnimation(map) {
13513
+ if (map.isTileMap) {
13514
+ for (let i = 0; i < map.layersCollection.length; i++) {
13515
+ const markerTemplateElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
13516
+ const lineElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_line_Group');
13517
+ if (!isNullOrUndefined(markerTemplateElement)) {
13518
+ markerTemplateElement.style.visibility = 'hidden';
13519
+ }
13520
+ if (!isNullOrUndefined(lineElement)) {
13521
+ lineElement.style.visibility = 'hidden';
13522
+ }
13523
+ }
13524
+ }
13525
+ }
13310
13526
  panning(direction, xDifference, yDifference, mouseLocation) {
13311
13527
  const map = this.maps;
13312
13528
  let panArgs;
@@ -13438,41 +13654,45 @@ class Zoom {
13438
13654
  let tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
13439
13655
  map.scale = Math.pow(2, tileZoomFactor - 1);
13440
13656
  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);
13657
+ if (map.previousScale !== map.scale || map.isReset) {
13658
+ map.zoomSettings.zoomFactor = zoomFactor;
13659
+ const position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
13660
+ this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
13661
+ if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
13662
+ map.initialCheck = true;
13663
+ map.zoomPersistence = false;
13664
+ map.tileTranslatePoint.x = map.initialTileTranslate.x;
13665
+ map.tileTranslatePoint.y = map.initialTileTranslate.y;
13666
+ tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
13667
+ }
13668
+ this.triggerZoomEvent(prevTilePoint, prevLevel, type);
13669
+ map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
13670
+ map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
13464
13671
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13465
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13672
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
13466
13673
  }
13467
- }, 250);
13674
+ if (document.querySelector('.GroupElement')) {
13675
+ document.querySelector('.GroupElement').style.display = 'none';
13676
+ }
13677
+ this.markerLineAnimation(map);
13678
+ map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
13679
+ const element1 = document.getElementById(this.maps.element.id + '_tiles');
13680
+ const animationDuration = this.maps.layersCollection[0].animationDuration;
13681
+ setTimeout(() => {
13682
+ this.applyTransform(true);
13683
+ if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13684
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13685
+ }
13686
+ }, animationDuration);
13687
+ }
13688
+ this.maps.zoomNotApplied = false;
13468
13689
  }
13469
- this.maps.zoomNotApplied = false;
13470
13690
  }
13471
13691
  createZoomingToolbars() {
13472
13692
  const map = this.maps;
13473
13693
  this.toolBarGroup = map.renderer.createGroup({
13474
13694
  id: map.element.id + '_Zooming_KitCollection',
13475
- opacity: 0.3
13695
+ opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
13476
13696
  });
13477
13697
  const kitHeight = 16;
13478
13698
  const kitWidth = 16;
@@ -13730,8 +13950,9 @@ class Zoom {
13730
13950
  x = (size.width - toolBarSize.width) - padding;
13731
13951
  break;
13732
13952
  }
13733
- element.style.left = x + 'px';
13734
- element.style.top = y + 'px';
13953
+ let extraPosition = map.getExtraPosition();
13954
+ element.style.left = x + extraPosition.x + 'px';
13955
+ element.style.top = y + extraPosition.y + 'px';
13735
13956
  const color = this.maps.zoomSettings.highlightColor || this.maps.themeStyle.zoomSelectionColor;
13736
13957
  const css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
13737
13958
  '.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
@@ -13875,14 +14096,14 @@ class Zoom {
13875
14096
  if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
13876
14097
  if (!this.maps.zoomSettings.enablePanning) {
13877
14098
  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');
14099
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14100
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
13880
14101
  }
13881
14102
  }
13882
14103
  }
13883
14104
  }
13884
14105
  else {
13885
- getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '0.3');
14106
+ getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
13886
14107
  if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
13887
14108
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
13888
14109
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');