@syncfusion/ej2-maps 19.3.46 → 19.4.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
- package/CHANGELOG.md +34 -1
- package/README.md +1 -1
- 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 +478 -257
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +474 -253
- 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 +47 -18
- package/src/maps/layers/marker.js +2 -8
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +5 -0
- package/src/maps/maps.js +42 -16
- package/src/maps/model/base-model.d.ts +7 -0
- package/src/maps/model/base.d.ts +6 -0
- package/src/maps/model/base.js +5 -2
- package/src/maps/model/interface.d.ts +1 -3
- 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 +76 -44
- package/src/maps/utils/enum.d.ts +3 -1
- package/src/maps/utils/helper.d.ts +4 -2
- package/src/maps/utils/helper.js +130 -98
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -59,13 +59,15 @@ function calculateSize(maps) {
|
|
|
59
59
|
var containerHeight = maps.element.clientHeight;
|
|
60
60
|
var containerElementWidth = stringToNumber(maps.element.style.width, containerWidth);
|
|
61
61
|
var containerElementHeight = stringToNumber(maps.element.style.height, containerHeight);
|
|
62
|
+
var availableSize = new Size(0, 0);
|
|
62
63
|
if (maps.width === '0px' || maps.width === '0%' || maps.height === '0%' || maps.height === '0px') {
|
|
63
|
-
|
|
64
|
+
availableSize = new Size(0, 0);
|
|
64
65
|
}
|
|
65
66
|
else {
|
|
66
|
-
|
|
67
|
+
availableSize = new Size(stringToNumber(maps.width, containerWidth) || containerWidth || containerElementWidth || 600, stringToNumber(maps.height, containerHeight) || containerHeight || containerElementHeight || (maps.isDevice ?
|
|
67
68
|
Math.min(window.innerWidth, window.innerHeight) : 450));
|
|
68
69
|
}
|
|
70
|
+
return availableSize;
|
|
69
71
|
}
|
|
70
72
|
/**
|
|
71
73
|
* Method to create svg for maps.
|
|
@@ -75,7 +77,7 @@ function calculateSize(maps) {
|
|
|
75
77
|
*/
|
|
76
78
|
function createSvg(maps) {
|
|
77
79
|
maps.renderer = new SvgRenderer(maps.element.id);
|
|
78
|
-
calculateSize(maps);
|
|
80
|
+
maps.availableSize = calculateSize(maps);
|
|
79
81
|
maps.svgObject = maps.renderer.createSvg({
|
|
80
82
|
id: maps.element.id + '_svg',
|
|
81
83
|
width: maps.availableSize.width,
|
|
@@ -857,17 +859,19 @@ function markerShapeChoose(eventArgs, data) {
|
|
|
857
859
|
var shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
|
|
858
860
|
(getValueFromObject(data, eventArgs.shapeValuePath).toString()) :
|
|
859
861
|
data[eventArgs.shapeValuePath]);
|
|
860
|
-
eventArgs.shape = shape;
|
|
862
|
+
eventArgs.shape = (shape.toString() !== "") ? shape : eventArgs.shape;
|
|
861
863
|
if (data[eventArgs.shapeValuePath] === 'Image') {
|
|
862
|
-
eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)
|
|
863
|
-
!isNullOrUndefined(data[eventArgs.imageUrlValuePath])
|
|
864
|
-
|
|
864
|
+
eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
865
|
+
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
866
|
+
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
865
867
|
}
|
|
866
868
|
}
|
|
867
869
|
else {
|
|
868
870
|
var shapes = (!isNullOrUndefined(eventArgs.shapeValuePath)) ? ((eventArgs.shapeValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.shapeValuePath).toString() : eventArgs.shape) : eventArgs.shape;
|
|
869
|
-
eventArgs.shape = shapes;
|
|
870
|
-
var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
871
|
+
eventArgs.shape = (shapes.toString() !== "") ? shapes : eventArgs.shape;
|
|
872
|
+
var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
873
|
+
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
874
|
+
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
871
875
|
eventArgs.imageUrl = shapeImage;
|
|
872
876
|
}
|
|
873
877
|
return eventArgs;
|
|
@@ -1245,6 +1249,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1245
1249
|
* @param {number} markerIndex - Specifies the marker index
|
|
1246
1250
|
* @param {HTMLElement} markerTemplate - Specifies the marker template element
|
|
1247
1251
|
* @param {Point} location - Specifies the location
|
|
1252
|
+
* @param {Point} transPoint - Specifies the translate point.
|
|
1248
1253
|
* @param {number} scale - Specifies the scale value
|
|
1249
1254
|
* @param {Point} offset - Specifies the offset value
|
|
1250
1255
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
@@ -1426,7 +1431,7 @@ function calculateShapes(maps, shape, options, size, location, markerEle) {
|
|
|
1426
1431
|
var tempGroup;
|
|
1427
1432
|
switch (shape) {
|
|
1428
1433
|
case 'Balloon':
|
|
1429
|
-
tempGroup = drawBalloon(maps, options, size, location, markerEle);
|
|
1434
|
+
tempGroup = drawBalloon(maps, options, size, location, 'Marker', markerEle);
|
|
1430
1435
|
break;
|
|
1431
1436
|
case 'Cross':
|
|
1432
1437
|
options.d = 'M ' + location.x + ' ' + (location.y - size.height / 2) + ' L ' + location.x + ' ' + (location.y + size.height
|
|
@@ -1584,9 +1589,10 @@ function drawStar(maps, options, size, location, element) {
|
|
|
1584
1589
|
* @returns {Element} - Returns the element
|
|
1585
1590
|
* @private
|
|
1586
1591
|
*/
|
|
1587
|
-
function drawBalloon(maps, options, size, location, element) {
|
|
1592
|
+
function drawBalloon(maps, options, size, location, type, element) {
|
|
1588
1593
|
var width = size.width;
|
|
1589
1594
|
var height = size.height;
|
|
1595
|
+
var pathElement;
|
|
1590
1596
|
location.x -= width / 2;
|
|
1591
1597
|
location.y -= height;
|
|
1592
1598
|
options.d = 'M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16' +
|
|
@@ -1595,9 +1601,15 @@ function drawBalloon(maps, options, size, location, element) {
|
|
|
1595
1601
|
var x = size.width / 30;
|
|
1596
1602
|
var y = size.height / 30;
|
|
1597
1603
|
balloon.setAttribute('transform', 'translate(' + location.x + ', ' + location.y + ') scale(' + x + ', ' + y + ')');
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1604
|
+
if (type === 'Marker') {
|
|
1605
|
+
var g = maps.renderer.createGroup({ id: options.id });
|
|
1606
|
+
appendShape(balloon, g);
|
|
1607
|
+
pathElement = appendShape(g, element);
|
|
1608
|
+
}
|
|
1609
|
+
else {
|
|
1610
|
+
pathElement = balloon;
|
|
1611
|
+
}
|
|
1612
|
+
return pathElement;
|
|
1601
1613
|
}
|
|
1602
1614
|
/**
|
|
1603
1615
|
* Internal rendering of Pattern
|
|
@@ -1739,6 +1751,7 @@ function getRatioOfBubble(min, max, value, minValue, maxValue) {
|
|
|
1739
1751
|
*
|
|
1740
1752
|
* @param {MapLocation[]} points - Specifies the points
|
|
1741
1753
|
* @param {string} type - Specifies the type
|
|
1754
|
+
* @param {string} geometryType - Specified the type of the geometry
|
|
1742
1755
|
* @returns {any} - Specifies the object
|
|
1743
1756
|
*/
|
|
1744
1757
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1957,9 +1970,9 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
1957
1970
|
mapObject.mapScaleValue = scaleFactor = zoomFactorValue = mapObject.scaleOfGivenLocation;
|
|
1958
1971
|
}
|
|
1959
1972
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1960
|
-
var min = mapObject.baseMapRectBounds['min'];
|
|
1973
|
+
var min = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['min'] : null;
|
|
1961
1974
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1962
|
-
var max = mapObject.baseMapRectBounds['max'];
|
|
1975
|
+
var max = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['max'] : null;
|
|
1963
1976
|
var zoomFactor = animate ? 1 : mapObject.mapScaleValue;
|
|
1964
1977
|
if (isNullOrUndefined(mapObject.currentShapeDataLength)) {
|
|
1965
1978
|
mapObject.currentShapeDataLength = !isNullOrUndefined(layer.shapeData['features'])
|
|
@@ -1969,111 +1982,113 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
1969
1982
|
var availSize = mapObject.availableSize;
|
|
1970
1983
|
var x;
|
|
1971
1984
|
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)) {
|
|
1985
|
+
if (!isNullOrUndefined(min) && !isNullOrUndefined(max)) {
|
|
1986
|
+
var mapWidth = Math.abs(max['x'] - min['x']);
|
|
1987
|
+
var mapHeight = Math.abs(min['y'] - max['y']);
|
|
1988
|
+
var factor = animate ? 1 : mapObject.markerZoomFactor === 1 ? mapObject.mapScaleValue : zoomFactorValue;
|
|
1989
|
+
center = mapObject.zoomSettings.shouldZoomInitially
|
|
1990
|
+
&& mapObject.markerZoomedState && !mapObject.zoomPersistence ? mapObject.markerZoomCenterPoint :
|
|
1991
|
+
mapObject.centerPosition;
|
|
1992
|
+
if ((!isNullOrUndefined(centerLongitude) && !isNullOrUndefined(centerLatitude)) || checkMethodeZoom) {
|
|
1993
|
+
var leftPosition = (((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) + mapObject.mapAreaRect.x) / factor;
|
|
1994
|
+
var topPosition = (((mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2) + mapObject.mapAreaRect.y) / factor;
|
|
1995
|
+
var point = checkMethodeZoom ? calculateCenterFromPixel(mapObject, layer) :
|
|
1996
|
+
convertGeoToPoint(centerLatitude, centerLongitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
|
|
1997
|
+
if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
|
|
1990
1998
|
x = -point.x + leftPosition;
|
|
1991
1999
|
y = -point.y + topPosition;
|
|
2000
|
+
scaleFactor = zoomFactor;
|
|
1992
2001
|
}
|
|
1993
2002
|
else {
|
|
1994
|
-
if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
|
|
2003
|
+
if (Math.floor(mapObject.scale) !== 1 && mapObject.zoomSettings.shouldZoomInitially || (mapObject.zoomNotApplied)) {
|
|
1995
2004
|
x = -point.x + leftPosition;
|
|
1996
2005
|
y = -point.y + topPosition;
|
|
1997
|
-
scaleFactor = zoomFactor;
|
|
1998
2006
|
}
|
|
1999
2007
|
else {
|
|
2000
|
-
|
|
2001
|
-
|
|
2008
|
+
if (mapObject.zoomSettings.shouldZoomInitially || mapObject.zoomNotApplied) {
|
|
2009
|
+
x = -point.x + leftPosition;
|
|
2010
|
+
y = -point.y + topPosition;
|
|
2011
|
+
scaleFactor = zoomFactor;
|
|
2012
|
+
}
|
|
2013
|
+
else {
|
|
2014
|
+
x = mapObject.zoomTranslatePoint.x;
|
|
2015
|
+
y = mapObject.zoomTranslatePoint.y;
|
|
2016
|
+
}
|
|
2002
2017
|
}
|
|
2018
|
+
scaleFactor = mapObject.mapScaleValue;
|
|
2003
2019
|
}
|
|
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
2020
|
}
|
|
2017
2021
|
else {
|
|
2018
|
-
if (
|
|
2022
|
+
if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
|
|
2019
2023
|
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2020
|
-
mapHeight *= scaleFactor;
|
|
2021
2024
|
mapWidth *= scaleFactor;
|
|
2025
|
+
mapHeight *= scaleFactor;
|
|
2026
|
+
var widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
|
|
2027
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2))) - widthDiff;
|
|
2022
2028
|
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
2023
|
-
|
|
2029
|
+
mapObject.previousTranslate = new Point(x, y);
|
|
2024
2030
|
}
|
|
2025
2031
|
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;
|
|
2032
|
+
if (!mapObject.zoomSettings.shouldZoomInitially && mapObject.markerZoomFactor === 1 && mapObject.mapScaleValue === 1) {
|
|
2033
|
+
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2034
|
+
mapHeight *= scaleFactor;
|
|
2035
|
+
mapWidth *= scaleFactor;
|
|
2036
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
2037
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
|
|
2056
2038
|
}
|
|
2057
2039
|
else {
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
mapHeight
|
|
2063
|
-
|
|
2040
|
+
scaleFactor = mapObject.mapScaleValue < 1 ? mapObject.mapScaleValue + 1 : mapObject.mapScaleValue;
|
|
2041
|
+
mapObject.mapScaleValue = mapObject.zoomSettings.enable && mapObject.mapScaleValue !== 1 ? mapObject.mapScaleValue : 1;
|
|
2042
|
+
if ((mapObject.currentShapeDataLength !== (!isNullOrUndefined(layer.shapeData['features'])
|
|
2043
|
+
? layer.shapeData['features'].length : layer.shapeData['geometries'].length)) && layer.type !== 'SubLayer') {
|
|
2044
|
+
var scale = parseFloat(Math.min(size.height / mapHeight, size.width / mapWidth).toFixed(2));
|
|
2045
|
+
mapHeight *= scale;
|
|
2046
|
+
mapWidth *= scale;
|
|
2047
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2)
|
|
2048
|
+
- (mapHeight / 2)));
|
|
2049
|
+
scaleFactor = scale;
|
|
2050
|
+
x = size.x + ((-(min['x']))
|
|
2051
|
+
+ ((size.width / 2) - (mapWidth / 2)));
|
|
2052
|
+
}
|
|
2053
|
+
else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width) {
|
|
2054
|
+
var cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2055
|
+
var cmapWidth = mapWidth;
|
|
2056
|
+
cmapWidth *= cscaleFactor;
|
|
2057
|
+
var cmapHeight = mapHeight;
|
|
2058
|
+
cmapHeight *= cscaleFactor;
|
|
2059
|
+
var x1 = size.x + ((-(min['x'])) + ((size.width / 2) - (cmapWidth / 2)));
|
|
2060
|
+
var y1 = size.y + ((-(min['y'])) + ((size.height / 2) - (cmapHeight / 2)));
|
|
2061
|
+
var xdiff = (mapObject.translatePoint.x - mapObject.previousTranslate.x) / (mapObject.widthBeforeRefresh);
|
|
2062
|
+
var ydiff = (mapObject.translatePoint.y - mapObject.previousTranslate.y) / (mapObject.heightBeforeRefresh);
|
|
2063
|
+
var actxdiff = xdiff * (mapObject.availableSize.width);
|
|
2064
|
+
var actydiff = ydiff * (mapObject.availableSize.height);
|
|
2065
|
+
x = x1 + actxdiff;
|
|
2066
|
+
y = y1 + actydiff;
|
|
2067
|
+
mapObject.previousTranslate = new Point(x1, y1);
|
|
2068
|
+
mapObject.zoomTranslatePoint.x = x;
|
|
2069
|
+
mapObject.zoomTranslatePoint.y = y;
|
|
2064
2070
|
}
|
|
2065
2071
|
else {
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2072
|
+
if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
|
|
2073
|
+
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2074
|
+
mapWidth *= scaleFactor;
|
|
2075
|
+
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
|
|
2076
|
+
mapHeight *= scaleFactor;
|
|
2077
|
+
y = size.y + ((-(min['y'])) + ((size.height / 2) - (mapHeight / 2)));
|
|
2078
|
+
}
|
|
2079
|
+
else {
|
|
2080
|
+
x = mapObject.zoomTranslatePoint.x;
|
|
2081
|
+
y = mapObject.zoomTranslatePoint.y;
|
|
2082
|
+
scaleFactor = mapObject.scale;
|
|
2083
|
+
}
|
|
2069
2084
|
}
|
|
2070
2085
|
}
|
|
2071
2086
|
}
|
|
2072
2087
|
}
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2088
|
+
if (!isNullOrUndefined(mapObject.translatePoint)) {
|
|
2089
|
+
x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.x : x;
|
|
2090
|
+
y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ? mapObject.translatePoint.y : y;
|
|
2091
|
+
}
|
|
2077
2092
|
}
|
|
2078
2093
|
scaleFactor = (mapObject.enablePersistence) ? ((mapObject.mapScaleValue >= 1) ? mapObject.mapScaleValue : 1) : scaleFactor;
|
|
2079
2094
|
mapObject.widthBeforeRefresh = mapObject.availableSize.width;
|
|
@@ -2510,6 +2525,12 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius) {
|
|
|
2510
2525
|
delay: delay,
|
|
2511
2526
|
progress: function (args) {
|
|
2512
2527
|
if (args.timeStamp > args.delay) {
|
|
2528
|
+
if (maps.isTileMap && height === 0) {
|
|
2529
|
+
var layerGroupElement = document.querySelector('.GroupElement');
|
|
2530
|
+
if (!isNullOrUndefined(layerGroupElement)) {
|
|
2531
|
+
layerGroupElement.style.display = 'block';
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2513
2534
|
height = ((args.timeStamp - args.delay) / args.duration);
|
|
2514
2535
|
element.setAttribute('transform', 'translate( ' + (centerX - (radius * height)) + ' ' + (centerY - (radius * height)) +
|
|
2515
2536
|
' ) scale(' + height + ')');
|
|
@@ -2709,6 +2730,8 @@ function renderLegendShape(location, size, shape, options, url) {
|
|
|
2709
2730
|
var shapeY = location.y;
|
|
2710
2731
|
var x = location.x + (-shapeWidth / 2);
|
|
2711
2732
|
var y = location.y + (-shapeHeight / 2);
|
|
2733
|
+
options['stroke'] = (shape === 'HorizontalLine' || shape === 'VerticalLine' || shape === 'Cross') ? options['fill'] : options['stroke'];
|
|
2734
|
+
options['stroke-width'] = (options['stroke-width'] === 0 && (shape === 'HorizontalLine' || shape === 'VerticalLine' || shape === 'Cross')) ? 1 : options['stroke-width'];
|
|
2712
2735
|
switch (shape) {
|
|
2713
2736
|
case 'Circle':
|
|
2714
2737
|
case 'Bubble':
|
|
@@ -2720,6 +2743,11 @@ function renderLegendShape(location, size, shape, options, url) {
|
|
|
2720
2743
|
+ (shapeY + (-shapeHeight / 2));
|
|
2721
2744
|
merge(options, { 'd': renderPath });
|
|
2722
2745
|
break;
|
|
2746
|
+
case 'HorizontalLine':
|
|
2747
|
+
renderPath = 'M' + ' ' + shapeX + ' ' + shapeY + ' ' + 'L' + ' ' + (shapeX + (shapeWidth / 2)) + ' '
|
|
2748
|
+
+ shapeY;
|
|
2749
|
+
merge(options, { 'd': renderPath });
|
|
2750
|
+
break;
|
|
2723
2751
|
case 'Diamond':
|
|
2724
2752
|
renderPath = 'M' + ' ' + x + ' ' + shapeY + ' ' +
|
|
2725
2753
|
'L' + ' ' + shapeX + ' ' + (shapeY + (-shapeHeight / 2)) + ' ' +
|
|
@@ -2844,6 +2872,7 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2844
2872
|
var value = 0;
|
|
2845
2873
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2846
2874
|
var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
|
|
2875
|
+
var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
|
|
2847
2876
|
if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
|
|
2848
2877
|
value = checkShapeDataFields(
|
|
2849
2878
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2853,14 +2882,17 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2853
2882
|
currentStroke = maps.layersCollection[index].dataSource[value][borderWidthValue];
|
|
2854
2883
|
}
|
|
2855
2884
|
else {
|
|
2856
|
-
currentStroke = (
|
|
2885
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2857
2886
|
}
|
|
2858
2887
|
}
|
|
2859
2888
|
}
|
|
2860
2889
|
else {
|
|
2861
|
-
currentStroke = (
|
|
2890
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2862
2891
|
}
|
|
2863
2892
|
childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
|
|
2893
|
+
if (element.id.indexOf('_LineString') > -1 && isNullOrUndefined(currentStroke)) {
|
|
2894
|
+
childNode.setAttribute('stroke-width', (1 / scale).toString());
|
|
2895
|
+
}
|
|
2864
2896
|
}
|
|
2865
2897
|
}
|
|
2866
2898
|
}
|
|
@@ -3224,15 +3256,15 @@ var Theme;
|
|
|
3224
3256
|
fontWeight: 'Regular',
|
|
3225
3257
|
color: null,
|
|
3226
3258
|
fontStyle: 'Regular',
|
|
3227
|
-
fontFamily:
|
|
3259
|
+
fontFamily: null
|
|
3228
3260
|
};
|
|
3229
3261
|
/** @private */
|
|
3230
3262
|
Theme.legendTitleFont = {
|
|
3231
|
-
size: '
|
|
3232
|
-
fontWeight: '
|
|
3263
|
+
size: '12px',
|
|
3264
|
+
fontWeight: 'Medium',
|
|
3233
3265
|
color: null,
|
|
3234
|
-
fontStyle: '
|
|
3235
|
-
fontFamily:
|
|
3266
|
+
fontStyle: 'Medium',
|
|
3267
|
+
fontFamily: null
|
|
3236
3268
|
};
|
|
3237
3269
|
/** @private */
|
|
3238
3270
|
Theme.legendLabelFont = {
|
|
@@ -3381,6 +3413,14 @@ function getShapeColor(theme) {
|
|
|
3381
3413
|
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
3382
3414
|
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
3383
3415
|
break;
|
|
3416
|
+
case 'fluentui':
|
|
3417
|
+
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
3418
|
+
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
3419
|
+
break;
|
|
3420
|
+
case 'fluentuidark':
|
|
3421
|
+
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
3422
|
+
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
3423
|
+
break;
|
|
3384
3424
|
default:
|
|
3385
3425
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
3386
3426
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -3526,6 +3566,7 @@ function getThemeStyle(theme) {
|
|
|
3526
3566
|
tooltipFillColor: '#363F4C',
|
|
3527
3567
|
zoomFillColor: '#FFFFFF',
|
|
3528
3568
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3569
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3529
3570
|
titleFontWeight: 'Medium',
|
|
3530
3571
|
zoomSelectionColor: '#e61576',
|
|
3531
3572
|
shapeFill: '#A6A6A6'
|
|
@@ -3543,6 +3584,7 @@ function getThemeStyle(theme) {
|
|
|
3543
3584
|
tooltipFontColor: '#000000',
|
|
3544
3585
|
tooltipFillColor: '#ffffff',
|
|
3545
3586
|
zoomFillColor: '#FFFFFF',
|
|
3587
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3546
3588
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3547
3589
|
titleFontWeight: 'Medium',
|
|
3548
3590
|
zoomSelectionColor: '#e61576',
|
|
@@ -3664,6 +3706,52 @@ function getThemeStyle(theme) {
|
|
|
3664
3706
|
shapeFill: '#495057'
|
|
3665
3707
|
};
|
|
3666
3708
|
break;
|
|
3709
|
+
case 'fluentui':
|
|
3710
|
+
style = {
|
|
3711
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3712
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3713
|
+
titleFontColor: '#201F1E',
|
|
3714
|
+
subTitleFontColor: '#201F1E',
|
|
3715
|
+
legendTitleFontColor: '#201F1E',
|
|
3716
|
+
legendTextColor: '#201F1E',
|
|
3717
|
+
dataLabelFontColor: '#201F1E',
|
|
3718
|
+
tooltipFontColor: '#323130',
|
|
3719
|
+
tooltipFillColor: '#FFFFFF',
|
|
3720
|
+
zoomFillColor: '#A19F9D',
|
|
3721
|
+
fontFamily: 'Segoe UI',
|
|
3722
|
+
titleFontSize: '14px',
|
|
3723
|
+
legendFontSize: '12px',
|
|
3724
|
+
tooltipFillOpacity: 1,
|
|
3725
|
+
tooltipTextOpacity: 1,
|
|
3726
|
+
labelFontFamily: 'Segoe UI',
|
|
3727
|
+
titleFontWeight: '600',
|
|
3728
|
+
zoomSelectionColor: '#323130',
|
|
3729
|
+
shapeFill: '#F3F2F1'
|
|
3730
|
+
};
|
|
3731
|
+
break;
|
|
3732
|
+
case 'fluentuidark':
|
|
3733
|
+
style = {
|
|
3734
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3735
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3736
|
+
titleFontColor: '#F3F2F1',
|
|
3737
|
+
subTitleFontColor: '#F3F2F1',
|
|
3738
|
+
legendTitleFontColor: '#F3F2F1',
|
|
3739
|
+
legendTextColor: '#F3F2F1',
|
|
3740
|
+
dataLabelFontColor: '#F3F2F1',
|
|
3741
|
+
tooltipFontColor: '#F3F2F1',
|
|
3742
|
+
tooltipFillColor: '#252423',
|
|
3743
|
+
zoomFillColor: '#484644',
|
|
3744
|
+
fontFamily: 'Segoe UI',
|
|
3745
|
+
titleFontSize: '14px',
|
|
3746
|
+
legendFontSize: '12px',
|
|
3747
|
+
tooltipFillOpacity: 1,
|
|
3748
|
+
tooltipTextOpacity: 1,
|
|
3749
|
+
labelFontFamily: 'Segoe UI',
|
|
3750
|
+
titleFontWeight: '600',
|
|
3751
|
+
zoomSelectionColor: '#F3F2F1',
|
|
3752
|
+
shapeFill: '#252423'
|
|
3753
|
+
};
|
|
3754
|
+
break;
|
|
3667
3755
|
default:
|
|
3668
3756
|
style = {
|
|
3669
3757
|
backgroundColor: '#FFFFFF',
|
|
@@ -3677,6 +3765,7 @@ function getThemeStyle(theme) {
|
|
|
3677
3765
|
tooltipFillColor: '#000000',
|
|
3678
3766
|
zoomFillColor: '#737373',
|
|
3679
3767
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
3768
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
3680
3769
|
titleFontWeight: 'Medium',
|
|
3681
3770
|
zoomSelectionColor: '#e61576',
|
|
3682
3771
|
shapeFill: '#A6A6A6'
|
|
@@ -4318,6 +4407,9 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4318
4407
|
function LegendSettings() {
|
|
4319
4408
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
4320
4409
|
}
|
|
4410
|
+
__decorate$1([
|
|
4411
|
+
Property(false)
|
|
4412
|
+
], LegendSettings.prototype, "useMarkerShape", void 0);
|
|
4321
4413
|
__decorate$1([
|
|
4322
4414
|
Property(false)
|
|
4323
4415
|
], LegendSettings.prototype, "toggleVisibility", void 0);
|
|
@@ -4370,7 +4462,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4370
4462
|
Complex({}, CommonTitleSettings)
|
|
4371
4463
|
], LegendSettings.prototype, "title", void 0);
|
|
4372
4464
|
__decorate$1([
|
|
4373
|
-
Complex(
|
|
4465
|
+
Complex(Theme.legendTitleFont, Font)
|
|
4374
4466
|
], LegendSettings.prototype, "titleStyle", void 0);
|
|
4375
4467
|
__decorate$1([
|
|
4376
4468
|
Property('Bottom')
|
|
@@ -4468,7 +4560,7 @@ var ShapeSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4468
4560
|
Property(5)
|
|
4469
4561
|
], ShapeSettings.prototype, "circleRadius", void 0);
|
|
4470
4562
|
__decorate$1([
|
|
4471
|
-
Complex({ width:
|
|
4563
|
+
Complex({ width: null, color: '#000000' }, Border)
|
|
4472
4564
|
], ShapeSettings.prototype, "border", void 0);
|
|
4473
4565
|
__decorate$1([
|
|
4474
4566
|
Property('')
|
|
@@ -4761,15 +4853,9 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
4761
4853
|
border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
|
|
4762
4854
|
shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
|
|
4763
4855
|
};
|
|
4764
|
-
eventArgs = markerColorChoose(eventArgs, data);
|
|
4765
|
-
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4766
4856
|
_this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
}
|
|
4770
|
-
if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
|
|
4771
|
-
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4772
|
-
}
|
|
4857
|
+
eventArgs = markerColorChoose(eventArgs, data);
|
|
4858
|
+
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4773
4859
|
var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
4774
4860
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
4775
4861
|
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : 0;
|
|
@@ -5763,7 +5849,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5763
5849
|
if (this.mapObject.zoomSettings.resetToInitial && this.mapObject.initialCheck && !isNullOrUndefined(panel.mapObject.height)
|
|
5764
5850
|
&& this.mapObject.availableSize.height > 512) {
|
|
5765
5851
|
this.mapObject.applyZoomReset = true;
|
|
5766
|
-
this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512)
|
|
5852
|
+
this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512);
|
|
5767
5853
|
var padding = this.mapObject.layers[this.mapObject.baseLayerIndex].layerType !== 'GoogleStaticMap' ?
|
|
5768
5854
|
20 : 0;
|
|
5769
5855
|
var totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
|
|
@@ -5845,6 +5931,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5845
5931
|
proxy_1.mapObject['bingMap'] = bing_1;
|
|
5846
5932
|
proxy_1.renderTileLayer(proxy_1, layer, layerIndex, bing_1);
|
|
5847
5933
|
_this.mapObject.arrangeTemplate();
|
|
5934
|
+
if (_this.mapObject.zoomModule && (_this.mapObject.previousScale !== _this.mapObject.scale)) {
|
|
5935
|
+
_this.mapObject.zoomModule.applyTransform(true);
|
|
5936
|
+
}
|
|
5848
5937
|
};
|
|
5849
5938
|
ajax.send();
|
|
5850
5939
|
}
|
|
@@ -5923,9 +6012,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5923
6012
|
var data = geometryData['geometry'];
|
|
5924
6013
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5925
6014
|
var properties = geometryData['properties'];
|
|
5926
|
-
|
|
5927
|
-
_this.generatePoints(type, coords, data, properties);
|
|
5928
|
-
}
|
|
6015
|
+
_this.generatePoints(type, coords, data, properties);
|
|
5929
6016
|
}
|
|
5930
6017
|
});
|
|
5931
6018
|
this.currentLayer.rectBounds = this.rectBounds;
|
|
@@ -5953,11 +6040,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5953
6040
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5954
6041
|
var currentShapeData = this_1.currentLayer.layerData[i];
|
|
5955
6042
|
var pathOptions;
|
|
5956
|
-
var polyLineOptions;
|
|
5957
6043
|
var circleOptions;
|
|
5958
6044
|
var groupElement;
|
|
5959
6045
|
var path = '';
|
|
5960
|
-
var points = '';
|
|
5961
6046
|
var fill = (shapeSettings.autofill) ? colors[i % colors.length] :
|
|
5962
6047
|
(shapeSettings.fill || this_1.mapObject.themeStyle.shapeFill);
|
|
5963
6048
|
if (shapeSettings.colorValuePath !== null && !isNullOrUndefined(currentShapeData['property'])) {
|
|
@@ -6021,7 +6106,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6021
6106
|
if (isNullOrUndefined(shapeSettings.borderColorValuePath)) {
|
|
6022
6107
|
_this.mapObject.layers[layerIndex].shapeSettings.border.color = eventArgs.border.color;
|
|
6023
6108
|
}
|
|
6024
|
-
|
|
6109
|
+
if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
|
|
6025
6110
|
_this.mapObject.layers[layerIndex].shapeSettings.border.width = eventArgs.border.width;
|
|
6026
6111
|
}
|
|
6027
6112
|
}
|
|
@@ -6075,17 +6160,21 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6075
6160
|
}
|
|
6076
6161
|
break;
|
|
6077
6162
|
case 'LineString':
|
|
6163
|
+
path += 'M ' + (currentShapeData[0]['point']['x']) + ' ' + (currentShapeData[0]['point']['y']);
|
|
6078
6164
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6079
6165
|
currentShapeData.map(function (lineData) {
|
|
6080
|
-
|
|
6166
|
+
path += 'L' + (lineData['point']['x']) + ' , ' + (lineData['point']['y']) + ' ';
|
|
6081
6167
|
});
|
|
6082
|
-
|
|
6083
|
-
|
|
6168
|
+
if (path.length > 3) {
|
|
6169
|
+
pathOptions = new PathOption(shapeID, 'transparent', !isNullOrUndefined(eventArgs.border.width) ? eventArgs.border.width : 1, eventArgs.border.color, opacity, eventArgs.border.opacity, shapeSettings.dashArray, path);
|
|
6170
|
+
pathEle = _this.mapObject.renderer.drawPath(pathOptions);
|
|
6171
|
+
}
|
|
6084
6172
|
break;
|
|
6085
6173
|
case 'Point':
|
|
6086
6174
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6087
6175
|
var pointData = currentShapeData['point'];
|
|
6088
|
-
|
|
6176
|
+
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / _this.currentFactor;
|
|
6177
|
+
circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, null);
|
|
6089
6178
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
6090
6179
|
break;
|
|
6091
6180
|
case 'Path':
|
|
@@ -6107,6 +6196,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6107
6196
|
pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
|
|
6108
6197
|
(currentShapeData['property'][properties]) : ''));
|
|
6109
6198
|
pathEle.setAttribute('tabindex', (_this.mapObject.tabIndex + i + 2).toString());
|
|
6199
|
+
if (drawingType === 'LineString') {
|
|
6200
|
+
pathEle.setAttribute('style', 'outline:none');
|
|
6201
|
+
}
|
|
6110
6202
|
maintainSelection(_this.mapObject.selectedElementId, _this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
|
|
6111
6203
|
if (_this.mapObject.toggledShapeElementId) {
|
|
6112
6204
|
for (var j = 0; j < _this.mapObject.toggledShapeElementId.length; j++) {
|
|
@@ -6325,11 +6417,14 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6325
6417
|
this.currentLayer.layerData.push(multiPolygonDatas);
|
|
6326
6418
|
break;
|
|
6327
6419
|
case 'linestring':
|
|
6420
|
+
var extraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6421
|
+
this.currentLayer.shapeSettings.border.width : 1;
|
|
6328
6422
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6329
6423
|
coordinates.map(function (points, index) {
|
|
6330
6424
|
latitude = points[1];
|
|
6331
6425
|
longitude = points[0];
|
|
6332
6426
|
var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
|
|
6427
|
+
_this.calculateBox(point, extraSpace_1);
|
|
6333
6428
|
newData.push({
|
|
6334
6429
|
point: point, lat: latitude, lng: longitude
|
|
6335
6430
|
});
|
|
@@ -6340,6 +6435,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6340
6435
|
break;
|
|
6341
6436
|
case 'point': {
|
|
6342
6437
|
var arrayCollections_1 = false;
|
|
6438
|
+
var extraSpace_2 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6439
|
+
this.currentLayer.shapeSettings.border.width : 1) + (this.currentLayer.shapeSettings.circleRadius * 2);
|
|
6343
6440
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6344
6441
|
coordinates.map(function (points, index) {
|
|
6345
6442
|
if (Object.prototype.toString.call(points) === '[object Array]') {
|
|
@@ -6356,6 +6453,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6356
6453
|
latitude = coordinates[1];
|
|
6357
6454
|
longitude = coordinates[0];
|
|
6358
6455
|
var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
|
|
6456
|
+
this.calculateBox(point, extraSpace_2);
|
|
6359
6457
|
this.currentLayer.layerData.push({
|
|
6360
6458
|
point: point, type: type, lat: latitude, lng: longitude, property: properties
|
|
6361
6459
|
});
|
|
@@ -6369,6 +6467,17 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6369
6467
|
break;
|
|
6370
6468
|
}
|
|
6371
6469
|
};
|
|
6470
|
+
LayerPanel.prototype.calculateBox = function (point, extraSpace) {
|
|
6471
|
+
if (isNullOrUndefined(this.rectBounds)) {
|
|
6472
|
+
this.rectBounds = { min: { x: point.x, y: point.y - extraSpace }, max: { x: point.x, y: point.y + extraSpace } };
|
|
6473
|
+
}
|
|
6474
|
+
else {
|
|
6475
|
+
this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x);
|
|
6476
|
+
this.rectBounds['min']['y'] = Math.min(this.rectBounds['min']['y'], point.y - extraSpace);
|
|
6477
|
+
this.rectBounds['max']['x'] = Math.max(this.rectBounds['max']['x'], point.x);
|
|
6478
|
+
this.rectBounds['max']['y'] = Math.max(this.rectBounds['max']['y'], point.y + extraSpace);
|
|
6479
|
+
}
|
|
6480
|
+
};
|
|
6372
6481
|
LayerPanel.prototype.calculateFactor = function (layer) {
|
|
6373
6482
|
var horFactor;
|
|
6374
6483
|
var verFactor = 1;
|
|
@@ -6477,6 +6586,15 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6477
6586
|
_this.calculateRectBox(point[0]);
|
|
6478
6587
|
});
|
|
6479
6588
|
break;
|
|
6589
|
+
case 'linestring':
|
|
6590
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6591
|
+
coordinates.map(function (point, index) {
|
|
6592
|
+
_this.calculateRectBox(point, 'LineString', index === 0 ? true : false);
|
|
6593
|
+
});
|
|
6594
|
+
break;
|
|
6595
|
+
case 'point':
|
|
6596
|
+
_this.calculateRectBox(coordinates, 'point');
|
|
6597
|
+
break;
|
|
6480
6598
|
}
|
|
6481
6599
|
}
|
|
6482
6600
|
});
|
|
@@ -6513,20 +6631,33 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6513
6631
|
return newData;
|
|
6514
6632
|
};
|
|
6515
6633
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6516
|
-
LayerPanel.prototype.calculateRectBox = function (coordinates) {
|
|
6634
|
+
LayerPanel.prototype.calculateRectBox = function (coordinates, type, isFirstItem) {
|
|
6517
6635
|
var _this = this;
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
_this.mapObject.baseMapBounds
|
|
6636
|
+
if (type !== 'LineString' && type !== 'point') {
|
|
6637
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6638
|
+
Array.prototype.forEach.call(coordinates, function (currentCoords) {
|
|
6639
|
+
if (isNullOrUndefined(_this.mapObject.baseMapBounds)) {
|
|
6640
|
+
_this.mapObject.baseMapBounds = new GeoLocation({ min: currentCoords[1], max: currentCoords[1] }, { min: currentCoords[0], max: currentCoords[0] });
|
|
6641
|
+
}
|
|
6642
|
+
else {
|
|
6643
|
+
_this.mapObject.baseMapBounds.latitude.min = Math.min(_this.mapObject.baseMapBounds.latitude.min, currentCoords[1]);
|
|
6644
|
+
_this.mapObject.baseMapBounds.latitude.max = Math.max(_this.mapObject.baseMapBounds.latitude.max, currentCoords[1]);
|
|
6645
|
+
_this.mapObject.baseMapBounds.longitude.min = Math.min(_this.mapObject.baseMapBounds.longitude.min, currentCoords[0]);
|
|
6646
|
+
_this.mapObject.baseMapBounds.longitude.max = Math.max(_this.mapObject.baseMapBounds.longitude.max, currentCoords[0]);
|
|
6647
|
+
}
|
|
6648
|
+
});
|
|
6649
|
+
}
|
|
6650
|
+
else {
|
|
6651
|
+
if ((isFirstItem || type === 'point') && isNullOrUndefined(this.mapObject.baseMapBounds)) {
|
|
6652
|
+
this.mapObject.baseMapBounds = new GeoLocation({ min: coordinates[1], max: coordinates[1] }, { min: coordinates[0], max: coordinates[0] });
|
|
6522
6653
|
}
|
|
6523
6654
|
else {
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6655
|
+
this.mapObject.baseMapBounds.latitude.min = Math.min(this.mapObject.baseMapBounds.latitude.min, coordinates[1]);
|
|
6656
|
+
this.mapObject.baseMapBounds.latitude.max = Math.max(this.mapObject.baseMapBounds.latitude.max, coordinates[1]);
|
|
6657
|
+
this.mapObject.baseMapBounds.longitude.min = Math.min(this.mapObject.baseMapBounds.longitude.min, coordinates[0]);
|
|
6658
|
+
this.mapObject.baseMapBounds.longitude.max = Math.max(this.mapObject.baseMapBounds.longitude.max, coordinates[0]);
|
|
6528
6659
|
}
|
|
6529
|
-
}
|
|
6660
|
+
}
|
|
6530
6661
|
};
|
|
6531
6662
|
LayerPanel.prototype.generateTiles = function (zoomLevel, tileTranslatePoint, zoomType, bing, position) {
|
|
6532
6663
|
var userLang = this.mapObject.locale;
|
|
@@ -6615,16 +6746,18 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6615
6746
|
}
|
|
6616
6747
|
}
|
|
6617
6748
|
}
|
|
6618
|
-
this.
|
|
6749
|
+
if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset) {
|
|
6750
|
+
this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
|
|
6751
|
+
}
|
|
6619
6752
|
};
|
|
6620
6753
|
LayerPanel.prototype.arrangeTiles = function (type, x, y) {
|
|
6621
6754
|
var _this = this;
|
|
6622
6755
|
var element = document.getElementById(this.mapObject.element.id + '_tile_parent');
|
|
6623
6756
|
var element1 = document.getElementById(this.mapObject.element.id + '_tiles');
|
|
6624
6757
|
var timeOut;
|
|
6625
|
-
if (!isNullOrUndefined(type) && type !== 'Pan'
|
|
6758
|
+
if (!isNullOrUndefined(type) && type !== 'Pan') {
|
|
6626
6759
|
this.tileAnimation(type, x, y);
|
|
6627
|
-
timeOut =
|
|
6760
|
+
timeOut = this.mapObject.layersCollection[0].animationDuration;
|
|
6628
6761
|
}
|
|
6629
6762
|
else {
|
|
6630
6763
|
timeOut = 0;
|
|
@@ -6639,7 +6772,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6639
6772
|
}
|
|
6640
6773
|
if (element1) {
|
|
6641
6774
|
element1.style.zIndex = '0';
|
|
6642
|
-
element1.style.visibility = 'hidden';
|
|
6643
6775
|
}
|
|
6644
6776
|
var animateElement;
|
|
6645
6777
|
if (!document.getElementById(_this.mapObject.element.id + '_animated_tiles') && element) {
|
|
@@ -6701,35 +6833,23 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6701
6833
|
* @returns {void}
|
|
6702
6834
|
*/
|
|
6703
6835
|
LayerPanel.prototype.tileAnimation = function (zoomType, translateX, translateY) {
|
|
6704
|
-
var
|
|
6705
|
-
var
|
|
6706
|
-
var
|
|
6836
|
+
var tileParent = document.getElementById(this.mapObject.element.id + '_tile_parent');
|
|
6837
|
+
var animatedTiles = document.getElementById(this.mapObject.element.id + '_animated_tiles');
|
|
6838
|
+
var tileElement = document.getElementById(this.mapObject.element.id + '_tiles');
|
|
6707
6839
|
var scaleValue = '2';
|
|
6708
|
-
if (zoomType.indexOf('ZoomOut') === 0) {
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
ele.removeChild(ele.children[0]);
|
|
6840
|
+
if (zoomType.indexOf('ZoomOut') === 0 || zoomType === 'Reset') {
|
|
6841
|
+
tileElement.style.zIndex = '1';
|
|
6842
|
+
tileParent.style.zIndex = '0';
|
|
6843
|
+
while (tileElement.childElementCount >= 1) {
|
|
6844
|
+
tileElement.removeChild(tileElement.children[0]);
|
|
6714
6845
|
}
|
|
6715
6846
|
translateX = 0;
|
|
6716
|
-
translateY =
|
|
6717
|
-
scaleValue = '0.5';
|
|
6847
|
+
translateY = document.getElementById(this.mapObject.element.id + '_tile_parent').getClientRects()[0].height / 4;
|
|
6848
|
+
scaleValue = zoomType.indexOf('ZoomOut') === 0 ? '0.5' : '0.2';
|
|
6718
6849
|
}
|
|
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 + ')';
|
|
6850
|
+
if (!isNullOrUndefined(animatedTiles)) {
|
|
6851
|
+
animatedTiles.style.transition = this.mapObject.layersCollection[0].animationDuration + 'ms';
|
|
6852
|
+
animatedTiles.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
|
|
6733
6853
|
}
|
|
6734
6854
|
};
|
|
6735
6855
|
/**
|
|
@@ -7345,7 +7465,15 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7345
7465
|
}
|
|
7346
7466
|
this.mapLayerPanel.measureLayerPanel();
|
|
7347
7467
|
this.element.appendChild(this.svgObject);
|
|
7468
|
+
var position = this.getExtraPosition();
|
|
7348
7469
|
for (var i = 0; i < this.layers.length; i++) {
|
|
7470
|
+
if (position.x !== 0 || position.y !== 0) {
|
|
7471
|
+
var markerTemplate$$1 = document.getElementById(this.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
|
|
7472
|
+
if (!isNullOrUndefined(markerTemplate$$1)) {
|
|
7473
|
+
markerTemplate$$1.style.top = this.mapAreaRect.y + position.y + 'px';
|
|
7474
|
+
markerTemplate$$1.style.left = this.mapAreaRect.x + position.x + 'px';
|
|
7475
|
+
}
|
|
7476
|
+
}
|
|
7349
7477
|
if (this.layers[i].selectionSettings && this.layers[i].selectionSettings.enable &&
|
|
7350
7478
|
this.layers[i].initialShapeSelection.length > 0 && this.checkInitialRender) {
|
|
7351
7479
|
var checkSelection = this.layers[i].selectionSettings.enableMultiSelect;
|
|
@@ -8171,26 +8299,28 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8171
8299
|
*/
|
|
8172
8300
|
Maps.prototype.mapsOnResize = function (e) {
|
|
8173
8301
|
var _this = this;
|
|
8174
|
-
this.isResize = true;
|
|
8302
|
+
this.isResize = this.isReset = true;
|
|
8175
8303
|
var args = {
|
|
8304
|
+
cancel: false,
|
|
8176
8305
|
name: resize,
|
|
8177
8306
|
previousSize: this.availableSize,
|
|
8178
|
-
currentSize:
|
|
8307
|
+
currentSize: calculateSize(this),
|
|
8179
8308
|
maps: this
|
|
8180
8309
|
};
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
8310
|
+
this.trigger(resize, args);
|
|
8311
|
+
if (!args.cancel) {
|
|
8312
|
+
if (this.resizeTo) {
|
|
8313
|
+
clearTimeout(this.resizeTo);
|
|
8314
|
+
}
|
|
8315
|
+
if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
|
|
8316
|
+
this.resizeTo = setTimeout(function () {
|
|
8317
|
+
_this.unWireEVents();
|
|
8318
|
+
_this.createSVG();
|
|
8319
|
+
_this.refreshing = true;
|
|
8320
|
+
_this.wireEVents();
|
|
8321
|
+
_this.render();
|
|
8322
|
+
}, 500);
|
|
8323
|
+
}
|
|
8194
8324
|
}
|
|
8195
8325
|
return false;
|
|
8196
8326
|
};
|
|
@@ -8778,6 +8908,22 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8778
8908
|
});
|
|
8779
8909
|
return isVisible;
|
|
8780
8910
|
};
|
|
8911
|
+
/**
|
|
8912
|
+
* To find space between the secondary element and svg element.
|
|
8913
|
+
* @private
|
|
8914
|
+
*/
|
|
8915
|
+
Maps.prototype.getExtraPosition = function () {
|
|
8916
|
+
var top;
|
|
8917
|
+
var left;
|
|
8918
|
+
var svgElement = getElement(this.element.id + '_svg');
|
|
8919
|
+
if (!isNullOrUndefined(svgElement)) {
|
|
8920
|
+
var svgClientRect = svgElement.getClientRects()[0];
|
|
8921
|
+
var mapsClientRect = (getElement(this.element.id + '_Secondary_Element')).getClientRects()[0];
|
|
8922
|
+
top = svgClientRect.top - mapsClientRect.top;
|
|
8923
|
+
left = svgClientRect.left - mapsClientRect.left;
|
|
8924
|
+
}
|
|
8925
|
+
return new Point(left, top);
|
|
8926
|
+
};
|
|
8781
8927
|
/**
|
|
8782
8928
|
* To find marker visibility
|
|
8783
8929
|
*/
|
|
@@ -9154,6 +9300,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9154
9300
|
// eslint-disable-next-line valid-jsdoc
|
|
9155
9301
|
/**
|
|
9156
9302
|
* To render bubble
|
|
9303
|
+
*
|
|
9304
|
+
* @private
|
|
9157
9305
|
*/
|
|
9158
9306
|
Bubble.prototype.renderBubble = function (
|
|
9159
9307
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -9199,7 +9347,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9199
9347
|
isNaN(shapeData[layer.shapeDataPath]) ? shapeData[layer.shapeDataPath].toLowerCase() : shapeData[layer.shapeDataPath];
|
|
9200
9348
|
var shapePathValue = !isNullOrUndefined(shape[shapePath]) && isNaN(shape[shapePath])
|
|
9201
9349
|
? shape[shapePath].toLowerCase() : shape[shapePath];
|
|
9202
|
-
if (shapeDataLayerPathValue === shapePathValue) {
|
|
9350
|
+
if (shapeDataLayerPathValue === shapePathValue && layerData[i].type !== 'LineString') {
|
|
9203
9351
|
if (layerData[i]['type'] === 'Point') {
|
|
9204
9352
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9205
9353
|
shapePoints.push(this.getPoints(layerData[i], []));
|
|
@@ -9330,6 +9478,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9330
9478
|
// eslint-disable-next-line valid-jsdoc
|
|
9331
9479
|
/**
|
|
9332
9480
|
* To check and trigger bubble click event
|
|
9481
|
+
*
|
|
9482
|
+
* @private
|
|
9333
9483
|
*/
|
|
9334
9484
|
Bubble.prototype.bubbleClick = function (e) {
|
|
9335
9485
|
var target = e.target.id;
|
|
@@ -9373,6 +9523,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9373
9523
|
// eslint-disable-next-line valid-jsdoc
|
|
9374
9524
|
/**
|
|
9375
9525
|
* To check and trigger bubble move event
|
|
9526
|
+
*
|
|
9527
|
+
* @private
|
|
9376
9528
|
*/
|
|
9377
9529
|
Bubble.prototype.bubbleMove = function (e) {
|
|
9378
9530
|
var target = e.target.id;
|
|
@@ -9674,6 +9826,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
9674
9826
|
}
|
|
9675
9827
|
else {
|
|
9676
9828
|
if (dataLabelSettings.smartLabelMode === 'Trim') {
|
|
9829
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9677
9830
|
var textType = typeof text === 'number' ? text.toString() : text;
|
|
9678
9831
|
trimmedLable = textTrim(width, textType, style);
|
|
9679
9832
|
elementSize = measureText(trimmedLable, style);
|
|
@@ -10395,6 +10548,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10395
10548
|
var shapeSize = new Size(legend.shapeWidth, legend.shapeHeight);
|
|
10396
10549
|
var textOptions;
|
|
10397
10550
|
var render = map.renderer;
|
|
10551
|
+
var legendShape = legend.shape;
|
|
10398
10552
|
if (page >= 0 && page < this.totalPages.length) {
|
|
10399
10553
|
if (querySelector(this.legendGroup.id, this.maps.element.id)) {
|
|
10400
10554
|
remove(querySelector(this.legendGroup.id, this.maps.element.id));
|
|
@@ -10419,21 +10573,35 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10419
10573
|
var textLocation = collection['Text'];
|
|
10420
10574
|
var imageUrl = ((isNullOrUndefined(collection['ImageSrc'])) ? legend.shape : collection['ImageSrc']);
|
|
10421
10575
|
var renderOptions_1 = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
10422
|
-
|
|
10576
|
+
var legendTextStyle = {
|
|
10577
|
+
fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
|
|
10578
|
+
fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color, opacity: legend.textStyle.opacity
|
|
10579
|
+
};
|
|
10580
|
+
legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
|
|
10423
10581
|
this.maps.themeStyle.legendTextColor;
|
|
10424
|
-
|
|
10425
|
-
|
|
10582
|
+
legendTextStyle.fontFamily = map.themeStyle.fontFamily || legendTextStyle.fontFamily;
|
|
10583
|
+
legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
|
|
10426
10584
|
if (i === 0) {
|
|
10427
10585
|
this.renderLegendBorder();
|
|
10428
10586
|
}
|
|
10429
|
-
|
|
10587
|
+
if (legend.type === 'Markers' && legend.useMarkerShape) {
|
|
10588
|
+
var legendShapeData = this.legendCollection[collection['idIndex']].data[0];
|
|
10589
|
+
var marker$$1 = map.layers[legendShapeData['layerIndex']].markerSettings[legendShapeData['markerIndex']];
|
|
10590
|
+
legendShape = !isNullOrUndefined(marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']]) && marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']] !== '' ? marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']] : marker$$1.shape;
|
|
10591
|
+
}
|
|
10592
|
+
if (legendShape === "Balloon") {
|
|
10593
|
+
legendElement.appendChild(drawBalloon(map, renderOptions_1, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
|
|
10594
|
+
}
|
|
10595
|
+
else {
|
|
10596
|
+
legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions_1));
|
|
10597
|
+
}
|
|
10430
10598
|
var legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
|
|
10431
10599
|
if (legendRectSize > this.legendBorderRect.width) {
|
|
10432
|
-
var trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText,
|
|
10600
|
+
var trimmedText = this.legendTextTrim(this.legendBorderRect.width, legendText, legendTextStyle, legendRectSize);
|
|
10433
10601
|
legendText = trimmedText;
|
|
10434
10602
|
}
|
|
10435
10603
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
|
|
10436
|
-
renderTextElement(textOptions,
|
|
10604
|
+
renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
|
|
10437
10605
|
this.legendGroup.appendChild(legendElement);
|
|
10438
10606
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10439
10607
|
if (i === (this.totalPages[page]['Collection'].length - 1)) {
|
|
@@ -11114,7 +11282,10 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11114
11282
|
var map = this.maps;
|
|
11115
11283
|
var legend = map.legendSettings;
|
|
11116
11284
|
var legendTitle = legend.title.text;
|
|
11117
|
-
var textStyle =
|
|
11285
|
+
var textStyle = {
|
|
11286
|
+
fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
|
|
11287
|
+
fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color, opacity: legend.titleStyle.opacity
|
|
11288
|
+
};
|
|
11118
11289
|
var textOptions;
|
|
11119
11290
|
var spacing = 10;
|
|
11120
11291
|
var trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
|
|
@@ -11133,6 +11304,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11133
11304
|
map.svgObject.appendChild(this.legendGroup);
|
|
11134
11305
|
if (legendTitle) {
|
|
11135
11306
|
textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
|
|
11307
|
+
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily : this.maps.themeStyle.fontFamily;
|
|
11136
11308
|
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
11309
|
renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
11138
11310
|
}
|
|
@@ -11239,21 +11411,25 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11239
11411
|
}
|
|
11240
11412
|
else {
|
|
11241
11413
|
newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
|
|
11242
|
-
shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
|
|
11414
|
+
shape: (!isNullOrUndefined(marker$$1.shapeValuePath) && !isNullOrUndefined(data[marker$$1.shapeValuePath]) && data[marker$$1.shapeValuePath] !== '') ? data[marker$$1.shapeValuePath] : (_this.maps.legendSettings.useMarkerShape ? marker$$1.shape : _this.maps.legendSettings.shape) });
|
|
11243
11415
|
_this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
|
|
11244
11416
|
}
|
|
11245
11417
|
}
|
|
11246
11418
|
});
|
|
11247
11419
|
});
|
|
11248
11420
|
};
|
|
11421
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11249
11422
|
Legend.prototype.getMarkerLegendData = function (layerIndex, text, legendFill) {
|
|
11250
11423
|
var _this = this;
|
|
11424
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11251
11425
|
var legendData = [];
|
|
11252
11426
|
this.maps.layers[layerIndex].markerSettings.map(function (markerSettings, markerIndex) {
|
|
11427
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11253
11428
|
var markerData = markerSettings.dataSource;
|
|
11429
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11254
11430
|
Array.prototype.forEach.call(markerData, function (data, dataIndex) {
|
|
11255
11431
|
var marker$$1 = _this.maps.layers[layerIndex].markerSettings[markerIndex];
|
|
11256
|
-
if ((text === data[marker$$1.legendText] || text === '') && legendFill
|
|
11432
|
+
if ((text === data[marker$$1.legendText] || text === '') && legendFill === data[marker$$1.colorValuePath]) {
|
|
11257
11433
|
legendData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill, name: text,
|
|
11258
11434
|
shape: !isNullOrUndefined(marker$$1.shapeValuePath) ? data[marker$$1.shapeValuePath] : marker$$1.shape });
|
|
11259
11435
|
}
|
|
@@ -11615,7 +11791,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11615
11791
|
shape = this.legendCollection[legendIndex]['data'][i];
|
|
11616
11792
|
mapElement = this.maps.legendSettings.type === 'Bubbles' ? querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
|
|
11617
11793
|
'_BubbleIndex_' + j + '_dataIndex_' + shape['dataIndex'], this.maps.element.id) : querySelector(this.maps.element.id + '_LayerIndex_' + shape['layerIndex'] +
|
|
11618
|
-
'_MarkerIndex_' +
|
|
11794
|
+
'_MarkerIndex_' + shape['markerIndex'] + '_dataIndex_' + shape['dataIndex'], this.maps.element.id);
|
|
11619
11795
|
if (!isNullOrUndefined(shape['shape']) && shape['shape'] === 'Balloon') {
|
|
11620
11796
|
mapElement = mapElement.children[0];
|
|
11621
11797
|
}
|
|
@@ -11624,7 +11800,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11624
11800
|
mapElement.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
11625
11801
|
mapElement.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
11626
11802
|
mapElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11627
|
-
mapElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11803
|
+
mapElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11628
11804
|
mapElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11629
11805
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11630
11806
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11639,6 +11815,9 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11639
11815
|
if (targetEle !== null) {
|
|
11640
11816
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
11641
11817
|
legendShapeId.setAttribute('fill', '#E5E5E5');
|
|
11818
|
+
if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
|
|
11819
|
+
legendShapeId.setAttribute('stroke', '#E5E5E5');
|
|
11820
|
+
}
|
|
11642
11821
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
11643
11822
|
legendTextId.setAttribute('fill', '#E5E5E5');
|
|
11644
11823
|
}
|
|
@@ -11653,6 +11832,9 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11653
11832
|
if (targetEle !== null) {
|
|
11654
11833
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
11655
11834
|
legendShapeId.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
11835
|
+
if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
|
|
11836
|
+
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
|
|
11837
|
+
}
|
|
11656
11838
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
11657
11839
|
legendTextId.setAttribute('fill', '#757575');
|
|
11658
11840
|
}
|
|
@@ -11687,7 +11869,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11687
11869
|
layerElement.setAttribute('fill', this.maps.layers[j].shapeSettings.fill);
|
|
11688
11870
|
layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
|
|
11689
11871
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
11690
|
-
layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11872
|
+
layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11691
11873
|
layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
|
|
11692
11874
|
this.maps.layers[j].shapeSettings.opacity :
|
|
11693
11875
|
this.maps.layers[j].shapeSettings.border.opacity).toString());
|
|
@@ -11717,7 +11899,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11717
11899
|
layerElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ?
|
|
11718
11900
|
this.maps.layers[j].shapeSettings.opacity :
|
|
11719
11901
|
this.maps.layers[j].shapeSettings.border.opacity).toString());
|
|
11720
|
-
layerElement.setAttribute('stroke-width', (this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11902
|
+
layerElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width).toString());
|
|
11721
11903
|
layerElement.setAttribute('fill-opacity', (this.maps.layers[j].shapeSettings.opacity).toString());
|
|
11722
11904
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
11723
11905
|
if (targetEle !== null) {
|
|
@@ -11737,7 +11919,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11737
11919
|
targetEle.id.indexOf(this.maps.element.id + '_Legend_Index') !== -1) && this.maps.legendSettings.visible &&
|
|
11738
11920
|
targetEle.id.indexOf('_Text') === -1) {
|
|
11739
11921
|
var LegendInteractive = void 0;
|
|
11740
|
-
var legendIndex = parseFloat(targetEle.id.
|
|
11922
|
+
var legendIndex = parseFloat(targetEle.id.split(this.maps.element.id + '_Legend_Index_')[1]);
|
|
11741
11923
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11742
11924
|
var mapdata = void 0;
|
|
11743
11925
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -11758,7 +11940,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11758
11940
|
if (this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
11759
11941
|
LegendInteractive.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
11760
11942
|
LegendInteractive.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
11761
|
-
LegendInteractive.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11943
|
+
LegendInteractive.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11762
11944
|
LegendInteractive.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11763
11945
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11764
11946
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11822,7 +12004,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11822
12004
|
mapLegendElement.setAttribute('fill', this.maps.layers[0].shapeSettings.fill);
|
|
11823
12005
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
11824
12006
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11825
|
-
mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
12007
|
+
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11826
12008
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11827
12009
|
this.maps.layers[k].shapeSettings.opacity :
|
|
11828
12010
|
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -11849,7 +12031,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11849
12031
|
this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
|
|
11850
12032
|
}
|
|
11851
12033
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
11852
|
-
mapLegendElement.setAttribute('stroke-width', (this.maps.layers[k].shapeSettings.border.width).toString());
|
|
12034
|
+
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
11853
12035
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
11854
12036
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
11855
12037
|
this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
@@ -12125,14 +12307,14 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12125
12307
|
isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
|
|
12126
12308
|
}
|
|
12127
12309
|
var border = {
|
|
12128
|
-
color: this.highlightSettings.border.color,
|
|
12129
|
-
width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
|
|
12310
|
+
color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
|
|
12311
|
+
width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
|
|
12130
12312
|
opacity: this.highlightSettings.border.opacity
|
|
12131
12313
|
};
|
|
12132
12314
|
var eventArgs = {
|
|
12133
12315
|
opacity: this.highlightSettings.opacity,
|
|
12134
|
-
fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
12135
|
-
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
|
|
12316
|
+
fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
12317
|
+
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
|
|
12136
12318
|
border: border,
|
|
12137
12319
|
name: itemHighlight,
|
|
12138
12320
|
target: targetEle.id,
|
|
@@ -12315,15 +12497,16 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12315
12497
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12316
12498
|
Selection.prototype.selectMap = function (targetElement, shapeData, data) {
|
|
12317
12499
|
var _this = this;
|
|
12500
|
+
var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
12318
12501
|
var selectionsettings = this.selectionsettings;
|
|
12319
12502
|
var border = {
|
|
12320
|
-
color: this.selectionsettings.border.color,
|
|
12321
|
-
width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
|
|
12503
|
+
color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
|
|
12504
|
+
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
12505
|
opacity: this.selectionsettings.border.opacity
|
|
12323
12506
|
};
|
|
12324
12507
|
var eventArgs = {
|
|
12325
12508
|
opacity: this.selectionsettings.opacity,
|
|
12326
|
-
fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
|
|
12509
|
+
fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
|
|
12327
12510
|
border: border,
|
|
12328
12511
|
name: itemSelection,
|
|
12329
12512
|
target: targetElement.id,
|
|
@@ -12346,9 +12529,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12346
12529
|
}
|
|
12347
12530
|
if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
12348
12531
|
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[
|
|
12532
|
+
var layerIndex_1 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
12533
|
+
targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex_1].navigationLineSettings[index].width.toString());
|
|
12534
|
+
targetElement.setAttribute('stroke', _this.maps.layers[layerIndex_1].navigationLineSettings[index].color);
|
|
12352
12535
|
}
|
|
12353
12536
|
}
|
|
12354
12537
|
else {
|
|
@@ -12374,9 +12557,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
12374
12557
|
}
|
|
12375
12558
|
if (ele.id.indexOf('NavigationIndex') > -1) {
|
|
12376
12559
|
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[
|
|
12560
|
+
var layerIndex_2 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
12561
|
+
ele.setAttribute('stroke-width', _this.maps.layers[layerIndex_2].navigationLineSettings[index].width.toString());
|
|
12562
|
+
ele.setAttribute('stroke', _this.maps.layers[layerIndex_2].navigationLineSettings[index].color);
|
|
12380
12563
|
}
|
|
12381
12564
|
}
|
|
12382
12565
|
if (!getElement(_this.selectionType + 'selectionMap')) {
|
|
@@ -12517,8 +12700,6 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
12517
12700
|
if (istooltipRender) {
|
|
12518
12701
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
12519
12702
|
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
12703
|
var shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
12523
12704
|
if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
|
|
12524
12705
|
return;
|
|
@@ -12635,9 +12816,13 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
12635
12816
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
12636
12817
|
}
|
|
12637
12818
|
templateData = this.setTooltipContent(option, templateData);
|
|
12819
|
+
var tooltipTextStyle = {
|
|
12820
|
+
color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
|
|
12821
|
+
fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
|
|
12822
|
+
};
|
|
12638
12823
|
var tooltipOption = {
|
|
12639
12824
|
location: location, text: tooltipContent, data: templateData,
|
|
12640
|
-
textStyle:
|
|
12825
|
+
textStyle: tooltipTextStyle,
|
|
12641
12826
|
template: option.template
|
|
12642
12827
|
};
|
|
12643
12828
|
tooltipArgs = {
|
|
@@ -12653,6 +12838,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
12653
12838
|
_this.maps['isProtectedOnChange'] = true;
|
|
12654
12839
|
tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
|
|
12655
12840
|
|| _this.maps.themeStyle.tooltipFontColor;
|
|
12841
|
+
tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
|
|
12842
|
+
|| _this.maps.themeStyle.fontFamily;
|
|
12843
|
+
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
12844
|
+
|| _this.maps.themeStyle.tooltipTextOpacity;
|
|
12656
12845
|
if (tooltipArgs.cancel) {
|
|
12657
12846
|
_this.svgTooltip = new Tooltip({
|
|
12658
12847
|
enable: true,
|
|
@@ -12935,8 +13124,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
12935
13124
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
12936
13125
|
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
12937
13126
|
}
|
|
13127
|
+
this.markerLineAnimation(map);
|
|
12938
13128
|
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
12939
13129
|
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13130
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
12940
13131
|
setTimeout(function () {
|
|
12941
13132
|
// if (type === 'ZoomOut') {
|
|
12942
13133
|
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
@@ -12950,7 +13141,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
12950
13141
|
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
12951
13142
|
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
12952
13143
|
}
|
|
12953
|
-
},
|
|
13144
|
+
}, animationDuration);
|
|
12954
13145
|
}
|
|
12955
13146
|
this.maps.zoomNotApplied = false;
|
|
12956
13147
|
};
|
|
@@ -13124,11 +13315,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13124
13315
|
*/
|
|
13125
13316
|
Zoom.prototype.animateTransform = function (element, animate$$1, x, y, scale) {
|
|
13126
13317
|
var duration = this.currentLayer.animationDuration;
|
|
13127
|
-
if (!animate$$1 || duration === 0) {
|
|
13318
|
+
if (!animate$$1 || duration === 0 || this.maps.isTileMap) {
|
|
13128
13319
|
element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
|
|
13129
13320
|
return;
|
|
13130
13321
|
}
|
|
13131
|
-
|
|
13322
|
+
if (!this.maps.isTileMap) {
|
|
13323
|
+
zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
|
|
13324
|
+
}
|
|
13132
13325
|
};
|
|
13133
13326
|
Zoom.prototype.applyTransform = function (animate$$1) {
|
|
13134
13327
|
var layerIndex;
|
|
@@ -13175,12 +13368,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13175
13368
|
this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate$$1);
|
|
13176
13369
|
}
|
|
13177
13370
|
currentEle = layerElement.childNodes[j];
|
|
13371
|
+
var markerAnimation = void 0;
|
|
13178
13372
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
13179
13373
|
for (var k = 0; k < currentEle.childElementCount; k++) {
|
|
13180
13374
|
this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate$$1);
|
|
13181
13375
|
var layerIndex_1 = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
13182
13376
|
var dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
13183
13377
|
var markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
13378
|
+
markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
|
|
13184
13379
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13185
13380
|
var markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
|
|
13186
13381
|
for (var x_1 = 0; x_1 < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x_1++) {
|
|
@@ -13191,9 +13386,17 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13191
13386
|
this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
|
|
13192
13387
|
}
|
|
13193
13388
|
}
|
|
13194
|
-
if (
|
|
13195
|
-
|
|
13196
|
-
|
|
13389
|
+
if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
|
|
13390
|
+
if (this.maps.isTileMap) {
|
|
13391
|
+
var groupElement = document.querySelector('.GroupElement');
|
|
13392
|
+
if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
|
|
13393
|
+
groupElement.style.display = 'none';
|
|
13394
|
+
}
|
|
13395
|
+
}
|
|
13396
|
+
else {
|
|
13397
|
+
markerStyle = 'visibility:hidden';
|
|
13398
|
+
currentEle.setAttribute('style', markerStyle);
|
|
13399
|
+
}
|
|
13197
13400
|
}
|
|
13198
13401
|
}
|
|
13199
13402
|
if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
|
|
@@ -13292,7 +13495,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13292
13495
|
this.maps.arrangeTemplate();
|
|
13293
13496
|
}
|
|
13294
13497
|
if (!isNullOrUndefined(this.currentLayer)) {
|
|
13295
|
-
if (!animate$$1 || this.currentLayer.animationDuration === 0) {
|
|
13498
|
+
if (!animate$$1 || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
|
|
13296
13499
|
this.processTemplate(x, y, scale, this.maps);
|
|
13297
13500
|
}
|
|
13298
13501
|
}
|
|
@@ -13411,7 +13614,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13411
13614
|
*/
|
|
13412
13615
|
Zoom.prototype.processTemplate = function (x, y, scale, maps) {
|
|
13413
13616
|
for (var i = 0; i < this.templateCount; i++) {
|
|
13414
|
-
this.currentLayer = maps.layersCollection[i];
|
|
13415
13617
|
var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
|
|
13416
13618
|
var markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
|
|
13417
13619
|
i + '_Markers_Template_Group');
|
|
@@ -13642,6 +13844,20 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13642
13844
|
}
|
|
13643
13845
|
}
|
|
13644
13846
|
};
|
|
13847
|
+
Zoom.prototype.markerLineAnimation = function (map) {
|
|
13848
|
+
if (map.isTileMap) {
|
|
13849
|
+
for (var i = 0; i < map.layersCollection.length; i++) {
|
|
13850
|
+
var markerTemplateElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
|
|
13851
|
+
var lineElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_line_Group');
|
|
13852
|
+
if (!isNullOrUndefined(markerTemplateElement)) {
|
|
13853
|
+
markerTemplateElement.style.visibility = 'hidden';
|
|
13854
|
+
}
|
|
13855
|
+
if (!isNullOrUndefined(lineElement)) {
|
|
13856
|
+
lineElement.style.visibility = 'hidden';
|
|
13857
|
+
}
|
|
13858
|
+
}
|
|
13859
|
+
}
|
|
13860
|
+
};
|
|
13645
13861
|
Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
|
|
13646
13862
|
var map = this.maps;
|
|
13647
13863
|
var panArgs;
|
|
@@ -13774,41 +13990,45 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13774
13990
|
var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
13775
13991
|
map.scale = Math.pow(2, tileZoomFactor - 1);
|
|
13776
13992
|
map.tileZoomLevel = tileZoomFactor;
|
|
13777
|
-
map.
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
map.
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1')
|
|
13993
|
+
if (map.previousScale !== map.scale || map.isReset) {
|
|
13994
|
+
map.zoomSettings.zoomFactor = zoomFactor;
|
|
13995
|
+
var position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
|
|
13996
|
+
this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
|
|
13997
|
+
if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
|
|
13998
|
+
map.initialCheck = true;
|
|
13999
|
+
map.zoomPersistence = false;
|
|
14000
|
+
map.tileTranslatePoint.x = map.initialTileTranslate.x;
|
|
14001
|
+
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
14002
|
+
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
14003
|
+
}
|
|
14004
|
+
this.triggerZoomEvent(prevTilePoint, prevLevel, type);
|
|
14005
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
14006
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
14007
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
14008
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
14009
|
+
}
|
|
14010
|
+
if (document.querySelector('.GroupElement')) {
|
|
14011
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
14012
|
+
}
|
|
14013
|
+
this.markerLineAnimation(map);
|
|
14014
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
14015
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
14016
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
14017
|
+
setTimeout(function () {
|
|
14018
|
+
_this.applyTransform(true);
|
|
14019
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
14020
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
14021
|
+
}
|
|
14022
|
+
}, animationDuration);
|
|
13792
14023
|
}
|
|
13793
|
-
|
|
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);
|
|
14024
|
+
this.maps.zoomNotApplied = false;
|
|
13804
14025
|
}
|
|
13805
|
-
this.maps.zoomNotApplied = false;
|
|
13806
14026
|
};
|
|
13807
14027
|
Zoom.prototype.createZoomingToolbars = function () {
|
|
13808
14028
|
var map = this.maps;
|
|
13809
14029
|
this.toolBarGroup = map.renderer.createGroup({
|
|
13810
14030
|
id: map.element.id + '_Zooming_KitCollection',
|
|
13811
|
-
opacity: 0.3
|
|
14031
|
+
opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
|
|
13812
14032
|
});
|
|
13813
14033
|
var kitHeight = 16;
|
|
13814
14034
|
var kitWidth = 16;
|
|
@@ -14066,8 +14286,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14066
14286
|
x = (size.width - toolBarSize.width) - padding;
|
|
14067
14287
|
break;
|
|
14068
14288
|
}
|
|
14069
|
-
|
|
14070
|
-
element.style.
|
|
14289
|
+
var extraPosition = map.getExtraPosition();
|
|
14290
|
+
element.style.left = x + extraPosition.x + 'px';
|
|
14291
|
+
element.style.top = y + extraPosition.y + 'px';
|
|
14071
14292
|
var color = this.maps.zoomSettings.highlightColor || this.maps.themeStyle.zoomSelectionColor;
|
|
14072
14293
|
var css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
|
|
14073
14294
|
'.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
|
|
@@ -14211,14 +14432,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14211
14432
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14212
14433
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
14213
14434
|
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');
|
|
14435
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
14436
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
14216
14437
|
}
|
|
14217
14438
|
}
|
|
14218
14439
|
}
|
|
14219
14440
|
}
|
|
14220
14441
|
else {
|
|
14221
|
-
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '0.3');
|
|
14442
|
+
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
14222
14443
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14223
14444
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
14224
14445
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|