@syncfusion/ej2-maps 19.3.44 → 19.4.42

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/.eslintrc.json +1 -1
  2. package/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
  3. package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
  4. package/CHANGELOG.md +36 -5
  5. package/README.md +4 -4
  6. package/dist/ej2-maps.umd.min.js +2 -2
  7. package/dist/ej2-maps.umd.min.js.map +1 -1
  8. package/dist/es6/ej2-maps.es2015.js +655 -647
  9. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  10. package/dist/es6/ej2-maps.es5.js +652 -645
  11. package/dist/es6/ej2-maps.es5.js.map +1 -1
  12. package/dist/global/ej2-maps.min.js +2 -2
  13. package/dist/global/ej2-maps.min.js.map +1 -1
  14. package/dist/global/index.d.ts +1 -1
  15. package/package.json +12 -12
  16. package/src/maps/layers/bubble.d.ts +6 -0
  17. package/src/maps/layers/bubble.js +10 -25
  18. package/src/maps/layers/data-label.js +6 -17
  19. package/src/maps/layers/layer-panel.d.ts +2 -1
  20. package/src/maps/layers/layer-panel.js +86 -72
  21. package/src/maps/layers/legend.js +48 -19
  22. package/src/maps/layers/marker.js +2 -24
  23. package/src/maps/maps-model.d.ts +1 -28
  24. package/src/maps/maps.d.ts +5 -38
  25. package/src/maps/maps.js +80 -102
  26. package/src/maps/model/base-model.d.ts +7 -5
  27. package/src/maps/model/base.d.ts +6 -5
  28. package/src/maps/model/base.js +5 -2
  29. package/src/maps/model/export-pdf.js +1 -1
  30. package/src/maps/model/interface.d.ts +1 -3
  31. package/src/maps/model/theme.js +116 -6
  32. package/src/maps/user-interaction/annotation.js +3 -7
  33. package/src/maps/user-interaction/highlight.js +4 -17
  34. package/src/maps/user-interaction/selection.js +10 -22
  35. package/src/maps/user-interaction/tooltip.js +61 -125
  36. package/src/maps/user-interaction/zoom.d.ts +1 -0
  37. package/src/maps/user-interaction/zoom.js +92 -110
  38. package/src/maps/utils/enum.d.ts +8 -2
  39. package/src/maps/utils/helper.d.ts +5 -3
  40. package/src/maps/utils/helper.js +136 -104
@@ -1,4 +1,4 @@
1
- import { Ajax, Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, L10n, NotifyPropertyChanges, Property, compile, createElement, extend, isBlazor, isNullOrUndefined, merge, print, remove, resetBlazorTemplate, setValue, updateBlazorTemplate } from '@syncfusion/ej2-base';
1
+ import { Ajax, Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, L10n, NotifyPropertyChanges, Property, compile, createElement, extend, isNullOrUndefined, merge, print, remove, setValue } from '@syncfusion/ej2-base';
2
2
  import { SvgRenderer, Tooltip } from '@syncfusion/ej2-svg-base';
3
3
  import { DataManager, Query } from '@syncfusion/ej2-data';
4
4
  import { PdfBitmap, PdfDocument, PdfPageOrientation } from '@syncfusion/ej2-pdf-export';
@@ -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,
@@ -571,7 +573,7 @@ function renderTextElement(option, style, color, parent, isMinus = false) {
571
573
  'opacity': style.opacity,
572
574
  'dominant-baseline': option.baseLine
573
575
  };
574
- const text = typeof option.text === 'string' ? option.text : isMinus ? option.text[option.text.length - 1] : option.text[0];
576
+ const text = typeof option.text === 'string' || typeof option.text === 'number' ? option.text : isMinus ? option.text[option.text.length - 1] : option.text[0];
575
577
  let tspanElement;
576
578
  const renderer = new SvgRenderer('');
577
579
  let height;
@@ -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,10 +1695,11 @@ 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
1689
- function findMidPointOfPolygon(points, type) {
1702
+ function findMidPointOfPolygon(points, type, geometryType) {
1690
1703
  if (!points.length) {
1691
1704
  return null;
1692
1705
  }
@@ -1701,14 +1714,14 @@ function findMidPointOfPolygon(points, type) {
1701
1714
  let ySum = 0;
1702
1715
  for (let i = min; i <= max - 1; i++) {
1703
1716
  startX = points[i].x;
1704
- startY = type === 'Mercator' ? points[i].y : -(points[i].y);
1717
+ startY = type === 'Mercator' || geometryType === 'Normal' ? points[i].y : -(points[i].y);
1705
1718
  if (i === max - 1) {
1706
1719
  startX1 = points[0].x;
1707
- startY1 = type === 'Mercator' ? points[0].y : -(points[0].y);
1720
+ startY1 = type === 'Mercator' || geometryType === 'Normal' ? points[0].y : -(points[0].y);
1708
1721
  }
1709
1722
  else {
1710
1723
  startX1 = points[i + 1].x;
1711
- startY1 = type === 'Mercator' ? points[i + 1].y : -(points[i + 1].y);
1724
+ startY1 = type === 'Mercator' || geometryType === 'Normal' ? points[i + 1].y : -(points[i + 1].y);
1712
1725
  }
1713
1726
  sum = sum + Math.abs(((startX * startY1)) - (startX1 * startY));
1714
1727
  xSum = xSum + Math.abs(((startX + startX1) * (((startX * startY1) - (startX1 * startY)))));
@@ -1729,7 +1742,7 @@ function findMidPointOfPolygon(points, type) {
1729
1742
  let height = 0;
1730
1743
  for (let i = min; i <= max - 1; i++) {
1731
1744
  const point = points[i];
1732
- point.y = type === 'Mercator' ? point.y : -(point.y);
1745
+ point.y = type === 'Mercator' || geometryType === 'Normal' ? point.y : -(point.y);
1733
1746
  if (point.y > ySum) {
1734
1747
  if (point.x < xSum && xSum - point.x < xSum - bottomMinPoint.x) {
1735
1748
  bottomMinPoint = { x: point.x, y: point.y };
@@ -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 = {
@@ -3303,7 +3335,6 @@ var BootstrapTheme;
3303
3335
  * @param {MapsTheme} theme Specifies the theme of the maps
3304
3336
  * @returns {string[]} Returns the shape color
3305
3337
  */
3306
- // eslint-disable-next-line @typescript-eslint/no-namespace
3307
3338
  function getShapeColor(theme) {
3308
3339
  let themePalette;
3309
3340
  switch (theme.toLowerCase()) {
@@ -3315,6 +3346,22 @@ function getShapeColor(theme) {
3315
3346
  themePalette = ['#10B981', '#22D3EE', '#2DD4BF', '#4ADE80', '#8B5CF6',
3316
3347
  '#E879F9', '#F472B6', '#F87171', '#F97316', '#FCD34D'];
3317
3348
  break;
3349
+ case 'bootstrap5':
3350
+ themePalette = ['#262E0B', '#668E1F', '#AF6E10', '#862C0B', '#1F2D50',
3351
+ '#64680B', '#311508', '#4C4C81', '#0C7DA0', '#862C0B'];
3352
+ break;
3353
+ case 'bootstrap5dark':
3354
+ themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
3355
+ '#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
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;
3318
3365
  default:
3319
3366
  themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
3320
3367
  '#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
@@ -3460,6 +3507,7 @@ function getThemeStyle(theme) {
3460
3507
  tooltipFillColor: '#363F4C',
3461
3508
  zoomFillColor: '#FFFFFF',
3462
3509
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3510
+ fontFamily: 'Roboto, Noto, Sans-serif',
3463
3511
  titleFontWeight: 'Medium',
3464
3512
  zoomSelectionColor: '#e61576',
3465
3513
  shapeFill: '#A6A6A6'
@@ -3477,6 +3525,7 @@ function getThemeStyle(theme) {
3477
3525
  tooltipFontColor: '#000000',
3478
3526
  tooltipFillColor: '#ffffff',
3479
3527
  zoomFillColor: '#FFFFFF',
3528
+ fontFamily: 'Roboto, Noto, Sans-serif',
3480
3529
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3481
3530
  titleFontWeight: 'Medium',
3482
3531
  zoomSelectionColor: '#e61576',
@@ -3552,6 +3601,98 @@ function getThemeStyle(theme) {
3552
3601
  shapeFill: '#374151'
3553
3602
  };
3554
3603
  break;
3604
+ case 'bootstrap5':
3605
+ style = {
3606
+ backgroundColor: 'rgba(255,255,255, 0.0)',
3607
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
3608
+ titleFontColor: '#212529',
3609
+ subTitleFontColor: '#212529',
3610
+ legendTitleFontColor: '#212529',
3611
+ legendTextColor: '#212529',
3612
+ dataLabelFontColor: '#212529',
3613
+ tooltipFontColor: '#F9FAFB',
3614
+ tooltipFillColor: '#212529',
3615
+ zoomFillColor: '#6C757D',
3616
+ fontFamily: 'Helvetica Neue',
3617
+ titleFontSize: '14px',
3618
+ legendFontSize: '12px',
3619
+ tooltipFillOpacity: 1,
3620
+ tooltipTextOpacity: 1,
3621
+ labelFontFamily: 'Helvetica Neue',
3622
+ titleFontWeight: 'normal',
3623
+ zoomSelectionColor: '#343A40',
3624
+ shapeFill: '#E9ECEF'
3625
+ };
3626
+ break;
3627
+ case 'bootstrap5dark':
3628
+ style = {
3629
+ backgroundColor: 'rgba(255,255,255, 0.0)',
3630
+ areaBackgroundColor: 'rgba(255,255,255, 0.0)',
3631
+ titleFontColor: '#FFFFFF',
3632
+ subTitleFontColor: '#FFFFFF',
3633
+ legendTitleFontColor: '#FFFFFF',
3634
+ legendTextColor: '#FFFFFF',
3635
+ dataLabelFontColor: '#FFFFFF',
3636
+ tooltipFontColor: '#212529',
3637
+ tooltipFillColor: '#E9ECEF',
3638
+ zoomFillColor: '#B5BABE',
3639
+ fontFamily: 'Helvetica Neue',
3640
+ titleFontSize: '14px',
3641
+ legendFontSize: '12px',
3642
+ tooltipFillOpacity: 1,
3643
+ tooltipTextOpacity: 1,
3644
+ labelFontFamily: 'Helvetica Neue',
3645
+ titleFontWeight: 'normal',
3646
+ zoomSelectionColor: '#DEE2E6',
3647
+ shapeFill: '#495057'
3648
+ };
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;
3555
3696
  default:
3556
3697
  style = {
3557
3698
  backgroundColor: '#FFFFFF',
@@ -3565,6 +3706,7 @@ function getThemeStyle(theme) {
3565
3706
  tooltipFillColor: '#000000',
3566
3707
  zoomFillColor: '#737373',
3567
3708
  labelFontFamily: 'Roboto, Noto, Sans-serif',
3709
+ fontFamily: 'Roboto, Noto, Sans-serif',
3568
3710
  titleFontWeight: 'Medium',
3569
3711
  zoomSelectionColor: '#e61576',
3570
3712
  shapeFill: '#A6A6A6'
@@ -4080,6 +4222,9 @@ __decorate$1([
4080
4222
  */
4081
4223
  class LegendSettings extends ChildProperty {
4082
4224
  }
4225
+ __decorate$1([
4226
+ Property(false)
4227
+ ], LegendSettings.prototype, "useMarkerShape", void 0);
4083
4228
  __decorate$1([
4084
4229
  Property(false)
4085
4230
  ], LegendSettings.prototype, "toggleVisibility", void 0);
@@ -4132,7 +4277,7 @@ __decorate$1([
4132
4277
  Complex({}, CommonTitleSettings)
4133
4278
  ], LegendSettings.prototype, "title", void 0);
4134
4279
  __decorate$1([
4135
- Complex({}, Font)
4280
+ Complex(Theme.legendTitleFont, Font)
4136
4281
  ], LegendSettings.prototype, "titleStyle", void 0);
4137
4282
  __decorate$1([
4138
4283
  Property('Bottom')
@@ -4220,7 +4365,7 @@ __decorate$1([
4220
4365
  Property(5)
4221
4366
  ], ShapeSettings.prototype, "circleRadius", void 0);
4222
4367
  __decorate$1([
4223
- Complex({ width: 0, color: '#000000' }, Border)
4368
+ Complex({ width: null, color: '#000000' }, Border)
4224
4369
  ], ShapeSettings.prototype, "border", void 0);
4225
4370
  __decorate$1([
4226
4371
  Property('')
@@ -4445,15 +4590,6 @@ __decorate$1([
4445
4590
  Complex({ color: 'transparent', width: 1 }, Border)
4446
4591
  ], MapsAreaSettings.prototype, "border", void 0);
4447
4592
 
4448
- var __rest = (undefined && undefined.__rest) || function (s, e) {
4449
- var t = {};
4450
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4451
- t[p] = s[p];
4452
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
4453
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
4454
- t[p[i]] = s[p[i]];
4455
- return t;
4456
- };
4457
4593
  /**
4458
4594
  * Marker class
4459
4595
  */
@@ -4498,15 +4634,9 @@ class Marker {
4498
4634
  border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
4499
4635
  shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
4500
4636
  };
4501
- eventArgs = markerColorChoose(eventArgs, data);
4502
- eventArgs = markerShapeChoose(eventArgs, data);
4503
4637
  this.maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
4504
- if (markerSettings.colorValuePath !== eventArgs.colorValuePath) {
4505
- eventArgs = markerColorChoose(eventArgs, data);
4506
- }
4507
- if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
4508
- eventArgs = markerShapeChoose(eventArgs, data);
4509
- }
4638
+ eventArgs = markerColorChoose(eventArgs, data);
4639
+ eventArgs = markerShapeChoose(eventArgs, data);
4510
4640
  const lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
4511
4641
  Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
4512
4642
  parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : 0;
@@ -4726,17 +4856,13 @@ class Marker {
4726
4856
  if (isNullOrUndefined(options)) {
4727
4857
  return;
4728
4858
  }
4729
- let eventArgs = {
4859
+ const eventArgs = {
4730
4860
  cancel: false, name: markerClick, data: options.data, maps: this.maps,
4731
4861
  marker: options.marker, target: target, x: e.clientX, y: e.clientY,
4732
4862
  latitude: options.data['latitude'] || options.data['Latitude'],
4733
4863
  longitude: options.data['longitude'] || options.data['Longitude'],
4734
4864
  value: options.data['name']
4735
4865
  };
4736
- if (this.maps.isBlazor) {
4737
- const { maps, marker: marker$$1 } = eventArgs, blazorEventArgs = __rest(eventArgs, ["maps", "marker"]);
4738
- eventArgs = blazorEventArgs;
4739
- }
4740
4866
  this.maps.trigger(markerClick, eventArgs);
4741
4867
  }
4742
4868
  /**
@@ -4815,9 +4941,6 @@ class Marker {
4815
4941
  collection = [];
4816
4942
  for (const i of indexes) {
4817
4943
  collection.push({ data: marker$$1.dataSource[i], index: i });
4818
- if (this.maps.isBlazor) {
4819
- marker$$1.dataSource[i]['text'] = '';
4820
- }
4821
4944
  markCollection.push(marker$$1.dataSource[i]);
4822
4945
  }
4823
4946
  isClusterSame = false;
@@ -5332,15 +5455,6 @@ class ColorMapping {
5332
5455
  }
5333
5456
  }
5334
5457
 
5335
- var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
5336
- var t = {};
5337
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5338
- t[p] = s[p];
5339
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
5340
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
5341
- t[p[i]] = s[p[i]];
5342
- return t;
5343
- };
5344
5458
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
5345
5459
  /* eslint-disable jsdoc/require-param */
5346
5460
  /* eslint-disable no-case-declarations */
@@ -5510,7 +5624,7 @@ class LayerPanel {
5510
5624
  if (this.mapObject.zoomSettings.resetToInitial && this.mapObject.initialCheck && !isNullOrUndefined(panel.mapObject.height)
5511
5625
  && this.mapObject.availableSize.height > 512) {
5512
5626
  this.mapObject.applyZoomReset = true;
5513
- this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512) + 1;
5627
+ this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512);
5514
5628
  const padding = this.mapObject.layers[this.mapObject.baseLayerIndex].layerType !== 'GoogleStaticMap' ?
5515
5629
  20 : 0;
5516
5630
  const totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
@@ -5551,14 +5665,10 @@ class LayerPanel {
5551
5665
  }
5552
5666
  }
5553
5667
  }
5554
- let eventArgs = {
5668
+ const eventArgs = {
5555
5669
  cancel: false, name: layerRendering, index: layerIndex,
5556
5670
  layer: layer, maps: this.mapObject, visible: layer.visible
5557
5671
  };
5558
- if (this.mapObject.isBlazor) {
5559
- const { maps, layer } = eventArgs, blazorEventArgs = __rest$1(eventArgs, ["maps", "layer"]);
5560
- eventArgs = blazorEventArgs;
5561
- }
5562
5672
  this.mapObject.trigger('layerRendering', eventArgs, (observedArgs) => {
5563
5673
  if (!eventArgs.cancel && eventArgs.visible) {
5564
5674
  if (layer.layerType !== 'Geometry') {
@@ -5593,13 +5703,11 @@ class LayerPanel {
5593
5703
  bing.maxZoom = maxZoom;
5594
5704
  }
5595
5705
  proxy.mapObject['bingMap'] = bing;
5596
- if (this.mapObject.isBlazor) {
5597
- if (!isNullOrUndefined(markerGroupElement)) {
5598
- removeElement(this.mapObject.element.id + '_Markers_Group');
5599
- }
5600
- }
5601
5706
  proxy.renderTileLayer(proxy, layer, layerIndex, bing);
5602
5707
  this.mapObject.arrangeTemplate();
5708
+ if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
5709
+ this.mapObject.zoomModule.applyTransform(true);
5710
+ }
5603
5711
  };
5604
5712
  ajax.send();
5605
5713
  }
@@ -5677,9 +5785,7 @@ class LayerPanel {
5677
5785
  const data = geometryData['geometry'];
5678
5786
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5679
5787
  const properties = geometryData['properties'];
5680
- if (type !== 'LineString') {
5681
- this.generatePoints(type, coords, data, properties);
5682
- }
5788
+ this.generatePoints(type, coords, data, properties);
5683
5789
  }
5684
5790
  });
5685
5791
  this.currentLayer.rectBounds = this.rectBounds;
@@ -5707,11 +5813,9 @@ class LayerPanel {
5707
5813
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5708
5814
  const currentShapeData = this.currentLayer.layerData[i];
5709
5815
  let pathOptions;
5710
- let polyLineOptions;
5711
5816
  let circleOptions;
5712
5817
  let groupElement;
5713
5818
  let path = '';
5714
- let points = '';
5715
5819
  let fill = (shapeSettings.autofill) ? colors[i % colors.length] :
5716
5820
  (shapeSettings.fill || this.mapObject.themeStyle.shapeFill);
5717
5821
  if (shapeSettings.colorValuePath !== null && !isNullOrUndefined(currentShapeData['property'])) {
@@ -5754,17 +5858,13 @@ class LayerPanel {
5754
5858
  }
5755
5859
  const opacity = (Object.prototype.toString.call(getShapeColor$$1) === '[object Object]'
5756
5860
  && !isNullOrUndefined(getShapeColor$$1['opacity'])) ? getShapeColor$$1['opacity'] : shapeSettings.opacity;
5757
- let eventArgs = {
5861
+ const eventArgs = {
5758
5862
  cancel: false, name: shapeRendering, index: i,
5759
5863
  data: this.currentLayer.dataSource ? this.currentLayer.dataSource[k] : null,
5760
5864
  maps: this.mapObject,
5761
5865
  shape: shapeSettings, fill: fill,
5762
5866
  border: { width: borderValue.width, color: borderValue.color, opacity: borderValue.opacity }
5763
5867
  };
5764
- if (this.mapObject.isBlazor) {
5765
- const { maps } = eventArgs, blazorEventArgs = __rest$1(eventArgs, ["maps"]);
5766
- eventArgs = blazorEventArgs;
5767
- }
5768
5868
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5769
5869
  const shapeRenderingSuccess = (eventArgs) => {
5770
5870
  let drawingType = !isNullOrUndefined(currentShapeData['_isMultiPolygon'])
@@ -5779,7 +5879,7 @@ class LayerPanel {
5779
5879
  if (isNullOrUndefined(shapeSettings.borderColorValuePath)) {
5780
5880
  this.mapObject.layers[layerIndex].shapeSettings.border.color = eventArgs.border.color;
5781
5881
  }
5782
- else if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
5882
+ if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
5783
5883
  this.mapObject.layers[layerIndex].shapeSettings.border.width = eventArgs.border.width;
5784
5884
  }
5785
5885
  }
@@ -5833,17 +5933,21 @@ class LayerPanel {
5833
5933
  }
5834
5934
  break;
5835
5935
  case 'LineString':
5936
+ path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
5836
5937
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5837
5938
  currentShapeData.map((lineData) => {
5838
- points += lineData['point']['x'] + ' , ' + lineData['point']['y'] + ' ';
5939
+ path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
5839
5940
  });
5840
- polyLineOptions = new PolylineOption(shapeID, points, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray);
5841
- 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
+ }
5842
5945
  break;
5843
5946
  case 'Point':
5844
5947
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5845
5948
  const pointData = currentShapeData['point'];
5846
- 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);
5847
5951
  pathEle = this.mapObject.renderer.drawCircle(circleOptions);
5848
5952
  break;
5849
5953
  case 'Path':
@@ -5865,6 +5969,9 @@ class LayerPanel {
5865
5969
  pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
5866
5970
  (currentShapeData['property'][properties]) : ''));
5867
5971
  pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + i + 2).toString());
5972
+ if (drawingType === 'LineString') {
5973
+ pathEle.setAttribute('style', 'outline:none');
5974
+ }
5868
5975
  maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
5869
5976
  if (this.mapObject.toggledShapeElementId) {
5870
5977
  for (let j = 0; j < this.mapObject.toggledShapeElementId.length; j++) {
@@ -6073,11 +6180,14 @@ class LayerPanel {
6073
6180
  this.currentLayer.layerData.push(multiPolygonDatas);
6074
6181
  break;
6075
6182
  case 'linestring':
6183
+ const extraSpace = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
6184
+ this.currentLayer.shapeSettings.border.width : 1;
6076
6185
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6077
6186
  coordinates.map((points, index) => {
6078
6187
  latitude = points[1];
6079
6188
  longitude = points[0];
6080
6189
  const point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6190
+ this.calculateBox(point, extraSpace);
6081
6191
  newData.push({
6082
6192
  point: point, lat: latitude, lng: longitude
6083
6193
  });
@@ -6088,6 +6198,8 @@ class LayerPanel {
6088
6198
  break;
6089
6199
  case 'point': {
6090
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);
6091
6203
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6092
6204
  coordinates.map((points, index) => {
6093
6205
  if (Object.prototype.toString.call(points) === '[object Array]') {
@@ -6104,6 +6216,7 @@ class LayerPanel {
6104
6216
  latitude = coordinates[1];
6105
6217
  longitude = coordinates[0];
6106
6218
  const point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
6219
+ this.calculateBox(point, extraSpace);
6107
6220
  this.currentLayer.layerData.push({
6108
6221
  point: point, type: type, lat: latitude, lng: longitude, property: properties
6109
6222
  });
@@ -6117,6 +6230,17 @@ class LayerPanel {
6117
6230
  break;
6118
6231
  }
6119
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
+ }
6120
6244
  calculateFactor(layer) {
6121
6245
  let horFactor;
6122
6246
  let verFactor = 1;
@@ -6224,6 +6348,15 @@ class LayerPanel {
6224
6348
  this.calculateRectBox(point[0]);
6225
6349
  });
6226
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;
6227
6360
  }
6228
6361
  }
6229
6362
  });
@@ -6259,19 +6392,32 @@ class LayerPanel {
6259
6392
  return newData;
6260
6393
  }
6261
6394
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6262
- calculateRectBox(coordinates) {
6263
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6264
- Array.prototype.forEach.call(coordinates, (currentCoords) => {
6265
- if (isNullOrUndefined(this.mapObject.baseMapBounds)) {
6266
- 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] });
6267
6413
  }
6268
6414
  else {
6269
- this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
6270
- this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
6271
- this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
6272
- 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]);
6273
6419
  }
6274
- });
6420
+ }
6275
6421
  }
6276
6422
  generateTiles(zoomLevel, tileTranslatePoint, zoomType, bing, position) {
6277
6423
  const userLang = this.mapObject.locale;
@@ -6358,15 +6504,17 @@ class LayerPanel {
6358
6504
  }
6359
6505
  }
6360
6506
  }
6361
- 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
+ }
6362
6510
  }
6363
6511
  arrangeTiles(type, x, y) {
6364
6512
  const element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6365
6513
  const element1 = document.getElementById(this.mapObject.element.id + '_tiles');
6366
6514
  let timeOut;
6367
- if (!isNullOrUndefined(type) && type !== 'Pan' && type !== 'Reset' && type.indexOf('ZoomOut') === -1) {
6515
+ if (!isNullOrUndefined(type) && type !== 'Pan') {
6368
6516
  this.tileAnimation(type, x, y);
6369
- timeOut = 250;
6517
+ timeOut = this.mapObject.layersCollection[0].animationDuration;
6370
6518
  }
6371
6519
  else {
6372
6520
  timeOut = 0;
@@ -6381,7 +6529,6 @@ class LayerPanel {
6381
6529
  }
6382
6530
  if (element1) {
6383
6531
  element1.style.zIndex = '0';
6384
- element1.style.visibility = 'hidden';
6385
6532
  }
6386
6533
  let animateElement;
6387
6534
  if (!document.getElementById(this.mapObject.element.id + '_animated_tiles') && element) {
@@ -6439,35 +6586,23 @@ class LayerPanel {
6439
6586
  * @returns {void}
6440
6587
  */
6441
6588
  tileAnimation(zoomType, translateX, translateY) {
6442
- const element = document.getElementById(this.mapObject.element.id + '_tile_parent');
6443
- let element1 = document.getElementById('animated_tiles');
6444
- 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');
6445
6592
  let scaleValue = '2';
6446
- if (zoomType.indexOf('ZoomOut') === 0) {
6447
- ele.style.zIndex = '1';
6448
- element.style.zIndex = '0';
6449
- // element1 = ele.children[ele.childElementCount - 1] as HTMLElement;
6450
- while (ele.childElementCount >= 1) {
6451
- ele.removeChild(ele.children[0]);
6452
- }
6453
- translateX = 0;
6454
- translateY = 128 - 23;
6455
- scaleValue = '0.5';
6456
- }
6457
- else if (zoomType === 'Reset') {
6458
- ele.style.zIndex = '1';
6459
- element.style.zIndex = '0';
6460
- while (!(ele.childElementCount === 1) && !(ele.childElementCount === 0)) {
6461
- 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]);
6462
6598
  }
6463
- element1 = ele.children[0];
6464
6599
  translateX = 0;
6465
- translateY = 0;
6466
- 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';
6467
6602
  }
6468
- if (!isNullOrUndefined(element1)) {
6469
- element1.style.transition = '250ms';
6470
- 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 + ')';
6471
6606
  }
6472
6607
  }
6473
6608
  /**
@@ -6607,9 +6742,6 @@ class Annotations {
6607
6742
  });
6608
6743
  if (annotationGroup.childElementCount > 0 && !(isNullOrUndefined(getElementByID(secondaryID)))) {
6609
6744
  getElementByID(secondaryID).appendChild(annotationGroup);
6610
- for (let i = 0; i < this.map.annotations.length; i++) {
6611
- updateBlazorTemplate(this.map.element.id + '_ContentTemplate_' + i, 'ContentTemplate', this.map.annotations[i]);
6612
- }
6613
6745
  }
6614
6746
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6615
6747
  this.map.renderReactTemplates();
@@ -6638,10 +6770,9 @@ class Annotations {
6638
6770
  if (argsData.cancel) {
6639
6771
  return;
6640
6772
  }
6641
- const blazor = 'Blazor';
6642
6773
  templateFn = getTemplateFunction(argsData.content);
6643
- if (templateFn && (!window[blazor] ? templateFn(this.map, this.map, argsData.content, this.map.element.id + '_ContentTemplate_' + annotationIndex).length : {})) {
6644
- templateElement = Array.prototype.slice.call(templateFn(!window[blazor] ? this.map : {}, this.map, argsData.content, this.map.element.id + '_ContentTemplate_' + annotationIndex));
6774
+ if (templateFn && templateFn(this.map, this.map, argsData.content, this.map.element.id + '_ContentTemplate_' + annotationIndex).length) {
6775
+ templateElement = Array.prototype.slice.call(templateFn(this.map, this.map, argsData.content, this.map.element.id + '_ContentTemplate_' + annotationIndex));
6645
6776
  const length = templateElement.length;
6646
6777
  for (let i = 0; i < length; i++) {
6647
6778
  childElement.appendChild(templateElement[i]);
@@ -6884,20 +7015,14 @@ let Maps = class Maps extends Component {
6884
7015
  */
6885
7016
  preRender() {
6886
7017
  this.isDevice = Browser.isDevice;
6887
- this.isBlazor = isBlazor();
6888
7018
  this.initPrivateVariable();
6889
7019
  this.allowServerDataBinding = false;
6890
7020
  this.unWireEVents();
6891
7021
  this.wireEVents();
6892
7022
  this.setCulture();
6893
7023
  }
6894
- /**
6895
- * To Initialize the control rendering.
6896
- *
6897
- * @returns {void}
6898
- */
6899
- render() {
6900
- this.trigger(load, this.isBlazor ? {} : { maps: this });
7024
+ renderElements() {
7025
+ this.trigger(load, { maps: this });
6901
7026
  this.createSVG();
6902
7027
  this.findBaseAndSubLayers();
6903
7028
  this.createSecondaryElement();
@@ -6909,6 +7034,14 @@ let Maps = class Maps extends Component {
6909
7034
  this.processRequestJsonData();
6910
7035
  this.renderComplete();
6911
7036
  }
7037
+ /**
7038
+ * To Initialize the control rendering.
7039
+ *
7040
+ * @returns {void}
7041
+ */
7042
+ render() {
7043
+ this.renderElements();
7044
+ }
6912
7045
  processRequestJsonData() {
6913
7046
  const length = this.layersCollection.length - 1;
6914
7047
  this.serverProcess = { request: 0, response: 0 };
@@ -6918,7 +7051,7 @@ let Maps = class Maps extends Component {
6918
7051
  if (layer.shapeData instanceof DataManager) {
6919
7052
  this.serverProcess['request']++;
6920
7053
  dataModule = layer.shapeData;
6921
- queryModule = layer.query instanceof Query ? layer.query : this.isBlazor ? (new Query().requiresCount()) : new Query();
7054
+ queryModule = layer.query instanceof Query ? layer.query : new Query();
6922
7055
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6923
7056
  const dataManager = dataModule.executeQuery(queryModule);
6924
7057
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6934,7 +7067,7 @@ let Maps = class Maps extends Component {
6934
7067
  if (layer.dataSource instanceof DataManager) {
6935
7068
  this.serverProcess['request']++;
6936
7069
  dataModule = layer.dataSource;
6937
- queryModule = layer.query instanceof Query ? layer.query : this.isBlazor ? (new Query().requiresCount()) : new Query();
7070
+ queryModule = layer.query instanceof Query ? layer.query : new Query();
6938
7071
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6939
7072
  const dataManager = dataModule.executeQuery(queryModule);
6940
7073
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6948,8 +7081,7 @@ let Maps = class Maps extends Component {
6948
7081
  if (layer.markerSettings[i].dataSource instanceof DataManager) {
6949
7082
  this.serverProcess['request']++;
6950
7083
  dataModule = layer.markerSettings[i].dataSource;
6951
- queryModule = layer.markerSettings[i].query instanceof Query ? layer.markerSettings[i].query : this.isBlazor ?
6952
- (new Query().requiresCount()) : new Query();
7084
+ queryModule = layer.markerSettings[i].query instanceof Query ? layer.markerSettings[i].query : new Query();
6953
7085
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6954
7086
  const dataManager = dataModule.executeQuery(queryModule);
6955
7087
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6965,8 +7097,7 @@ let Maps = class Maps extends Component {
6965
7097
  if (layer.bubbleSettings[i].dataSource instanceof DataManager) {
6966
7098
  this.serverProcess['request']++;
6967
7099
  dataModule = layer.bubbleSettings[i].dataSource;
6968
- queryModule = layer.bubbleSettings[i].query instanceof Query ? layer.bubbleSettings[i].query : this.isBlazor ?
6969
- (new Query().requiresCount()) : new Query();
7100
+ queryModule = layer.bubbleSettings[i].query instanceof Query ? layer.bubbleSettings[i].query : new Query();
6970
7101
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6971
7102
  const dataManager = dataModule.executeQuery(queryModule);
6972
7103
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -7055,7 +7186,15 @@ let Maps = class Maps extends Component {
7055
7186
  }
7056
7187
  this.mapLayerPanel.measureLayerPanel();
7057
7188
  this.element.appendChild(this.svgObject);
7189
+ const position = this.getExtraPosition();
7058
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
+ }
7059
7198
  if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
7060
7199
  this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
7061
7200
  const checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
@@ -7124,7 +7263,6 @@ let Maps = class Maps extends Component {
7124
7263
  tileElement1.style.left = left + 'px';
7125
7264
  }
7126
7265
  this.arrangeTemplate();
7127
- const blazor = this.isBlazor ? this.blazorTemplates() : null;
7128
7266
  if (this.annotationsModule) {
7129
7267
  if (this.width !== '0px' && this.height !== '0px' && this.width !== '0%' && this.height !== '0%') {
7130
7268
  this.annotationsModule.renderAnnotationElements();
@@ -7137,7 +7275,7 @@ let Maps = class Maps extends Component {
7137
7275
  }
7138
7276
  }
7139
7277
  this.zoomingChange();
7140
- this.trigger(loaded, this.isBlazor ? { isResized: this.isResize } : { maps: this, isResized: this.isResize });
7278
+ this.trigger(loaded, { maps: this, isResized: this.isResize });
7141
7279
  this.isResize = false;
7142
7280
  }
7143
7281
  /**
@@ -7203,36 +7341,6 @@ let Maps = class Maps extends Component {
7203
7341
  }
7204
7342
  }
7205
7343
  }
7206
- /**
7207
- * To append blazor templates
7208
- *
7209
- * @returns {void}
7210
- * @private
7211
- */
7212
- blazorTemplates() {
7213
- for (let i = 0; i < this.layers.length; i++) {
7214
- const markerLength = this.layers[i].markerSettings.length - 1;
7215
- if (markerLength >= 0) {
7216
- if (this.layers[i].dataLabelSettings.visible || this.layers[i].markerSettings[markerLength].template) {
7217
- updateBlazorTemplate(this.element.id + '_LabelTemplate', 'LabelTemplate', this.layers[i].dataLabelSettings);
7218
- for (let j = 0; j < this.layers[i].markerSettings.length; j++) {
7219
- const markerRendered = () => {
7220
- for (let x = 0; x < this.layers.length; x++) {
7221
- const markerTemplateEle = document.getElementById(this.element.id + '_LayerIndex_' + x + '_Markers_Template_Group');
7222
- if (!isNullOrUndefined(markerTemplateEle)) {
7223
- for (let z = 0; z < markerTemplateEle.childElementCount; z++) {
7224
- const markerTemplate$$1 = markerTemplateEle.childNodes[z];
7225
- markerTemplate$$1['style']['transform'] = 'translate(-50%, -50%)';
7226
- }
7227
- }
7228
- }
7229
- };
7230
- updateBlazorTemplate(this.element.id + '_MarkerTemplate' + j, 'MarkerTemplate', this.layers[i].markerSettings[j], undefined, markerRendered);
7231
- }
7232
- }
7233
- }
7234
- }
7235
- }
7236
7344
  /**
7237
7345
  * Render the map area border
7238
7346
  *
@@ -7508,12 +7616,6 @@ let Maps = class Maps extends Component {
7508
7616
  * @returns {void}
7509
7617
  */
7510
7618
  createSVG() {
7511
- resetBlazorTemplate(this.element.id + '_LabelTemplate', 'LabelTemplate');
7512
- for (let i = 0; i < this.layers.length; i++) {
7513
- for (let j = 0; j < this.layers[i].markerSettings.length; j++) {
7514
- resetBlazorTemplate(this.element.id + '_MarkerTemplate' + j, 'MarkerTemplate');
7515
- }
7516
- }
7517
7619
  this.removeSvg();
7518
7620
  createSvg(this);
7519
7621
  }
@@ -7523,9 +7625,6 @@ let Maps = class Maps extends Component {
7523
7625
  * @returns {void}
7524
7626
  */
7525
7627
  removeSvg() {
7526
- for (let i = 0; i < this.annotations.length; i++) {
7527
- resetBlazorTemplate(this.element.id + '_ContentTemplate_' + i, 'ContentTemplate');
7528
- }
7529
7628
  removeElement(this.element.id + '_Secondary_Element');
7530
7629
  removeElement(this.element.id + '_tile_parent');
7531
7630
  removeElement(this.element.id + '_tiles');
@@ -7603,7 +7702,6 @@ let Maps = class Maps extends Component {
7603
7702
  * This method is used to perform the operations when a click operation is performed on maps.
7604
7703
  *
7605
7704
  * @param {PointerEvent} e - Specifies the pointer event on maps.
7606
- * @blazorProperty 'PerformClick'
7607
7705
  */
7608
7706
  mapsOnClick(e) {
7609
7707
  const targetEle = e.target;
@@ -7754,7 +7852,9 @@ let Maps = class Maps extends Component {
7754
7852
  }
7755
7853
  }
7756
7854
  this.notify(Browser.touchEndEvent, e);
7757
- e.preventDefault();
7855
+ if (e.cancelable) {
7856
+ e.preventDefault();
7857
+ }
7758
7858
  return false;
7759
7859
  }
7760
7860
  /**
@@ -7802,7 +7902,6 @@ let Maps = class Maps extends Component {
7802
7902
  * This method is used to perform operations when performing the double click operation on maps.
7803
7903
  *
7804
7904
  * @param {PointerEvent} e - Specifies the pointer event.
7805
- * @blazorProperty 'PerformDoubleClick'
7806
7905
  */
7807
7906
  mapsOnDoubleClick(e) {
7808
7907
  this.notify('dblclick', e);
@@ -7828,9 +7927,7 @@ let Maps = class Maps extends Component {
7828
7927
  }
7829
7928
  const doubleClickArgs = { cancel: false, name: doubleClick, x: e.clientX, y: e.clientY,
7830
7929
  target: targetId, latitude: latitude, longitude: longitude, isShapeSelected: null };
7831
- const doubleClickBlazorArgs = { cancel: false, name: doubleClick, x: e.clientX, y: e.clientY,
7832
- target: targetId, latitude: latitude, longitude: longitude, isShapeSelected: null };
7833
- this.trigger('doubleClick', this.isBlazor ? doubleClickBlazorArgs : doubleClickArgs);
7930
+ this.trigger('doubleClick', doubleClickArgs);
7834
7931
  }
7835
7932
  }
7836
7933
  /**
@@ -7920,26 +8017,28 @@ let Maps = class Maps extends Component {
7920
8017
  * @param e - Specifies the arguments of window resize event.
7921
8018
  */
7922
8019
  mapsOnResize(e) {
7923
- this.isResize = true;
8020
+ this.isResize = this.isReset = true;
7924
8021
  const args = {
8022
+ cancel: false,
7925
8023
  name: resize,
7926
8024
  previousSize: this.availableSize,
7927
- currentSize: new Size(0, 0),
7928
- maps: !this.isBlazor ? this : null
8025
+ currentSize: calculateSize(this),
8026
+ maps: this
7929
8027
  };
7930
- if (this.resizeTo) {
7931
- clearTimeout(this.resizeTo);
7932
- }
7933
- if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
7934
- this.resizeTo = setTimeout(() => {
7935
- this.unWireEVents();
7936
- this.createSVG();
7937
- this.refreshing = true;
7938
- this.wireEVents();
7939
- args.currentSize = this.availableSize;
7940
- this.trigger(resize, args);
7941
- this.render();
7942
- }, 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
+ }
7943
8042
  }
7944
8043
  return false;
7945
8044
  }
@@ -8197,7 +8296,7 @@ let Maps = class Maps extends Component {
8197
8296
  this.zoomNotApplied = true;
8198
8297
  this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this);
8199
8298
  const zoomArgs = {
8200
- cancel: false, name: 'zoom', type: zoomIn, maps: !this.isBlazor ? this : null,
8299
+ cancel: false, name: 'zoom', type: zoomIn, maps: this,
8201
8300
  tileTranslatePoint: {}, translatePoint: {},
8202
8301
  tileZoomLevel: this.isTileMap ? { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation } : {},
8203
8302
  scale: !this.isTileMap ? { previous: this.scale, current: this.scaleOfGivenLocation } :
@@ -8345,19 +8444,21 @@ let Maps = class Maps extends Component {
8345
8444
  render = true;
8346
8445
  break;
8347
8446
  case 'zoomSettings':
8348
- if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor) {
8349
- render = false;
8350
- }
8351
- else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
8352
- this.zoomSettings.zoomFactor = 1;
8353
- render = true;
8354
- }
8355
- else if (newProp.zoomSettings.enable !== oldProp.zoomSettings.enable) {
8356
- this.zoomSettings.zoomFactor = 1;
8357
- render = true;
8358
- }
8359
- else {
8360
- render = true;
8447
+ if (!isNullOrUndefined(oldProp.zoomSettings)) {
8448
+ if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor) {
8449
+ render = false;
8450
+ }
8451
+ else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
8452
+ this.zoomSettings.zoomFactor = 1;
8453
+ render = true;
8454
+ }
8455
+ else if (newProp.zoomSettings.enable !== oldProp.zoomSettings.enable) {
8456
+ this.zoomSettings.zoomFactor = 1;
8457
+ render = true;
8458
+ }
8459
+ else {
8460
+ render = true;
8461
+ }
8361
8462
  }
8362
8463
  break;
8363
8464
  case 'locale':
@@ -8370,12 +8471,7 @@ let Maps = class Maps extends Component {
8370
8471
  if (newProp.layers && isMarker) {
8371
8472
  removeElement(this.element.id + '_Markers_Group');
8372
8473
  if (this.isTileMap) {
8373
- if (this.isBlazor) {
8374
- this.render();
8375
- }
8376
- else {
8377
- this.mapLayerPanel.renderTileLayer(this.mapLayerPanel, this.layers['currentFactor'], (this.layers.length - 1));
8378
- }
8474
+ this.mapLayerPanel.renderTileLayer(this.mapLayerPanel, this.layers['currentFactor'], (this.layers.length - 1));
8379
8475
  }
8380
8476
  else {
8381
8477
  this.render();
@@ -8386,7 +8482,7 @@ let Maps = class Maps extends Component {
8386
8482
  }
8387
8483
  else {
8388
8484
  this.createSVG();
8389
- this.render();
8485
+ this.renderElements();
8390
8486
  }
8391
8487
  }
8392
8488
  }
@@ -8526,6 +8622,21 @@ let Maps = class Maps extends Component {
8526
8622
  });
8527
8623
  return isVisible;
8528
8624
  }
8625
+ /**
8626
+ * To find space between the secondary element and svg element.
8627
+ */
8628
+ getExtraPosition() {
8629
+ let top;
8630
+ let left;
8631
+ const svgElement = getElement(this.element.id + '_svg');
8632
+ if (!isNullOrUndefined(svgElement)) {
8633
+ const svgClientRect = svgElement.getClientRects()[0];
8634
+ const mapsClientRect = (getElement(this.element.id + '_Secondary_Element')).getClientRects()[0];
8635
+ top = svgClientRect.top - mapsClientRect.top;
8636
+ left = svgClientRect.left - mapsClientRect.left;
8637
+ }
8638
+ return new Point(left, top);
8639
+ }
8529
8640
  /**
8530
8641
  * To find marker visibility
8531
8642
  */
@@ -8874,15 +8985,6 @@ Maps = __decorate([
8874
8985
  NotifyPropertyChanges
8875
8986
  ], Maps);
8876
8987
 
8877
- var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
8878
- var t = {};
8879
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
8880
- t[p] = s[p];
8881
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
8882
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
8883
- t[p[i]] = s[p[i]];
8884
- return t;
8885
- };
8886
8988
  /**
8887
8989
  * Bubble module class
8888
8990
  */
@@ -8898,6 +9000,8 @@ class Bubble {
8898
9000
  // eslint-disable-next-line valid-jsdoc
8899
9001
  /**
8900
9002
  * To render bubble
9003
+ *
9004
+ * @private
8901
9005
  */
8902
9006
  renderBubble(
8903
9007
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -8942,7 +9046,7 @@ class Bubble {
8942
9046
  isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
8943
9047
  const shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
8944
9048
  ? shape[shapePath].toLowerCase() : shape[shapePath];
8945
- if (shapeDataLayerPathValue === shapePathValue) {
9049
+ if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
8946
9050
  if (layerData[i]['type'] === 'Point') {
8947
9051
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8948
9052
  shapePoints.push(this.getPoints(layerData[i], []));
@@ -8979,14 +9083,14 @@ class Bubble {
8979
9083
  width: bubbleSettings.border.width
8980
9084
  };
8981
9085
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8982
- const center = findMidPointOfPolygon(shapePoints[midIndex], projectionType);
9086
+ const center = findMidPointOfPolygon(shapePoints[midIndex], projectionType, layer.geometryType);
8983
9087
  if (bubbleSettings.visible) {
8984
9088
  if (!isNullOrUndefined(center)) {
8985
9089
  centerY = this.maps.projectionType === 'Mercator' ? center['y'] : (-center['y']);
8986
9090
  eventArgs = {
8987
9091
  cancel: false, name: bubbleRendering, border: bubbleBorder,
8988
9092
  cx: center['x'], cy: centerY, data: shapeData, fill: bubbleColor,
8989
- maps: this.maps.isBlazor ? null : this.maps, radius: radius
9093
+ maps: this.maps, radius: radius
8990
9094
  };
8991
9095
  }
8992
9096
  else {
@@ -8995,17 +9099,13 @@ class Bubble {
8995
9099
  eventArgs = {
8996
9100
  cancel: false, name: bubbleRendering, border: bubbleBorder,
8997
9101
  cx: shapePoints[shapePointsLength]['x'], cy: shapePoints[shapePointsLength]['y'],
8998
- data: shapeData, fill: bubbleColor, maps: this.maps.isBlazor ? null : this.maps,
9102
+ data: shapeData, fill: bubbleColor, maps: this.maps,
8999
9103
  radius: radius
9000
9104
  };
9001
9105
  }
9002
9106
  else {
9003
9107
  return;
9004
9108
  }
9005
- if (this.maps.isBlazor) {
9006
- const { maps } = eventArgs, blazorEventArgs = __rest$2(eventArgs, ["maps"]);
9007
- eventArgs = blazorEventArgs;
9008
- }
9009
9109
  }
9010
9110
  this.maps.trigger('bubbleRendering', eventArgs, (bubbleArgs) => {
9011
9111
  if (eventArgs.cancel) {
@@ -9077,6 +9177,8 @@ class Bubble {
9077
9177
  // eslint-disable-next-line valid-jsdoc
9078
9178
  /**
9079
9179
  * To check and trigger bubble click event
9180
+ *
9181
+ * @private
9080
9182
  */
9081
9183
  bubbleClick(e) {
9082
9184
  const target = e.target.id;
@@ -9088,14 +9190,10 @@ class Bubble {
9088
9190
  if (isNullOrUndefined(data)) {
9089
9191
  return;
9090
9192
  }
9091
- let eventArgs = {
9193
+ const eventArgs = {
9092
9194
  cancel: false, name: bubbleClick, data: data, maps: this.maps,
9093
9195
  target: target, x: e.clientX, y: e.clientY
9094
9196
  };
9095
- if (this.maps.isBlazor) {
9096
- const { maps } = eventArgs, blazorEventArgs = __rest$2(eventArgs, ["maps"]);
9097
- eventArgs = blazorEventArgs;
9098
- }
9099
9197
  this.maps.trigger(bubbleClick, eventArgs);
9100
9198
  }
9101
9199
  /**
@@ -9124,6 +9222,8 @@ class Bubble {
9124
9222
  // eslint-disable-next-line valid-jsdoc
9125
9223
  /**
9126
9224
  * To check and trigger bubble move event
9225
+ *
9226
+ * @private
9127
9227
  */
9128
9228
  bubbleMove(e) {
9129
9229
  const target = e.target.id;
@@ -9135,14 +9235,10 @@ class Bubble {
9135
9235
  if (isNullOrUndefined(data)) {
9136
9236
  return;
9137
9237
  }
9138
- let eventArgs = {
9238
+ const eventArgs = {
9139
9239
  cancel: false, name: bubbleMouseMove, data: data, maps: this.maps,
9140
9240
  target: target, x: e.clientX, y: e.clientY
9141
9241
  };
9142
- if (this.maps.isBlazor) {
9143
- const { maps } = eventArgs, blazorEventArgs = __rest$2(eventArgs, ["maps"]);
9144
- eventArgs = blazorEventArgs;
9145
- }
9146
9242
  this.maps.trigger(bubbleMouseMove, eventArgs);
9147
9243
  }
9148
9244
  /**
@@ -9167,15 +9263,6 @@ class Bubble {
9167
9263
  }
9168
9264
  }
9169
9265
 
9170
- var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
9171
- var t = {};
9172
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
9173
- t[p] = s[p];
9174
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
9175
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
9176
- t[p[i]] = s[p[i]];
9177
- return t;
9178
- };
9179
9266
  /**
9180
9267
  * DataLabel Module used to render the maps datalabel
9181
9268
  */
@@ -9347,7 +9434,7 @@ class DataLabel {
9347
9434
  };
9348
9435
  }
9349
9436
  else {
9350
- location = findMidPointOfPolygon(shapePoint[midIndex], projectionType);
9437
+ location = findMidPointOfPolygon(shapePoint[midIndex], projectionType, layer.geometryType);
9351
9438
  }
9352
9439
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9353
9440
  const firstLevelMapLocation = location;
@@ -9368,7 +9455,7 @@ class DataLabel {
9368
9455
  location['x'] = ((location['x'] + zoomTransPoint['x']) * scale);
9369
9456
  location['y'] = ((location['y'] + zoomTransPoint['y']) * scale);
9370
9457
  }
9371
- location['y'] = (this.maps.projectionType === 'Mercator') ? location['y'] : (-location['y']);
9458
+ location['y'] = (this.maps.projectionType === 'Mercator') || layer.geometryType === 'Normal' ? location['y'] : (-location['y']);
9372
9459
  if (!isNullOrUndefined(this.maps.format) && !isNaN(parseFloat(text))) {
9373
9460
  if (this.maps.useGroupingSeparator) {
9374
9461
  text = Internalize(this.maps, parseFloat(text));
@@ -9377,15 +9464,11 @@ class DataLabel {
9377
9464
  }
9378
9465
  }
9379
9466
  }
9380
- let eventargs = {
9467
+ const eventargs = {
9381
9468
  name: dataLabelRendering, maps: this.maps, cancel: false, border: { color: dataLabel.border.color,
9382
9469
  width: dataLabel.border.width, opacity: dataLabel.border.opacity }, datalabel: dataLabel,
9383
9470
  fill: dataLabel.fill, template: dataLabel.template, text: text
9384
9471
  };
9385
- if (this.maps.isBlazor) {
9386
- const { maps, datalabel } = eventargs, blazorEventArgs = __rest$3(eventargs, ["maps", "datalabel"]);
9387
- eventargs = blazorEventArgs;
9388
- }
9389
9472
  this.maps.trigger('dataLabelRendering', eventargs, (labelArgs) => {
9390
9473
  if (eventargs.cancel) {
9391
9474
  return;
@@ -9413,7 +9496,7 @@ class DataLabel {
9413
9496
  if (!isPoint && position.length > 5 && (shapeData['geometry']['type'] !== 'MultiPolygon') &&
9414
9497
  (shapeData['type'] !== 'MultiPolygon')) {
9415
9498
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9416
- const location1 = findMidPointOfPolygon(position, projectionType);
9499
+ const location1 = findMidPointOfPolygon(position, projectionType, layer.geometryType);
9417
9500
  if (zoomLabelsPosition && scaleZoomValue > 1 && !this.maps.zoomNotApplied && eventargs.template === '') {
9418
9501
  location1['x'] = ((this.maps.zoomLabelPositions[index]['location']['x'] + zoomTransPoint['x']) * scale);
9419
9502
  location1['y'] = ((this.maps.zoomLabelPositions[index]['location']['y'] + zoomTransPoint['y']) * scale);
@@ -9440,7 +9523,9 @@ class DataLabel {
9440
9523
  }
9441
9524
  else {
9442
9525
  if (dataLabelSettings.smartLabelMode === 'Trim') {
9443
- trimmedLable = textTrim(width, text, style);
9526
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9527
+ const textType = typeof text === 'number' ? text.toString() : text;
9528
+ trimmedLable = textTrim(width, textType, style);
9444
9529
  elementSize = measureText(trimmedLable, style);
9445
9530
  options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', trimmedLable, '', '');
9446
9531
  }
@@ -10156,6 +10241,7 @@ class Legend {
10156
10241
  const shapeSize = new Size(legend.shapeWidth, legend.shapeHeight);
10157
10242
  let textOptions;
10158
10243
  const render = map.renderer;
10244
+ let legendShape = legend.shape;
10159
10245
  if (page >= 0 && page < this.totalPages.length) {
10160
10246
  if (querySelector(this.legendGroup.id, this.maps.element.id)) {
10161
10247
  remove(querySelector(this.legendGroup.id, this.maps.element.id));
@@ -10165,7 +10251,7 @@ class Legend {
10165
10251
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10166
10252
  const collection = this.totalPages[page]['Collection'][i];
10167
10253
  const shapeBorder = collection['shapeBorder'];
10168
- const legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
10254
+ let legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
10169
10255
  let legendText = collection['DisplayText'];
10170
10256
  const shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
10171
10257
  legend.shape : 'Image') : collection['legendShape']);
@@ -10180,21 +10266,35 @@ class Legend {
10180
10266
  const textLocation = collection['Text'];
10181
10267
  const imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
10182
10268
  const renderOptions = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
10183
- legend.textStyle.color = (legend.textStyle.color !== null) ? legend.textStyle.color :
10269
+ const legendTextStyle = {
10270
+ fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
10271
+ fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color, opacity: legend.textStyle.opacity
10272
+ };
10273
+ legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
10184
10274
  this.maps.themeStyle.legendTextColor;
10185
- legend.textStyle.fontFamily = map.themeStyle.fontFamily || legend.textStyle.fontFamily;
10186
- legend.textStyle.size = map.themeStyle.legendFontSize || legend.textStyle.size;
10275
+ legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
10276
+ legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
10187
10277
  if (i === 0) {
10188
10278
  this.renderLegendBorder();
10189
10279
  }
10190
- legendElement.appendChild(drawSymbol(shapeLocation, shape, shapeSize, collection['ImageSrc'], renderOptions));
10280
+ if (legend.type === 'Markers' && legend.useMarkerShape) {
10281
+ const legendShapeData = this.legendCollection[collection['idIndex']].data[0];
10282
+ const marker$$1 = map.layers[legendShapeData['layerIndex']].markerSettings[legendShapeData['markerIndex']];
10283
+ 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;
10284
+ }
10285
+ if (legendShape === "Balloon") {
10286
+ legendElement.appendChild(drawBalloon(map, renderOptions, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
10287
+ }
10288
+ else {
10289
+ legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions));
10290
+ }
10191
10291
  const legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
10192
10292
  if (legendRectSize > this.legendBorderRect.width) {
10193
- const trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legend.textStyle, legendRectSize);
10293
+ const trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legendTextStyle, legendRectSize);
10194
10294
  legendText = trimmedText;
10195
10295
  }
10196
10296
  textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
10197
- renderTextElement(textOptions, legend.textStyle, legend.textStyle.color, legendElement);
10297
+ renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
10198
10298
  this.legendGroup.appendChild(legendElement);
10199
10299
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10200
10300
  if (i === (this.totalPages[page]['Collection'].length - 1)) {
@@ -10262,7 +10362,7 @@ class Legend {
10262
10362
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
10263
10363
  const collection = this.maps.legendModule.legendCollection;
10264
10364
  let length;
10265
- const multiSelectEnable = this.maps.layers[collection[0]['data'][0]['layerIndex']].selectionSettings.enableMultiSelect;
10365
+ const multiSelectEnable = !isNullOrUndefined(collection[0]['data'][0]['layerIndex']) ? this.maps.layers[collection[0]['data'][0]['layerIndex']].selectionSettings.enableMultiSelect : false;
10266
10366
  let selectLength = 0;
10267
10367
  let interactProcess = true;
10268
10368
  const idIndex = parseFloat(targetElement.id.charAt(targetElement.id.length - 1));
@@ -10875,7 +10975,10 @@ class Legend {
10875
10975
  const map = this.maps;
10876
10976
  const legend = map.legendSettings;
10877
10977
  const legendTitle = legend.title.text;
10878
- const textStyle = legend.titleStyle;
10978
+ const textStyle = {
10979
+ fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
10980
+ fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color, opacity: legend.titleStyle.opacity
10981
+ };
10879
10982
  let textOptions;
10880
10983
  const spacing = 10;
10881
10984
  const trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
@@ -10894,6 +10997,7 @@ class Legend {
10894
10997
  map.svgObject.appendChild(this.legendGroup);
10895
10998
  if (legendTitle) {
10896
10999
  textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
11000
+ textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
10897
11001
  textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
10898
11002
  renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
10899
11003
  }
@@ -10999,20 +11103,24 @@ class Legend {
10999
11103
  }
11000
11104
  else {
11001
11105
  newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
11002
- shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
11106
+ 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) });
11003
11107
  this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
11004
11108
  }
11005
11109
  }
11006
11110
  });
11007
11111
  });
11008
11112
  }
11113
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11009
11114
  getMarkerLegendData(layerIndex, text, legendFill) {
11115
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11010
11116
  const legendData = [];
11011
11117
  this.maps.layers[layerIndex].markerSettings.map((markerSettings, markerIndex) => {
11118
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11012
11119
  const markerData = markerSettings.dataSource;
11120
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11013
11121
  Array.prototype.forEach.call(markerData, (data, dataIndex) => {
11014
- let marker$$1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
11015
- if ((text === data[marker$$1.legendText] || text === '') && legendFill == data[marker$$1.colorValuePath]) {
11122
+ const marker$$1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
11123
+ if ((text === data[marker$$1.legendText] || text === '') && legendFill === data[marker$$1.colorValuePath]) {
11016
11124
  legendData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
11017
11125
  shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
11018
11126
  }
@@ -11361,7 +11469,7 @@ class Legend {
11361
11469
  shape = this.legendCollection[legendIndex]['data'][i];
11362
11470
  mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11363
11471
  '_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
11364
- '_MarkerIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11472
+ '_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
11365
11473
  if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
11366
11474
  mapElement = mapElement.children[0];
11367
11475
  }
@@ -11370,7 +11478,7 @@ class Legend {
11370
11478
  mapElement.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
11371
11479
  mapElement.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
11372
11480
  mapElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11373
- mapElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11481
+ mapElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11374
11482
  mapElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11375
11483
  this.maps.layers[k].shapeSettings.opacity :
11376
11484
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11385,6 +11493,9 @@ class Legend {
11385
11493
  if (targetEle !== null) {
11386
11494
  legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
11387
11495
  legendShapeId.setAttribute('fill', '#E5E5E5');
11496
+ if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
11497
+ legendShapeId.setAttribute('stroke', '#E5E5E5');
11498
+ }
11388
11499
  legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
11389
11500
  legendTextId.setAttribute('fill', '#E5E5E5');
11390
11501
  }
@@ -11399,6 +11510,9 @@ class Legend {
11399
11510
  if (targetEle !== null) {
11400
11511
  legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
11401
11512
  legendShapeId.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
11513
+ if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
11514
+ legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
11515
+ }
11402
11516
  legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
11403
11517
  legendTextId.setAttribute('fill', '#757575');
11404
11518
  }
@@ -11433,7 +11547,7 @@ class Legend {
11433
11547
  layerElement.setAttribute('fill', this.maps.layers[j].shapeSettings.fill);
11434
11548
  layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
11435
11549
  layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
11436
- layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
11550
+ layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
11437
11551
  layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
11438
11552
  this.maps.layers[j].shapeSettings.opacity :
11439
11553
  this.maps.layers[j].shapeSettings.border.opacity).toString());
@@ -11463,7 +11577,7 @@ class Legend {
11463
11577
  layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
11464
11578
  this.maps.layers[j].shapeSettings.opacity :
11465
11579
  this.maps.layers[j].shapeSettings.border.opacity).toString());
11466
- layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
11580
+ layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
11467
11581
  layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
11468
11582
  layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
11469
11583
  if (targetEle !== null) {
@@ -11483,7 +11597,7 @@ class Legend {
11483
11597
  targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendSettings.visible &&
11484
11598
  targetEle.id.indexOf('_Text') === -1) {
11485
11599
  let LegendInteractive;
11486
- const legendIndex = parseFloat(targetEle.id.substr((this.maps.element.id + '_Legend_Index_').length));
11600
+ const legendIndex = parseFloat(targetEle.id.split(this.maps.element.id + '_Legend_Index_')[1]);
11487
11601
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11488
11602
  let mapdata;
11489
11603
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -11504,7 +11618,7 @@ class Legend {
11504
11618
  if (this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
11505
11619
  LegendInteractive.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
11506
11620
  LegendInteractive.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
11507
- LegendInteractive.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11621
+ LegendInteractive.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11508
11622
  LegendInteractive.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11509
11623
  this.maps.layers[k].shapeSettings.opacity :
11510
11624
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11568,7 +11682,7 @@ class Legend {
11568
11682
  mapLegendElement.setAttribute('fill', this.maps.layers[0].shapeSettings.fill);
11569
11683
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
11570
11684
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11571
- mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11685
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11572
11686
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11573
11687
  this.maps.layers[k].shapeSettings.opacity :
11574
11688
  this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11595,7 +11709,7 @@ class Legend {
11595
11709
  this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
11596
11710
  }
11597
11711
  mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
11598
- mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
11712
+ mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
11599
11713
  mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
11600
11714
  mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
11601
11715
  this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity).toString());
@@ -11722,15 +11836,6 @@ class Legend {
11722
11836
  }
11723
11837
  }
11724
11838
 
11725
- var __rest$4 = (undefined && undefined.__rest) || function (s, e) {
11726
- var t = {};
11727
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
11728
- t[p] = s[p];
11729
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
11730
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
11731
- t[p[i]] = s[p[i]];
11732
- return t;
11733
- };
11734
11839
  /**
11735
11840
  * Highlight module class
11736
11841
  */
@@ -11878,14 +11983,14 @@ class Highlight {
11878
11983
  isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
11879
11984
  }
11880
11985
  const border = {
11881
- color: this.highlightSettings.border.color,
11882
- width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
11986
+ color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
11987
+ width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
11883
11988
  opacity: this.highlightSettings.border.opacity
11884
11989
  };
11885
- let eventArgs = {
11990
+ const eventArgs = {
11886
11991
  opacity: this.highlightSettings.opacity,
11887
- fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
11888
- ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
11992
+ fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
11993
+ ? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
11889
11994
  border: border,
11890
11995
  name: itemHighlight,
11891
11996
  target: targetEle.id,
@@ -11894,10 +11999,6 @@ class Highlight {
11894
11999
  data: data,
11895
12000
  maps: this.maps
11896
12001
  };
11897
- if (this.maps.isBlazor) {
11898
- const { shapeData, maps } = eventArgs, blazorEventArgs = __rest$4(eventArgs, ["shapeData", "maps"]);
11899
- eventArgs = blazorEventArgs;
11900
- }
11901
12002
  this.maps.trigger(itemHighlight, eventArgs, () => {
11902
12003
  eventArgs.border.opacity = isNullOrUndefined(this.highlightSettings.border.opacity) ? this.highlightSettings.opacity : this.highlightSettings.border.opacity;
11903
12004
  this.highlightMap(targetEle, eventArgs);
@@ -11950,15 +12051,6 @@ class Highlight {
11950
12051
  }
11951
12052
  }
11952
12053
 
11953
- var __rest$5 = (undefined && undefined.__rest) || function (s, e) {
11954
- var t = {};
11955
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
11956
- t[p] = s[p];
11957
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
11958
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
11959
- t[p[i]] = s[p[i]];
11960
- return t;
11961
- };
11962
12054
  /**
11963
12055
  * Selection module class
11964
12056
  */
@@ -12079,15 +12171,16 @@ class Selection {
12079
12171
  */
12080
12172
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12081
12173
  selectMap(targetElement, shapeData, data) {
12174
+ const layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
12082
12175
  const selectionsettings = this.selectionsettings;
12083
12176
  const border = {
12084
- color: this.selectionsettings.border.color,
12085
- width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
12177
+ color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
12178
+ 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),
12086
12179
  opacity: this.selectionsettings.border.opacity
12087
12180
  };
12088
- let eventArgs = {
12181
+ const eventArgs = {
12089
12182
  opacity: this.selectionsettings.opacity,
12090
- fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
12183
+ fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
12091
12184
  border: border,
12092
12185
  name: itemSelection,
12093
12186
  target: targetElement.id,
@@ -12096,10 +12189,6 @@ class Selection {
12096
12189
  data: data,
12097
12190
  maps: this.maps
12098
12191
  };
12099
- if (this.maps.isBlazor) {
12100
- const { shapeData, maps } = eventArgs, blazorEventArgs = __rest$5(eventArgs, ["shapeData", "maps"]);
12101
- eventArgs = blazorEventArgs;
12102
- }
12103
12192
  this.maps.trigger('itemSelection', eventArgs, (observedArgs) => {
12104
12193
  eventArgs.border.opacity = isNullOrUndefined(this.selectionsettings.border.opacity) ? this.selectionsettings.opacity : this.selectionsettings.border.opacity;
12105
12194
  if (!eventArgs.cancel) {
@@ -12283,8 +12372,6 @@ class MapsTooltip {
12283
12372
  if (istooltipRender) {
12284
12373
  if (targetId.indexOf('_shapeIndex_') > -1) {
12285
12374
  option = layer.tooltipSettings;
12286
- option.textStyle.fontFamily = this.maps.themeStyle.fontFamily || option.textStyle.fontFamily;
12287
- option.textStyle.opacity = this.maps.themeStyle.tooltipTextOpacity || option.textStyle.opacity;
12288
12375
  const shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
12289
12376
  if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
12290
12377
  return;
@@ -12401,9 +12488,13 @@ class MapsTooltip {
12401
12488
  option.template = option.template[Object.keys(option.template)[0]];
12402
12489
  }
12403
12490
  templateData = this.setTooltipContent(option, templateData);
12491
+ const tooltipTextStyle = {
12492
+ color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
12493
+ fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
12494
+ };
12404
12495
  const tooltipOption = {
12405
12496
  location: location, text: tooltipContent, data: templateData,
12406
- textStyle: option.textStyle,
12497
+ textStyle: tooltipTextStyle,
12407
12498
  template: option.template
12408
12499
  };
12409
12500
  tooltipArgs = {
@@ -12413,131 +12504,66 @@ class MapsTooltip {
12413
12504
  maps: this.maps,
12414
12505
  element: target, eventArgs: e
12415
12506
  };
12416
- if (this.maps.isBlazor) {
12417
- const tootipOption = {
12418
- location: location
12419
- };
12420
- const blazorArgs = {
12421
- name: tooltipRender,
12422
- cancel: false,
12423
- options: tootipOption,
12424
- data: templateData,
12425
- textStyle: tooltipArgs.options['textStyle'],
12426
- fill: tooltipArgs.fill,
12427
- element: target, eventArgs: e
12428
- };
12429
- this.maps.trigger(tooltipRender, blazorArgs, (args) => {
12430
- if (!blazorArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
12431
- (targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
12432
- if (targetId.indexOf('MarkerIndex') > 0) {
12433
-
12434
- }
12435
- else if (targetId.indexOf('BubbleIndex') > 0) {
12436
-
12437
- }
12438
- else {
12439
-
12440
- }
12441
- this.maps['isProtectedOnChange'] = true;
12442
- if (blazorArgs.cancel) {
12443
- this.svgTooltip = new Tooltip({
12444
- enable: true,
12445
- header: '',
12446
- content: [currentData.toString()],
12447
- shapes: [],
12448
- location: tootipOption.location,
12449
- palette: [markerFill],
12450
- areaBounds: this.maps.mapAreaRect,
12451
- textStyle: tooltipArgs.options['textStyle'],
12452
- availableSize: this.maps.availableSize,
12453
- fill: tooltipArgs.fill
12454
- });
12455
- }
12456
- else {
12457
- this.svgTooltip = new Tooltip({
12458
- enable: true,
12459
- header: '',
12460
- content: [currentData.toString()],
12461
- shapes: [],
12462
- location: tootipOption.location,
12463
- palette: [markerFill],
12464
- areaBounds: this.maps.mapAreaRect,
12465
- textStyle: blazorArgs.textStyle,
12466
- availableSize: this.maps.availableSize,
12467
- fill: blazorArgs.fill
12468
- });
12469
- }
12470
- const tooltipElement = tooltipEle;
12471
- this.svgTooltip.opacity = this.maps.themeStyle.tooltipFillOpacity || this.svgTooltip.opacity;
12472
- this.svgTooltip.appendTo(tooltipElement);
12473
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12474
- this.maps.renderReactTemplates();
12507
+ this.maps.trigger(tooltipRender, tooltipArgs, (args) => {
12508
+ if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
12509
+ (targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
12510
+ this.maps['isProtectedOnChange'] = true;
12511
+ tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
12512
+ || this.maps.themeStyle.tooltipFontColor;
12513
+ tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
12514
+ || this.maps.themeStyle.fontFamily;
12515
+ tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
12516
+ || this.maps.themeStyle.tooltipTextOpacity;
12517
+ if (tooltipArgs.cancel) {
12518
+ this.svgTooltip = new Tooltip({
12519
+ enable: true,
12520
+ header: '',
12521
+ data: option['data'],
12522
+ template: option['template'],
12523
+ content: [currentData.toString()],
12524
+ shapes: [],
12525
+ location: option['location'],
12526
+ palette: [markerFill],
12527
+ areaBounds: this.maps.mapAreaRect,
12528
+ textStyle: option['textStyle'],
12529
+ availableSize: this.maps.availableSize,
12530
+ fill: option.fill || this.maps.themeStyle.tooltipFillColor
12531
+ });
12475
12532
  }
12476
12533
  else {
12477
- this.removeTooltip();
12478
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12479
- this.maps.clearTemplate();
12480
- }
12481
- });
12482
- }
12483
- else {
12484
- this.maps.trigger(tooltipRender, tooltipArgs, (args) => {
12485
- if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
12486
- (targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
12487
- this.maps['isProtectedOnChange'] = true;
12488
- tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
12489
- || this.maps.themeStyle.tooltipFontColor;
12490
- if (tooltipArgs.cancel) {
12491
- this.svgTooltip = new Tooltip({
12492
- enable: true,
12493
- header: '',
12494
- data: option['data'],
12495
- template: option['template'],
12496
- content: [currentData.toString()],
12497
- shapes: [],
12498
- location: option['location'],
12499
- palette: [markerFill],
12500
- areaBounds: this.maps.mapAreaRect,
12501
- textStyle: option['textStyle'],
12502
- availableSize: this.maps.availableSize,
12503
- fill: option.fill || this.maps.themeStyle.tooltipFillColor
12504
- });
12505
- }
12506
- else {
12507
- this.svgTooltip = new Tooltip({
12508
- enable: true,
12509
- header: '',
12510
- data: tooltipArgs.options['data'],
12511
- template: tooltipArgs.options['template'],
12512
- content: [currentData.toString()],
12513
- shapes: [],
12514
- location: tooltipArgs.options['location'],
12515
- palette: [markerFill],
12516
- areaBounds: this.maps.mapAreaRect,
12517
- textStyle: tooltipArgs.options['textStyle'],
12518
- availableSize: this.maps.availableSize,
12519
- fill: tooltipArgs.fill || this.maps.themeStyle.tooltipFillColor
12520
- });
12521
- }
12522
- this.svgTooltip.opacity = this.maps.themeStyle.tooltipFillOpacity || this.svgTooltip.opacity;
12523
- this.svgTooltip.appendTo(tooltipEle);
12524
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12525
- this.maps.renderReactTemplates();
12526
- tooltipTemplateElement = document.getElementById(this.maps.element.id + '_mapsTooltip');
12527
- if (tooltipTemplateElement !== null && tooltipTemplateElement.innerHTML.indexOf('href') !== -1
12528
- && tooltipTemplateElement.innerHTML.indexOf('</a>') !== -1) {
12529
- let templateStyle = tooltipTemplateElement.getAttribute('style');
12530
- templateStyle = templateStyle.replace('pointer-events: none;', 'position-events:all;');
12531
- tooltipTemplateElement.setAttribute('style', templateStyle);
12532
- }
12534
+ this.svgTooltip = new Tooltip({
12535
+ enable: true,
12536
+ header: '',
12537
+ data: tooltipArgs.options['data'],
12538
+ template: tooltipArgs.options['template'],
12539
+ content: [currentData.toString()],
12540
+ shapes: [],
12541
+ location: tooltipArgs.options['location'],
12542
+ palette: [markerFill],
12543
+ areaBounds: this.maps.mapAreaRect,
12544
+ textStyle: tooltipArgs.options['textStyle'],
12545
+ availableSize: this.maps.availableSize,
12546
+ fill: tooltipArgs.fill || this.maps.themeStyle.tooltipFillColor
12547
+ });
12533
12548
  }
12534
- else {
12535
- this.removeTooltip();
12536
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12537
- this.maps.clearTemplate();
12549
+ this.svgTooltip.opacity = this.maps.themeStyle.tooltipFillOpacity || this.svgTooltip.opacity;
12550
+ this.svgTooltip.appendTo(tooltipEle);
12551
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12552
+ this.maps.renderReactTemplates();
12553
+ tooltipTemplateElement = document.getElementById(this.maps.element.id + '_mapsTooltip');
12554
+ if (tooltipTemplateElement !== null && tooltipTemplateElement.innerHTML.indexOf('href') !== -1
12555
+ && tooltipTemplateElement.innerHTML.indexOf('</a>') !== -1) {
12556
+ let templateStyle = tooltipTemplateElement.getAttribute('style');
12557
+ templateStyle = templateStyle.replace('pointer-events: none;', 'position-events:all;');
12558
+ tooltipTemplateElement.setAttribute('style', templateStyle);
12538
12559
  }
12539
- });
12540
- }
12560
+ }
12561
+ else {
12562
+ this.removeTooltip();
12563
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
12564
+ this.maps.clearTemplate();
12565
+ }
12566
+ });
12541
12567
  if (this.svgTooltip) {
12542
12568
  this.maps.trigger('tooltipRenderComplete', {
12543
12569
  cancel: false, name: 'tooltipRenderComplete', maps: this.maps, options: tooltipOption,
@@ -12667,15 +12693,6 @@ class MapsTooltip {
12667
12693
  }
12668
12694
  }
12669
12695
 
12670
- var __rest$6 = (undefined && undefined.__rest) || function (s, e) {
12671
- var t = {};
12672
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
12673
- t[p] = s[p];
12674
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
12675
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
12676
- t[p[i]] = s[p[i]];
12677
- return t;
12678
- };
12679
12696
  /**
12680
12697
  * Zoom module used to process the zoom for maps
12681
12698
  */
@@ -12775,8 +12792,10 @@ class Zoom {
12775
12792
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
12776
12793
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
12777
12794
  }
12795
+ this.markerLineAnimation(map);
12778
12796
  map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
12779
12797
  const element1 = document.getElementById(this.maps.element.id + '_tiles');
12798
+ const animationDuration = this.maps.layersCollection[0].animationDuration;
12780
12799
  setTimeout(() => {
12781
12800
  // if (type === 'ZoomOut') {
12782
12801
  // element1.removeChild(element1.children[element1.childElementCount - 1]);
@@ -12790,7 +12809,7 @@ class Zoom {
12790
12809
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
12791
12810
  document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
12792
12811
  }
12793
- }, 250);
12812
+ }, animationDuration);
12794
12813
  }
12795
12814
  this.maps.zoomNotApplied = false;
12796
12815
  }
@@ -12799,14 +12818,14 @@ class Zoom {
12799
12818
  let zoomArgs;
12800
12819
  if (!map.isTileMap) {
12801
12820
  zoomArgs = {
12802
- cancel: false, name: 'zoom', type: type, maps: !map.isBlazor ? map : null,
12821
+ cancel: false, name: 'zoom', type: type, maps: map,
12803
12822
  tileTranslatePoint: {}, translatePoint: { previous: map.previousPoint, current: map.translatePoint },
12804
12823
  tileZoomLevel: {}, scale: { previous: map.previousScale, current: map.scale }
12805
12824
  };
12806
12825
  }
12807
12826
  else {
12808
12827
  zoomArgs = {
12809
- cancel: false, name: 'zoom', type: type, maps: !map.isBlazor ? map : null,
12828
+ cancel: false, name: 'zoom', type: type, maps: map,
12810
12829
  tileTranslatePoint: { previous: prevTilePoint, current: map.tileTranslatePoint }, translatePoint: { previous: map.previousPoint, current: map.translatePoint },
12811
12830
  tileZoomLevel: { previous: prevLevel, current: map.tileZoomLevel }, scale: { previous: map.previousScale, current: map.scale }
12812
12831
  };
@@ -12964,11 +12983,13 @@ class Zoom {
12964
12983
  */
12965
12984
  animateTransform(element, animate$$1, x, y, scale) {
12966
12985
  const duration = this.currentLayer.animationDuration;
12967
- if (!animate$$1 || duration === 0) {
12986
+ if (!animate$$1 || duration === 0 || this.maps.isTileMap) {
12968
12987
  element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
12969
12988
  return;
12970
12989
  }
12971
- zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
12990
+ if (!this.maps.isTileMap) {
12991
+ zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
12992
+ }
12972
12993
  }
12973
12994
  applyTransform(animate$$1) {
12974
12995
  let layerIndex;
@@ -13011,16 +13032,18 @@ class Zoom {
13011
13032
  }
13012
13033
  }
13013
13034
  else if (currentEle.id.indexOf('_Markers_Group') > -1) {
13014
- if (!this.isPanning || this.maps.isBlazor) {
13035
+ if (!this.isPanning) {
13015
13036
  this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
13016
13037
  }
13017
13038
  currentEle = layerElement.childNodes[j];
13039
+ let markerAnimation;
13018
13040
  if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
13019
13041
  for (let k = 0; k < currentEle.childElementCount; k++) {
13020
13042
  this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate$$1);
13021
13043
  const layerIndex = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
13022
13044
  const dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
13023
13045
  const markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
13046
+ markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
13024
13047
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13025
13048
  const markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
13026
13049
  for (let x = 0; x < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x++) {
@@ -13031,9 +13054,17 @@ class Zoom {
13031
13054
  this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
13032
13055
  }
13033
13056
  }
13034
- if (!this.maps.isTileMap && this.currentLayer.animationDuration > 0) {
13035
- markerStyle = 'visibility:hidden';
13036
- currentEle.setAttribute('style', markerStyle);
13057
+ if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
13058
+ if (this.maps.isTileMap) {
13059
+ const groupElement = document.querySelector('.GroupElement');
13060
+ if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
13061
+ groupElement.style.display = 'none';
13062
+ }
13063
+ }
13064
+ else {
13065
+ markerStyle = 'visibility:hidden';
13066
+ currentEle.setAttribute('style', markerStyle);
13067
+ }
13037
13068
  }
13038
13069
  }
13039
13070
  if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
@@ -13130,10 +13161,9 @@ class Zoom {
13130
13161
  }
13131
13162
  }
13132
13163
  this.maps.arrangeTemplate();
13133
- const blazor = this.maps.isBlazor ? this.maps.blazorTemplates() : null;
13134
13164
  }
13135
13165
  if (!isNullOrUndefined(this.currentLayer)) {
13136
- if (!animate$$1 || this.currentLayer.animationDuration === 0) {
13166
+ if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
13137
13167
  this.processTemplate(x, y, scale, this.maps);
13138
13168
  }
13139
13169
  }
@@ -13183,18 +13213,6 @@ class Zoom {
13183
13213
  };
13184
13214
  eventArgs = markerShapeChoose(eventArgs, data);
13185
13215
  eventArgs = markerColorChoose(eventArgs, data);
13186
- if (this.maps.isBlazor) {
13187
- const { maps, marker: marker$$1 } = eventArgs, blazorEventArgs = __rest$6(eventArgs, ["maps", "marker"]);
13188
- eventArgs = blazorEventArgs;
13189
- const latitudeValue = 'Latitude';
13190
- const longitudeValue = 'Longitude';
13191
- markerSettings.longitudeValuePath = !isNullOrUndefined(markerSettings.longitudeValuePath) ?
13192
- markerSettings.longitudeValuePath : !isNullOrUndefined(data['Longitude']) ? longitudeValue :
13193
- !isNullOrUndefined(data['longitude']) ? 'longitude' : null;
13194
- markerSettings.latitudeValuePath = !isNullOrUndefined(markerSettings.latitudeValuePath) ?
13195
- markerSettings.latitudeValuePath : !isNullOrUndefined(data['Latitude']) ? latitudeValue :
13196
- !isNullOrUndefined(data['latitude']) ? 'latitude' : null;
13197
- }
13198
13216
  this.maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
13199
13217
  if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
13200
13218
  eventArgs = markerShapeChoose(eventArgs, data);
@@ -13208,22 +13226,6 @@ class Zoom {
13208
13226
  const long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
13209
13227
  Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
13210
13228
  parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : 0;
13211
- if (this.maps.isBlazor) {
13212
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13213
- const data1 = {};
13214
- let j = 0;
13215
- const text = [];
13216
- for (let i = 0; i < Object.keys(data).length; i++) {
13217
- if (Object.keys(data)[i].toLowerCase() !== 'text' && Object.keys(data)[i].toLowerCase() !== 'latitude'
13218
- && Object.keys(data)[i].toLowerCase() !== 'blazortemplateid' && Object.keys(data)[i].toLowerCase() !== 'longitude'
13219
- && Object.keys(data)[i].toLowerCase() !== 'name') {
13220
- data1['text'] = text;
13221
- text[j] = data[Object.keys(data)[i].toLowerCase()];
13222
- j++;
13223
- }
13224
- }
13225
- data['text'] = data1['text'];
13226
- }
13227
13229
  const offset = markerSettings.offset;
13228
13230
  if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
13229
13231
  const markerID = this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
@@ -13278,7 +13280,6 @@ class Zoom {
13278
13280
  */
13279
13281
  processTemplate(x, y, scale, maps) {
13280
13282
  for (let i = 0; i < this.templateCount; i++) {
13281
- this.currentLayer = maps.layersCollection[i];
13282
13283
  const factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
13283
13284
  const markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
13284
13285
  i + '_Markers_Template_Group');
@@ -13442,28 +13443,6 @@ class Zoom {
13442
13443
  const layer = this.maps.layersCollection[layerIndex];
13443
13444
  const marker$$1 = layer.markerSettings[markerIndex];
13444
13445
  if (!isNullOrUndefined(marker$$1) && !isNullOrUndefined(marker$$1.dataSource) && !isNullOrUndefined(marker$$1.dataSource[dataIndex])) {
13445
- if (this.maps.isBlazor) {
13446
- marker$$1.longitudeValuePath = !isNullOrUndefined(marker$$1.longitudeValuePath) ?
13447
- marker$$1.longitudeValuePath : !isNullOrUndefined(marker$$1.dataSource[dataIndex]['Longitude']) ? 'Longitude' :
13448
- !isNullOrUndefined(marker$$1.dataSource[dataIndex]['longitude']) ? 'longitude' : null;
13449
- marker$$1.latitudeValuePath = !isNullOrUndefined(marker$$1.latitudeValuePath) ?
13450
- marker$$1.latitudeValuePath : !isNullOrUndefined(marker$$1.dataSource[dataIndex]['Latitude']) ? 'Latitude' :
13451
- !isNullOrUndefined(marker$$1.dataSource[dataIndex]['latitude']) ? 'latitude' : null;
13452
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13453
- const data1 = {};
13454
- let j = 0;
13455
- const text = [];
13456
- for (let i = 0; i < Object.keys(marker$$1.dataSource[dataIndex]).length; i++) {
13457
- if (Object.keys(marker$$1.dataSource[dataIndex])[i].toLowerCase() !== 'text' && Object.keys(marker$$1.dataSource[dataIndex])[i].toLowerCase() !== 'longitude'
13458
- && Object.keys(marker$$1.dataSource[dataIndex])[i].toLowerCase() !== 'latitude' && Object.keys(marker$$1.dataSource[dataIndex])[i].toLowerCase() !== 'blazortemplateid'
13459
- && Object.keys(marker$$1.dataSource[dataIndex])[i].toLowerCase() !== 'name') {
13460
- data1['text'] = text;
13461
- text[j] = marker$$1.dataSource[dataIndex][Object.keys(marker$$1.dataSource[dataIndex])[i].toLowerCase()];
13462
- j++;
13463
- }
13464
- }
13465
- marker$$1.dataSource[dataIndex]['text'] = data1['text'];
13466
- }
13467
13446
  const lng = (!isNullOrUndefined(marker$$1.longitudeValuePath)) ?
13468
13447
  Number(getValueFromObject(marker$$1.dataSource[dataIndex], marker$$1.longitudeValuePath)) :
13469
13448
  !isNullOrUndefined(marker$$1.dataSource[dataIndex]['longitude']) ? parseFloat(marker$$1.dataSource[dataIndex]['longitude']) :
@@ -13501,9 +13480,20 @@ class Zoom {
13501
13480
  }
13502
13481
  else {
13503
13482
  if (type === 'Template') {
13504
- const elementOffset = element.getBoundingClientRect();
13505
- element.style.left = ((location.x + x) * scale) + marker$$1.offset.x - this.maps.mapAreaRect.x - (elementOffset.width / 2) + 'px';
13506
- element.style.top = ((location.y + y) * scale) + marker$$1.offset.y - this.maps.mapAreaRect.y - (elementOffset.height / 2) + 'px';
13483
+ if (duration > 0) {
13484
+ location.x = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - location.x)) * scale);
13485
+ location.y = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - location.y)) * scale);
13486
+ const layerOffset = getElementByID(this.maps.element.id + '_Layer_Collections').getBoundingClientRect();
13487
+ const elementOffset = element.parentElement.getBoundingClientRect();
13488
+ element.style.left = (((location.x) + (layerOffset.left - elementOffset.left)) + marker$$1.offset.x) + 'px';
13489
+ element.style.top = (((location.y) + (layerOffset.top - elementOffset.top)) + marker$$1.offset.y) + 'px';
13490
+ element.style.transform = 'translate(-50%, -50%)';
13491
+ }
13492
+ else {
13493
+ const elementOffset = element.getBoundingClientRect();
13494
+ element.style.left = ((location.x + x) * scale) + marker$$1.offset.x - this.maps.mapAreaRect.x - (elementOffset.width / 2) + 'px';
13495
+ element.style.top = ((location.y + y) * scale) + marker$$1.offset.y - this.maps.mapAreaRect.y - (elementOffset.height / 2) + 'px';
13496
+ }
13507
13497
  }
13508
13498
  else {
13509
13499
  location.x = (((location.x + x) * scale) + marker$$1.offset.x);
@@ -13518,6 +13508,20 @@ class Zoom {
13518
13508
  }
13519
13509
  }
13520
13510
  }
13511
+ markerLineAnimation(map) {
13512
+ if (map.isTileMap) {
13513
+ for (let i = 0; i < map.layersCollection.length; i++) {
13514
+ const markerTemplateElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
13515
+ const lineElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_line_Group');
13516
+ if (!isNullOrUndefined(markerTemplateElement)) {
13517
+ markerTemplateElement.style.visibility = 'hidden';
13518
+ }
13519
+ if (!isNullOrUndefined(lineElement)) {
13520
+ lineElement.style.visibility = 'hidden';
13521
+ }
13522
+ }
13523
+ }
13524
+ }
13521
13525
  panning(direction, xDifference, yDifference, mouseLocation) {
13522
13526
  const map = this.maps;
13523
13527
  let panArgs;
@@ -13547,7 +13551,7 @@ class Zoom {
13547
13551
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13548
13552
  const location = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
13549
13553
  panArgs = {
13550
- cancel: false, name: pan, maps: !map.isBlazor ? map : null,
13554
+ cancel: false, name: pan, maps: map,
13551
13555
  tileTranslatePoint: {}, translatePoint: { previous: translatePoint, current: new Point(x, y) },
13552
13556
  scale: map.scale, tileZoomLevel: map.tileZoomLevel, latitude: location['latitude'], longitude: location['longitude']
13553
13557
  };
@@ -13584,7 +13588,7 @@ class Zoom {
13584
13588
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13585
13589
  const location = this.maps.getTileGeoLocation(mouseLocation['layerX'], mouseLocation['layerY']);
13586
13590
  panArgs = {
13587
- cancel: false, name: pan, maps: !map.isBlazor ? map : null,
13591
+ cancel: false, name: pan, maps: map,
13588
13592
  tileTranslatePoint: { previous: prevTilePoint, current: map.tileTranslatePoint },
13589
13593
  translatePoint: { previous: translatePoint, current: map.translatePoint }, scale: map.scale,
13590
13594
  tileZoomLevel: map.tileZoomLevel, latitude: location['latitude'], longitude: location['longitude']
@@ -13649,41 +13653,45 @@ class Zoom {
13649
13653
  let tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
13650
13654
  map.scale = Math.pow(2, tileZoomFactor - 1);
13651
13655
  map.tileZoomLevel = tileZoomFactor;
13652
- map.zoomSettings.zoomFactor = zoomFactor;
13653
- const position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
13654
- this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
13655
- if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
13656
- map.initialCheck = true;
13657
- map.zoomPersistence = false;
13658
- map.tileTranslatePoint.x = map.initialTileTranslate.x;
13659
- map.tileTranslatePoint.y = map.initialTileTranslate.y;
13660
- tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
13661
- }
13662
- this.triggerZoomEvent(prevTilePoint, prevLevel, type);
13663
- map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
13664
- map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
13665
- if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13666
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
13667
- }
13668
- if (document.querySelector('.GroupElement')) {
13669
- document.querySelector('.GroupElement').style.display = 'none';
13670
- }
13671
- map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
13672
- const element1 = document.getElementById(this.maps.element.id + '_tiles');
13673
- setTimeout(() => {
13674
- this.applyTransform(true);
13656
+ if (map.previousScale !== map.scale || map.isReset) {
13657
+ map.zoomSettings.zoomFactor = zoomFactor;
13658
+ const position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
13659
+ this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
13660
+ if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
13661
+ map.initialCheck = true;
13662
+ map.zoomPersistence = false;
13663
+ map.tileTranslatePoint.x = map.initialTileTranslate.x;
13664
+ map.tileTranslatePoint.y = map.initialTileTranslate.y;
13665
+ tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
13666
+ }
13667
+ this.triggerZoomEvent(prevTilePoint, prevLevel, type);
13668
+ map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
13669
+ map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
13675
13670
  if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13676
- document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13671
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
13677
13672
  }
13678
- }, 250);
13673
+ if (document.querySelector('.GroupElement')) {
13674
+ document.querySelector('.GroupElement').style.display = 'none';
13675
+ }
13676
+ this.markerLineAnimation(map);
13677
+ map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
13678
+ const element1 = document.getElementById(this.maps.element.id + '_tiles');
13679
+ const animationDuration = this.maps.layersCollection[0].animationDuration;
13680
+ setTimeout(() => {
13681
+ this.applyTransform(true);
13682
+ if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
13683
+ document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
13684
+ }
13685
+ }, animationDuration);
13686
+ }
13687
+ this.maps.zoomNotApplied = false;
13679
13688
  }
13680
- this.maps.zoomNotApplied = false;
13681
13689
  }
13682
13690
  createZoomingToolbars() {
13683
13691
  const map = this.maps;
13684
13692
  this.toolBarGroup = map.renderer.createGroup({
13685
13693
  id: map.element.id + '_Zooming_KitCollection',
13686
- opacity: 0.3
13694
+ opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
13687
13695
  });
13688
13696
  const kitHeight = 16;
13689
13697
  const kitWidth = 16;
@@ -14086,14 +14094,14 @@ class Zoom {
14086
14094
  if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
14087
14095
  if (!this.maps.zoomSettings.enablePanning) {
14088
14096
  if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
14089
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '0.3');
14090
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '0.3');
14097
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14098
+ getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14091
14099
  }
14092
14100
  }
14093
14101
  }
14094
14102
  }
14095
14103
  else {
14096
- getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '0.3');
14104
+ getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
14097
14105
  if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
14098
14106
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
14099
14107
  getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
@@ -14546,7 +14554,7 @@ class PdfExport {
14546
14554
  const exportElement = this.control.svgObject.cloneNode(true);
14547
14555
  const backgroundElement = exportElement.childNodes[0];
14548
14556
  const backgroundColor = backgroundElement.getAttribute('fill');
14549
- if ((this.control.theme === 'Tailwind' || this.control.theme === 'TailwindDark')
14557
+ if ((this.control.theme === 'Tailwind' || this.control.theme === 'TailwindDark' || this.control.theme === 'Bootstrap5' || this.control.theme === 'Bootstrap5Dark')
14550
14558
  && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
14551
14559
  exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
14552
14560
  }