@syncfusion/ej2-maps 19.3.53 → 19.4.38
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.
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
- package/CHANGELOG.md +13 -0
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +384 -226
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +381 -223
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/bubble.d.ts +6 -0
- package/src/maps/layers/bubble.js +7 -1
- package/src/maps/layers/data-label.js +1 -0
- package/src/maps/layers/layer-panel.d.ts +2 -1
- package/src/maps/layers/layer-panel.js +86 -50
- package/src/maps/layers/legend.js +25 -13
- package/src/maps/layers/marker.js +2 -8
- package/src/maps/maps.js +1 -1
- package/src/maps/model/base.js +2 -2
- package/src/maps/model/theme.js +62 -5
- package/src/maps/user-interaction/highlight.js +4 -4
- package/src/maps/user-interaction/selection.js +10 -9
- package/src/maps/user-interaction/tooltip.js +9 -3
- package/src/maps/user-interaction/zoom.d.ts +1 -0
- package/src/maps/user-interaction/zoom.js +73 -42
- package/src/maps/utils/helper.d.ts +2 -0
- package/src/maps/utils/helper.js +104 -88
|
@@ -806,15 +806,17 @@ function markerShapeChoose(eventArgs, data) {
|
|
|
806
806
|
data[eventArgs.shapeValuePath]);
|
|
807
807
|
eventArgs.shape = shape;
|
|
808
808
|
if (data[eventArgs.shapeValuePath] === 'Image') {
|
|
809
|
-
eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)
|
|
810
|
-
!isNullOrUndefined(data[eventArgs.imageUrlValuePath])
|
|
811
|
-
|
|
809
|
+
eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
810
|
+
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
811
|
+
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
else {
|
|
815
815
|
const shapes = (!isNullOrUndefined(eventArgs.shapeValuePath)) ? ((eventArgs.shapeValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.shapeValuePath).toString() : eventArgs.shape) : eventArgs.shape;
|
|
816
816
|
eventArgs.shape = shapes;
|
|
817
|
-
const shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
817
|
+
const shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
818
|
+
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
819
|
+
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
818
820
|
eventArgs.imageUrl = shapeImage;
|
|
819
821
|
}
|
|
820
822
|
return eventArgs;
|
|
@@ -1192,6 +1194,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1192
1194
|
* @param {number} markerIndex - Specifies the marker index
|
|
1193
1195
|
* @param {HTMLElement} markerTemplate - Specifies the marker template element
|
|
1194
1196
|
* @param {Point} location - Specifies the location
|
|
1197
|
+
* @param {Point} transPoint - Specifies the translate point.
|
|
1195
1198
|
* @param {number} scale - Specifies the scale value
|
|
1196
1199
|
* @param {Point} offset - Specifies the offset value
|
|
1197
1200
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
@@ -1683,6 +1686,7 @@ function getRatioOfBubble(min, max, value, minValue, maxValue) {
|
|
|
1683
1686
|
*
|
|
1684
1687
|
* @param {MapLocation[]} points - Specifies the points
|
|
1685
1688
|
* @param {string} type - Specifies the type
|
|
1689
|
+
* @param {string} geometryType - Specified the type of the geometry
|
|
1686
1690
|
* @returns {any} - Specifies the object
|
|
1687
1691
|
*/
|
|
1688
1692
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1901,9 +1905,9 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
1901
1905
|
mapObject.mapScaleValue = scaleFactor = zoomFactorValue = mapObject.scaleOfGivenLocation;
|
|
1902
1906
|
}
|
|
1903
1907
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1904
|
-
const min = mapObject.baseMapRectBounds['min'];
|
|
1908
|
+
const min = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['min'] : null;
|
|
1905
1909
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1906
|
-
const max = mapObject.baseMapRectBounds['max'];
|
|
1910
|
+
const max = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['max'] : null;
|
|
1907
1911
|
const zoomFactor = animate ? 1 : mapObject.mapScaleValue;
|
|
1908
1912
|
if (isNullOrUndefined(mapObject.currentShapeDataLength)) {
|
|
1909
1913
|
mapObject.currentShapeDataLength = !isNullOrUndefined(layer.shapeData['features'])
|
|
@@ -1913,111 +1917,113 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
1913
1917
|
const availSize = mapObject.availableSize;
|
|
1914
1918
|
let x;
|
|
1915
1919
|
let y;
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
y = -point.y + topPosition;
|
|
1930
|
-
scaleFactor = zoomFactor;
|
|
1931
|
-
}
|
|
1932
|
-
else {
|
|
1933
|
-
if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
|
|
1920
|
+
if (!isNullOrUndefined(min) && !isNullOrUndefined(max)) {
|
|
1921
|
+
let mapWidth = Math.abs(max['x'] - min['x']);
|
|
1922
|
+
let mapHeight = Math.abs(min['y'] - max['y']);
|
|
1923
|
+
const factor = animate ? 1 : mapObject.markerZoomFactor === 1 ? mapObject.mapScaleValue : zoomFactorValue;
|
|
1924
|
+
center = mapObject.zoomSettings.shouldZoomInitially
|
|
1925
|
+
&& mapObject.markerZoomedState && !mapObject.zoomPersistence ? mapObject.markerZoomCenterPoint :
|
|
1926
|
+
mapObject.centerPosition;
|
|
1927
|
+
if ((!isNullOrUndefined(centerLongitude) && !isNullOrUndefined(centerLatitude)) || checkMethodeZoom) {
|
|
1928
|
+
const leftPosition = (((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) + mapObject.mapAreaRect.x) / factor;
|
|
1929
|
+
const topPosition = (((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) + mapObject.mapAreaRect.y) / factor;
|
|
1930
|
+
const point = checkMethodeZoom ? calculateCenterFromPixel(mapObject, layer) :
|
|
1931
|
+
convertGeoToPoint(centerLatitude, centerLongitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
|
|
1932
|
+
if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
|
|
1934
1933
|
x = -point.x + leftPosition;
|
|
1935
1934
|
y = -point.y + topPosition;
|
|
1935
|
+
scaleFactor = zoomFactor;
|
|
1936
1936
|
}
|
|
1937
1937
|
else {
|
|
1938
|
-
if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
|
|
1938
|
+
if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
|
|
1939
1939
|
x = -point.x + leftPosition;
|
|
1940
1940
|
y = -point.y + topPosition;
|
|
1941
|
-
scaleFactor = zoomFactor;
|
|
1942
1941
|
}
|
|
1943
1942
|
else {
|
|
1944
|
-
|
|
1945
|
-
|
|
1943
|
+
if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
|
|
1944
|
+
x = -point.x + leftPosition;
|
|
1945
|
+
y = -point.y + topPosition;
|
|
1946
|
+
scaleFactor = zoomFactor;
|
|
1947
|
+
}
|
|
1948
|
+
else {
|
|
1949
|
+
x = mapObject.zoomTranslatePoint.x;
|
|
1950
|
+
y = mapObject.zoomTranslatePoint.y;
|
|
1951
|
+
}
|
|
1946
1952
|
}
|
|
1953
|
+
scaleFactor = mapObject.mapScaleValue;
|
|
1947
1954
|
}
|
|
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
1955
|
}
|
|
1961
1956
|
else {
|
|
1962
|
-
if (
|
|
1957
|
+
if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
|
|
1963
1958
|
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
1964
|
-
mapHeight *= scaleFactor;
|
|
1965
1959
|
mapWidth *= scaleFactor;
|
|
1960
|
+
mapHeight *= scaleFactor;
|
|
1961
|
+
const widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
|
|
1962
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))) - widthDiff;
|
|
1966
1963
|
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
1967
|
-
|
|
1964
|
+
mapObject.previousTranslate = new Point(x, y);
|
|
1968
1965
|
}
|
|
1969
1966
|
else {
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
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;
|
|
1967
|
+
if (!mapObject.zoomSettings.shouldZoomInitially && mapObject.markerZoomFactor === 1 && mapObject.mapScaleValue === 1) {
|
|
1968
|
+
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
1969
|
+
mapHeight *= scaleFactor;
|
|
1970
|
+
mapWidth *= scaleFactor;
|
|
1971
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
1972
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
|
|
2000
1973
|
}
|
|
2001
1974
|
else {
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
mapHeight
|
|
2007
|
-
|
|
1975
|
+
scaleFactor = mapObject.mapScaleValue < 1 ? mapObject.mapScaleValue + 1 : mapObject.mapScaleValue;
|
|
1976
|
+
mapObject.mapScaleValue = mapObject.zoomSettings.enable && mapObject.mapScaleValue !== 1 ? mapObject.mapScaleValue : 1;
|
|
1977
|
+
if ((mapObject.currentShapeDataLength !== (!isNullOrUndefined(layer.shapeData['features'])
|
|
1978
|
+
? layer.shapeData['features'].length : layer.shapeData['geometries'].length)) && layer.type !== 'SubLayer') {
|
|
1979
|
+
const scale = parseFloat(Math.min(size.height / mapHeight, size.width / mapWidth).toFixed(2));
|
|
1980
|
+
mapHeight *= scale;
|
|
1981
|
+
mapWidth *= scale;
|
|
1982
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2)
|
|
1983
|
+
- (mapHeight / 2)));
|
|
1984
|
+
scaleFactor = scale;
|
|
1985
|
+
x = size.x + ((-(min['x']))
|
|
1986
|
+
+ ((size.width / 2) - (mapWidth / 2)));
|
|
1987
|
+
}
|
|
1988
|
+
else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width) {
|
|
1989
|
+
const cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
1990
|
+
let cmapWidth = mapWidth;
|
|
1991
|
+
cmapWidth *= cscaleFactor;
|
|
1992
|
+
let cmapHeight = mapHeight;
|
|
1993
|
+
cmapHeight *= cscaleFactor;
|
|
1994
|
+
const x1 = size.x + ((-(min['x'])) + ((size.width / 2) - (cmapWidth / 2)));
|
|
1995
|
+
const y1 = size.y + ((-(min['y'])) + ((size.height / 2) - (cmapHeight / 2)));
|
|
1996
|
+
const xdiff = (mapObject.translatePoint.x - mapObject.previousTranslate.x) / (mapObject.widthBeforeRefresh);
|
|
1997
|
+
const ydiff = (mapObject.translatePoint.y - mapObject.previousTranslate.y) / (mapObject.heightBeforeRefresh);
|
|
1998
|
+
const actxdiff = xdiff * (mapObject.availableSize.width);
|
|
1999
|
+
const actydiff = ydiff * (mapObject.availableSize.height);
|
|
2000
|
+
x = x1 + actxdiff;
|
|
2001
|
+
y = y1 + actydiff;
|
|
2002
|
+
mapObject.previousTranslate = new Point(x1, y1);
|
|
2003
|
+
mapObject.zoomTranslatePoint.x = x;
|
|
2004
|
+
mapObject.zoomTranslatePoint.y = y;
|
|
2008
2005
|
}
|
|
2009
2006
|
else {
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2007
|
+
if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
|
|
2008
|
+
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2009
|
+
mapWidth *= scaleFactor;
|
|
2010
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
|
|
2011
|
+
mapHeight *= scaleFactor;
|
|
2012
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
2013
|
+
}
|
|
2014
|
+
else {
|
|
2015
|
+
x = mapObject.zoomTranslatePoint.x;
|
|
2016
|
+
y = mapObject.zoomTranslatePoint.y;
|
|
2017
|
+
scaleFactor = mapObject.scale;
|
|
2018
|
+
}
|
|
2013
2019
|
}
|
|
2014
2020
|
}
|
|
2015
2021
|
}
|
|
2016
2022
|
}
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2023
|
+
if (!isNullOrUndefined(mapObject.translatePoint)) {
|
|
2024
|
+
x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
|
|
2025
|
+
y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
|
|
2026
|
+
}
|
|
2021
2027
|
}
|
|
2022
2028
|
scaleFactor = (mapObject.enablePersistence) ? ((mapObject.mapScaleValue >= 1) ? mapObject.mapScaleValue : 1) : scaleFactor;
|
|
2023
2029
|
mapObject.widthBeforeRefresh = mapObject.availableSize.width;
|
|
@@ -2453,6 +2459,12 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius = 0)
|
|
|
2453
2459
|
delay: delay,
|
|
2454
2460
|
progress: (args) => {
|
|
2455
2461
|
if (args.timeStamp > args.delay) {
|
|
2462
|
+
if (maps.isTileMap && height === 0) {
|
|
2463
|
+
const layerGroupElement = document.querySelector('.GroupElement');
|
|
2464
|
+
if (!isNullOrUndefined(layerGroupElement)) {
|
|
2465
|
+
layerGroupElement.style.display = 'block';
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2456
2468
|
height = ((args.timeStamp - args.delay) / args.duration);
|
|
2457
2469
|
element.setAttribute('transform', 'translate( ' + (centerX - (radius * height)) + ' ' + (centerY - (radius * height)) +
|
|
2458
2470
|
' ) scale(' + height + ')');
|
|
@@ -2787,6 +2799,7 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2787
2799
|
let value = 0;
|
|
2788
2800
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2789
2801
|
const borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
|
|
2802
|
+
const borderWidth = maps.layersCollection[index].shapeSettings.border.width;
|
|
2790
2803
|
if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
|
|
2791
2804
|
value = checkShapeDataFields(
|
|
2792
2805
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2796,14 +2809,17 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2796
2809
|
currentStroke = maps.layersCollection[index].dataSource[value][borderWidthValue];
|
|
2797
2810
|
}
|
|
2798
2811
|
else {
|
|
2799
|
-
currentStroke = (
|
|
2812
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2800
2813
|
}
|
|
2801
2814
|
}
|
|
2802
2815
|
}
|
|
2803
2816
|
else {
|
|
2804
|
-
currentStroke = (
|
|
2817
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2805
2818
|
}
|
|
2806
2819
|
childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
|
|
2820
|
+
if (element.id.indexOf('_LineString') > -1 && isNullOrUndefined(currentStroke)) {
|
|
2821
|
+
childNode.setAttribute('stroke-width', (1 / scale).toString());
|
|
2822
|
+
}
|
|
2807
2823
|
}
|
|
2808
2824
|
}
|
|
2809
2825
|
}
|
|
@@ -3165,15 +3181,15 @@ var Theme;
|
|
|
3165
3181
|
fontWeight: 'Regular',
|
|
3166
3182
|
color: null,
|
|
3167
3183
|
fontStyle: 'Regular',
|
|
3168
|
-
fontFamily:
|
|
3184
|
+
fontFamily: null
|
|
3169
3185
|
};
|
|
3170
3186
|
/** @private */
|
|
3171
3187
|
Theme.legendTitleFont = {
|
|
3172
|
-
size: '
|
|
3173
|
-
fontWeight: '
|
|
3188
|
+
size: '12px',
|
|
3189
|
+
fontWeight: 'Medium',
|
|
3174
3190
|
color: null,
|
|
3175
|
-
fontStyle: '
|
|
3176
|
-
fontFamily:
|
|
3191
|
+
fontStyle: 'Medium',
|
|
3192
|
+
fontFamily: null
|
|
3177
3193
|
};
|
|
3178
3194
|
/** @private */
|
|
3179
3195
|
Theme.legendLabelFont = {
|
|
@@ -3322,6 +3338,14 @@ function getShapeColor(theme) {
|
|
|
3322
3338
|
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
3323
3339
|
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
3324
3340
|
break;
|
|
3341
|
+
case 'fluentui':
|
|
3342
|
+
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
3343
|
+
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
3344
|
+
break;
|
|
3345
|
+
case 'fluentuidark':
|
|
3346
|
+
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
3347
|
+
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
3348
|
+
break;
|
|
3325
3349
|
default:
|
|
3326
3350
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
3327
3351
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -3467,6 +3491,7 @@ function getThemeStyle(theme) {
|
|
|
3467
3491
|
tooltipFillColor: '#363F4C',
|
|
3468
3492
|
zoomFillColor: '#FFFFFF',
|
|
3469
3493
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3494
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3470
3495
|
titleFontWeight: 'Medium',
|
|
3471
3496
|
zoomSelectionColor: '#e61576',
|
|
3472
3497
|
shapeFill: '#A6A6A6'
|
|
@@ -3484,6 +3509,7 @@ function getThemeStyle(theme) {
|
|
|
3484
3509
|
tooltipFontColor: '#000000',
|
|
3485
3510
|
tooltipFillColor: '#ffffff',
|
|
3486
3511
|
zoomFillColor: '#FFFFFF',
|
|
3512
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3487
3513
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3488
3514
|
titleFontWeight: 'Medium',
|
|
3489
3515
|
zoomSelectionColor: '#e61576',
|
|
@@ -3605,6 +3631,52 @@ function getThemeStyle(theme) {
|
|
|
3605
3631
|
shapeFill: '#495057'
|
|
3606
3632
|
};
|
|
3607
3633
|
break;
|
|
3634
|
+
case 'fluentui':
|
|
3635
|
+
style = {
|
|
3636
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3637
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3638
|
+
titleFontColor: '#201F1E',
|
|
3639
|
+
subTitleFontColor: '#201F1E',
|
|
3640
|
+
legendTitleFontColor: '#201F1E',
|
|
3641
|
+
legendTextColor: '#201F1E',
|
|
3642
|
+
dataLabelFontColor: '#201F1E',
|
|
3643
|
+
tooltipFontColor: '#323130',
|
|
3644
|
+
tooltipFillColor: '#FFFFFF',
|
|
3645
|
+
zoomFillColor: '#A19F9D',
|
|
3646
|
+
fontFamily: 'Segoe UI',
|
|
3647
|
+
titleFontSize: '14px',
|
|
3648
|
+
legendFontSize: '12px',
|
|
3649
|
+
tooltipFillOpacity: 1,
|
|
3650
|
+
tooltipTextOpacity: 1,
|
|
3651
|
+
labelFontFamily: 'Segoe UI',
|
|
3652
|
+
titleFontWeight: '600',
|
|
3653
|
+
zoomSelectionColor: '#323130',
|
|
3654
|
+
shapeFill: '#F3F2F1'
|
|
3655
|
+
};
|
|
3656
|
+
break;
|
|
3657
|
+
case 'fluentuidark':
|
|
3658
|
+
style = {
|
|
3659
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3660
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3661
|
+
titleFontColor: '#F3F2F1',
|
|
3662
|
+
subTitleFontColor: '#F3F2F1',
|
|
3663
|
+
legendTitleFontColor: '#F3F2F1',
|
|
3664
|
+
legendTextColor: '#F3F2F1',
|
|
3665
|
+
dataLabelFontColor: '#F3F2F1',
|
|
3666
|
+
tooltipFontColor: '#F3F2F1',
|
|
3667
|
+
tooltipFillColor: '#252423',
|
|
3668
|
+
zoomFillColor: '#484644',
|
|
3669
|
+
fontFamily: 'Segoe UI',
|
|
3670
|
+
titleFontSize: '14px',
|
|
3671
|
+
legendFontSize: '12px',
|
|
3672
|
+
tooltipFillOpacity: 1,
|
|
3673
|
+
tooltipTextOpacity: 1,
|
|
3674
|
+
labelFontFamily: 'Segoe UI',
|
|
3675
|
+
titleFontWeight: '600',
|
|
3676
|
+
zoomSelectionColor: '#F3F2F1',
|
|
3677
|
+
shapeFill: '#252423'
|
|
3678
|
+
};
|
|
3679
|
+
break;
|
|
3608
3680
|
default:
|
|
3609
3681
|
style = {
|
|
3610
3682
|
backgroundColor: '#FFFFFF',
|
|
@@ -3618,6 +3690,7 @@ function getThemeStyle(theme) {
|
|
|
3618
3690
|
tooltipFillColor: '#000000',
|
|
3619
3691
|
zoomFillColor: '#737373',
|
|
3620
3692
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3693
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3621
3694
|
titleFontWeight: 'Medium',
|
|
3622
3695
|
zoomSelectionColor: '#e61576',
|
|
3623
3696
|
shapeFill: '#A6A6A6'
|
|
@@ -4185,7 +4258,7 @@ __decorate$1([
|
|
|
4185
4258
|
Complex({}, CommonTitleSettings)
|
|
4186
4259
|
], LegendSettings.prototype, "title", void 0);
|
|
4187
4260
|
__decorate$1([
|
|
4188
|
-
Complex(
|
|
4261
|
+
Complex(Theme.legendTitleFont, Font)
|
|
4189
4262
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
4190
4263
|
__decorate$1([
|
|
4191
4264
|
Property('Bottom')
|
|
@@ -4273,7 +4346,7 @@ __decorate$1([
|
|
|
4273
4346
|
Property(5)
|
|
4274
4347
|
], ShapeSettings.prototype, "circleRadius", void 0);
|
|
4275
4348
|
__decorate$1([
|
|
4276
|
-
Complex({ width:
|
|
4349
|
+
Complex({ width: null, color: '#000000' }, Border)
|
|
4277
4350
|
], ShapeSettings.prototype, "border", void 0);
|
|
4278
4351
|
__decorate$1([
|
|
4279
4352
|
Property('')
|
|
@@ -4542,15 +4615,9 @@ class Marker {
|
|
|
4542
4615
|
border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
|
|
4543
4616
|
shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
|
|
4544
4617
|
};
|
|
4545
|
-
eventArgs = markerColorChoose(eventArgs, data);
|
|
4546
|
-
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4547
4618
|
this.maps.trigger('markerRendering', eventArgs, (MarkerArgs) => {
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
}
|
|
4551
|
-
if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
|
|
4552
|
-
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4553
|
-
}
|
|
4619
|
+
eventArgs = markerColorChoose(eventArgs, data);
|
|
4620
|
+
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4554
4621
|
const lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
4555
4622
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
4556
4623
|
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : 0;
|
|
@@ -4770,7 +4837,7 @@ class Marker {
|
|
|
4770
4837
|
if (isNullOrUndefined(options)) {
|
|
4771
4838
|
return;
|
|
4772
4839
|
}
|
|
4773
|
-
|
|
4840
|
+
const eventArgs = {
|
|
4774
4841
|
cancel: false, name: markerClick, data: options.data, maps: this.maps,
|
|
4775
4842
|
marker: options.marker, target: target, x: e.clientX, y: e.clientY,
|
|
4776
4843
|
latitude: options.data['latitude'] || options.data['Latitude'],
|
|
@@ -5538,7 +5605,7 @@ class LayerPanel {
|
|
|
5538
5605
|
if (this.mapObject.zoomSettings.resetToInitial && this.mapObject.initialCheck && !isNullOrUndefined(panel.mapObject.height)
|
|
5539
5606
|
&& this.mapObject.availableSize.height > 512) {
|
|
5540
5607
|
this.mapObject.applyZoomReset = true;
|
|
5541
|
-
this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512)
|
|
5608
|
+
this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512);
|
|
5542
5609
|
const padding = this.mapObject.layers[this.mapObject.baseLayerIndex].layerType !== 'GoogleStaticMap' ?
|
|
5543
5610
|
20 : 0;
|
|
5544
5611
|
const totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
|
|
@@ -5579,7 +5646,7 @@ class LayerPanel {
|
|
|
5579
5646
|
}
|
|
5580
5647
|
}
|
|
5581
5648
|
}
|
|
5582
|
-
|
|
5649
|
+
const eventArgs = {
|
|
5583
5650
|
cancel: false, name: layerRendering, index: layerIndex,
|
|
5584
5651
|
layer: layer, maps: this.mapObject, visible: layer.visible
|
|
5585
5652
|
};
|
|
@@ -5619,6 +5686,9 @@ class LayerPanel {
|
|
|
5619
5686
|
proxy.mapObject['bingMap'] = bing;
|
|
5620
5687
|
proxy.renderTileLayer(proxy, layer, layerIndex, bing);
|
|
5621
5688
|
this.mapObject.arrangeTemplate();
|
|
5689
|
+
if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
|
|
5690
|
+
this.mapObject.zoomModule.applyTransform(true);
|
|
5691
|
+
}
|
|
5622
5692
|
};
|
|
5623
5693
|
ajax.send();
|
|
5624
5694
|
}
|
|
@@ -5696,9 +5766,7 @@ class LayerPanel {
|
|
|
5696
5766
|
const data = geometryData['geometry'];
|
|
5697
5767
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5698
5768
|
const properties = geometryData['properties'];
|
|
5699
|
-
|
|
5700
|
-
this.generatePoints(type, coords, data, properties);
|
|
5701
|
-
}
|
|
5769
|
+
this.generatePoints(type, coords, data, properties);
|
|
5702
5770
|
}
|
|
5703
5771
|
});
|
|
5704
5772
|
this.currentLayer.rectBounds = this.rectBounds;
|
|
@@ -5726,11 +5794,9 @@ class LayerPanel {
|
|
|
5726
5794
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5727
5795
|
const currentShapeData = this.currentLayer.layerData[i];
|
|
5728
5796
|
let pathOptions;
|
|
5729
|
-
let polyLineOptions;
|
|
5730
5797
|
let circleOptions;
|
|
5731
5798
|
let groupElement;
|
|
5732
5799
|
let path = '';
|
|
5733
|
-
let points = '';
|
|
5734
5800
|
let fill = (shapeSettings.autofill) ? colors[i % colors.length] :
|
|
5735
5801
|
(shapeSettings.fill || this.mapObject.themeStyle.shapeFill);
|
|
5736
5802
|
if (shapeSettings.colorValuePath !== null && !isNullOrUndefined(currentShapeData['property'])) {
|
|
@@ -5773,7 +5839,7 @@ class LayerPanel {
|
|
|
5773
5839
|
}
|
|
5774
5840
|
const opacity = (Object.prototype.toString.call(getShapeColor$$1) === '[object Object]'
|
|
5775
5841
|
&& !isNullOrUndefined(getShapeColor$$1['opacity'])) ? getShapeColor$$1['opacity'] : shapeSettings.opacity;
|
|
5776
|
-
|
|
5842
|
+
const eventArgs = {
|
|
5777
5843
|
cancel: false, name: shapeRendering, index: i,
|
|
5778
5844
|
data: this.currentLayer.dataSource ? this.currentLayer.dataSource[k] : null,
|
|
5779
5845
|
maps: this.mapObject,
|
|
@@ -5794,7 +5860,7 @@ class LayerPanel {
|
|
|
5794
5860
|
if (isNullOrUndefined(shapeSettings.borderColorValuePath)) {
|
|
5795
5861
|
this.mapObject.layers[layerIndex].shapeSettings.border.color = eventArgs.border.color;
|
|
5796
5862
|
}
|
|
5797
|
-
|
|
5863
|
+
if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
|
|
5798
5864
|
this.mapObject.layers[layerIndex].shapeSettings.border.width = eventArgs.border.width;
|
|
5799
5865
|
}
|
|
5800
5866
|
}
|
|
@@ -5848,17 +5914,21 @@ class LayerPanel {
|
|
|
5848
5914
|
}
|
|
5849
5915
|
break;
|
|
5850
5916
|
case 'LineString':
|
|
5917
|
+
path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
|
|
5851
5918
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5852
5919
|
currentShapeData.map((lineData) => {
|
|
5853
|
-
|
|
5920
|
+
path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
|
|
5854
5921
|
});
|
|
5855
|
-
|
|
5856
|
-
|
|
5922
|
+
if (path.length > 3) {
|
|
5923
|
+
pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
|
|
5924
|
+
pathEle = this.mapObject.renderer.drawPath(pathOptions);
|
|
5925
|
+
}
|
|
5857
5926
|
break;
|
|
5858
5927
|
case 'Point':
|
|
5859
5928
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5860
5929
|
const pointData = currentShapeData['point'];
|
|
5861
|
-
|
|
5930
|
+
const circleRadius = (this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / this.currentFactor;
|
|
5931
|
+
circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, null);
|
|
5862
5932
|
pathEle = this.mapObject.renderer.drawCircle(circleOptions);
|
|
5863
5933
|
break;
|
|
5864
5934
|
case 'Path':
|
|
@@ -5880,6 +5950,9 @@ class LayerPanel {
|
|
|
5880
5950
|
pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
|
|
5881
5951
|
(currentShapeData['property'][properties]) : ''));
|
|
5882
5952
|
pathEle.setAttribute('tabindex', (this.mapObject.tabIndex + i + 2).toString());
|
|
5953
|
+
if (drawingType === 'LineString') {
|
|
5954
|
+
pathEle.setAttribute('style', 'outline:none');
|
|
5955
|
+
}
|
|
5883
5956
|
maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
|
|
5884
5957
|
if (this.mapObject.toggledShapeElementId) {
|
|
5885
5958
|
for (let j = 0; j < this.mapObject.toggledShapeElementId.length; j++) {
|
|
@@ -6088,11 +6161,14 @@ class LayerPanel {
|
|
|
6088
6161
|
this.currentLayer.layerData.push(multiPolygonDatas);
|
|
6089
6162
|
break;
|
|
6090
6163
|
case 'linestring':
|
|
6164
|
+
const extraSpace = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6165
|
+
this.currentLayer.shapeSettings.border.width : 1;
|
|
6091
6166
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6092
6167
|
coordinates.map((points, index) => {
|
|
6093
6168
|
latitude = points[1];
|
|
6094
6169
|
longitude = points[0];
|
|
6095
6170
|
const point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
|
|
6171
|
+
this.calculateBox(point, extraSpace);
|
|
6096
6172
|
newData.push({
|
|
6097
6173
|
point: point, lat: latitude, lng: longitude
|
|
6098
6174
|
});
|
|
@@ -6103,6 +6179,8 @@ class LayerPanel {
|
|
|
6103
6179
|
break;
|
|
6104
6180
|
case 'point': {
|
|
6105
6181
|
let arrayCollections = false;
|
|
6182
|
+
const extraSpace = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6183
|
+
this.currentLayer.shapeSettings.border.width : 1) + (this.currentLayer.shapeSettings.circleRadius * 2);
|
|
6106
6184
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6107
6185
|
coordinates.map((points, index) => {
|
|
6108
6186
|
if (Object.prototype.toString.call(points) === '[object Array]') {
|
|
@@ -6119,6 +6197,7 @@ class LayerPanel {
|
|
|
6119
6197
|
latitude = coordinates[1];
|
|
6120
6198
|
longitude = coordinates[0];
|
|
6121
6199
|
const point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
|
|
6200
|
+
this.calculateBox(point, extraSpace);
|
|
6122
6201
|
this.currentLayer.layerData.push({
|
|
6123
6202
|
point: point, type: type, lat: latitude, lng: longitude, property: properties
|
|
6124
6203
|
});
|
|
@@ -6132,6 +6211,17 @@ class LayerPanel {
|
|
|
6132
6211
|
break;
|
|
6133
6212
|
}
|
|
6134
6213
|
}
|
|
6214
|
+
calculateBox(point, extraSpace) {
|
|
6215
|
+
if (isNullOrUndefined(this.rectBounds)) {
|
|
6216
|
+
this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
|
|
6217
|
+
}
|
|
6218
|
+
else {
|
|
6219
|
+
this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
|
|
6220
|
+
this.rectBounds['min']['y'] = Math.min(this.rectBounds['min']['y'], point.y - extraSpace);
|
|
6221
|
+
this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x);
|
|
6222
|
+
this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
|
|
6223
|
+
}
|
|
6224
|
+
}
|
|
6135
6225
|
calculateFactor(layer) {
|
|
6136
6226
|
let horFactor;
|
|
6137
6227
|
let verFactor = 1;
|
|
@@ -6239,6 +6329,15 @@ class LayerPanel {
|
|
|
6239
6329
|
this.calculateRectBox(point[0]);
|
|
6240
6330
|
});
|
|
6241
6331
|
break;
|
|
6332
|
+
case 'linestring':
|
|
6333
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6334
|
+
coordinates.map((point, index) => {
|
|
6335
|
+
this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
|
|
6336
|
+
});
|
|
6337
|
+
break;
|
|
6338
|
+
case 'point':
|
|
6339
|
+
this.calculateRectBox(coordinates, 'point');
|
|
6340
|
+
break;
|
|
6242
6341
|
}
|
|
6243
6342
|
}
|
|
6244
6343
|
});
|
|
@@ -6274,19 +6373,32 @@ class LayerPanel {
|
|
|
6274
6373
|
return newData;
|
|
6275
6374
|
}
|
|
6276
6375
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6277
|
-
calculateRectBox(coordinates) {
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
this.mapObject.baseMapBounds
|
|
6376
|
+
calculateRectBox(coordinates, type, isFirstItem) {
|
|
6377
|
+
if (type !== 'LineString' && type !== 'point') {
|
|
6378
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6379
|
+
Array.prototype.forEach.call(coordinates, (currentCoords) => {
|
|
6380
|
+
if (isNullOrUndefined(this.mapObject.baseMapBounds)) {
|
|
6381
|
+
this.mapObject.baseMapBounds = new GeoLocation({ min: currentCoords[1], max: currentCoords[1] }, { min: currentCoords[0], max: currentCoords[0] });
|
|
6382
|
+
}
|
|
6383
|
+
else {
|
|
6384
|
+
this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
|
|
6385
|
+
this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
|
|
6386
|
+
this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
|
|
6387
|
+
this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, currentCoords[0]);
|
|
6388
|
+
}
|
|
6389
|
+
});
|
|
6390
|
+
}
|
|
6391
|
+
else {
|
|
6392
|
+
if ((isFirstItem || type === 'point') && isNullOrUndefined(this.mapObject.baseMapBounds)) {
|
|
6393
|
+
this.mapObject.baseMapBounds = new GeoLocation({ min: coordinates[1], max: coordinates[1] }, { min: coordinates[0], max: coordinates[0] });
|
|
6282
6394
|
}
|
|
6283
6395
|
else {
|
|
6284
|
-
this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min,
|
|
6285
|
-
this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max,
|
|
6286
|
-
this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min,
|
|
6287
|
-
this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max,
|
|
6396
|
+
this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, coordinates[1]);
|
|
6397
|
+
this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, coordinates[1]);
|
|
6398
|
+
this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, coordinates[0]);
|
|
6399
|
+
this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, coordinates[0]);
|
|
6288
6400
|
}
|
|
6289
|
-
}
|
|
6401
|
+
}
|
|
6290
6402
|
}
|
|
6291
6403
|
generateTiles(zoomLevel, tileTranslatePoint, zoomType, bing, position) {
|
|
6292
6404
|
const userLang = this.mapObject.locale;
|
|
@@ -6373,15 +6485,17 @@ class LayerPanel {
|
|
|
6373
6485
|
}
|
|
6374
6486
|
}
|
|
6375
6487
|
}
|
|
6376
|
-
this.
|
|
6488
|
+
if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset) {
|
|
6489
|
+
this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
|
|
6490
|
+
}
|
|
6377
6491
|
}
|
|
6378
6492
|
arrangeTiles(type, x, y) {
|
|
6379
6493
|
const element = document.getElementById(this.mapObject.element.id + '_tile_parent');
|
|
6380
6494
|
const element1 = document.getElementById(this.mapObject.element.id + '_tiles');
|
|
6381
6495
|
let timeOut;
|
|
6382
|
-
if (!isNullOrUndefined(type) && type !== 'Pan'
|
|
6496
|
+
if (!isNullOrUndefined(type) && type !== 'Pan') {
|
|
6383
6497
|
this.tileAnimation(type, x, y);
|
|
6384
|
-
timeOut =
|
|
6498
|
+
timeOut = this.mapObject.layersCollection[0].animationDuration;
|
|
6385
6499
|
}
|
|
6386
6500
|
else {
|
|
6387
6501
|
timeOut = 0;
|
|
@@ -6396,7 +6510,6 @@ class LayerPanel {
|
|
|
6396
6510
|
}
|
|
6397
6511
|
if (element1) {
|
|
6398
6512
|
element1.style.zIndex = '0';
|
|
6399
|
-
element1.style.visibility = 'hidden';
|
|
6400
6513
|
}
|
|
6401
6514
|
let animateElement;
|
|
6402
6515
|
if (!document.getElementById(this.mapObject.element.id + '_animated_tiles') && element) {
|
|
@@ -6454,35 +6567,23 @@ class LayerPanel {
|
|
|
6454
6567
|
* @returns {void}
|
|
6455
6568
|
*/
|
|
6456
6569
|
tileAnimation(zoomType, translateX, translateY) {
|
|
6457
|
-
const
|
|
6458
|
-
|
|
6459
|
-
const
|
|
6570
|
+
const tileParent = document.getElementById(this.mapObject.element.id + '_tile_parent');
|
|
6571
|
+
const animatedTiles = document.getElementById(this.mapObject.element.id + '_animated_tiles');
|
|
6572
|
+
const tileElement = document.getElementById(this.mapObject.element.id + '_tiles');
|
|
6460
6573
|
let scaleValue = '2';
|
|
6461
|
-
if (zoomType.indexOf('ZoomOut') === 0) {
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
ele.removeChild(ele.children[0]);
|
|
6574
|
+
if (zoomType.indexOf('ZoomOut') === 0 || zoomType === 'Reset') {
|
|
6575
|
+
tileElement.style.zIndex = '1';
|
|
6576
|
+
tileParent.style.zIndex = '0';
|
|
6577
|
+
while (tileElement.childElementCount >= 1) {
|
|
6578
|
+
tileElement.removeChild(tileElement.children[0]);
|
|
6467
6579
|
}
|
|
6468
6580
|
translateX = 0;
|
|
6469
|
-
translateY =
|
|
6470
|
-
scaleValue = '0.5';
|
|
6581
|
+
translateY = document.getElementById(this.mapObject.element.id + '_tile_parent').getClientRects()[0].height / 4;
|
|
6582
|
+
scaleValue = zoomType.indexOf('ZoomOut') === 0 ? '0.5' : '0.2';
|
|
6471
6583
|
}
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
while (!(ele.childElementCount === 1) && !(ele.childElementCount === 0)) {
|
|
6476
|
-
ele.removeChild(ele.children[1]);
|
|
6477
|
-
}
|
|
6478
|
-
element1 = ele.children[0];
|
|
6479
|
-
translateX = 0;
|
|
6480
|
-
translateY = 0;
|
|
6481
|
-
scaleValue = '1';
|
|
6482
|
-
}
|
|
6483
|
-
if (!isNullOrUndefined(element1)) {
|
|
6484
|
-
element1.style.transition = '250ms';
|
|
6485
|
-
element1.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
|
|
6584
|
+
if (!isNullOrUndefined(animatedTiles)) {
|
|
6585
|
+
animatedTiles.style.transition = this.mapObject.layersCollection[0].animationDuration + 'ms';
|
|
6586
|
+
animatedTiles.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
|
|
6486
6587
|
}
|
|
6487
6588
|
}
|
|
6488
6589
|
/**
|
|
@@ -7889,7 +7990,7 @@ let Maps = class Maps extends Component {
|
|
|
7889
7990
|
* @param e - Specifies the arguments of window resize event.
|
|
7890
7991
|
*/
|
|
7891
7992
|
mapsOnResize(e) {
|
|
7892
|
-
this.isResize = true;
|
|
7993
|
+
this.isResize = this.isReset = true;
|
|
7893
7994
|
const args = {
|
|
7894
7995
|
name: resize,
|
|
7895
7996
|
previousSize: this.availableSize,
|
|
@@ -8855,6 +8956,8 @@ class Bubble {
|
|
|
8855
8956
|
// eslint-disable-next-line valid-jsdoc
|
|
8856
8957
|
/**
|
|
8857
8958
|
* To render bubble
|
|
8959
|
+
*
|
|
8960
|
+
* @private
|
|
8858
8961
|
*/
|
|
8859
8962
|
renderBubble(
|
|
8860
8963
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -8899,7 +9002,7 @@ class Bubble {
|
|
|
8899
9002
|
isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
|
|
8900
9003
|
const shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
|
|
8901
9004
|
? shape[shapePath].toLowerCase() : shape[shapePath];
|
|
8902
|
-
if (shapeDataLayerPathValue === shapePathValue) {
|
|
9005
|
+
if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
|
|
8903
9006
|
if (layerData[i]['type'] === 'Point') {
|
|
8904
9007
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8905
9008
|
shapePoints.push(this.getPoints(layerData[i], []));
|
|
@@ -9030,6 +9133,8 @@ class Bubble {
|
|
|
9030
9133
|
// eslint-disable-next-line valid-jsdoc
|
|
9031
9134
|
/**
|
|
9032
9135
|
* To check and trigger bubble click event
|
|
9136
|
+
*
|
|
9137
|
+
* @private
|
|
9033
9138
|
*/
|
|
9034
9139
|
bubbleClick(e) {
|
|
9035
9140
|
const target = e.target.id;
|
|
@@ -9041,7 +9146,7 @@ class Bubble {
|
|
|
9041
9146
|
if (isNullOrUndefined(data)) {
|
|
9042
9147
|
return;
|
|
9043
9148
|
}
|
|
9044
|
-
|
|
9149
|
+
const eventArgs = {
|
|
9045
9150
|
cancel: false, name: bubbleClick, data: data, maps: this.maps,
|
|
9046
9151
|
target: target, x: e.clientX, y: e.clientY
|
|
9047
9152
|
};
|
|
@@ -9073,6 +9178,8 @@ class Bubble {
|
|
|
9073
9178
|
// eslint-disable-next-line valid-jsdoc
|
|
9074
9179
|
/**
|
|
9075
9180
|
* To check and trigger bubble move event
|
|
9181
|
+
*
|
|
9182
|
+
* @private
|
|
9076
9183
|
*/
|
|
9077
9184
|
bubbleMove(e) {
|
|
9078
9185
|
const target = e.target.id;
|
|
@@ -9084,7 +9191,7 @@ class Bubble {
|
|
|
9084
9191
|
if (isNullOrUndefined(data)) {
|
|
9085
9192
|
return;
|
|
9086
9193
|
}
|
|
9087
|
-
|
|
9194
|
+
const eventArgs = {
|
|
9088
9195
|
cancel: false, name: bubbleMouseMove, data: data, maps: this.maps,
|
|
9089
9196
|
target: target, x: e.clientX, y: e.clientY
|
|
9090
9197
|
};
|
|
@@ -9313,7 +9420,7 @@ class DataLabel {
|
|
|
9313
9420
|
}
|
|
9314
9421
|
}
|
|
9315
9422
|
}
|
|
9316
|
-
|
|
9423
|
+
const eventargs = {
|
|
9317
9424
|
name: dataLabelRendering, maps: this.maps, cancel: false, border: { color: dataLabel.border.color,
|
|
9318
9425
|
width: dataLabel.border.width, opacity: dataLabel.border.opacity }, datalabel: dataLabel,
|
|
9319
9426
|
fill: dataLabel.fill, template: dataLabel.template, text: text
|
|
@@ -9372,7 +9479,8 @@ class DataLabel {
|
|
|
9372
9479
|
}
|
|
9373
9480
|
else {
|
|
9374
9481
|
if (dataLabelSettings.smartLabelMode === 'Trim') {
|
|
9375
|
-
|
|
9482
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9483
|
+
const textType = typeof text === 'number' ? text.toString() : text;
|
|
9376
9484
|
trimmedLable = textTrim(width, textType, style);
|
|
9377
9485
|
elementSize = measureText(trimmedLable, style);
|
|
9378
9486
|
options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', trimmedLable, '', '');
|
|
@@ -10113,21 +10221,25 @@ class Legend {
|
|
|
10113
10221
|
const textLocation = collection['Text'];
|
|
10114
10222
|
const imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
|
|
10115
10223
|
const renderOptions = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
10116
|
-
|
|
10224
|
+
const legendTextStyle = {
|
|
10225
|
+
fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
|
|
10226
|
+
fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color, opacity: legend.textStyle.opacity
|
|
10227
|
+
};
|
|
10228
|
+
legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
|
|
10117
10229
|
this.maps.themeStyle.legendTextColor;
|
|
10118
|
-
|
|
10119
|
-
|
|
10230
|
+
legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
|
|
10231
|
+
legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
|
|
10120
10232
|
if (i === 0) {
|
|
10121
10233
|
this.renderLegendBorder();
|
|
10122
10234
|
}
|
|
10123
10235
|
legendElement.appendChild(drawSymbol(shapeLocation, shape, shapeSize, collection['ImageSrc'], renderOptions));
|
|
10124
10236
|
const legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
|
|
10125
10237
|
if (legendRectSize > this.legendBorderRect.width) {
|
|
10126
|
-
const trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText,
|
|
10238
|
+
const trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legendTextStyle, legendRectSize);
|
|
10127
10239
|
legendText = trimmedText;
|
|
10128
10240
|
}
|
|
10129
10241
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
|
|
10130
|
-
renderTextElement(textOptions,
|
|
10242
|
+
renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
|
|
10131
10243
|
this.legendGroup.appendChild(legendElement);
|
|
10132
10244
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10133
10245
|
if (i === (this.totalPages[page]['Collection'].length - 1)) {
|
|
@@ -10808,7 +10920,10 @@ class Legend {
|
|
|
10808
10920
|
const map = this.maps;
|
|
10809
10921
|
const legend = map.legendSettings;
|
|
10810
10922
|
const legendTitle = legend.title.text;
|
|
10811
|
-
const textStyle =
|
|
10923
|
+
const textStyle = {
|
|
10924
|
+
fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
|
|
10925
|
+
fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color, opacity: legend.titleStyle.opacity
|
|
10926
|
+
};
|
|
10812
10927
|
let textOptions;
|
|
10813
10928
|
const spacing = 10;
|
|
10814
10929
|
const trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
|
|
@@ -10827,6 +10942,7 @@ class Legend {
|
|
|
10827
10942
|
map.svgObject.appendChild(this.legendGroup);
|
|
10828
10943
|
if (legendTitle) {
|
|
10829
10944
|
textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
|
|
10945
|
+
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
|
|
10830
10946
|
textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
|
|
10831
10947
|
renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
10832
10948
|
}
|
|
@@ -10939,13 +11055,17 @@ class Legend {
|
|
|
10939
11055
|
});
|
|
10940
11056
|
});
|
|
10941
11057
|
}
|
|
11058
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10942
11059
|
getMarkerLegendData(layerIndex, text, legendFill) {
|
|
11060
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10943
11061
|
const legendData = [];
|
|
10944
11062
|
this.maps.layers[layerIndex].markerSettings.map((markerSettings, markerIndex) => {
|
|
11063
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10945
11064
|
const markerData = markerSettings.dataSource;
|
|
11065
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10946
11066
|
Array.prototype.forEach.call(markerData, (data, dataIndex) => {
|
|
10947
|
-
|
|
10948
|
-
if ((text === data[marker$$1.legendText] || text === '') && legendFill
|
|
11067
|
+
const marker$$1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
|
|
11068
|
+
if ((text === data[marker$$1.legendText] || text === '') && legendFill === data[marker$$1.colorValuePath]) {
|
|
10949
11069
|
legendData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
|
|
10950
11070
|
shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
|
|
10951
11071
|
}
|
|
@@ -11303,7 +11423,7 @@ class Legend {
|
|
|
11303
11423
|
mapElement.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
11304
11424
|
mapElement.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
11305
11425
|
mapElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11306
|
-
mapElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11426
|
+
mapElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11307
11427
|
mapElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11308
11428
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11309
11429
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11366,7 +11486,7 @@ class Legend {
|
|
|
11366
11486
|
layerElement.setAttribute('fill', this.maps.layers[j].shapeSettings.fill);
|
|
11367
11487
|
layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
|
|
11368
11488
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
11369
|
-
layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11489
|
+
layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11370
11490
|
layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
|
|
11371
11491
|
this.maps.layers[j].shapeSettings.opacity :
|
|
11372
11492
|
this.maps.layers[j].shapeSettings.border.opacity).toString());
|
|
@@ -11396,7 +11516,7 @@ class Legend {
|
|
|
11396
11516
|
layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
|
|
11397
11517
|
this.maps.layers[j].shapeSettings.opacity :
|
|
11398
11518
|
this.maps.layers[j].shapeSettings.border.opacity).toString());
|
|
11399
|
-
layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11519
|
+
layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11400
11520
|
layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
|
|
11401
11521
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
11402
11522
|
if (targetEle !== null) {
|
|
@@ -11437,7 +11557,7 @@ class Legend {
|
|
|
11437
11557
|
if (this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
11438
11558
|
LegendInteractive.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
11439
11559
|
LegendInteractive.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
11440
|
-
LegendInteractive.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11560
|
+
LegendInteractive.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11441
11561
|
LegendInteractive.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11442
11562
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11443
11563
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11501,7 +11621,7 @@ class Legend {
|
|
|
11501
11621
|
mapLegendElement.setAttribute('fill', this.maps.layers[0].shapeSettings.fill);
|
|
11502
11622
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
11503
11623
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11504
|
-
mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11624
|
+
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11505
11625
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11506
11626
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11507
11627
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11528,7 +11648,7 @@ class Legend {
|
|
|
11528
11648
|
this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
|
|
11529
11649
|
}
|
|
11530
11650
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11531
|
-
mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11651
|
+
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11532
11652
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
11533
11653
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11534
11654
|
this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11802,14 +11922,14 @@ class Highlight {
|
|
|
11802
11922
|
isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
|
|
11803
11923
|
}
|
|
11804
11924
|
const border = {
|
|
11805
|
-
color: this.highlightSettings.border.color,
|
|
11806
|
-
width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
|
|
11925
|
+
color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
|
|
11926
|
+
width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
|
|
11807
11927
|
opacity: this.highlightSettings.border.opacity
|
|
11808
11928
|
};
|
|
11809
|
-
|
|
11929
|
+
const eventArgs = {
|
|
11810
11930
|
opacity: this.highlightSettings.opacity,
|
|
11811
|
-
fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
11812
|
-
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
|
|
11931
|
+
fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
11932
|
+
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
|
|
11813
11933
|
border: border,
|
|
11814
11934
|
name: itemHighlight,
|
|
11815
11935
|
target: targetEle.id,
|
|
@@ -11990,15 +12110,16 @@ class Selection {
|
|
|
11990
12110
|
*/
|
|
11991
12111
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11992
12112
|
selectMap(targetElement, shapeData, data) {
|
|
12113
|
+
const layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
11993
12114
|
const selectionsettings = this.selectionsettings;
|
|
11994
12115
|
const border = {
|
|
11995
|
-
color: this.selectionsettings.border.color,
|
|
11996
|
-
width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
|
|
12116
|
+
color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
|
|
12117
|
+
width: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)) : (this.selectionsettings.border.width / this.maps.scale),
|
|
11997
12118
|
opacity: this.selectionsettings.border.opacity
|
|
11998
12119
|
};
|
|
11999
|
-
|
|
12120
|
+
const eventArgs = {
|
|
12000
12121
|
opacity: this.selectionsettings.opacity,
|
|
12001
|
-
fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
|
|
12122
|
+
fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
|
|
12002
12123
|
border: border,
|
|
12003
12124
|
name: itemSelection,
|
|
12004
12125
|
target: targetElement.id,
|
|
@@ -12190,8 +12311,6 @@ class MapsTooltip {
|
|
|
12190
12311
|
if (istooltipRender) {
|
|
12191
12312
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
12192
12313
|
option = layer.tooltipSettings;
|
|
12193
|
-
option.textStyle.fontFamily = this.maps.themeStyle.fontFamily || option.textStyle.fontFamily;
|
|
12194
|
-
option.textStyle.opacity = this.maps.themeStyle.tooltipTextOpacity || option.textStyle.opacity;
|
|
12195
12314
|
const shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
12196
12315
|
if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
|
|
12197
12316
|
return;
|
|
@@ -12308,9 +12427,13 @@ class MapsTooltip {
|
|
|
12308
12427
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
12309
12428
|
}
|
|
12310
12429
|
templateData = this.setTooltipContent(option, templateData);
|
|
12430
|
+
const tooltipTextStyle = {
|
|
12431
|
+
color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
|
|
12432
|
+
fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
|
|
12433
|
+
};
|
|
12311
12434
|
const tooltipOption = {
|
|
12312
12435
|
location: location, text: tooltipContent, data: templateData,
|
|
12313
|
-
textStyle:
|
|
12436
|
+
textStyle: tooltipTextStyle,
|
|
12314
12437
|
template: option.template
|
|
12315
12438
|
};
|
|
12316
12439
|
tooltipArgs = {
|
|
@@ -12326,6 +12449,10 @@ class MapsTooltip {
|
|
|
12326
12449
|
this.maps['isProtectedOnChange'] = true;
|
|
12327
12450
|
tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
|
|
12328
12451
|
|| this.maps.themeStyle.tooltipFontColor;
|
|
12452
|
+
tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
|
|
12453
|
+
|| this.maps.themeStyle.fontFamily;
|
|
12454
|
+
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
12455
|
+
|| this.maps.themeStyle.tooltipTextOpacity;
|
|
12329
12456
|
if (tooltipArgs.cancel) {
|
|
12330
12457
|
this.svgTooltip = new Tooltip({
|
|
12331
12458
|
enable: true,
|
|
@@ -12604,8 +12731,10 @@ class Zoom {
|
|
|
12604
12731
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
12605
12732
|
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
12606
12733
|
}
|
|
12734
|
+
this.markerLineAnimation(map);
|
|
12607
12735
|
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
12608
12736
|
const element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
12737
|
+
const animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
12609
12738
|
setTimeout(() => {
|
|
12610
12739
|
// if (type === 'ZoomOut') {
|
|
12611
12740
|
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
@@ -12619,7 +12748,7 @@ class Zoom {
|
|
|
12619
12748
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
12620
12749
|
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
12621
12750
|
}
|
|
12622
|
-
},
|
|
12751
|
+
}, animationDuration);
|
|
12623
12752
|
}
|
|
12624
12753
|
this.maps.zoomNotApplied = false;
|
|
12625
12754
|
}
|
|
@@ -12793,11 +12922,13 @@ class Zoom {
|
|
|
12793
12922
|
*/
|
|
12794
12923
|
animateTransform(element, animate$$1, x, y, scale) {
|
|
12795
12924
|
const duration = this.currentLayer.animationDuration;
|
|
12796
|
-
if (!animate$$1 || duration === 0) {
|
|
12925
|
+
if (!animate$$1 || duration === 0 || this.maps.isTileMap) {
|
|
12797
12926
|
element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
|
|
12798
12927
|
return;
|
|
12799
12928
|
}
|
|
12800
|
-
|
|
12929
|
+
if (!this.maps.isTileMap) {
|
|
12930
|
+
zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
|
|
12931
|
+
}
|
|
12801
12932
|
}
|
|
12802
12933
|
applyTransform(animate$$1) {
|
|
12803
12934
|
let layerIndex;
|
|
@@ -12844,12 +12975,14 @@ class Zoom {
|
|
|
12844
12975
|
this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
|
|
12845
12976
|
}
|
|
12846
12977
|
currentEle = layerElement.childNodes[j];
|
|
12978
|
+
let markerAnimation;
|
|
12847
12979
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
12848
12980
|
for (let k = 0; k < currentEle.childElementCount; k++) {
|
|
12849
12981
|
this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate$$1);
|
|
12850
12982
|
const layerIndex = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
12851
12983
|
const dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
12852
12984
|
const markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
12985
|
+
markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
|
|
12853
12986
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12854
12987
|
const markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
|
|
12855
12988
|
for (let x = 0; x < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x++) {
|
|
@@ -12860,9 +12993,17 @@ class Zoom {
|
|
|
12860
12993
|
this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
|
|
12861
12994
|
}
|
|
12862
12995
|
}
|
|
12863
|
-
if (
|
|
12864
|
-
|
|
12865
|
-
|
|
12996
|
+
if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
|
|
12997
|
+
if (this.maps.isTileMap) {
|
|
12998
|
+
const groupElement = document.querySelector('.GroupElement');
|
|
12999
|
+
if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
|
|
13000
|
+
groupElement.style.display = 'none';
|
|
13001
|
+
}
|
|
13002
|
+
}
|
|
13003
|
+
else {
|
|
13004
|
+
markerStyle = 'visibility:hidden';
|
|
13005
|
+
currentEle.setAttribute('style', markerStyle);
|
|
13006
|
+
}
|
|
12866
13007
|
}
|
|
12867
13008
|
}
|
|
12868
13009
|
if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
|
|
@@ -12961,7 +13102,7 @@ class Zoom {
|
|
|
12961
13102
|
this.maps.arrangeTemplate();
|
|
12962
13103
|
}
|
|
12963
13104
|
if (!isNullOrUndefined(this.currentLayer)) {
|
|
12964
|
-
if (!animate$$1 || this.currentLayer.animationDuration === 0) {
|
|
13105
|
+
if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
|
|
12965
13106
|
this.processTemplate(x, y, scale, this.maps);
|
|
12966
13107
|
}
|
|
12967
13108
|
}
|
|
@@ -13078,7 +13219,6 @@ class Zoom {
|
|
|
13078
13219
|
*/
|
|
13079
13220
|
processTemplate(x, y, scale, maps) {
|
|
13080
13221
|
for (let i = 0; i < this.templateCount; i++) {
|
|
13081
|
-
this.currentLayer = maps.layersCollection[i];
|
|
13082
13222
|
const factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
|
|
13083
13223
|
const markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
|
|
13084
13224
|
i + '_Markers_Template_Group');
|
|
@@ -13307,6 +13447,20 @@ class Zoom {
|
|
|
13307
13447
|
}
|
|
13308
13448
|
}
|
|
13309
13449
|
}
|
|
13450
|
+
markerLineAnimation(map) {
|
|
13451
|
+
if (map.isTileMap) {
|
|
13452
|
+
for (let i = 0; i < map.layersCollection.length; i++) {
|
|
13453
|
+
const markerTemplateElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
|
|
13454
|
+
const lineElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_line_Group');
|
|
13455
|
+
if (!isNullOrUndefined(markerTemplateElement)) {
|
|
13456
|
+
markerTemplateElement.style.visibility = 'hidden';
|
|
13457
|
+
}
|
|
13458
|
+
if (!isNullOrUndefined(lineElement)) {
|
|
13459
|
+
lineElement.style.visibility = 'hidden';
|
|
13460
|
+
}
|
|
13461
|
+
}
|
|
13462
|
+
}
|
|
13463
|
+
}
|
|
13310
13464
|
panning(direction, xDifference, yDifference, mouseLocation) {
|
|
13311
13465
|
const map = this.maps;
|
|
13312
13466
|
let panArgs;
|
|
@@ -13438,41 +13592,45 @@ class Zoom {
|
|
|
13438
13592
|
let tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
13439
13593
|
map.scale = Math.pow(2, tileZoomFactor - 1);
|
|
13440
13594
|
map.tileZoomLevel = tileZoomFactor;
|
|
13441
|
-
map.
|
|
13442
|
-
|
|
13443
|
-
|
|
13444
|
-
|
|
13445
|
-
map.
|
|
13446
|
-
|
|
13447
|
-
|
|
13448
|
-
|
|
13449
|
-
|
|
13450
|
-
|
|
13451
|
-
|
|
13452
|
-
|
|
13453
|
-
|
|
13454
|
-
|
|
13455
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
13456
|
-
}
|
|
13457
|
-
if (document.querySelector('.GroupElement')) {
|
|
13458
|
-
document.querySelector('.GroupElement').style.display = 'none';
|
|
13459
|
-
}
|
|
13460
|
-
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
13461
|
-
const element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13462
|
-
setTimeout(() => {
|
|
13463
|
-
this.applyTransform(true);
|
|
13595
|
+
if (map.previousScale !== map.scale || map.isReset) {
|
|
13596
|
+
map.zoomSettings.zoomFactor = zoomFactor;
|
|
13597
|
+
const position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
|
|
13598
|
+
this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
|
|
13599
|
+
if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
|
|
13600
|
+
map.initialCheck = true;
|
|
13601
|
+
map.zoomPersistence = false;
|
|
13602
|
+
map.tileTranslatePoint.x = map.initialTileTranslate.x;
|
|
13603
|
+
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
13604
|
+
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
13605
|
+
}
|
|
13606
|
+
this.triggerZoomEvent(prevTilePoint, prevLevel, type);
|
|
13607
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13608
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13464
13609
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13465
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = '
|
|
13610
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
13611
|
+
}
|
|
13612
|
+
if (document.querySelector('.GroupElement')) {
|
|
13613
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
13466
13614
|
}
|
|
13467
|
-
|
|
13615
|
+
this.markerLineAnimation(map);
|
|
13616
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
13617
|
+
const element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13618
|
+
const animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13619
|
+
setTimeout(() => {
|
|
13620
|
+
this.applyTransform(true);
|
|
13621
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13622
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13623
|
+
}
|
|
13624
|
+
}, animationDuration);
|
|
13625
|
+
}
|
|
13626
|
+
this.maps.zoomNotApplied = false;
|
|
13468
13627
|
}
|
|
13469
|
-
this.maps.zoomNotApplied = false;
|
|
13470
13628
|
}
|
|
13471
13629
|
createZoomingToolbars() {
|
|
13472
13630
|
const map = this.maps;
|
|
13473
13631
|
this.toolBarGroup = map.renderer.createGroup({
|
|
13474
13632
|
id: map.element.id + '_Zooming_KitCollection',
|
|
13475
|
-
opacity: 0.3
|
|
13633
|
+
opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
|
|
13476
13634
|
});
|
|
13477
13635
|
const kitHeight = 16;
|
|
13478
13636
|
const kitWidth = 16;
|
|
@@ -13875,14 +14033,14 @@ class Zoom {
|
|
|
13875
14033
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
13876
14034
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
13877
14035
|
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
13878
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '0.3');
|
|
13879
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '0.3');
|
|
14036
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
14037
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
13880
14038
|
}
|
|
13881
14039
|
}
|
|
13882
14040
|
}
|
|
13883
14041
|
}
|
|
13884
14042
|
else {
|
|
13885
|
-
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '0.3');
|
|
14043
|
+
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
13886
14044
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
13887
14045
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
13888
14046
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|