@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
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -859,15 +859,17 @@ function markerShapeChoose(eventArgs, data) {
|
|
|
859
859
|
data[eventArgs.shapeValuePath]);
|
|
860
860
|
eventArgs.shape = shape;
|
|
861
861
|
if (data[eventArgs.shapeValuePath] === 'Image') {
|
|
862
|
-
eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)
|
|
863
|
-
!isNullOrUndefined(data[eventArgs.imageUrlValuePath])
|
|
864
|
-
|
|
862
|
+
eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
863
|
+
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
864
|
+
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
else {
|
|
868
868
|
var shapes = (!isNullOrUndefined(eventArgs.shapeValuePath)) ? ((eventArgs.shapeValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.shapeValuePath).toString() : eventArgs.shape) : eventArgs.shape;
|
|
869
869
|
eventArgs.shape = shapes;
|
|
870
|
-
var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
870
|
+
var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
871
|
+
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
872
|
+
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
871
873
|
eventArgs.imageUrl = shapeImage;
|
|
872
874
|
}
|
|
873
875
|
return eventArgs;
|
|
@@ -1245,6 +1247,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1245
1247
|
* @param {number} markerIndex - Specifies the marker index
|
|
1246
1248
|
* @param {HTMLElement} markerTemplate - Specifies the marker template element
|
|
1247
1249
|
* @param {Point} location - Specifies the location
|
|
1250
|
+
* @param {Point} transPoint - Specifies the translate point.
|
|
1248
1251
|
* @param {number} scale - Specifies the scale value
|
|
1249
1252
|
* @param {Point} offset - Specifies the offset value
|
|
1250
1253
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
@@ -1739,6 +1742,7 @@ function getRatioOfBubble(min, max, value, minValue, maxValue) {
|
|
|
1739
1742
|
*
|
|
1740
1743
|
* @param {MapLocation[]} points - Specifies the points
|
|
1741
1744
|
* @param {string} type - Specifies the type
|
|
1745
|
+
* @param {string} geometryType - Specified the type of the geometry
|
|
1742
1746
|
* @returns {any} - Specifies the object
|
|
1743
1747
|
*/
|
|
1744
1748
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1957,9 +1961,9 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
1957
1961
|
mapObject.mapScaleValue = scaleFactor = zoomFactorValue = mapObject.scaleOfGivenLocation;
|
|
1958
1962
|
}
|
|
1959
1963
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1960
|
-
var min = mapObject.baseMapRectBounds['min'];
|
|
1964
|
+
var min = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['min'] : null;
|
|
1961
1965
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1962
|
-
var max = mapObject.baseMapRectBounds['max'];
|
|
1966
|
+
var max = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['max'] : null;
|
|
1963
1967
|
var zoomFactor = animate ? 1 : mapObject.mapScaleValue;
|
|
1964
1968
|
if (isNullOrUndefined(mapObject.currentShapeDataLength)) {
|
|
1965
1969
|
mapObject.currentShapeDataLength = !isNullOrUndefined(layer.shapeData['features'])
|
|
@@ -1969,111 +1973,113 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
1969
1973
|
var availSize = mapObject.availableSize;
|
|
1970
1974
|
var x;
|
|
1971
1975
|
var y;
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
y = -point.y + topPosition;
|
|
1986
|
-
scaleFactor = zoomFactor;
|
|
1987
|
-
}
|
|
1988
|
-
else {
|
|
1989
|
-
if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
|
|
1976
|
+
if (!isNullOrUndefined(min) && !isNullOrUndefined(max)) {
|
|
1977
|
+
var mapWidth = Math.abs(max['x'] - min['x']);
|
|
1978
|
+
var mapHeight = Math.abs(min['y'] - max['y']);
|
|
1979
|
+
var factor = animate ? 1 : mapObject.markerZoomFactor === 1 ? mapObject.mapScaleValue : zoomFactorValue;
|
|
1980
|
+
center = mapObject.zoomSettings.shouldZoomInitially
|
|
1981
|
+
&& mapObject.markerZoomedState && !mapObject.zoomPersistence ? mapObject.markerZoomCenterPoint :
|
|
1982
|
+
mapObject.centerPosition;
|
|
1983
|
+
if ((!isNullOrUndefined(centerLongitude) && !isNullOrUndefined(centerLatitude)) || checkMethodeZoom) {
|
|
1984
|
+
var leftPosition = (((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) + mapObject.mapAreaRect.x) / factor;
|
|
1985
|
+
var topPosition = (((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) + mapObject.mapAreaRect.y) / factor;
|
|
1986
|
+
var point = checkMethodeZoom ? calculateCenterFromPixel(mapObject, layer) :
|
|
1987
|
+
convertGeoToPoint(centerLatitude, centerLongitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
|
|
1988
|
+
if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
|
|
1990
1989
|
x = -point.x + leftPosition;
|
|
1991
1990
|
y = -point.y + topPosition;
|
|
1991
|
+
scaleFactor = zoomFactor;
|
|
1992
1992
|
}
|
|
1993
1993
|
else {
|
|
1994
|
-
if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
|
|
1994
|
+
if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
|
|
1995
1995
|
x = -point.x + leftPosition;
|
|
1996
1996
|
y = -point.y + topPosition;
|
|
1997
|
-
scaleFactor = zoomFactor;
|
|
1998
1997
|
}
|
|
1999
1998
|
else {
|
|
2000
|
-
|
|
2001
|
-
|
|
1999
|
+
if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
|
|
2000
|
+
x = -point.x + leftPosition;
|
|
2001
|
+
y = -point.y + topPosition;
|
|
2002
|
+
scaleFactor = zoomFactor;
|
|
2003
|
+
}
|
|
2004
|
+
else {
|
|
2005
|
+
x = mapObject.zoomTranslatePoint.x;
|
|
2006
|
+
y = mapObject.zoomTranslatePoint.y;
|
|
2007
|
+
}
|
|
2002
2008
|
}
|
|
2009
|
+
scaleFactor = mapObject.mapScaleValue;
|
|
2003
2010
|
}
|
|
2004
|
-
scaleFactor = mapObject.mapScaleValue;
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
else {
|
|
2008
|
-
if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
|
|
2009
|
-
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2010
|
-
mapWidth *= scaleFactor;
|
|
2011
|
-
mapHeight *= scaleFactor;
|
|
2012
|
-
var widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
|
|
2013
|
-
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))) - widthDiff;
|
|
2014
|
-
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
2015
|
-
mapObject.previousTranslate = new Point(x, y);
|
|
2016
2011
|
}
|
|
2017
2012
|
else {
|
|
2018
|
-
if (
|
|
2013
|
+
if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
|
|
2019
2014
|
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2020
|
-
mapHeight *= scaleFactor;
|
|
2021
2015
|
mapWidth *= scaleFactor;
|
|
2016
|
+
mapHeight *= scaleFactor;
|
|
2017
|
+
var widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
|
|
2018
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))) - widthDiff;
|
|
2022
2019
|
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
2023
|
-
|
|
2020
|
+
mapObject.previousTranslate = new Point(x, y);
|
|
2024
2021
|
}
|
|
2025
2022
|
else {
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
mapWidth *= scale;
|
|
2033
|
-
y = size.y + ((-(min['y'])) + ((size.height / 2)
|
|
2034
|
-
- (mapHeight / 2)));
|
|
2035
|
-
scaleFactor = scale;
|
|
2036
|
-
x = size.x + ((-(min['x']))
|
|
2037
|
-
+ ((size.width / 2) - (mapWidth / 2)));
|
|
2038
|
-
}
|
|
2039
|
-
else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width) {
|
|
2040
|
-
var cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2041
|
-
var cmapWidth = mapWidth;
|
|
2042
|
-
cmapWidth *= cscaleFactor;
|
|
2043
|
-
var cmapHeight = mapHeight;
|
|
2044
|
-
cmapHeight *= cscaleFactor;
|
|
2045
|
-
var x1 = size.x + ((-(min['x'])) + ((size.width / 2) - (cmapWidth / 2)));
|
|
2046
|
-
var y1 = size.y + ((-(min['y'])) + ((size.height / 2) - (cmapHeight / 2)));
|
|
2047
|
-
var xdiff = (mapObject.translatePoint.x - mapObject.previousTranslate.x) / (mapObject.widthBeforeRefresh);
|
|
2048
|
-
var ydiff = (mapObject.translatePoint.y - mapObject.previousTranslate.y) / (mapObject.heightBeforeRefresh);
|
|
2049
|
-
var actxdiff = xdiff * (mapObject.availableSize.width);
|
|
2050
|
-
var actydiff = ydiff * (mapObject.availableSize.height);
|
|
2051
|
-
x = x1 + actxdiff;
|
|
2052
|
-
y = y1 + actydiff;
|
|
2053
|
-
mapObject.previousTranslate = new Point(x1, y1);
|
|
2054
|
-
mapObject.zoomTranslatePoint.x = x;
|
|
2055
|
-
mapObject.zoomTranslatePoint.y = y;
|
|
2023
|
+
if (!mapObject.zoomSettings.shouldZoomInitially && mapObject.markerZoomFactor === 1 && mapObject.mapScaleValue === 1) {
|
|
2024
|
+
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2025
|
+
mapHeight *= scaleFactor;
|
|
2026
|
+
mapWidth *= scaleFactor;
|
|
2027
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
2028
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
|
|
2056
2029
|
}
|
|
2057
2030
|
else {
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
mapHeight
|
|
2063
|
-
|
|
2031
|
+
scaleFactor = mapObject.mapScaleValue < 1 ? mapObject.mapScaleValue + 1 : mapObject.mapScaleValue;
|
|
2032
|
+
mapObject.mapScaleValue = mapObject.zoomSettings.enable && mapObject.mapScaleValue !== 1 ? mapObject.mapScaleValue : 1;
|
|
2033
|
+
if ((mapObject.currentShapeDataLength !== (!isNullOrUndefined(layer.shapeData['features'])
|
|
2034
|
+
? layer.shapeData['features'].length : layer.shapeData['geometries'].length)) && layer.type !== 'SubLayer') {
|
|
2035
|
+
var scale = parseFloat(Math.min(size.height / mapHeight, size.width / mapWidth).toFixed(2));
|
|
2036
|
+
mapHeight *= scale;
|
|
2037
|
+
mapWidth *= scale;
|
|
2038
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2)
|
|
2039
|
+
- (mapHeight / 2)));
|
|
2040
|
+
scaleFactor = scale;
|
|
2041
|
+
x = size.x + ((-(min['x']))
|
|
2042
|
+
+ ((size.width / 2) - (mapWidth / 2)));
|
|
2043
|
+
}
|
|
2044
|
+
else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width) {
|
|
2045
|
+
var cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2046
|
+
var cmapWidth = mapWidth;
|
|
2047
|
+
cmapWidth *= cscaleFactor;
|
|
2048
|
+
var cmapHeight = mapHeight;
|
|
2049
|
+
cmapHeight *= cscaleFactor;
|
|
2050
|
+
var x1 = size.x + ((-(min['x'])) + ((size.width / 2) - (cmapWidth / 2)));
|
|
2051
|
+
var y1 = size.y + ((-(min['y'])) + ((size.height / 2) - (cmapHeight / 2)));
|
|
2052
|
+
var xdiff = (mapObject.translatePoint.x - mapObject.previousTranslate.x) / (mapObject.widthBeforeRefresh);
|
|
2053
|
+
var ydiff = (mapObject.translatePoint.y - mapObject.previousTranslate.y) / (mapObject.heightBeforeRefresh);
|
|
2054
|
+
var actxdiff = xdiff * (mapObject.availableSize.width);
|
|
2055
|
+
var actydiff = ydiff * (mapObject.availableSize.height);
|
|
2056
|
+
x = x1 + actxdiff;
|
|
2057
|
+
y = y1 + actydiff;
|
|
2058
|
+
mapObject.previousTranslate = new Point(x1, y1);
|
|
2059
|
+
mapObject.zoomTranslatePoint.x = x;
|
|
2060
|
+
mapObject.zoomTranslatePoint.y = y;
|
|
2064
2061
|
}
|
|
2065
2062
|
else {
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2063
|
+
if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
|
|
2064
|
+
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2065
|
+
mapWidth *= scaleFactor;
|
|
2066
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
|
|
2067
|
+
mapHeight *= scaleFactor;
|
|
2068
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
2069
|
+
}
|
|
2070
|
+
else {
|
|
2071
|
+
x = mapObject.zoomTranslatePoint.x;
|
|
2072
|
+
y = mapObject.zoomTranslatePoint.y;
|
|
2073
|
+
scaleFactor = mapObject.scale;
|
|
2074
|
+
}
|
|
2069
2075
|
}
|
|
2070
2076
|
}
|
|
2071
2077
|
}
|
|
2072
2078
|
}
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2079
|
+
if (!isNullOrUndefined(mapObject.translatePoint)) {
|
|
2080
|
+
x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
|
|
2081
|
+
y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
|
|
2082
|
+
}
|
|
2077
2083
|
}
|
|
2078
2084
|
scaleFactor = (mapObject.enablePersistence) ? ((mapObject.mapScaleValue >= 1) ? mapObject.mapScaleValue : 1) : scaleFactor;
|
|
2079
2085
|
mapObject.widthBeforeRefresh = mapObject.availableSize.width;
|
|
@@ -2510,6 +2516,12 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius) {
|
|
|
2510
2516
|
delay: delay,
|
|
2511
2517
|
progress: function (args) {
|
|
2512
2518
|
if (args.timeStamp > args.delay) {
|
|
2519
|
+
if (maps.isTileMap && height === 0) {
|
|
2520
|
+
var layerGroupElement = document.querySelector('.GroupElement');
|
|
2521
|
+
if (!isNullOrUndefined(layerGroupElement)) {
|
|
2522
|
+
layerGroupElement.style.display = 'block';
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2513
2525
|
height = ((args.timeStamp - args.delay) / args.duration);
|
|
2514
2526
|
element.setAttribute('transform', 'translate( ' + (centerX - (radius * height)) + ' ' + (centerY - (radius * height)) +
|
|
2515
2527
|
' ) scale(' + height + ')');
|
|
@@ -2844,6 +2856,7 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2844
2856
|
var value = 0;
|
|
2845
2857
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2846
2858
|
var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
|
|
2859
|
+
var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
|
|
2847
2860
|
if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
|
|
2848
2861
|
value = checkShapeDataFields(
|
|
2849
2862
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2853,14 +2866,17 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2853
2866
|
currentStroke = maps.layersCollection[index].dataSource[value][borderWidthValue];
|
|
2854
2867
|
}
|
|
2855
2868
|
else {
|
|
2856
|
-
currentStroke = (
|
|
2869
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2857
2870
|
}
|
|
2858
2871
|
}
|
|
2859
2872
|
}
|
|
2860
2873
|
else {
|
|
2861
|
-
currentStroke = (
|
|
2874
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2862
2875
|
}
|
|
2863
2876
|
childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
|
|
2877
|
+
if (element.id.indexOf('_LineString') > -1 && isNullOrUndefined(currentStroke)) {
|
|
2878
|
+
childNode.setAttribute('stroke-width', (1 / scale).toString());
|
|
2879
|
+
}
|
|
2864
2880
|
}
|
|
2865
2881
|
}
|
|
2866
2882
|
}
|
|
@@ -3224,15 +3240,15 @@ var Theme;
|
|
|
3224
3240
|
fontWeight: 'Regular',
|
|
3225
3241
|
color: null,
|
|
3226
3242
|
fontStyle: 'Regular',
|
|
3227
|
-
fontFamily:
|
|
3243
|
+
fontFamily: null
|
|
3228
3244
|
};
|
|
3229
3245
|
/** @private */
|
|
3230
3246
|
Theme.legendTitleFont = {
|
|
3231
|
-
size: '
|
|
3232
|
-
fontWeight: '
|
|
3247
|
+
size: '12px',
|
|
3248
|
+
fontWeight: 'Medium',
|
|
3233
3249
|
color: null,
|
|
3234
|
-
fontStyle: '
|
|
3235
|
-
fontFamily:
|
|
3250
|
+
fontStyle: 'Medium',
|
|
3251
|
+
fontFamily: null
|
|
3236
3252
|
};
|
|
3237
3253
|
/** @private */
|
|
3238
3254
|
Theme.legendLabelFont = {
|
|
@@ -3381,6 +3397,14 @@ function getShapeColor(theme) {
|
|
|
3381
3397
|
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
3382
3398
|
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
3383
3399
|
break;
|
|
3400
|
+
case 'fluentui':
|
|
3401
|
+
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
3402
|
+
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
3403
|
+
break;
|
|
3404
|
+
case 'fluentuidark':
|
|
3405
|
+
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
3406
|
+
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
3407
|
+
break;
|
|
3384
3408
|
default:
|
|
3385
3409
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
3386
3410
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -3526,6 +3550,7 @@ function getThemeStyle(theme) {
|
|
|
3526
3550
|
tooltipFillColor: '#363F4C',
|
|
3527
3551
|
zoomFillColor: '#FFFFFF',
|
|
3528
3552
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3553
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3529
3554
|
titleFontWeight: 'Medium',
|
|
3530
3555
|
zoomSelectionColor: '#e61576',
|
|
3531
3556
|
shapeFill: '#A6A6A6'
|
|
@@ -3543,6 +3568,7 @@ function getThemeStyle(theme) {
|
|
|
3543
3568
|
tooltipFontColor: '#000000',
|
|
3544
3569
|
tooltipFillColor: '#ffffff',
|
|
3545
3570
|
zoomFillColor: '#FFFFFF',
|
|
3571
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3546
3572
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3547
3573
|
titleFontWeight: 'Medium',
|
|
3548
3574
|
zoomSelectionColor: '#e61576',
|
|
@@ -3664,6 +3690,52 @@ function getThemeStyle(theme) {
|
|
|
3664
3690
|
shapeFill: '#495057'
|
|
3665
3691
|
};
|
|
3666
3692
|
break;
|
|
3693
|
+
case 'fluentui':
|
|
3694
|
+
style = {
|
|
3695
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3696
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3697
|
+
titleFontColor: '#201F1E',
|
|
3698
|
+
subTitleFontColor: '#201F1E',
|
|
3699
|
+
legendTitleFontColor: '#201F1E',
|
|
3700
|
+
legendTextColor: '#201F1E',
|
|
3701
|
+
dataLabelFontColor: '#201F1E',
|
|
3702
|
+
tooltipFontColor: '#323130',
|
|
3703
|
+
tooltipFillColor: '#FFFFFF',
|
|
3704
|
+
zoomFillColor: '#A19F9D',
|
|
3705
|
+
fontFamily: 'Segoe UI',
|
|
3706
|
+
titleFontSize: '14px',
|
|
3707
|
+
legendFontSize: '12px',
|
|
3708
|
+
tooltipFillOpacity: 1,
|
|
3709
|
+
tooltipTextOpacity: 1,
|
|
3710
|
+
labelFontFamily: 'Segoe UI',
|
|
3711
|
+
titleFontWeight: '600',
|
|
3712
|
+
zoomSelectionColor: '#323130',
|
|
3713
|
+
shapeFill: '#F3F2F1'
|
|
3714
|
+
};
|
|
3715
|
+
break;
|
|
3716
|
+
case 'fluentuidark':
|
|
3717
|
+
style = {
|
|
3718
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3719
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3720
|
+
titleFontColor: '#F3F2F1',
|
|
3721
|
+
subTitleFontColor: '#F3F2F1',
|
|
3722
|
+
legendTitleFontColor: '#F3F2F1',
|
|
3723
|
+
legendTextColor: '#F3F2F1',
|
|
3724
|
+
dataLabelFontColor: '#F3F2F1',
|
|
3725
|
+
tooltipFontColor: '#F3F2F1',
|
|
3726
|
+
tooltipFillColor: '#252423',
|
|
3727
|
+
zoomFillColor: '#484644',
|
|
3728
|
+
fontFamily: 'Segoe UI',
|
|
3729
|
+
titleFontSize: '14px',
|
|
3730
|
+
legendFontSize: '12px',
|
|
3731
|
+
tooltipFillOpacity: 1,
|
|
3732
|
+
tooltipTextOpacity: 1,
|
|
3733
|
+
labelFontFamily: 'Segoe UI',
|
|
3734
|
+
titleFontWeight: '600',
|
|
3735
|
+
zoomSelectionColor: '#F3F2F1',
|
|
3736
|
+
shapeFill: '#252423'
|
|
3737
|
+
};
|
|
3738
|
+
break;
|
|
3667
3739
|
default:
|
|
3668
3740
|
style = {
|
|
3669
3741
|
backgroundColor: '#FFFFFF',
|
|
@@ -3677,6 +3749,7 @@ function getThemeStyle(theme) {
|
|
|
3677
3749
|
tooltipFillColor: '#000000',
|
|
3678
3750
|
zoomFillColor: '#737373',
|
|
3679
3751
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3752
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3680
3753
|
titleFontWeight: 'Medium',
|
|
3681
3754
|
zoomSelectionColor: '#e61576',
|
|
3682
3755
|
shapeFill: '#A6A6A6'
|
|
@@ -4370,7 +4443,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4370
4443
|
Complex({}, CommonTitleSettings)
|
|
4371
4444
|
], LegendSettings.prototype, "title", void 0);
|
|
4372
4445
|
__decorate$1([
|
|
4373
|
-
Complex(
|
|
4446
|
+
Complex(Theme.legendTitleFont, Font)
|
|
4374
4447
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
4375
4448
|
__decorate$1([
|
|
4376
4449
|
Property('Bottom')
|
|
@@ -4468,7 +4541,7 @@ var ShapeSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4468
4541
|
Property(5)
|
|
4469
4542
|
], ShapeSettings.prototype, "circleRadius", void 0);
|
|
4470
4543
|
__decorate$1([
|
|
4471
|
-
Complex({ width:
|
|
4544
|
+
Complex({ width: null, color: '#000000' }, Border)
|
|
4472
4545
|
], ShapeSettings.prototype, "border", void 0);
|
|
4473
4546
|
__decorate$1([
|
|
4474
4547
|
Property('')
|
|
@@ -4761,15 +4834,9 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
4761
4834
|
border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
|
|
4762
4835
|
shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
|
|
4763
4836
|
};
|
|
4764
|
-
eventArgs = markerColorChoose(eventArgs, data);
|
|
4765
|
-
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4766
4837
|
_this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
}
|
|
4770
|
-
if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
|
|
4771
|
-
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4772
|
-
}
|
|
4838
|
+
eventArgs = markerColorChoose(eventArgs, data);
|
|
4839
|
+
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4773
4840
|
var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
4774
4841
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
4775
4842
|
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : 0;
|
|
@@ -5763,7 +5830,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5763
5830
|
if (this.mapObject.zoomSettings.resetToInitial && this.mapObject.initialCheck && !isNullOrUndefined(panel.mapObject.height)
|
|
5764
5831
|
&& this.mapObject.availableSize.height > 512) {
|
|
5765
5832
|
this.mapObject.applyZoomReset = true;
|
|
5766
|
-
this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512)
|
|
5833
|
+
this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512);
|
|
5767
5834
|
var padding = this.mapObject.layers[this.mapObject.baseLayerIndex].layerType !== 'GoogleStaticMap' ?
|
|
5768
5835
|
20 : 0;
|
|
5769
5836
|
var totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
|
|
@@ -5845,6 +5912,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5845
5912
|
proxy_1.mapObject['bingMap'] = bing_1;
|
|
5846
5913
|
proxy_1.renderTileLayer(proxy_1, layer, layerIndex, bing_1);
|
|
5847
5914
|
_this.mapObject.arrangeTemplate();
|
|
5915
|
+
if (_this.mapObject.zoomModule && (_this.mapObject.previousScale !== _this.mapObject.scale)) {
|
|
5916
|
+
_this.mapObject.zoomModule.applyTransform(true);
|
|
5917
|
+
}
|
|
5848
5918
|
};
|
|
5849
5919
|
ajax.send();
|
|
5850
5920
|
}
|
|
@@ -5923,9 +5993,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5923
5993
|
var data = geometryData['geometry'];
|
|
5924
5994
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5925
5995
|
var properties = geometryData['properties'];
|
|
5926
|
-
|
|
5927
|
-
_this.generatePoints(type, coords, data, properties);
|
|
5928
|
-
}
|
|
5996
|
+
_this.generatePoints(type, coords, data, properties);
|
|
5929
5997
|
}
|
|
5930
5998
|
});
|
|
5931
5999
|
this.currentLayer.rectBounds = this.rectBounds;
|
|
@@ -5953,11 +6021,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5953
6021
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5954
6022
|
var currentShapeData = this_1.currentLayer.layerData[i];
|
|
5955
6023
|
var pathOptions;
|
|
5956
|
-
var polyLineOptions;
|
|
5957
6024
|
var circleOptions;
|
|
5958
6025
|
var groupElement;
|
|
5959
6026
|
var path = '';
|
|
5960
|
-
var points = '';
|
|
5961
6027
|
var fill = (shapeSettings.autofill) ? colors[i % colors.length] :
|
|
5962
6028
|
(shapeSettings.fill || this_1.mapObject.themeStyle.shapeFill);
|
|
5963
6029
|
if (shapeSettings.colorValuePath !== null && !isNullOrUndefined(currentShapeData['property'])) {
|
|
@@ -6021,7 +6087,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6021
6087
|
if (isNullOrUndefined(shapeSettings.borderColorValuePath)) {
|
|
6022
6088
|
_this.mapObject.layers[layerIndex].shapeSettings.border.color = eventArgs.border.color;
|
|
6023
6089
|
}
|
|
6024
|
-
|
|
6090
|
+
if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
|
|
6025
6091
|
_this.mapObject.layers[layerIndex].shapeSettings.border.width = eventArgs.border.width;
|
|
6026
6092
|
}
|
|
6027
6093
|
}
|
|
@@ -6075,17 +6141,21 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6075
6141
|
}
|
|
6076
6142
|
break;
|
|
6077
6143
|
case 'LineString':
|
|
6144
|
+
path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
|
|
6078
6145
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6079
6146
|
currentShapeData.map(function (lineData) {
|
|
6080
|
-
|
|
6147
|
+
path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
|
|
6081
6148
|
});
|
|
6082
|
-
|
|
6083
|
-
|
|
6149
|
+
if (path.length > 3) {
|
|
6150
|
+
pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
|
|
6151
|
+
pathEle = _this.mapObject.renderer.drawPath(pathOptions);
|
|
6152
|
+
}
|
|
6084
6153
|
break;
|
|
6085
6154
|
case 'Point':
|
|
6086
6155
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6087
6156
|
var pointData = currentShapeData['point'];
|
|
6088
|
-
|
|
6157
|
+
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / _this.currentFactor;
|
|
6158
|
+
circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, null);
|
|
6089
6159
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
6090
6160
|
break;
|
|
6091
6161
|
case 'Path':
|
|
@@ -6107,6 +6177,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6107
6177
|
pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
|
|
6108
6178
|
(currentShapeData['property'][properties]) : ''));
|
|
6109
6179
|
pathEle.setAttribute('tabindex', (_this.mapObject.tabIndex + i + 2).toString());
|
|
6180
|
+
if (drawingType === 'LineString') {
|
|
6181
|
+
pathEle.setAttribute('style', 'outline:none');
|
|
6182
|
+
}
|
|
6110
6183
|
maintainSelection(_this.mapObject.selectedElementId, _this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
|
|
6111
6184
|
if (_this.mapObject.toggledShapeElementId) {
|
|
6112
6185
|
for (var j = 0; j < _this.mapObject.toggledShapeElementId.length; j++) {
|
|
@@ -6325,11 +6398,14 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6325
6398
|
this.currentLayer.layerData.push(multiPolygonDatas);
|
|
6326
6399
|
break;
|
|
6327
6400
|
case 'linestring':
|
|
6401
|
+
var extraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6402
|
+
this.currentLayer.shapeSettings.border.width : 1;
|
|
6328
6403
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6329
6404
|
coordinates.map(function (points, index) {
|
|
6330
6405
|
latitude = points[1];
|
|
6331
6406
|
longitude = points[0];
|
|
6332
6407
|
var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
|
|
6408
|
+
_this.calculateBox(point, extraSpace_1);
|
|
6333
6409
|
newData.push({
|
|
6334
6410
|
point: point, lat: latitude, lng: longitude
|
|
6335
6411
|
});
|
|
@@ -6340,6 +6416,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6340
6416
|
break;
|
|
6341
6417
|
case 'point': {
|
|
6342
6418
|
var arrayCollections_1 = false;
|
|
6419
|
+
var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6420
|
+
this.currentLayer.shapeSettings.border.width : 1) + (this.currentLayer.shapeSettings.circleRadius * 2);
|
|
6343
6421
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6344
6422
|
coordinates.map(function (points, index) {
|
|
6345
6423
|
if (Object.prototype.toString.call(points) === '[object Array]') {
|
|
@@ -6356,6 +6434,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6356
6434
|
latitude = coordinates[1];
|
|
6357
6435
|
longitude = coordinates[0];
|
|
6358
6436
|
var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
|
|
6437
|
+
this.calculateBox(point, extraSpace_2);
|
|
6359
6438
|
this.currentLayer.layerData.push({
|
|
6360
6439
|
point: point, type: type, lat: latitude, lng: longitude, property: properties
|
|
6361
6440
|
});
|
|
@@ -6369,6 +6448,17 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6369
6448
|
break;
|
|
6370
6449
|
}
|
|
6371
6450
|
};
|
|
6451
|
+
LayerPanel.prototype.calculateBox = function (point, extraSpace) {
|
|
6452
|
+
if (isNullOrUndefined(this.rectBounds)) {
|
|
6453
|
+
this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
|
|
6454
|
+
}
|
|
6455
|
+
else {
|
|
6456
|
+
this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
|
|
6457
|
+
this.rectBounds['min']['y'] = Math.min(this.rectBounds['min']['y'], point.y - extraSpace);
|
|
6458
|
+
this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x);
|
|
6459
|
+
this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
|
|
6460
|
+
}
|
|
6461
|
+
};
|
|
6372
6462
|
LayerPanel.prototype.calculateFactor = function (layer) {
|
|
6373
6463
|
var horFactor;
|
|
6374
6464
|
var verFactor = 1;
|
|
@@ -6477,6 +6567,15 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6477
6567
|
_this.calculateRectBox(point[0]);
|
|
6478
6568
|
});
|
|
6479
6569
|
break;
|
|
6570
|
+
case 'linestring':
|
|
6571
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6572
|
+
coordinates.map(function (point, index) {
|
|
6573
|
+
_this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
|
|
6574
|
+
});
|
|
6575
|
+
break;
|
|
6576
|
+
case 'point':
|
|
6577
|
+
_this.calculateRectBox(coordinates, 'point');
|
|
6578
|
+
break;
|
|
6480
6579
|
}
|
|
6481
6580
|
}
|
|
6482
6581
|
});
|
|
@@ -6513,20 +6612,33 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6513
6612
|
return newData;
|
|
6514
6613
|
};
|
|
6515
6614
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6516
|
-
LayerPanel.prototype.calculateRectBox = function (coordinates) {
|
|
6615
|
+
LayerPanel.prototype.calculateRectBox = function (coordinates, type, isFirstItem) {
|
|
6517
6616
|
var _this = this;
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
_this.mapObject.baseMapBounds
|
|
6617
|
+
if (type !== 'LineString' && type !== 'point') {
|
|
6618
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6619
|
+
Array.prototype.forEach.call(coordinates, function (currentCoords) {
|
|
6620
|
+
if (isNullOrUndefined(_this.mapObject.baseMapBounds)) {
|
|
6621
|
+
_this.mapObject.baseMapBounds = new GeoLocation({ min: currentCoords[1], max: currentCoords[1] }, { min: currentCoords[0], max: currentCoords[0] });
|
|
6622
|
+
}
|
|
6623
|
+
else {
|
|
6624
|
+
_this.mapObject.baseMapBounds.latitude.min = Math.min(_this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
|
|
6625
|
+
_this.mapObject.baseMapBounds.latitude.max = Math.max(_this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
|
|
6626
|
+
_this.mapObject.baseMapBounds.longitude.min = Math.min(_this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
|
|
6627
|
+
_this.mapObject.baseMapBounds.longitude.max = Math.max(_this.mapObject.baseMapBounds.longitude.max, currentCoords[0]);
|
|
6628
|
+
}
|
|
6629
|
+
});
|
|
6630
|
+
}
|
|
6631
|
+
else {
|
|
6632
|
+
if ((isFirstItem || type === 'point') && isNullOrUndefined(this.mapObject.baseMapBounds)) {
|
|
6633
|
+
this.mapObject.baseMapBounds = new GeoLocation({ min: coordinates[1], max: coordinates[1] }, { min: coordinates[0], max: coordinates[0] });
|
|
6522
6634
|
}
|
|
6523
6635
|
else {
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6636
|
+
this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, coordinates[1]);
|
|
6637
|
+
this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, coordinates[1]);
|
|
6638
|
+
this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, coordinates[0]);
|
|
6639
|
+
this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, coordinates[0]);
|
|
6528
6640
|
}
|
|
6529
|
-
}
|
|
6641
|
+
}
|
|
6530
6642
|
};
|
|
6531
6643
|
LayerPanel.prototype.generateTiles = function (zoomLevel, tileTranslatePoint, zoomType, bing, position) {
|
|
6532
6644
|
var userLang = this.mapObject.locale;
|
|
@@ -6615,16 +6727,18 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6615
6727
|
}
|
|
6616
6728
|
}
|
|
6617
6729
|
}
|
|
6618
|
-
this.
|
|
6730
|
+
if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset) {
|
|
6731
|
+
this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
|
|
6732
|
+
}
|
|
6619
6733
|
};
|
|
6620
6734
|
LayerPanel.prototype.arrangeTiles = function (type, x, y) {
|
|
6621
6735
|
var _this = this;
|
|
6622
6736
|
var element = document.getElementById(this.mapObject.element.id + '_tile_parent');
|
|
6623
6737
|
var element1 = document.getElementById(this.mapObject.element.id + '_tiles');
|
|
6624
6738
|
var timeOut;
|
|
6625
|
-
if (!isNullOrUndefined(type) && type !== 'Pan'
|
|
6739
|
+
if (!isNullOrUndefined(type) && type !== 'Pan') {
|
|
6626
6740
|
this.tileAnimation(type, x, y);
|
|
6627
|
-
timeOut =
|
|
6741
|
+
timeOut = this.mapObject.layersCollection[0].animationDuration;
|
|
6628
6742
|
}
|
|
6629
6743
|
else {
|
|
6630
6744
|
timeOut = 0;
|
|
@@ -6639,7 +6753,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6639
6753
|
}
|
|
6640
6754
|
if (element1) {
|
|
6641
6755
|
element1.style.zIndex = '0';
|
|
6642
|
-
element1.style.visibility = 'hidden';
|
|
6643
6756
|
}
|
|
6644
6757
|
var animateElement;
|
|
6645
6758
|
if (!document.getElementById(_this.mapObject.element.id + '_animated_tiles') && element) {
|
|
@@ -6701,35 +6814,23 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6701
6814
|
* @returns {void}
|
|
6702
6815
|
*/
|
|
6703
6816
|
LayerPanel.prototype.tileAnimation = function (zoomType, translateX, translateY) {
|
|
6704
|
-
var
|
|
6705
|
-
var
|
|
6706
|
-
var
|
|
6817
|
+
var tileParent = document.getElementById(this.mapObject.element.id + '_tile_parent');
|
|
6818
|
+
var animatedTiles = document.getElementById(this.mapObject.element.id + '_animated_tiles');
|
|
6819
|
+
var tileElement = document.getElementById(this.mapObject.element.id + '_tiles');
|
|
6707
6820
|
var scaleValue = '2';
|
|
6708
|
-
if (zoomType.indexOf('ZoomOut') === 0) {
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
ele.removeChild(ele.children[0]);
|
|
6821
|
+
if (zoomType.indexOf('ZoomOut') === 0 || zoomType === 'Reset') {
|
|
6822
|
+
tileElement.style.zIndex = '1';
|
|
6823
|
+
tileParent.style.zIndex = '0';
|
|
6824
|
+
while (tileElement.childElementCount >= 1) {
|
|
6825
|
+
tileElement.removeChild(tileElement.children[0]);
|
|
6714
6826
|
}
|
|
6715
6827
|
translateX = 0;
|
|
6716
|
-
translateY =
|
|
6717
|
-
scaleValue = '0.5';
|
|
6828
|
+
translateY = document.getElementById(this.mapObject.element.id + '_tile_parent').getClientRects()[0].height / 4;
|
|
6829
|
+
scaleValue = zoomType.indexOf('ZoomOut') === 0 ? '0.5' : '0.2';
|
|
6718
6830
|
}
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
while (!(ele.childElementCount === 1) && !(ele.childElementCount === 0)) {
|
|
6723
|
-
ele.removeChild(ele.children[1]);
|
|
6724
|
-
}
|
|
6725
|
-
element1 = ele.children[0];
|
|
6726
|
-
translateX = 0;
|
|
6727
|
-
translateY = 0;
|
|
6728
|
-
scaleValue = '1';
|
|
6729
|
-
}
|
|
6730
|
-
if (!isNullOrUndefined(element1)) {
|
|
6731
|
-
element1.style.transition = '250ms';
|
|
6732
|
-
element1.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
|
|
6831
|
+
if (!isNullOrUndefined(animatedTiles)) {
|
|
6832
|
+
animatedTiles.style.transition = this.mapObject.layersCollection[0].animationDuration + 'ms';
|
|
6833
|
+
animatedTiles.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
|
|
6733
6834
|
}
|
|
6734
6835
|
};
|
|
6735
6836
|
/**
|
|
@@ -8171,7 +8272,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8171
8272
|
*/
|
|
8172
8273
|
Maps.prototype.mapsOnResize = function (e) {
|
|
8173
8274
|
var _this = this;
|
|
8174
|
-
this.isResize = true;
|
|
8275
|
+
this.isResize = this.isReset = true;
|
|
8175
8276
|
var args = {
|
|
8176
8277
|
name: resize,
|
|
8177
8278
|
previousSize: this.availableSize,
|
|
@@ -9154,6 +9255,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9154
9255
|
// eslint-disable-next-line valid-jsdoc
|
|
9155
9256
|
/**
|
|
9156
9257
|
* To render bubble
|
|
9258
|
+
*
|
|
9259
|
+
* @private
|
|
9157
9260
|
*/
|
|
9158
9261
|
Bubble.prototype.renderBubble = function (
|
|
9159
9262
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -9199,7 +9302,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9199
9302
|
isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
|
|
9200
9303
|
var shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
|
|
9201
9304
|
? shape[shapePath].toLowerCase() : shape[shapePath];
|
|
9202
|
-
if (shapeDataLayerPathValue === shapePathValue) {
|
|
9305
|
+
if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
|
|
9203
9306
|
if (layerData[i]['type'] === 'Point') {
|
|
9204
9307
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9205
9308
|
shapePoints.push(this.getPoints(layerData[i], []));
|
|
@@ -9330,6 +9433,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9330
9433
|
// eslint-disable-next-line valid-jsdoc
|
|
9331
9434
|
/**
|
|
9332
9435
|
* To check and trigger bubble click event
|
|
9436
|
+
*
|
|
9437
|
+
* @private
|
|
9333
9438
|
*/
|
|
9334
9439
|
Bubble.prototype.bubbleClick = function (e) {
|
|
9335
9440
|
var target = e.target.id;
|
|
@@ -9373,6 +9478,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9373
9478
|
// eslint-disable-next-line valid-jsdoc
|
|
9374
9479
|
/**
|
|
9375
9480
|
* To check and trigger bubble move event
|
|
9481
|
+
*
|
|
9482
|
+
* @private
|
|
9376
9483
|
*/
|
|
9377
9484
|
Bubble.prototype.bubbleMove = function (e) {
|
|
9378
9485
|
var target = e.target.id;
|
|
@@ -9674,6 +9781,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
9674
9781
|
}
|
|
9675
9782
|
else {
|
|
9676
9783
|
if (dataLabelSettings.smartLabelMode === 'Trim') {
|
|
9784
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9677
9785
|
var textType = typeof text === 'number' ? text.toString() : text;
|
|
9678
9786
|
trimmedLable = textTrim(width, textType, style);
|
|
9679
9787
|
elementSize = measureText(trimmedLable, style);
|
|
@@ -10419,21 +10527,25 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10419
10527
|
var textLocation = collection['Text'];
|
|
10420
10528
|
var imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
|
|
10421
10529
|
var renderOptions_1 = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
10422
|
-
|
|
10530
|
+
var legendTextStyle = {
|
|
10531
|
+
fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
|
|
10532
|
+
fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color, opacity: legend.textStyle.opacity
|
|
10533
|
+
};
|
|
10534
|
+
legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
|
|
10423
10535
|
this.maps.themeStyle.legendTextColor;
|
|
10424
|
-
|
|
10425
|
-
|
|
10536
|
+
legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
|
|
10537
|
+
legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
|
|
10426
10538
|
if (i === 0) {
|
|
10427
10539
|
this.renderLegendBorder();
|
|
10428
10540
|
}
|
|
10429
10541
|
legendElement.appendChild(drawSymbol(shapeLocation, shape, shapeSize, collection['ImageSrc'], renderOptions_1));
|
|
10430
10542
|
var legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
|
|
10431
10543
|
if (legendRectSize > this.legendBorderRect.width) {
|
|
10432
|
-
var trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText,
|
|
10544
|
+
var trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legendTextStyle, legendRectSize);
|
|
10433
10545
|
legendText = trimmedText;
|
|
10434
10546
|
}
|
|
10435
10547
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
|
|
10436
|
-
renderTextElement(textOptions,
|
|
10548
|
+
renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
|
|
10437
10549
|
this.legendGroup.appendChild(legendElement);
|
|
10438
10550
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10439
10551
|
if (i === (this.totalPages[page]['Collection'].length - 1)) {
|
|
@@ -11114,7 +11226,10 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11114
11226
|
var map = this.maps;
|
|
11115
11227
|
var legend = map.legendSettings;
|
|
11116
11228
|
var legendTitle = legend.title.text;
|
|
11117
|
-
var textStyle =
|
|
11229
|
+
var textStyle = {
|
|
11230
|
+
fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
|
|
11231
|
+
fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color, opacity: legend.titleStyle.opacity
|
|
11232
|
+
};
|
|
11118
11233
|
var textOptions;
|
|
11119
11234
|
var spacing = 10;
|
|
11120
11235
|
var trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
|
|
@@ -11133,6 +11248,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11133
11248
|
map.svgObject.appendChild(this.legendGroup);
|
|
11134
11249
|
if (legendTitle) {
|
|
11135
11250
|
textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
|
|
11251
|
+
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
|
|
11136
11252
|
textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
|
|
11137
11253
|
renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
11138
11254
|
}
|
|
@@ -11246,14 +11362,18 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11246
11362
|
});
|
|
11247
11363
|
});
|
|
11248
11364
|
};
|
|
11365
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11249
11366
|
Legend.prototype.getMarkerLegendData = function (layerIndex, text, legendFill) {
|
|
11250
11367
|
var _this = this;
|
|
11368
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11251
11369
|
var legendData = [];
|
|
11252
11370
|
this.maps.layers[layerIndex].markerSettings.map(function (markerSettings, markerIndex) {
|
|
11371
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11253
11372
|
var markerData = markerSettings.dataSource;
|
|
11373
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11254
11374
|
Array.prototype.forEach.call(markerData, function (data, dataIndex) {
|
|
11255
11375
|
var marker$$1 = _this.maps.layers[layerIndex].markerSettings[markerIndex];
|
|
11256
|
-
if ((text === data[marker$$1.legendText] || text === '') && legendFill
|
|
11376
|
+
if ((text === data[marker$$1.legendText] || text === '') && legendFill === data[marker$$1.colorValuePath]) {
|
|
11257
11377
|
legendData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
|
|
11258
11378
|
shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
|
|
11259
11379
|
}
|
|
@@ -11624,7 +11744,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11624
11744
|
mapElement.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
11625
11745
|
mapElement.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
11626
11746
|
mapElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11627
|
-
mapElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11747
|
+
mapElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11628
11748
|
mapElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11629
11749
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11630
11750
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11687,7 +11807,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11687
11807
|
layerElement.setAttribute('fill', this.maps.layers[j].shapeSettings.fill);
|
|
11688
11808
|
layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
|
|
11689
11809
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
11690
|
-
layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11810
|
+
layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11691
11811
|
layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
|
|
11692
11812
|
this.maps.layers[j].shapeSettings.opacity :
|
|
11693
11813
|
this.maps.layers[j].shapeSettings.border.opacity).toString());
|
|
@@ -11717,7 +11837,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11717
11837
|
layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
|
|
11718
11838
|
this.maps.layers[j].shapeSettings.opacity :
|
|
11719
11839
|
this.maps.layers[j].shapeSettings.border.opacity).toString());
|
|
11720
|
-
layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11840
|
+
layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11721
11841
|
layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
|
|
11722
11842
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
11723
11843
|
if (targetEle !== null) {
|
|
@@ -11758,7 +11878,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11758
11878
|
if (this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
11759
11879
|
LegendInteractive.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
11760
11880
|
LegendInteractive.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
11761
|
-
LegendInteractive.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11881
|
+
LegendInteractive.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11762
11882
|
LegendInteractive.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11763
11883
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11764
11884
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11822,7 +11942,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11822
11942
|
mapLegendElement.setAttribute('fill', this.maps.layers[0].shapeSettings.fill);
|
|
11823
11943
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
11824
11944
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11825
|
-
mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11945
|
+
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11826
11946
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11827
11947
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11828
11948
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11849,7 +11969,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11849
11969
|
this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
|
|
11850
11970
|
}
|
|
11851
11971
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11852
|
-
mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11972
|
+
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11853
11973
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
11854
11974
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11855
11975
|
this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -12125,14 +12245,14 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12125
12245
|
isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
|
|
12126
12246
|
}
|
|
12127
12247
|
var border = {
|
|
12128
|
-
color: this.highlightSettings.border.color,
|
|
12129
|
-
width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
|
|
12248
|
+
color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
|
|
12249
|
+
width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
|
|
12130
12250
|
opacity: this.highlightSettings.border.opacity
|
|
12131
12251
|
};
|
|
12132
12252
|
var eventArgs = {
|
|
12133
12253
|
opacity: this.highlightSettings.opacity,
|
|
12134
|
-
fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
12135
|
-
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
|
|
12254
|
+
fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
12255
|
+
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
|
|
12136
12256
|
border: border,
|
|
12137
12257
|
name: itemHighlight,
|
|
12138
12258
|
target: targetEle.id,
|
|
@@ -12315,15 +12435,16 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12315
12435
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12316
12436
|
Selection.prototype.selectMap = function (targetElement, shapeData, data) {
|
|
12317
12437
|
var _this = this;
|
|
12438
|
+
var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
12318
12439
|
var selectionsettings = this.selectionsettings;
|
|
12319
12440
|
var border = {
|
|
12320
|
-
color: this.selectionsettings.border.color,
|
|
12321
|
-
width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
|
|
12441
|
+
color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
|
|
12442
|
+
width: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)) : (this.selectionsettings.border.width / this.maps.scale),
|
|
12322
12443
|
opacity: this.selectionsettings.border.opacity
|
|
12323
12444
|
};
|
|
12324
12445
|
var eventArgs = {
|
|
12325
12446
|
opacity: this.selectionsettings.opacity,
|
|
12326
|
-
fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
|
|
12447
|
+
fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
|
|
12327
12448
|
border: border,
|
|
12328
12449
|
name: itemSelection,
|
|
12329
12450
|
target: targetElement.id,
|
|
@@ -12346,9 +12467,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12346
12467
|
}
|
|
12347
12468
|
if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
12348
12469
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
12349
|
-
var
|
|
12350
|
-
targetElement.setAttribute('stroke-width', _this.maps.layers[
|
|
12351
|
-
targetElement.setAttribute('stroke', _this.maps.layers[
|
|
12470
|
+
var layerIndex_1 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
12471
|
+
targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex_1].navigationLineSettings[index].width.toString());
|
|
12472
|
+
targetElement.setAttribute('stroke', _this.maps.layers[layerIndex_1].navigationLineSettings[index].color);
|
|
12352
12473
|
}
|
|
12353
12474
|
}
|
|
12354
12475
|
else {
|
|
@@ -12374,9 +12495,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12374
12495
|
}
|
|
12375
12496
|
if (ele.id.indexOf('NavigationIndex') > -1) {
|
|
12376
12497
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
12377
|
-
var
|
|
12378
|
-
ele.setAttribute('stroke-width', _this.maps.layers[
|
|
12379
|
-
ele.setAttribute('stroke', _this.maps.layers[
|
|
12498
|
+
var layerIndex_2 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
12499
|
+
ele.setAttribute('stroke-width', _this.maps.layers[layerIndex_2].navigationLineSettings[index].width.toString());
|
|
12500
|
+
ele.setAttribute('stroke', _this.maps.layers[layerIndex_2].navigationLineSettings[index].color);
|
|
12380
12501
|
}
|
|
12381
12502
|
}
|
|
12382
12503
|
if (!getElement(_this.selectionType + 'selectionMap')) {
|
|
@@ -12517,8 +12638,6 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
12517
12638
|
if (istooltipRender) {
|
|
12518
12639
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
12519
12640
|
option = layer.tooltipSettings;
|
|
12520
|
-
option.textStyle.fontFamily = this.maps.themeStyle.fontFamily || option.textStyle.fontFamily;
|
|
12521
|
-
option.textStyle.opacity = this.maps.themeStyle.tooltipTextOpacity || option.textStyle.opacity;
|
|
12522
12641
|
var shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
12523
12642
|
if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
|
|
12524
12643
|
return;
|
|
@@ -12635,9 +12754,13 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
12635
12754
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
12636
12755
|
}
|
|
12637
12756
|
templateData = this.setTooltipContent(option, templateData);
|
|
12757
|
+
var tooltipTextStyle = {
|
|
12758
|
+
color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
|
|
12759
|
+
fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
|
|
12760
|
+
};
|
|
12638
12761
|
var tooltipOption = {
|
|
12639
12762
|
location: location, text: tooltipContent, data: templateData,
|
|
12640
|
-
textStyle:
|
|
12763
|
+
textStyle: tooltipTextStyle,
|
|
12641
12764
|
template: option.template
|
|
12642
12765
|
};
|
|
12643
12766
|
tooltipArgs = {
|
|
@@ -12653,6 +12776,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
12653
12776
|
_this.maps['isProtectedOnChange'] = true;
|
|
12654
12777
|
tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
|
|
12655
12778
|
|| _this.maps.themeStyle.tooltipFontColor;
|
|
12779
|
+
tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
|
|
12780
|
+
|| _this.maps.themeStyle.fontFamily;
|
|
12781
|
+
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
12782
|
+
|| _this.maps.themeStyle.tooltipTextOpacity;
|
|
12656
12783
|
if (tooltipArgs.cancel) {
|
|
12657
12784
|
_this.svgTooltip = new Tooltip({
|
|
12658
12785
|
enable: true,
|
|
@@ -12935,8 +13062,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
12935
13062
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
12936
13063
|
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
12937
13064
|
}
|
|
13065
|
+
this.markerLineAnimation(map);
|
|
12938
13066
|
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
12939
13067
|
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13068
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
12940
13069
|
setTimeout(function () {
|
|
12941
13070
|
// if (type === 'ZoomOut') {
|
|
12942
13071
|
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
@@ -12950,7 +13079,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
12950
13079
|
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
12951
13080
|
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
12952
13081
|
}
|
|
12953
|
-
},
|
|
13082
|
+
}, animationDuration);
|
|
12954
13083
|
}
|
|
12955
13084
|
this.maps.zoomNotApplied = false;
|
|
12956
13085
|
};
|
|
@@ -13124,11 +13253,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13124
13253
|
*/
|
|
13125
13254
|
Zoom.prototype.animateTransform = function (element, animate$$1, x, y, scale) {
|
|
13126
13255
|
var duration = this.currentLayer.animationDuration;
|
|
13127
|
-
if (!animate$$1 || duration === 0) {
|
|
13256
|
+
if (!animate$$1 || duration === 0 || this.maps.isTileMap) {
|
|
13128
13257
|
element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
|
|
13129
13258
|
return;
|
|
13130
13259
|
}
|
|
13131
|
-
|
|
13260
|
+
if (!this.maps.isTileMap) {
|
|
13261
|
+
zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
|
|
13262
|
+
}
|
|
13132
13263
|
};
|
|
13133
13264
|
Zoom.prototype.applyTransform = function (animate$$1) {
|
|
13134
13265
|
var layerIndex;
|
|
@@ -13175,12 +13306,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13175
13306
|
this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
|
|
13176
13307
|
}
|
|
13177
13308
|
currentEle = layerElement.childNodes[j];
|
|
13309
|
+
var markerAnimation = void 0;
|
|
13178
13310
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
13179
13311
|
for (var k = 0; k < currentEle.childElementCount; k++) {
|
|
13180
13312
|
this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate$$1);
|
|
13181
13313
|
var layerIndex_1 = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
13182
13314
|
var dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
13183
13315
|
var markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
13316
|
+
markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
|
|
13184
13317
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13185
13318
|
var markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
|
|
13186
13319
|
for (var x_1 = 0; x_1 < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x_1++) {
|
|
@@ -13191,9 +13324,17 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13191
13324
|
this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
|
|
13192
13325
|
}
|
|
13193
13326
|
}
|
|
13194
|
-
if (
|
|
13195
|
-
|
|
13196
|
-
|
|
13327
|
+
if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
|
|
13328
|
+
if (this.maps.isTileMap) {
|
|
13329
|
+
var groupElement = document.querySelector('.GroupElement');
|
|
13330
|
+
if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
|
|
13331
|
+
groupElement.style.display = 'none';
|
|
13332
|
+
}
|
|
13333
|
+
}
|
|
13334
|
+
else {
|
|
13335
|
+
markerStyle = 'visibility:hidden';
|
|
13336
|
+
currentEle.setAttribute('style', markerStyle);
|
|
13337
|
+
}
|
|
13197
13338
|
}
|
|
13198
13339
|
}
|
|
13199
13340
|
if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
|
|
@@ -13292,7 +13433,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13292
13433
|
this.maps.arrangeTemplate();
|
|
13293
13434
|
}
|
|
13294
13435
|
if (!isNullOrUndefined(this.currentLayer)) {
|
|
13295
|
-
if (!animate$$1 || this.currentLayer.animationDuration === 0) {
|
|
13436
|
+
if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
|
|
13296
13437
|
this.processTemplate(x, y, scale, this.maps);
|
|
13297
13438
|
}
|
|
13298
13439
|
}
|
|
@@ -13411,7 +13552,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13411
13552
|
*/
|
|
13412
13553
|
Zoom.prototype.processTemplate = function (x, y, scale, maps) {
|
|
13413
13554
|
for (var i = 0; i < this.templateCount; i++) {
|
|
13414
|
-
this.currentLayer = maps.layersCollection[i];
|
|
13415
13555
|
var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
|
|
13416
13556
|
var markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
|
|
13417
13557
|
i + '_Markers_Template_Group');
|
|
@@ -13642,6 +13782,20 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13642
13782
|
}
|
|
13643
13783
|
}
|
|
13644
13784
|
};
|
|
13785
|
+
Zoom.prototype.markerLineAnimation = function (map) {
|
|
13786
|
+
if (map.isTileMap) {
|
|
13787
|
+
for (var i = 0; i < map.layersCollection.length; i++) {
|
|
13788
|
+
var markerTemplateElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
|
|
13789
|
+
var lineElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_line_Group');
|
|
13790
|
+
if (!isNullOrUndefined(markerTemplateElement)) {
|
|
13791
|
+
markerTemplateElement.style.visibility = 'hidden';
|
|
13792
|
+
}
|
|
13793
|
+
if (!isNullOrUndefined(lineElement)) {
|
|
13794
|
+
lineElement.style.visibility = 'hidden';
|
|
13795
|
+
}
|
|
13796
|
+
}
|
|
13797
|
+
}
|
|
13798
|
+
};
|
|
13645
13799
|
Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
|
|
13646
13800
|
var map = this.maps;
|
|
13647
13801
|
var panArgs;
|
|
@@ -13774,41 +13928,45 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13774
13928
|
var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
13775
13929
|
map.scale = Math.pow(2, tileZoomFactor - 1);
|
|
13776
13930
|
map.tileZoomLevel = tileZoomFactor;
|
|
13777
|
-
map.
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
map.
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13931
|
+
if (map.previousScale !== map.scale || map.isReset) {
|
|
13932
|
+
map.zoomSettings.zoomFactor = zoomFactor;
|
|
13933
|
+
var position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
|
|
13934
|
+
this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
|
|
13935
|
+
if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
|
|
13936
|
+
map.initialCheck = true;
|
|
13937
|
+
map.zoomPersistence = false;
|
|
13938
|
+
map.tileTranslatePoint.x = map.initialTileTranslate.x;
|
|
13939
|
+
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
13940
|
+
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
13941
|
+
}
|
|
13942
|
+
this.triggerZoomEvent(prevTilePoint, prevLevel, type);
|
|
13943
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13944
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13945
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13946
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
13947
|
+
}
|
|
13948
|
+
if (document.querySelector('.GroupElement')) {
|
|
13949
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
13950
|
+
}
|
|
13951
|
+
this.markerLineAnimation(map);
|
|
13952
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
13953
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13954
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13955
|
+
setTimeout(function () {
|
|
13956
|
+
_this.applyTransform(true);
|
|
13957
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
13958
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13959
|
+
}
|
|
13960
|
+
}, animationDuration);
|
|
13786
13961
|
}
|
|
13787
|
-
this.
|
|
13788
|
-
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13789
|
-
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13790
|
-
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13791
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
13792
|
-
}
|
|
13793
|
-
if (document.querySelector('.GroupElement')) {
|
|
13794
|
-
document.querySelector('.GroupElement').style.display = 'none';
|
|
13795
|
-
}
|
|
13796
|
-
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
13797
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13798
|
-
setTimeout(function () {
|
|
13799
|
-
_this.applyTransform(true);
|
|
13800
|
-
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
13801
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13802
|
-
}
|
|
13803
|
-
}, 250);
|
|
13962
|
+
this.maps.zoomNotApplied = false;
|
|
13804
13963
|
}
|
|
13805
|
-
this.maps.zoomNotApplied = false;
|
|
13806
13964
|
};
|
|
13807
13965
|
Zoom.prototype.createZoomingToolbars = function () {
|
|
13808
13966
|
var map = this.maps;
|
|
13809
13967
|
this.toolBarGroup = map.renderer.createGroup({
|
|
13810
13968
|
id: map.element.id + '_Zooming_KitCollection',
|
|
13811
|
-
opacity: 0.3
|
|
13969
|
+
opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
|
|
13812
13970
|
});
|
|
13813
13971
|
var kitHeight = 16;
|
|
13814
13972
|
var kitWidth = 16;
|
|
@@ -14211,14 +14369,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14211
14369
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14212
14370
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
14213
14371
|
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
14214
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '0.3');
|
|
14215
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '0.3');
|
|
14372
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
14373
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
14216
14374
|
}
|
|
14217
14375
|
}
|
|
14218
14376
|
}
|
|
14219
14377
|
}
|
|
14220
14378
|
else {
|
|
14221
|
-
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '0.3');
|
|
14379
|
+
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
14222
14380
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14223
14381
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
14224
14382
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|