@syncfusion/ej2-maps 26.2.10 → 27.1.50
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/dist/ej2-maps.min.js +2 -2
- 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 +276 -256
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +276 -256
- 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 +13 -13
- package/src/maps/layers/data-label.js +11 -7
- package/src/maps/layers/layer-panel.d.ts +0 -9
- package/src/maps/layers/layer-panel.js +16 -69
- package/src/maps/layers/legend.js +27 -11
- package/src/maps/layers/marker.js +2 -1
- package/src/maps/layers/navigation-selected-line.js +1 -1
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +23 -5
- package/src/maps/maps.js +58 -64
- package/src/maps/model/export-pdf.js +2 -1
- package/src/maps/model/print.js +2 -1
- package/src/maps/model/theme.js +54 -53
- package/src/maps/user-interaction/annotation.js +6 -4
- package/src/maps/user-interaction/tooltip.js +16 -11
- package/src/maps/user-interaction/zoom.js +7 -3
- package/src/maps/utils/helper.d.ts +8 -0
- package/src/maps/utils/helper.js +75 -31
- package/hotfix/26.1.35_Vol2.txt +0 -1
|
@@ -22,7 +22,10 @@ class Size {
|
|
|
22
22
|
* @private
|
|
23
23
|
*/
|
|
24
24
|
function stringToNumber(value, containerSize) {
|
|
25
|
-
if (
|
|
25
|
+
if (typeof value !== 'string') {
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
if (!isNullOrUndefined(value)) {
|
|
26
29
|
return value.indexOf('%') !== -1 ? (containerSize / 100) * parseInt(value, 10) : parseInt(value, 10);
|
|
27
30
|
}
|
|
28
31
|
return null;
|
|
@@ -40,8 +43,10 @@ function calculateSize(maps) {
|
|
|
40
43
|
maps.element.style.setProperty('display', 'block');
|
|
41
44
|
const containerWidth = maps.element.clientWidth;
|
|
42
45
|
const containerHeight = maps.element.clientHeight;
|
|
43
|
-
const containerElementWidth =
|
|
44
|
-
|
|
46
|
+
const containerElementWidth = (typeof maps.element.style.width === 'string') ?
|
|
47
|
+
stringToNumber(maps.element.style.width, containerWidth) : maps.element.style.width;
|
|
48
|
+
const containerElementHeight = (typeof maps.element.style.height === 'string') ?
|
|
49
|
+
stringToNumber(maps.element.style.height, containerHeight) : maps.element.style.height;
|
|
45
50
|
let availableSize = new Size(0, 0);
|
|
46
51
|
if (maps.width === '0px' || maps.width === '0%' || maps.height === '0%' || maps.height === '0px') {
|
|
47
52
|
availableSize = new Size(0, 0);
|
|
@@ -134,7 +139,7 @@ function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
|
|
|
134
139
|
const latitudeMinMax = mapModel.baseMapBounds.latitude;
|
|
135
140
|
let latRadian = degreesToRadians(latitude);
|
|
136
141
|
const lngRadian = degreesToRadians(longitude);
|
|
137
|
-
const type = mapModel.projectionType;
|
|
142
|
+
const type = !isNullOrUndefined(mapModel.projectionType) ? mapModel.projectionType : 'Mercator';
|
|
138
143
|
const size = (mapModel.isTileMap) ? Math.pow(2, 1) * 256 : (isNullOrUndefined(factor)) ?
|
|
139
144
|
Math.min(mapSize.width, mapSize.height) : (Math.min(mapSize.width, mapSize.height) * factor);
|
|
140
145
|
if (layer.geometryType === 'Normal') {
|
|
@@ -866,26 +871,54 @@ function markerColorChoose(eventArgs, data) {
|
|
|
866
871
|
*/
|
|
867
872
|
function markerShapeChoose(eventArgs, data) {
|
|
868
873
|
if (!isNullOrUndefined(eventArgs.shapeValuePath) && !isNullOrUndefined(data[eventArgs.shapeValuePath])) {
|
|
869
|
-
|
|
870
|
-
(getValueFromObject(data, eventArgs.shapeValuePath).toString()) :
|
|
871
|
-
data[eventArgs.shapeValuePath]);
|
|
872
|
-
eventArgs.shape = (shape.toString() !== '') ? shape : eventArgs.shape;
|
|
874
|
+
updateShape(eventArgs, data);
|
|
873
875
|
if (data[eventArgs.shapeValuePath] === 'Image') {
|
|
874
|
-
eventArgs
|
|
875
|
-
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
876
|
-
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
876
|
+
updateImageUrl(eventArgs, data);
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
else {
|
|
880
|
-
|
|
881
|
-
eventArgs
|
|
882
|
-
const shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
883
|
-
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
884
|
-
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
885
|
-
eventArgs.imageUrl = shapeImage;
|
|
880
|
+
updateShape(eventArgs, data);
|
|
881
|
+
updateImageUrl(eventArgs, data);
|
|
886
882
|
}
|
|
887
883
|
return eventArgs;
|
|
888
884
|
}
|
|
885
|
+
/**
|
|
886
|
+
*
|
|
887
|
+
* @param {any} path - contains a dot, it implies that the desired property is nested within the object.
|
|
888
|
+
* @param {any} data - The data object from which the value is to be retrieved. This can be any object that contains the properties specified in the path.
|
|
889
|
+
* @returns {any} - Returns the value of the property specified in the path.
|
|
890
|
+
* @private
|
|
891
|
+
*/
|
|
892
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
893
|
+
function getValue(path, data) {
|
|
894
|
+
return (path.indexOf('.') > -1) ? getValueFromObject(data, path).toString() : data[path];
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
*
|
|
898
|
+
* @param {any} eventArgs - Specifies the event arguments
|
|
899
|
+
* @param {any} data - Specifies the data
|
|
900
|
+
* @private
|
|
901
|
+
*/
|
|
902
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
903
|
+
function updateShape(eventArgs, data) {
|
|
904
|
+
if (!isNullOrUndefined(eventArgs.shapeValuePath)) {
|
|
905
|
+
const shape = getValue(eventArgs.shapeValuePath, data);
|
|
906
|
+
eventArgs.shape = (!isNullOrUndefined(shape) && shape.toString() !== '') ? shape : eventArgs.shape;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
*
|
|
911
|
+
* @param {any} eventArgs - Specifies the event arguments
|
|
912
|
+
* @param {any} data - Specifies the data
|
|
913
|
+
* @private
|
|
914
|
+
*/
|
|
915
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
916
|
+
function updateImageUrl(eventArgs, data) {
|
|
917
|
+
if (!isNullOrUndefined(eventArgs.imageUrlValuePath)) {
|
|
918
|
+
const imageUrl = getValue(eventArgs.imageUrlValuePath, data);
|
|
919
|
+
eventArgs.imageUrl = (!isNullOrUndefined(imageUrl)) ? imageUrl : eventArgs.imageUrl;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
889
922
|
/**
|
|
890
923
|
*
|
|
891
924
|
* @param {LayerSettings} currentLayer - Specifies the current layer
|
|
@@ -982,7 +1015,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
982
1015
|
const longitude = (!isNullOrUndefined(markerSetting.longitudeValuePath)) ?
|
|
983
1016
|
Number(getValueFromObject(markerData, markerSetting.longitudeValuePath)) :
|
|
984
1017
|
!isNullOrUndefined(markerData['longitude']) ? parseFloat(markerData['longitude']) :
|
|
985
|
-
!isNullOrUndefined(markerData['
|
|
1018
|
+
!isNullOrUndefined(markerData['Longitude']) ? parseFloat(markerData['Longitude']) : 0;
|
|
986
1019
|
const latitude = (!isNullOrUndefined(markerSetting.latitudeValuePath)) ?
|
|
987
1020
|
Number(getValueFromObject(markerData, markerSetting.latitudeValuePath)) :
|
|
988
1021
|
!isNullOrUndefined(markerData['latitude']) ? parseFloat(markerData['latitude']) :
|
|
@@ -1314,8 +1347,8 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1314
1347
|
};
|
|
1315
1348
|
removeElement(markerID);
|
|
1316
1349
|
const ele = drawSymbols(eventArgs.shape, eventArgs.imageUrl, { x: 0, y: 0 }, markerID, shapeCustom, markerCollection, maps);
|
|
1317
|
-
const x = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + (!isNullOrUndefined(offset.x) ? offset.x : 0);
|
|
1318
|
-
const y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + (!isNullOrUndefined(offset.y) ? offset.y : 0);
|
|
1350
|
+
const x = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + ((!isNullOrUndefined(offset) && !isNullOrUndefined(offset.x)) ? offset.x : 0);
|
|
1351
|
+
const y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + ((!isNullOrUndefined(offset) && !isNullOrUndefined(offset.y)) ? offset.y : 0);
|
|
1319
1352
|
ele.setAttribute('transform', 'translate( ' + x + ' ' + y + ' )');
|
|
1320
1353
|
maintainSelection(maps.selectedMarkerElementId, maps.markerSelectionClass, ele, 'MarkerselectionMapStyle');
|
|
1321
1354
|
if (maps.legendSettings.toggleLegendSettings.enable && maps.legendSettings.type === 'Markers') {
|
|
@@ -1682,9 +1715,9 @@ function drawVerticalLine(maps, options, size, location, element) {
|
|
|
1682
1715
|
*/
|
|
1683
1716
|
function drawStar(maps, options, size, location, element) {
|
|
1684
1717
|
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
|
|
1685
|
-
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
|
|
1686
|
-
+ (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
|
|
1687
|
-
+ ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
1718
|
+
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
|
|
1719
|
+
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
|
|
1720
|
+
(location.y - size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
1688
1721
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1689
1722
|
}
|
|
1690
1723
|
/**
|
|
@@ -1780,7 +1813,7 @@ function getFieldData(dataSource, fields) {
|
|
|
1780
1813
|
function checkShapeDataFields(dataSource, properties, dataPath, propertyPath,
|
|
1781
1814
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1782
1815
|
layer) {
|
|
1783
|
-
if (!(isNullOrUndefined(properties)) && !isNullOrUndefined(dataSource)) {
|
|
1816
|
+
if (!(isNullOrUndefined(properties)) && !isNullOrUndefined(dataSource) && !isNullOrUndefined(dataPath)) {
|
|
1784
1817
|
for (let i = 0; i < dataSource.length; i++) {
|
|
1785
1818
|
const shapeDataPath = ((dataPath.indexOf('.') > -1) ? getValueFromObject(dataSource[i], dataPath) :
|
|
1786
1819
|
dataSource[i][dataPath]);
|
|
@@ -2114,9 +2147,9 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
2114
2147
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2115
2148
|
const max = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['max'] : null;
|
|
2116
2149
|
const zoomFactor = animate ? 1 : mapObject.mapScaleValue;
|
|
2117
|
-
if (isNullOrUndefined(mapObject.currentShapeDataLength)) {
|
|
2150
|
+
if (isNullOrUndefined(mapObject.currentShapeDataLength) && !isNullOrUndefined(layer.shapeData)) {
|
|
2118
2151
|
mapObject.currentShapeDataLength = !isNullOrUndefined(layer.shapeData['features'])
|
|
2119
|
-
? layer.shapeData['features'].length : layer.shapeData['geometries'].length;
|
|
2152
|
+
? layer.shapeData['features'].length : !isNullOrUndefined(layer.shapeData['geometries']) ? layer.shapeData['geometries'].length : 0;
|
|
2120
2153
|
}
|
|
2121
2154
|
const size = (mapObject.totalRect && mapObject.legendSettings.visible) ? mapObject.totalRect : mapObject.mapAreaRect;
|
|
2122
2155
|
const availSize = mapObject.availableSize;
|
|
@@ -2196,7 +2229,8 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
2196
2229
|
x = size.x + ((-(min['x']))
|
|
2197
2230
|
+ ((size.width / 2) - (mapWidth / 2)));
|
|
2198
2231
|
}
|
|
2199
|
-
else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width)
|
|
2232
|
+
else if ((mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width)
|
|
2233
|
+
&& !isNullOrUndefined(mapObject.translatePoint) && !isNullOrUndefined(mapObject.previousTranslate)) {
|
|
2200
2234
|
const cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2201
2235
|
let cmapWidth = mapWidth;
|
|
2202
2236
|
cmapWidth *= cscaleFactor;
|
|
@@ -2437,6 +2471,16 @@ function getClientElement(id) {
|
|
|
2437
2471
|
return null;
|
|
2438
2472
|
}
|
|
2439
2473
|
}
|
|
2474
|
+
/**
|
|
2475
|
+
* Function to return the number value for the string value.
|
|
2476
|
+
*
|
|
2477
|
+
* @param {string | number} marginValue - Specifies the margin value.
|
|
2478
|
+
* @returns {number} - Returns the number value.
|
|
2479
|
+
* @private
|
|
2480
|
+
*/
|
|
2481
|
+
function getProcessedMarginValue(marginValue) {
|
|
2482
|
+
return typeof marginValue === 'string' ? parseFloat(marginValue) : marginValue;
|
|
2483
|
+
}
|
|
2440
2484
|
/**
|
|
2441
2485
|
* To apply internalization.
|
|
2442
2486
|
*
|
|
@@ -2625,8 +2669,8 @@ function createStyle(id, className, eventArgs) {
|
|
|
2625
2669
|
id: id
|
|
2626
2670
|
});
|
|
2627
2671
|
styleEle.innerText = '.' + className + '{fill:'
|
|
2628
|
-
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
|
|
2629
|
-
'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
|
|
2672
|
+
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (!isNullOrUndefined(eventArgs['opacity']) ? (eventArgs['opacity']).toString() : '1') + ';' +
|
|
2673
|
+
'stroke-opacity:' + (!isNullOrUndefined(eventArgs['border']['opacity']) ? (eventArgs['border']['opacity']).toString() : '1') + ';' +
|
|
2630
2674
|
'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
|
|
2631
2675
|
'stroke:' + eventArgs['border']['color'] + ';' + '}';
|
|
2632
2676
|
return styleEle;
|
|
@@ -2645,9 +2689,9 @@ function customizeStyle(id, className, eventArgs) {
|
|
|
2645
2689
|
const styleEle = getElement(id);
|
|
2646
2690
|
if (!isNullOrUndefined(styleEle)) {
|
|
2647
2691
|
styleEle.innerText = '.' + className + '{fill:'
|
|
2648
|
-
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
|
|
2692
|
+
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (!isNullOrUndefined(eventArgs['opacity']) ? (eventArgs['opacity']).toString() : '1') + ';' +
|
|
2649
2693
|
'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
|
|
2650
|
-
'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
|
|
2694
|
+
'stroke-opacity:' + (!isNullOrUndefined(eventArgs['border']['opacity']) ? (eventArgs['border']['opacity']).toString() : '1') + ';' +
|
|
2651
2695
|
'stroke:' + eventArgs['border']['color'] + '}';
|
|
2652
2696
|
}
|
|
2653
2697
|
}
|
|
@@ -3666,14 +3710,6 @@ function getShapeColor(theme) {
|
|
|
3666
3710
|
themePalette = ['#10B981', '#22D3EE', '#2DD4BF', '#4ADE80', '#8B5CF6',
|
|
3667
3711
|
'#E879F9', '#F472B6', '#F87171', '#F97316', '#FCD34D'];
|
|
3668
3712
|
break;
|
|
3669
|
-
case 'bootstrap5':
|
|
3670
|
-
themePalette = ['#262E0B', '#668E1F', '#AF6E10', '#862C0B', '#1F2D50',
|
|
3671
|
-
'#64680B', '#311508', '#4C4C81', '#0C7DA0', '#862C0B'];
|
|
3672
|
-
break;
|
|
3673
|
-
case 'bootstrap5dark':
|
|
3674
|
-
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
3675
|
-
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
3676
|
-
break;
|
|
3677
3713
|
case 'fluent':
|
|
3678
3714
|
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
3679
3715
|
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
@@ -3699,6 +3735,11 @@ function getShapeColor(theme) {
|
|
|
3699
3735
|
themePalette = ['#9BB449', '#2A72D5', '#43B786', '#3F579A', '#584EC6',
|
|
3700
3736
|
'#E85F9C', '#6E7A89', '#EA6266', '#0B6A0B', '#C19C00'];
|
|
3701
3737
|
break;
|
|
3738
|
+
case 'bootstrap5':
|
|
3739
|
+
case 'bootstrap5dark':
|
|
3740
|
+
themePalette = ['#6610F2', '#6f42C1', '#D63384', '#DC3545',
|
|
3741
|
+
'#FD7E14', '#FFC107', '#198754', '#0DCAF0'];
|
|
3742
|
+
break;
|
|
3702
3743
|
default:
|
|
3703
3744
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
3704
3745
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -3995,68 +4036,72 @@ function getThemeStyle(theme) {
|
|
|
3995
4036
|
break;
|
|
3996
4037
|
case 'bootstrap5':
|
|
3997
4038
|
style = {
|
|
3998
|
-
backgroundColor: '
|
|
3999
|
-
areaBackgroundColor: '
|
|
4039
|
+
backgroundColor: 'transparent',
|
|
4040
|
+
areaBackgroundColor: 'transparent',
|
|
4000
4041
|
titleFontColor: '#212529',
|
|
4001
4042
|
subTitleFontColor: '#212529',
|
|
4002
4043
|
legendTitleFontColor: '#212529',
|
|
4003
4044
|
legendTextColor: '#212529',
|
|
4004
4045
|
dataLabelFontColor: '#212529',
|
|
4005
|
-
tooltipFontColor: '#
|
|
4006
|
-
tooltipFillColor: '#
|
|
4007
|
-
zoomFillColor: '#
|
|
4008
|
-
fontFamily: '
|
|
4009
|
-
fontSize: '
|
|
4010
|
-
fontWeight: '
|
|
4046
|
+
tooltipFontColor: '#FFFFFF',
|
|
4047
|
+
tooltipFillColor: '#000000',
|
|
4048
|
+
zoomFillColor: '#6E757D',
|
|
4049
|
+
fontFamily: 'Segoe UI',
|
|
4050
|
+
fontSize: '10px',
|
|
4051
|
+
fontWeight: '400',
|
|
4011
4052
|
titleFontSize: '14px',
|
|
4012
|
-
|
|
4013
|
-
|
|
4053
|
+
subTitleFontSize: '12px',
|
|
4054
|
+
legendFontSize: '10px',
|
|
4055
|
+
tooltipFillOpacity: 0.9,
|
|
4014
4056
|
tooltipTextOpacity: 1,
|
|
4015
|
-
labelFontFamily: '
|
|
4016
|
-
titleFontWeight: '
|
|
4017
|
-
zoomSelectionColor: '#
|
|
4057
|
+
labelFontFamily: 'Segoe UI',
|
|
4058
|
+
titleFontWeight: '400',
|
|
4059
|
+
zoomSelectionColor: '#212529',
|
|
4060
|
+
zoomBorderColor: '#DEE2E6',
|
|
4018
4061
|
shapeFill: '#E9ECEF',
|
|
4019
|
-
shapeBorderColor: '#
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4062
|
+
shapeBorderColor: '#DEE2E6',
|
|
4063
|
+
zoomButtonRadius: 32,
|
|
4064
|
+
rectangleZoomBorderColor: '#0D6EFD',
|
|
4065
|
+
rectangleZoomFillColor: '#86B7FE',
|
|
4066
|
+
rectangleZoomFillOpacity: 0.30,
|
|
4023
4067
|
legendBorderColor: '#000000',
|
|
4024
4068
|
legendBorderWidth: 0,
|
|
4025
|
-
tooltipBorderColor: 'transparent'
|
|
4026
|
-
zoomButtonRadius: 30
|
|
4069
|
+
tooltipBorderColor: 'transparent'
|
|
4027
4070
|
};
|
|
4028
4071
|
break;
|
|
4029
4072
|
case 'bootstrap5dark':
|
|
4030
4073
|
style = {
|
|
4031
|
-
backgroundColor: '
|
|
4032
|
-
areaBackgroundColor: '
|
|
4033
|
-
titleFontColor: '#
|
|
4034
|
-
subTitleFontColor: '#
|
|
4035
|
-
legendTitleFontColor: '#
|
|
4036
|
-
legendTextColor: '#
|
|
4037
|
-
dataLabelFontColor: '#
|
|
4074
|
+
backgroundColor: 'transparent',
|
|
4075
|
+
areaBackgroundColor: 'transparent',
|
|
4076
|
+
titleFontColor: '#DEE2E6',
|
|
4077
|
+
subTitleFontColor: '#DEE2E6',
|
|
4078
|
+
legendTitleFontColor: '#DEE2E6',
|
|
4079
|
+
legendTextColor: '#DEE2E6',
|
|
4080
|
+
dataLabelFontColor: '#DEE2E6',
|
|
4038
4081
|
tooltipFontColor: '#212529',
|
|
4039
|
-
tooltipFillColor: '#
|
|
4040
|
-
zoomFillColor: '#
|
|
4041
|
-
fontFamily: '
|
|
4042
|
-
fontSize: '
|
|
4043
|
-
fontWeight: '
|
|
4082
|
+
tooltipFillColor: '#FFFFFF',
|
|
4083
|
+
zoomFillColor: '#ADB5BD',
|
|
4084
|
+
fontFamily: 'Segoe UI',
|
|
4085
|
+
fontSize: '10px',
|
|
4086
|
+
fontWeight: '400',
|
|
4044
4087
|
titleFontSize: '14px',
|
|
4045
|
-
|
|
4046
|
-
|
|
4088
|
+
subTitleFontSize: '12px',
|
|
4089
|
+
legendFontSize: '10px',
|
|
4090
|
+
tooltipFillOpacity: 0.9,
|
|
4047
4091
|
tooltipTextOpacity: 1,
|
|
4048
|
-
labelFontFamily: '
|
|
4049
|
-
titleFontWeight: '
|
|
4050
|
-
zoomSelectionColor: '#
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4092
|
+
labelFontFamily: 'Segoe UI',
|
|
4093
|
+
titleFontWeight: '400',
|
|
4094
|
+
zoomSelectionColor: '#F8F9FA',
|
|
4095
|
+
zoomBorderColor: '#495057',
|
|
4096
|
+
shapeFill: '#343A40',
|
|
4097
|
+
shapeBorderColor: '#495057',
|
|
4098
|
+
zoomButtonRadius: 32,
|
|
4099
|
+
rectangleZoomFillColor: '#86B7FE',
|
|
4100
|
+
rectangleZoomBorderColor: '#0D6EFD',
|
|
4101
|
+
rectangleZoomFillOpacity: 0.30,
|
|
4056
4102
|
legendBorderColor: '#000000',
|
|
4057
4103
|
legendBorderWidth: 0,
|
|
4058
|
-
tooltipBorderColor: 'transparent'
|
|
4059
|
-
zoomButtonRadius: 30
|
|
4104
|
+
tooltipBorderColor: 'transparent'
|
|
4060
4105
|
};
|
|
4061
4106
|
break;
|
|
4062
4107
|
case 'fluent':
|
|
@@ -4285,8 +4330,8 @@ function getThemeStyle(theme) {
|
|
|
4285
4330
|
titleFontWeight: '600',
|
|
4286
4331
|
zoomSelectionColor: '#FFFFFF',
|
|
4287
4332
|
zoomBorderColor: '#FFFFFF',
|
|
4288
|
-
shapeFill: '#
|
|
4289
|
-
shapeBorderColor: '#
|
|
4333
|
+
shapeFill: '#FFFFFF',
|
|
4334
|
+
shapeBorderColor: '#FFFFFF',
|
|
4290
4335
|
rectangleZoomFillColor: '#1AEBFF',
|
|
4291
4336
|
rectangleZoomFillOpacity: 0.25,
|
|
4292
4337
|
rectangleZoomBorderColor: '#1AEBFF',
|
|
@@ -6127,7 +6172,7 @@ class LayerPanel {
|
|
|
6127
6172
|
bing.imageUrl = layer.urlTemplate;
|
|
6128
6173
|
bing.subDomains = ['t0', 't1', 't2', 't3'];
|
|
6129
6174
|
bing.maxZoom = '21';
|
|
6130
|
-
proxy.mapObject
|
|
6175
|
+
proxy.mapObject.bingMap = bing;
|
|
6131
6176
|
proxy.renderTileLayer(proxy, layer, layerIndex, bing);
|
|
6132
6177
|
this.mapObject.arrangeTemplate();
|
|
6133
6178
|
if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
|
|
@@ -6143,17 +6188,19 @@ class LayerPanel {
|
|
|
6143
6188
|
Number(getValueFromObject(bubbleSettings.dataSource[i], bubbleSettings.valuePath)) :
|
|
6144
6189
|
parseFloat(bubbleSettings.dataSource[i][bubbleSettings.valuePath])) :
|
|
6145
6190
|
parseFloat(bubbleSettings.dataSource[i][bubbleSettings.valuePath]);
|
|
6146
|
-
if (
|
|
6147
|
-
if (
|
|
6148
|
-
range.max
|
|
6191
|
+
if (!isNaN(bubbledata)) {
|
|
6192
|
+
if (i !== 0) {
|
|
6193
|
+
if (bubbledata > range.max) {
|
|
6194
|
+
range.max = bubbledata;
|
|
6195
|
+
}
|
|
6196
|
+
else if (bubbledata < range.min) {
|
|
6197
|
+
range.min = bubbledata;
|
|
6198
|
+
}
|
|
6149
6199
|
}
|
|
6150
|
-
else
|
|
6151
|
-
range.min = bubbledata;
|
|
6200
|
+
else {
|
|
6201
|
+
range.max = range.min = bubbledata;
|
|
6152
6202
|
}
|
|
6153
6203
|
}
|
|
6154
|
-
else {
|
|
6155
|
-
range.max = range.min = bubbledata;
|
|
6156
|
-
}
|
|
6157
6204
|
}
|
|
6158
6205
|
}
|
|
6159
6206
|
}
|
|
@@ -6183,7 +6230,8 @@ class LayerPanel {
|
|
|
6183
6230
|
if (isNullOrUndefined(this.mapObject.baseMapRectBounds) && this.currentLayer.isBaseLayer) {
|
|
6184
6231
|
this.mapObject.baseMapRectBounds = this.rectBounds;
|
|
6185
6232
|
}
|
|
6186
|
-
const colors = shapeSettings.palette.length > 1 ?
|
|
6233
|
+
const colors = (!isNullOrUndefined(shapeSettings.palette) && shapeSettings.palette.length > 1) ?
|
|
6234
|
+
shapeSettings.palette : getShapeColor(this.mapObject.theme);
|
|
6187
6235
|
const labelTemplateEle = createElement('div', {
|
|
6188
6236
|
id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_Label_Template_Group',
|
|
6189
6237
|
className: this.mapObject.element.id + '_template'
|
|
@@ -6954,7 +7002,7 @@ class LayerPanel {
|
|
|
6954
7002
|
const endX = Math.min(xcount, ((-tileTranslatePoint.x + size.width + (xRight * 256)) / 256) + 1);
|
|
6955
7003
|
const startX = (-((tileTranslatePoint.x + (xLeft * 256)) + 256) / 256);
|
|
6956
7004
|
const startY = (-(tileTranslatePoint.y + 256) / 256);
|
|
6957
|
-
bing = bing || this.bing || this.mapObject
|
|
7005
|
+
bing = bing || this.bing || this.mapObject.bingMap;
|
|
6958
7006
|
for (let i = Math.round(startX); i < Math.round(endX); i++) {
|
|
6959
7007
|
for (let j = Math.round(startY); j < Math.round(endY); j++) {
|
|
6960
7008
|
const x = 256 * i + tileTranslatePoint.x;
|
|
@@ -6968,10 +7016,11 @@ class LayerPanel {
|
|
|
6968
7016
|
const tile = new Tile(tileI % ycount, j);
|
|
6969
7017
|
tile.left = Math.round(x);
|
|
6970
7018
|
tile.top = Math.round(y);
|
|
6971
|
-
if ((bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
|
|
7019
|
+
if ((bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '' && baseLayer.urlTemplate.indexOf('quadkey') > -1)) {
|
|
6972
7020
|
tile.src = bing.getBingMap(tile, '', '', userLang, bing.imageUrl, bing.subDomains);
|
|
6973
7021
|
}
|
|
6974
7022
|
else {
|
|
7023
|
+
bing = null;
|
|
6975
7024
|
tile.src = this.urlTemplate.replace('level', zoomLevel.toString()).replace('tileX', tile.x.toString())
|
|
6976
7025
|
.replace('tileY', tile.y.toString());
|
|
6977
7026
|
}
|
|
@@ -7157,63 +7206,6 @@ class LayerPanel {
|
|
|
7157
7206
|
animatedTiles.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
|
|
7158
7207
|
}
|
|
7159
7208
|
}
|
|
7160
|
-
/**
|
|
7161
|
-
* Static map rendering.
|
|
7162
|
-
*
|
|
7163
|
-
* @param {string} apikey - Specifies the api key
|
|
7164
|
-
* @param {number} zoom - Specifies the zoom value
|
|
7165
|
-
* @returns {void}
|
|
7166
|
-
* @private
|
|
7167
|
-
*/
|
|
7168
|
-
renderGoogleMap(apikey, zoom) {
|
|
7169
|
-
const map = this.mapObject;
|
|
7170
|
-
// zoom = this.mapObject.zoomSettings.shouldZoomInitially ? this.mapObject.markerZoomFactor : zoom;
|
|
7171
|
-
zoom = this.mapObject.tileZoomLevel;
|
|
7172
|
-
const totalSize = Math.pow(2, zoom) * 256;
|
|
7173
|
-
const x = (map.mapAreaRect.width / 2) - (totalSize / 2);
|
|
7174
|
-
const y = (map.mapAreaRect.height / 2) - (totalSize / 2);
|
|
7175
|
-
const centerPoint = new Point(null, null);
|
|
7176
|
-
let diffX = 0;
|
|
7177
|
-
let diffY = 0;
|
|
7178
|
-
const position = convertTileLatLongToPoint(centerPoint, zoom, { x: x, y: y }, this.isMapCoordinates);
|
|
7179
|
-
if (map.zoomModule && map.zoomSettings.enable) {
|
|
7180
|
-
diffX = map.zoomModule.mouseDownLatLong['x'] - map.zoomModule.mouseMoveLatLong['x'];
|
|
7181
|
-
diffY = map.zoomModule.mouseDownLatLong['y'] - map.zoomModule.mouseMoveLatLong['y'];
|
|
7182
|
-
}
|
|
7183
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7184
|
-
const panLatLng = map.pointToLatLong(position.x - diffX, position.y - diffY);
|
|
7185
|
-
map.centerPosition.latitude = panLatLng['latitude'];
|
|
7186
|
-
map.centerPosition.longitude = panLatLng['longitude'];
|
|
7187
|
-
let mapWidth;
|
|
7188
|
-
let mapHeight;
|
|
7189
|
-
if (isNullOrUndefined(parseInt(map.width, 10))) {
|
|
7190
|
-
mapWidth = parseInt(map.width, 10) - 22;
|
|
7191
|
-
}
|
|
7192
|
-
else {
|
|
7193
|
-
mapWidth = Math.round(map.mapAreaRect.width);
|
|
7194
|
-
}
|
|
7195
|
-
if (isNullOrUndefined(parseInt(map.height, 10))) {
|
|
7196
|
-
mapHeight = parseInt(map.height, 10) - 22;
|
|
7197
|
-
}
|
|
7198
|
-
else {
|
|
7199
|
-
mapHeight = Math.round(map.mapAreaRect.height);
|
|
7200
|
-
}
|
|
7201
|
-
const eleWidth = mapWidth > 640 ? (mapWidth - 640) / 2 : 0;
|
|
7202
|
-
const eleHeight = mapHeight > 640 ? (mapHeight - 640) / 2 : 0;
|
|
7203
|
-
let center;
|
|
7204
|
-
const mapType = 'roadmap';
|
|
7205
|
-
if (map.centerPosition.latitude && map.centerPosition.longitude) {
|
|
7206
|
-
center = map.centerPosition.latitude.toString() + ',' + map.centerPosition.longitude.toString();
|
|
7207
|
-
}
|
|
7208
|
-
else {
|
|
7209
|
-
center = '0,0';
|
|
7210
|
-
}
|
|
7211
|
-
const staticMapString = 'https://maps.googleapis.com/maps/api/staticmap?size=' + mapWidth + 'x' + mapHeight +
|
|
7212
|
-
'&zoom=' + zoom + '¢er=' + center + '&maptype=' + mapType + '&key=' + apikey;
|
|
7213
|
-
document.getElementById(this.mapObject.element.id + '_tile_parent').innerHTML
|
|
7214
|
-
= '<div id="' + this.mapObject.element.id + '_StaticGoogleMap"' + 'style="position:absolute; left:' + eleWidth + 'px; top:'
|
|
7215
|
-
+ eleHeight + 'px"><img src="' + staticMapString + '"' + 'alt="' + this.mapObject.getLocalizedLabel('ImageNotFound') + '"></div>';
|
|
7216
|
-
}
|
|
7217
7209
|
/**
|
|
7218
7210
|
* To find the tile translate point.
|
|
7219
7211
|
*
|
|
@@ -7365,10 +7357,12 @@ class Annotations {
|
|
|
7365
7357
|
const bounds = map.svgObject.getBoundingClientRect();
|
|
7366
7358
|
left = Math.abs(bounds.left - elementRect.left);
|
|
7367
7359
|
top = Math.abs(bounds.top - elementRect.top);
|
|
7368
|
-
const
|
|
7369
|
-
|
|
7370
|
-
const
|
|
7371
|
-
parseFloat(
|
|
7360
|
+
const annotationX = !isNullOrUndefined(annotation.x) ? annotation.x : '0%';
|
|
7361
|
+
const annotationY = !isNullOrUndefined(annotation.y) ? annotation.y : '0%';
|
|
7362
|
+
const annotationXValue = (annotationX.indexOf('%') > -1) ? (availSize.width / 100) * parseFloat(annotationX) :
|
|
7363
|
+
parseFloat(annotationX);
|
|
7364
|
+
const annotationYValue = (annotationY.indexOf('%') > -1) ? (availSize.height / 100) * parseFloat(annotationY) :
|
|
7365
|
+
parseFloat(annotationY);
|
|
7372
7366
|
left = (annotation.horizontalAlignment === 'None') ? (left + annotationXValue) : left;
|
|
7373
7367
|
top = (annotation.verticalAlignment === 'None') ? (top + annotationYValue) : top;
|
|
7374
7368
|
switch (annotation.verticalAlignment) {
|
|
@@ -7471,8 +7465,6 @@ let Maps = class Maps extends Component {
|
|
|
7471
7465
|
/** @private */
|
|
7472
7466
|
this.centerPositionChanged = false;
|
|
7473
7467
|
/** @private */
|
|
7474
|
-
this.isTileMapSubLayer = false;
|
|
7475
|
-
/** @private */
|
|
7476
7468
|
this.markerNullCount = 0;
|
|
7477
7469
|
/** @private */
|
|
7478
7470
|
this.tileTranslatePoint = new Point(0, 0);
|
|
@@ -7823,37 +7815,11 @@ let Maps = class Maps extends Component {
|
|
|
7823
7815
|
const tileElement = document.getElementById(this.element.id + '_tile_parent');
|
|
7824
7816
|
const tileElement1 = document.getElementById(this.element.id + '_tiles');
|
|
7825
7817
|
const tile = tileElement.getBoundingClientRect();
|
|
7826
|
-
let bottom;
|
|
7827
7818
|
let top;
|
|
7828
7819
|
let left;
|
|
7829
7820
|
left = parseFloat(tileElement.style.left);
|
|
7830
|
-
const
|
|
7831
|
-
|
|
7832
|
-
if (this.isTileMap && this.isTileMapSubLayer && this.legendSettings.position === 'Bottom' && this.legendSettings.visible) {
|
|
7833
|
-
if (this.legendSettings.mode !== 'Default') {
|
|
7834
|
-
if (titleTextSize.width !== 0 && titleTextSize.height !== 0) {
|
|
7835
|
-
top = parseFloat(tileElement.style.top) + (subTitleTextSize.height / 2)
|
|
7836
|
-
- (this.legendModule.legendBorderRect.height / 2);
|
|
7837
|
-
}
|
|
7838
|
-
else {
|
|
7839
|
-
top = parseFloat(tileElement.style.top) - this.mapAreaRect.y;
|
|
7840
|
-
}
|
|
7841
|
-
}
|
|
7842
|
-
else {
|
|
7843
|
-
left = this.legendModule.legendBorderRect.x;
|
|
7844
|
-
if (titleTextSize.width !== 0 && titleTextSize.height !== 0) {
|
|
7845
|
-
top = parseFloat(tileElement.style.top) + (subTitleTextSize['height'] / 2)
|
|
7846
|
-
- this.legendModule.legendBorderRect.y;
|
|
7847
|
-
}
|
|
7848
|
-
else {
|
|
7849
|
-
top = parseFloat(tileElement.style.top) + (subTitleTextSize['height'] / 2);
|
|
7850
|
-
}
|
|
7851
|
-
}
|
|
7852
|
-
}
|
|
7853
|
-
else {
|
|
7854
|
-
bottom = svg.bottom - tile.bottom - element.offsetTop;
|
|
7855
|
-
top = parseFloat(tileElement.style.top);
|
|
7856
|
-
}
|
|
7821
|
+
const bottom = svg.bottom - tile.bottom - element.offsetTop;
|
|
7822
|
+
top = parseFloat(tileElement.style.top);
|
|
7857
7823
|
top = (bottom <= 11) ? top : (!isNullOrUndefined(this.legendModule) && this.legendSettings.position === 'Bottom') ? this.mapAreaRect.y : (top * 2);
|
|
7858
7824
|
left = (bottom <= 11) ? left : !isNullOrUndefined(this.legendModule) ? left : (left * 2);
|
|
7859
7825
|
tileElement.style.top = top + 'px';
|
|
@@ -8078,8 +8044,9 @@ let Maps = class Maps extends Component {
|
|
|
8078
8044
|
const mapsElement = document.getElementById(this.element.id);
|
|
8079
8045
|
if (!isNullOrUndefined(mapsElement)) {
|
|
8080
8046
|
const element = mapsElement.getBoundingClientRect();
|
|
8047
|
+
const marginLeft = getProcessedMarginValue(this.margin.left);
|
|
8081
8048
|
const minPosition = this.isTileMap ?
|
|
8082
|
-
this.pointToLatLong((this.mapAreaRect.x -
|
|
8049
|
+
this.pointToLatLong((this.mapAreaRect.x - marginLeft), -this.mapAreaRect.y) :
|
|
8083
8050
|
this.getGeoLocation(0, (this.mapAreaRect.x + element.left), this.mapAreaRect.y);
|
|
8084
8051
|
const maxPosition = this.isTileMap ? this.pointToLatLong(this.mapAreaRect.width, (this.mapAreaRect.height - this.mapAreaRect.y)) :
|
|
8085
8052
|
this.getGeoLocation(0, (this.mapAreaRect.x + element.left + this.mapAreaRect.width), (this.mapAreaRect.y + this.mapAreaRect.height));
|
|
@@ -8145,8 +8112,9 @@ let Maps = class Maps extends Component {
|
|
|
8145
8112
|
const ele = createElement('div', {
|
|
8146
8113
|
id: this.element.id + '_tile_parent'
|
|
8147
8114
|
});
|
|
8115
|
+
const marginRight = getProcessedMarginValue(this.margin.right);
|
|
8148
8116
|
ele.style.cssText = 'position: absolute; left: ' +
|
|
8149
|
-
(this.mapAreaRect.x) + 'px; right: ' + (
|
|
8117
|
+
(this.mapAreaRect.x) + 'px; right: ' + (marginRight) + 'px; top: '
|
|
8150
8118
|
+ (this.mapAreaRect.y + padding) + 'px; height: ' +
|
|
8151
8119
|
(this.mapAreaRect.height) + 'px; width: '
|
|
8152
8120
|
+ (this.mapAreaRect.width) + 'px; overflow: hidden;';
|
|
@@ -8154,7 +8122,7 @@ let Maps = class Maps extends Component {
|
|
|
8154
8122
|
id: this.element.id + '_tiles'
|
|
8155
8123
|
});
|
|
8156
8124
|
ele1.style.cssText = 'position: absolute; left: ' +
|
|
8157
|
-
(this.mapAreaRect.x) + 'px; right: ' + (
|
|
8125
|
+
(this.mapAreaRect.x) + 'px; right: ' + (marginRight) + 'px; top: '
|
|
8158
8126
|
+ (this.mapAreaRect.y + padding) + 'px; height: ' + (this.mapAreaRect.height) + 'px; width: '
|
|
8159
8127
|
+ (this.mapAreaRect.width) + 'px; overflow: hidden;';
|
|
8160
8128
|
this.element.appendChild(ele);
|
|
@@ -8244,7 +8212,11 @@ let Maps = class Maps extends Component {
|
|
|
8244
8212
|
opacity: title.textStyle.opacity
|
|
8245
8213
|
};
|
|
8246
8214
|
let height;
|
|
8247
|
-
const
|
|
8215
|
+
const marginTop = getProcessedMarginValue(this.margin.top);
|
|
8216
|
+
const marginBottom = getProcessedMarginValue(this.margin.bottom);
|
|
8217
|
+
const marginLeft = getProcessedMarginValue(this.margin.left);
|
|
8218
|
+
const marginRight = getProcessedMarginValue(this.margin.right);
|
|
8219
|
+
const width = Math.abs((marginLeft + marginRight) - this.availableSize.width);
|
|
8248
8220
|
style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
|
|
8249
8221
|
style.fontWeight = type === 'title' ? style.fontWeight || this.themeStyle.titleFontWeight : style.fontWeight || this.themeStyle.titleFontWeight;
|
|
8250
8222
|
style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || this.themeStyle.subTitleFontSize || Theme.mapsSubTitleFont.size);
|
|
@@ -8254,16 +8226,16 @@ let Maps = class Maps extends Component {
|
|
|
8254
8226
|
}
|
|
8255
8227
|
const trimmedTitle = textTrim(width, title.text, style);
|
|
8256
8228
|
const elementSize = measureText(trimmedTitle, style);
|
|
8257
|
-
const rect = (isNullOrUndefined(bounds)) ? new Rect(
|
|
8258
|
-
const location = findPosition(rect, title.alignment, elementSize, type);
|
|
8229
|
+
const rect = (isNullOrUndefined(bounds)) ? new Rect(marginLeft, marginTop, this.availableSize.width, this.availableSize.height) : bounds;
|
|
8230
|
+
const location = findPosition(rect, !isNullOrUndefined(title.alignment) ? title.alignment : 'Center', elementSize, type);
|
|
8259
8231
|
const options = new TextOption(this.element.id + '_Map_' + type, location.x, location.y, 'start', trimmedTitle);
|
|
8260
8232
|
const titleBounds = new Rect(location.x, location.y, elementSize.width, elementSize.height);
|
|
8261
8233
|
const element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
|
|
8262
8234
|
element.setAttribute('aria-label', title.text);
|
|
8263
8235
|
element.setAttribute('role', 'region');
|
|
8264
8236
|
if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
|
|
8265
|
-
height = Math.abs((titleBounds.y +
|
|
8266
|
-
this.mapAreaRect = new Rect(
|
|
8237
|
+
height = Math.abs((titleBounds.y + marginBottom) - this.availableSize.height);
|
|
8238
|
+
this.mapAreaRect = new Rect(marginLeft, titleBounds.y + 10, width, height - 10);
|
|
8267
8239
|
}
|
|
8268
8240
|
if (type !== 'subtitle' && title.subtitleSettings.text) {
|
|
8269
8241
|
this.renderTitle(title.subtitleSettings, 'subtitle', titleBounds, groupEle);
|
|
@@ -8273,8 +8245,8 @@ let Maps = class Maps extends Component {
|
|
|
8273
8245
|
}
|
|
8274
8246
|
}
|
|
8275
8247
|
else {
|
|
8276
|
-
height = Math.abs((
|
|
8277
|
-
this.mapAreaRect = new Rect(
|
|
8248
|
+
height = Math.abs((marginTop + marginBottom) - this.availableSize.height);
|
|
8249
|
+
this.mapAreaRect = new Rect(marginLeft, marginTop, width, height);
|
|
8278
8250
|
}
|
|
8279
8251
|
}
|
|
8280
8252
|
/**
|
|
@@ -8358,13 +8330,20 @@ let Maps = class Maps extends Component {
|
|
|
8358
8330
|
removeClass(document.getElementsByClassName('highlightMapStyle')[0]);
|
|
8359
8331
|
}
|
|
8360
8332
|
}
|
|
8333
|
+
/**
|
|
8334
|
+
* This method is used to perform operations when keyboard key from maps.
|
|
8335
|
+
*
|
|
8336
|
+
* @param {KeyboardEvent} event - Specifies the keyboard event on maps.
|
|
8337
|
+
* @returns {void}
|
|
8338
|
+
* @private
|
|
8339
|
+
*/
|
|
8361
8340
|
keyUpHandler(event) {
|
|
8362
8341
|
const id = event.target['id'];
|
|
8363
8342
|
if (this.isTileMap) {
|
|
8364
8343
|
this.removeTileMap();
|
|
8365
8344
|
}
|
|
8366
8345
|
if (event.code === 'Tab' && id.indexOf('_LayerIndex_') > -1 && id.indexOf('shapeIndex') > -1) {
|
|
8367
|
-
this.keyboardHighlightSelection(id, event
|
|
8346
|
+
this.keyboardHighlightSelection(id, event);
|
|
8368
8347
|
}
|
|
8369
8348
|
else if (id.indexOf('_LayerIndex_') === -1 && id.indexOf('shapeIndex') === -1 &&
|
|
8370
8349
|
getElementsByClassName('highlightMapStyle').length > 0) {
|
|
@@ -8374,7 +8353,8 @@ let Maps = class Maps extends Component {
|
|
|
8374
8353
|
}
|
|
8375
8354
|
}
|
|
8376
8355
|
}
|
|
8377
|
-
keyboardHighlightSelection(id,
|
|
8356
|
+
keyboardHighlightSelection(id, event) {
|
|
8357
|
+
const key = event.type;
|
|
8378
8358
|
const layerIndex = parseInt(id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
8379
8359
|
const shapeIndex = parseInt(id.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
8380
8360
|
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -8394,6 +8374,13 @@ let Maps = class Maps extends Component {
|
|
|
8394
8374
|
this.highlightModule.handleHighlight(event.target, layerIndex, data, shapeData);
|
|
8395
8375
|
}
|
|
8396
8376
|
}
|
|
8377
|
+
/**
|
|
8378
|
+
* This method is used to perform operations when keyboard down from maps.
|
|
8379
|
+
*
|
|
8380
|
+
* @param {KeyboardEvent} event - Specifies the keyboard event on maps.
|
|
8381
|
+
* @returns {void}
|
|
8382
|
+
* @private
|
|
8383
|
+
*/
|
|
8397
8384
|
keyDownHandler(event) {
|
|
8398
8385
|
const zoom = this.zoomModule;
|
|
8399
8386
|
let id = event.target['id'];
|
|
@@ -8459,7 +8446,7 @@ let Maps = class Maps extends Component {
|
|
|
8459
8446
|
}
|
|
8460
8447
|
}
|
|
8461
8448
|
if (id.indexOf('shapeIndex') > -1) {
|
|
8462
|
-
this.keyboardHighlightSelection(id, event
|
|
8449
|
+
this.keyboardHighlightSelection(id, event);
|
|
8463
8450
|
}
|
|
8464
8451
|
}
|
|
8465
8452
|
if (this.zoomModule) {
|
|
@@ -9150,7 +9137,7 @@ let Maps = class Maps extends Component {
|
|
|
9150
9137
|
* @returns {void}
|
|
9151
9138
|
*/
|
|
9152
9139
|
shapeSelection(layerIndex, propertyName, name, enable) {
|
|
9153
|
-
if (!this.isDestroyed) {
|
|
9140
|
+
if (!this.isDestroyed && !isNullOrUndefined(this.layers[layerIndex])) {
|
|
9154
9141
|
let targetEle;
|
|
9155
9142
|
let subLayerIndex;
|
|
9156
9143
|
const popertyNameArray = Array.isArray(propertyName) ? propertyName : Array(propertyName);
|
|
@@ -9169,7 +9156,7 @@ let Maps = class Maps extends Component {
|
|
|
9169
9156
|
}
|
|
9170
9157
|
}
|
|
9171
9158
|
}
|
|
9172
|
-
if (selectionsettings.enable) {
|
|
9159
|
+
if (!isNullOrUndefined(selectionsettings) && selectionsettings.enable) {
|
|
9173
9160
|
let targetId;
|
|
9174
9161
|
let dataIndex;
|
|
9175
9162
|
let shapeIndex;
|
|
@@ -9374,6 +9361,9 @@ let Maps = class Maps extends Component {
|
|
|
9374
9361
|
if (!isNullOrUndefined(this.mapsTooltipModule)) {
|
|
9375
9362
|
this.mapsTooltipModule.removeEventListener();
|
|
9376
9363
|
}
|
|
9364
|
+
if (!isNullOrUndefined(this.bingMap)) {
|
|
9365
|
+
this.bingMap.destroy();
|
|
9366
|
+
}
|
|
9377
9367
|
super.destroy();
|
|
9378
9368
|
this.shapeSelectionItem = [];
|
|
9379
9369
|
this.toggledElementId = [];
|
|
@@ -9900,16 +9890,13 @@ let Maps = class Maps extends Component {
|
|
|
9900
9890
|
* @returns {GeoPosition}- Returns the geographical coordinates.
|
|
9901
9891
|
*/
|
|
9902
9892
|
getGeoLocation(layerIndex, x, y) {
|
|
9903
|
-
let latitude =
|
|
9904
|
-
let longitude =
|
|
9905
|
-
if (!this.isDestroyed) {
|
|
9893
|
+
let latitude = null;
|
|
9894
|
+
let longitude = null;
|
|
9895
|
+
if (!this.isDestroyed && !this.isTileMap) {
|
|
9906
9896
|
const container = document.getElementById(this.element.id);
|
|
9907
9897
|
const elementClientRect = this.element.getBoundingClientRect();
|
|
9908
|
-
const
|
|
9909
|
-
const
|
|
9910
|
-
(elementClientRect.left - bodyClientRect.left) : 0);
|
|
9911
|
-
const pageY = y - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop ||
|
|
9912
|
-
(elementClientRect.top - bodyClientRect.top) : 0);
|
|
9898
|
+
const pageX = x - container.offsetLeft - (elementClientRect.left - container.offsetLeft) - window.scrollX;
|
|
9899
|
+
const pageY = y - container.offsetTop - (elementClientRect.top - container.offsetTop) - window.scrollY;
|
|
9913
9900
|
const currentLayer = this.layersCollection[layerIndex];
|
|
9914
9901
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9915
9902
|
const translate = getTranslate(this, currentLayer, false);
|
|
@@ -9936,15 +9923,16 @@ let Maps = class Maps extends Component {
|
|
|
9936
9923
|
* @returns {GeoPosition} - Returns the geographical coordinates.
|
|
9937
9924
|
*/
|
|
9938
9925
|
getTileGeoLocation(x, y) {
|
|
9939
|
-
let latitude =
|
|
9940
|
-
let longitude =
|
|
9941
|
-
if (
|
|
9942
|
-
const
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9926
|
+
let latitude = null;
|
|
9927
|
+
let longitude = null;
|
|
9928
|
+
if (this.isTileMap) {
|
|
9929
|
+
const element = document.getElementById(this.element.id + '_tile_parent');
|
|
9930
|
+
if (!this.isDestroyed && !isNullOrUndefined(element)) {
|
|
9931
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9932
|
+
const latLong = this.pointToLatLong(x + this.mapAreaRect.x - element.offsetLeft, y + this.mapAreaRect.y - element.offsetTop);
|
|
9933
|
+
latitude = latLong['latitude'];
|
|
9934
|
+
longitude = latLong['longitude'];
|
|
9935
|
+
}
|
|
9948
9936
|
}
|
|
9949
9937
|
return { latitude: latitude, longitude: longitude };
|
|
9950
9938
|
}
|
|
@@ -9960,7 +9948,7 @@ let Maps = class Maps extends Component {
|
|
|
9960
9948
|
let longitude = 0;
|
|
9961
9949
|
if (!this.isDestroyed && !isNullOrUndefined(this.translatePoint)) {
|
|
9962
9950
|
const padding = 10;
|
|
9963
|
-
pageY = pageY + padding;
|
|
9951
|
+
pageY = !isNullOrUndefined(this.markerDragArgument) ? pageY + padding : pageY;
|
|
9964
9952
|
const mapSize = 256 * Math.pow(2, this.tileZoomLevel);
|
|
9965
9953
|
const x1 = (this.clip(pageX - (this.translatePoint.x * this.scale), 0, mapSize - 1) / mapSize) - 0.5;
|
|
9966
9954
|
const y1 = 0.5 - (this.clip(pageY - (this.translatePoint.y * this.scale), 0, mapSize - 1) / mapSize);
|
|
@@ -10718,7 +10706,8 @@ class Marker {
|
|
|
10718
10706
|
&& this.maps.mapScaleValue <= 1) {
|
|
10719
10707
|
this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ? (this.maps.isZoomByPosition ? this.maps.tileZoomLevel : 1)
|
|
10720
10708
|
: this.maps.mapScaleValue;
|
|
10721
|
-
if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1
|
|
10709
|
+
if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1 &&
|
|
10710
|
+
!isNullOrUndefined(this.maps.tileTranslatePoint)) {
|
|
10722
10711
|
this.maps.tileTranslatePoint.x = 0;
|
|
10723
10712
|
this.maps.tileTranslatePoint.y = 0;
|
|
10724
10713
|
}
|
|
@@ -11275,22 +11264,26 @@ class DataLabel {
|
|
|
11275
11264
|
labelTemplateElement.appendChild(labelElement);
|
|
11276
11265
|
}
|
|
11277
11266
|
else {
|
|
11278
|
-
|
|
11267
|
+
const smartLabelMode = !isNullOrUndefined(dataLabelSettings.smartLabelMode) ? dataLabelSettings.smartLabelMode.toString() : 'None';
|
|
11268
|
+
if (smartLabelMode === 'Trim') {
|
|
11279
11269
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11280
11270
|
const textType = typeof text === 'number' ? text.toString() : text;
|
|
11281
11271
|
trimmedLable = textTrim(width, textType, style, null, true);
|
|
11282
11272
|
elementSize = measureTextElement(trimmedLable, style);
|
|
11283
11273
|
options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', trimmedLable, '', '');
|
|
11284
11274
|
}
|
|
11285
|
-
if (
|
|
11275
|
+
if (smartLabelMode === 'None') {
|
|
11286
11276
|
options = new TextOption(labelId, (textLocation.x), textLocation.y, 'middle', text, '', '');
|
|
11287
11277
|
}
|
|
11288
|
-
if (
|
|
11278
|
+
if (smartLabelMode === 'Hide') {
|
|
11289
11279
|
text = (width >= textSize['width']) ? text : '';
|
|
11290
11280
|
options = new TextOption(labelId, (textLocation.x), (textLocation.y), 'middle', text, '', '');
|
|
11291
11281
|
}
|
|
11292
|
-
|
|
11293
|
-
|
|
11282
|
+
if (!isNullOrUndefined(options)) {
|
|
11283
|
+
text = options['text'];
|
|
11284
|
+
}
|
|
11285
|
+
const intersectionAction = !isNullOrUndefined(dataLabelSettings.intersectionAction) ? dataLabelSettings.intersectionAction.toString() : 'None';
|
|
11286
|
+
if (intersectionAction === 'Hide') {
|
|
11294
11287
|
for (let i = 0; i < intersect.length; i++) {
|
|
11295
11288
|
if (!isNullOrUndefined(intersect[i])) {
|
|
11296
11289
|
if (!(this.value[index]['leftWidth'] > intersect[i]['rightWidth']
|
|
@@ -11306,7 +11299,7 @@ class DataLabel {
|
|
|
11306
11299
|
options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', text, '', '');
|
|
11307
11300
|
}
|
|
11308
11301
|
let difference;
|
|
11309
|
-
if (
|
|
11302
|
+
if (intersectionAction === 'Trim') {
|
|
11310
11303
|
for (let j = 0; j < intersect.length; j++) {
|
|
11311
11304
|
if (!isNullOrUndefined(intersect[j])) {
|
|
11312
11305
|
if (intersect[j]['rightWidth'] < this.value[index]['leftWidth']
|
|
@@ -11336,7 +11329,7 @@ class DataLabel {
|
|
|
11336
11329
|
intersect.push(this.value[index]);
|
|
11337
11330
|
options = new TextOption(labelId, textLocation.x, (textLocation.y), 'middle', trimmedLable, '', '');
|
|
11338
11331
|
}
|
|
11339
|
-
if (
|
|
11332
|
+
if (intersectionAction === 'None') {
|
|
11340
11333
|
options = new TextOption(labelId, (textLocation.x), (textLocation.y), 'middle', text, '', '');
|
|
11341
11334
|
}
|
|
11342
11335
|
if (trimmedLable.length > 1) {
|
|
@@ -11549,7 +11542,7 @@ class NavigationLine {
|
|
|
11549
11542
|
}
|
|
11550
11543
|
if (showArrow) {
|
|
11551
11544
|
arrowColor = arrowSettings.color;
|
|
11552
|
-
arrowSize = arrowSettings.size;
|
|
11545
|
+
arrowSize = !isNullOrUndefined(arrowSettings.size) ? arrowSettings.size : 0;
|
|
11553
11546
|
offSetValue = !isNullOrUndefined(arrowSettings.offSet) ? arrowSettings.offSet : 0;
|
|
11554
11547
|
const divide = (Math.round(arrowSize / 2));
|
|
11555
11548
|
arrowPosition = arrowSettings.position;
|
|
@@ -11858,7 +11851,7 @@ class Legend {
|
|
|
11858
11851
|
shapeBorder: this.legendCollection[i]['shapeBorder']
|
|
11859
11852
|
});
|
|
11860
11853
|
}
|
|
11861
|
-
if (this.legendCollection.length === 1) {
|
|
11854
|
+
if (this.legendCollection.length === 1 && !(map.theme === 'Fluent2HighContrast' && legend.position === 'Bottom')) {
|
|
11862
11855
|
legendHeight = rectHeight;
|
|
11863
11856
|
legendWidth = rectWidth;
|
|
11864
11857
|
}
|
|
@@ -12057,7 +12050,7 @@ class Legend {
|
|
|
12057
12050
|
const rectOptions = new RectOption(itemId, item['fill'], item['shapeBorder'], legend.opacity, bounds);
|
|
12058
12051
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'middle', item['text'], '', '');
|
|
12059
12052
|
textFont.fontFamily = !isNullOrUndefined(textFont.fontFamily) ? textFont.fontFamily : this.maps.themeStyle.fontFamily;
|
|
12060
|
-
textFont.size = map.themeStyle.legendFontSize
|
|
12053
|
+
textFont.size = textFont.size || map.themeStyle.legendFontSize;
|
|
12061
12054
|
const textElement = renderTextElement(textOptions, textFont, textFont.color, this.legendGroup);
|
|
12062
12055
|
textElement.setAttribute('aria-label', item['text']);
|
|
12063
12056
|
textElement.setAttribute('role', 'region');
|
|
@@ -12117,7 +12110,7 @@ class Legend {
|
|
|
12117
12110
|
this.maps.themeStyle.legendTextColor;
|
|
12118
12111
|
legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
|
|
12119
12112
|
this.maps.themeStyle.fontFamily;
|
|
12120
|
-
legendTextStyle.size = map.themeStyle.legendFontSize
|
|
12113
|
+
legendTextStyle.size = legendTextStyle.size || map.themeStyle.legendFontSize;
|
|
12121
12114
|
legendTextStyle.fontWeight = legendTextStyle.fontWeight || map.themeStyle.fontWeight;
|
|
12122
12115
|
if (i === 0) {
|
|
12123
12116
|
this.renderLegendBorder();
|
|
@@ -12634,7 +12627,7 @@ class Legend {
|
|
|
12634
12627
|
}
|
|
12635
12628
|
else {
|
|
12636
12629
|
this.removeShapeHighlightCollection();
|
|
12637
|
-
this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
12630
|
+
this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(module.opacity) ? module.opacity.toString() : '1', module.border.color, module.border.width.toString(), 'highlight');
|
|
12638
12631
|
}
|
|
12639
12632
|
}
|
|
12640
12633
|
else if (getValue === 'selection') {
|
|
@@ -12699,7 +12692,7 @@ class Legend {
|
|
|
12699
12692
|
this.maps.legendSelectionClass = module;
|
|
12700
12693
|
this.removeLegend(this.shapeHighlightCollection);
|
|
12701
12694
|
if (!isNullOrUndefined(legendShape)) {
|
|
12702
|
-
this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
|
|
12695
|
+
this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), !isNullOrUndefined(module.opacity) ? module.opacity.toString() : '1', module.border.color, module.border.width.toString(), 'selection');
|
|
12703
12696
|
const legendSelectionIndex = this.getIndexofLegend(this.maps.legendSelectionCollection, legendShape);
|
|
12704
12697
|
this.maps.legendSelectionCollection[legendSelectionIndex]['MapShapeCollection']['Elements'].push(targetElement);
|
|
12705
12698
|
}
|
|
@@ -12772,10 +12765,10 @@ class Legend {
|
|
|
12772
12765
|
const collection = this.maps.legendModule.legendCollection;
|
|
12773
12766
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12774
12767
|
let currentCollection;
|
|
12775
|
-
if (legendType === 'Default' && !isNullOrUndefined(this.maps.legendModule.totalPages)) {
|
|
12768
|
+
if (legendType === 'Default' && !isNullOrUndefined(this.maps.legendModule.totalPages) && (this.maps.legendModule.totalPages.length > 0)) {
|
|
12776
12769
|
currentCollection = this.maps.legendModule.totalPages[this.maps.legendModule.currentPage]['Collection'];
|
|
12777
12770
|
}
|
|
12778
|
-
const currentCollectionLength = legendType === 'Default' ? currentCollection['length'] : 1;
|
|
12771
|
+
const currentCollectionLength = (legendType === 'Default' && !isNullOrUndefined(currentCollection)) ? currentCollection['length'] : 1;
|
|
12779
12772
|
for (let i = 0; i < collection.length; i++) {
|
|
12780
12773
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12781
12774
|
const dataValue = collection[i]['data'];
|
|
@@ -12926,7 +12919,18 @@ class Legend {
|
|
|
12926
12919
|
const spacing = 10;
|
|
12927
12920
|
const trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
|
|
12928
12921
|
const textSize = measureText(trimTitle, textStyle);
|
|
12929
|
-
|
|
12922
|
+
let sameTextWidth = false;
|
|
12923
|
+
for (let i = 0; i < this.legendRenderingCollections.length; i++) {
|
|
12924
|
+
if (this.legendRenderingCollections[i].textWidth !== this.legendRenderingCollections[0].textWidth) {
|
|
12925
|
+
sameTextWidth = false;
|
|
12926
|
+
break;
|
|
12927
|
+
}
|
|
12928
|
+
else {
|
|
12929
|
+
sameTextWidth = true;
|
|
12930
|
+
}
|
|
12931
|
+
}
|
|
12932
|
+
this.legendBorderRect = new Rect((map.theme === 'Fluent2HighContrast' && !sameTextWidth && (legend.position === 'Left' || legend.position === 'Right') && legend.mode === 'Interactive')
|
|
12933
|
+
? (this.legendItemRect.x - (spacing * 3)) : (this.legendItemRect.x - spacing), (this.legendItemRect.y - spacing - textSize.height), (this.legendItemRect.width) + (spacing * 2), (this.legendItemRect.height) + (spacing * 2) + textSize.height +
|
|
12930
12934
|
(legend.mode === 'Interactive' ? 0 : (this.page !== 0) ? spacing : 0));
|
|
12931
12935
|
const legendBorder = {
|
|
12932
12936
|
color: legend.border.color || this.maps.themeStyle.legendBorderColor, opacity: legend.border.opacity,
|
|
@@ -13209,7 +13213,7 @@ class Legend {
|
|
|
13209
13213
|
if (!isNullOrUndefined(dataSource) && dataSource.length > 0) {
|
|
13210
13214
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13211
13215
|
Array.prototype.forEach.call(dataSource, (data, dataIndex) => {
|
|
13212
|
-
const equalValue = ((colorValuePath.indexOf('.') > -1) ? (getValueFromObject(data, colorValuePath)) :
|
|
13216
|
+
const equalValue = ((colorValuePath && colorValuePath.indexOf('.') > -1) ? (getValueFromObject(data, colorValuePath)) :
|
|
13213
13217
|
(data[colorValuePath]));
|
|
13214
13218
|
if (equalValue === colorMap.value) {
|
|
13215
13219
|
eqaulColorProcess = true;
|
|
@@ -13301,7 +13305,8 @@ class Legend {
|
|
|
13301
13305
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13302
13306
|
const newData = [];
|
|
13303
13307
|
const legendFill = (isNullOrUndefined(fill)) ? dataValue : fill;
|
|
13304
|
-
if (!isNullOrUndefined(dataValue) && colorMapping.length === 0
|
|
13308
|
+
if (!isNullOrUndefined(dataValue) && colorMapping.length === 0 &&
|
|
13309
|
+
(!isNullOrUndefined(valuePath) || !isNullOrUndefined(dataPath))) {
|
|
13305
13310
|
legendText = !isNullOrUndefined(data[valuePath]) ? ((valuePath.indexOf('.') > -1) ?
|
|
13306
13311
|
getValueFromObject(data, valuePath) : data[valuePath]) : ((dataPath.indexOf('.') > -1) ?
|
|
13307
13312
|
getValueFromObject(data, dataPath) : data[dataPath]);
|
|
@@ -13351,7 +13356,11 @@ class Legend {
|
|
|
13351
13356
|
const arrowElement = querySelector(id, this.maps.element.id);
|
|
13352
13357
|
if (this.maps.isDevice && !(isNullOrUndefined(arrowElement))) {
|
|
13353
13358
|
clearTimeout(this.arrowTimer);
|
|
13354
|
-
this.arrowTimer = setTimeout(() => {
|
|
13359
|
+
this.arrowTimer = setTimeout(() => {
|
|
13360
|
+
if (!isNullOrUndefined(arrowElement.parentNode)) {
|
|
13361
|
+
remove(arrowElement);
|
|
13362
|
+
}
|
|
13363
|
+
}, 2000);
|
|
13355
13364
|
}
|
|
13356
13365
|
break;
|
|
13357
13366
|
}
|
|
@@ -14633,7 +14642,7 @@ class MapsTooltip {
|
|
|
14633
14642
|
layer.shapePropertyPath : [layer.shapePropertyPath]);
|
|
14634
14643
|
if (!isNullOrUndefined(properties)) {
|
|
14635
14644
|
for (let k = 0; k < properties.length; k++) {
|
|
14636
|
-
if (!isNullOrUndefined(layer.dataSource)) {
|
|
14645
|
+
if (!isNullOrUndefined(layer.dataSource) && !isNullOrUndefined(layer.shapeDataPath)) {
|
|
14637
14646
|
for (let i = 0; i < layer['dataSource']['length']; i++) {
|
|
14638
14647
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14639
14648
|
const data = layer.dataSource[i];
|
|
@@ -14679,7 +14688,7 @@ class MapsTooltip {
|
|
|
14679
14688
|
formatValue(((option.valuePath.indexOf('.') > -1) ?
|
|
14680
14689
|
(getValueFromObject(layer.dataSource[index], option.valuePath)) :
|
|
14681
14690
|
layer.dataSource[index][option.valuePath]), this.maps) : value[shapePath];
|
|
14682
|
-
if (isNullOrUndefined(currentData)) {
|
|
14691
|
+
if (isNullOrUndefined(currentData) && !isNullOrUndefined(option.valuePath)) {
|
|
14683
14692
|
currentData = (option.valuePath.indexOf('.') > -1) ?
|
|
14684
14693
|
(getValueFromObject(value, option.valuePath)) : value[option.valuePath];
|
|
14685
14694
|
}
|
|
@@ -14702,10 +14711,12 @@ class MapsTooltip {
|
|
|
14702
14711
|
currentData = marker.template.split('>')[1].split('<')[0];
|
|
14703
14712
|
}
|
|
14704
14713
|
else {
|
|
14705
|
-
|
|
14706
|
-
|
|
14707
|
-
(
|
|
14708
|
-
|
|
14714
|
+
if (!isNullOrUndefined(marker.tooltipSettings.valuePath)) {
|
|
14715
|
+
currentData =
|
|
14716
|
+
formatValue(((marker.tooltipSettings.valuePath.indexOf('.') > -1) ?
|
|
14717
|
+
(getValueFromObject(marker.dataSource[dataIndex], marker.tooltipSettings.valuePath)) :
|
|
14718
|
+
marker.dataSource[dataIndex][marker.tooltipSettings.valuePath]), this.maps);
|
|
14719
|
+
}
|
|
14709
14720
|
}
|
|
14710
14721
|
}
|
|
14711
14722
|
}
|
|
@@ -14722,10 +14733,12 @@ class MapsTooltip {
|
|
|
14722
14733
|
currentData = this.formatter(bubble.tooltipSettings.format, bubble.dataSource[dataIndex]);
|
|
14723
14734
|
}
|
|
14724
14735
|
else {
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
(
|
|
14728
|
-
|
|
14736
|
+
if (!isNullOrUndefined(bubble.tooltipSettings.valuePath)) {
|
|
14737
|
+
currentData =
|
|
14738
|
+
formatValue(((bubble.tooltipSettings.valuePath.indexOf('.') > -1) ?
|
|
14739
|
+
(getValueFromObject(bubble.dataSource[dataIndex], bubble.tooltipSettings.valuePath)) :
|
|
14740
|
+
bubble.dataSource[dataIndex][bubble.tooltipSettings.valuePath]), this.maps);
|
|
14741
|
+
}
|
|
14729
14742
|
}
|
|
14730
14743
|
}
|
|
14731
14744
|
//location.y = this.template(option, location);
|
|
@@ -14775,7 +14788,8 @@ class MapsTooltip {
|
|
|
14775
14788
|
options: tooltipOption,
|
|
14776
14789
|
fill: isPolygon ? polygonFill : option.fill,
|
|
14777
14790
|
maps: this.maps, latitude: latitude, longitude: longitude,
|
|
14778
|
-
element: target, eventArgs: e, content: isPolygon ? polygon.tooltipText
|
|
14791
|
+
element: target, eventArgs: e, content: isPolygon ? (!isNullOrUndefined(polygon.tooltipText) ? polygon.tooltipText : '') :
|
|
14792
|
+
!isNullOrUndefined(currentData) ? currentData.toString() : ''
|
|
14779
14793
|
};
|
|
14780
14794
|
if (tooltipArgs.content !== '' || tooltipArgs.options['template'] !== '') {
|
|
14781
14795
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -16140,6 +16154,7 @@ class Zoom {
|
|
|
16140
16154
|
const layerY = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerY'] : event.touches[0].pageY;
|
|
16141
16155
|
this.maps.mergeCluster();
|
|
16142
16156
|
if (!map.isTileMap) {
|
|
16157
|
+
const marginTop = getProcessedMarginValue(map.margin.top);
|
|
16143
16158
|
const legendElement = document.getElementById(map.element.id + '_Legend_Group');
|
|
16144
16159
|
const legendHeight = !isNullOrUndefined(legendElement) ? legendElement.getClientRects()[0].height : 0;
|
|
16145
16160
|
x = translatePoint.x - xDifference / scale;
|
|
@@ -16149,7 +16164,7 @@ class Zoom {
|
|
|
16149
16164
|
const panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
|
|
16150
16165
|
((layerRect.left + layerRect.width + map.mapAreaRect.x) >= (elementRect.width))));
|
|
16151
16166
|
const panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
|
|
16152
|
-
((layerRect.top + layerRect.height + legendHeight +
|
|
16167
|
+
((layerRect.top + layerRect.height + legendHeight + marginTop) >= (elementRect.top + elementRect.height))));
|
|
16153
16168
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16154
16169
|
const location = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, layerX, layerY);
|
|
16155
16170
|
const minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
|
|
@@ -16741,7 +16756,7 @@ class Zoom {
|
|
|
16741
16756
|
* @private
|
|
16742
16757
|
*/
|
|
16743
16758
|
removeToolbarOpacity(factor, id) {
|
|
16744
|
-
if (this.maps.zoomModule && this.maps.zoomSettings.enable) {
|
|
16759
|
+
if (!isNullOrUndefined(this.maps) && this.maps.zoomModule && this.maps.zoomSettings.enable) {
|
|
16745
16760
|
if (getElementByID(this.maps.element.id + '_Zooming_KitCollection') && id.indexOf(this.maps.element.id + '_Zooming_') > -1) {
|
|
16746
16761
|
if (this.maps.isDevice) {
|
|
16747
16762
|
getElementByID(this.maps.element.id + '_Zooming_KitCollection').setAttribute('opacity', '1');
|
|
@@ -16992,6 +17007,9 @@ class Zoom {
|
|
|
16992
17007
|
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16993
17008
|
target = e.target;
|
|
16994
17009
|
}
|
|
17010
|
+
if (!this.isTouch) {
|
|
17011
|
+
e.preventDefault();
|
|
17012
|
+
}
|
|
16995
17013
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
16996
17014
|
this.isPan = this.isPanModeEnabled = this.panColor !== this.selectionColor ? this.maps.zoomSettings.enablePanning
|
|
16997
17015
|
: this.zoomColor === this.selectionColor;
|
|
@@ -17343,7 +17361,8 @@ class Print {
|
|
|
17343
17361
|
backgroundElement = backgroundElement.childNodes[0];
|
|
17344
17362
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
17345
17363
|
const backgroundColor = backgroundElement.getAttribute('fill');
|
|
17346
|
-
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
|
|
17364
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
|
|
17365
|
+
maps.theme === 'Fluent2')
|
|
17347
17366
|
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
17348
17367
|
backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
17349
17368
|
}
|
|
@@ -17637,7 +17656,8 @@ class PdfExport {
|
|
|
17637
17656
|
const exportElement = maps.svgObject.cloneNode(true);
|
|
17638
17657
|
const backgroundElement = exportElement.childNodes[0];
|
|
17639
17658
|
const backgroundColor = backgroundElement.getAttribute('fill');
|
|
17640
|
-
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
|
|
17659
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
|
|
17660
|
+
maps.theme === 'Fluent2')
|
|
17641
17661
|
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
17642
17662
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
17643
17663
|
}
|
|
@@ -17763,5 +17783,5 @@ class PdfExport {
|
|
|
17763
17783
|
destroy() { }
|
|
17764
17784
|
}
|
|
17765
17785
|
|
|
17766
|
-
export { Annotation, Annotations, Arrow, BingMap, Border, Bubble, BubbleSettings, CenterPosition, CircleOption, ColorMapping, ColorMappingSettings, ColorValue, CommonTitleSettings, ConnectorLineSettings, Coordinate, DataLabel, DataLabelSettings, Font, GeoLocation, Highlight, HighlightSettings, ImageExport, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, Internalize, LayerPanel, LayerSettings, Legend, LegendSettings, Line, LineOption, MapAjax, MapLocation, Maps, MapsAreaSettings, MapsTooltip, Margin, Marker, MarkerBase, MarkerClusterData, MarkerClusterSettings, MarkerSettings, MinMax, NavigationLine, NavigationLineSettings, PathOption, PatternOptions, PdfExport, Point, Polygon, PolygonOption, PolygonSetting, PolygonSettings, PolygonTooltipSettings, PolylineOption, Print, Rect, RectOption, Selection, SelectionSettings, ShapeSettings, Size, SubTitleSettings, TextOption, Tile, TitleSettings, ToggleLegendSettings, TooltipSettings, Zoom, ZoomSettings, ZoomToolbarButtonSettings, ZoomToolbarSettings, ZoomToolbarTooltipSettings, acos, aitoff, animate, animationComplete, annotationRendering, appendShape, beforePrint, bubbleClick, bubbleMouseMove, bubbleRendering, calculateBound, calculateCenterFromPixel, calculatePolygonPath, calculateScale, calculateShapes, calculateSize, calculateZoomLevel, changeBorderWidth, changeNavaigationLineWidth, checkPropertyPath, checkShapeDataFields, click, clusterSeparate, clusterTemplate, compareZoomFactor, convertElement, convertElementFromLabel, convertGeoToPoint, convertStringToValue, convertTileLatLongToPoint, createStyle, createSvg, createTooltip, customizeStyle, dataLabelRendering, degreesToRadians, doubleClick, drawBalloon, drawCircle, drawCross, drawDiamond, drawHorizontalLine, drawLine, drawPath, drawPattern, drawPolygon, drawPolyline, drawRectangle, drawStar, drawSymbol, drawSymbols, drawTriangle, drawVerticalLine, elementAnimate, filter, findMidPointOfPolygon, findPosition, fixInitialScaleForTile, formatValue, getClientElement, getDistance, getElement, getElementByID, getElementOffset, getElementsByClassName, getFieldData, getHexColor, getMousePosition, getRatioOfBubble, getShapeData, getTargetElement, getTemplateFunction, getTouchCenter, getTouches, getTranslate, getValueFromObject, getZoomTranslate, isCustomPath, itemHighlight, itemSelection, layerRendering, legendRendering, load, loaded, maintainSelection, maintainStyleClass, maintainToggleSelection, marker, markerBoundsComparer, markerClick, markerClusterClick, markerClusterListHandler, markerClusterMouseMove, markerClusterRendering, markerColorChoose, markerDragEnd, markerDragStart, markerMouseMove, markerRendering, markerShapeChoose, markerTemplate, measureText, measureTextElement, mergeSeparateCluster, mousedown, mousemove, mouseup, onclick, pan, panComplete, processResult, querySelector, radiansToDegrees, removeClass, removeElement, renderLegendShape, renderTextElement, resize, rightClick, roundTo, shapeHighlight, shapeRendering, shapeSelected, showTooltip, sinci, smoothTranslate, stringToNumber, sum, targetTouches, textTrim, timeout, tooltipRender, triggerDownload, triggerItemSelectionEvent, triggerShapeEvent, wordWrap, xToCoordinate, yToCoordinate, zoomAnimate, zoomComplete, zoomIn, zoomOut };
|
|
17786
|
+
export { Annotation, Annotations, Arrow, BingMap, Border, Bubble, BubbleSettings, CenterPosition, CircleOption, ColorMapping, ColorMappingSettings, ColorValue, CommonTitleSettings, ConnectorLineSettings, Coordinate, DataLabel, DataLabelSettings, Font, GeoLocation, Highlight, HighlightSettings, ImageExport, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, Internalize, LayerPanel, LayerSettings, Legend, LegendSettings, Line, LineOption, MapAjax, MapLocation, Maps, MapsAreaSettings, MapsTooltip, Margin, Marker, MarkerBase, MarkerClusterData, MarkerClusterSettings, MarkerSettings, MinMax, NavigationLine, NavigationLineSettings, PathOption, PatternOptions, PdfExport, Point, Polygon, PolygonOption, PolygonSetting, PolygonSettings, PolygonTooltipSettings, PolylineOption, Print, Rect, RectOption, Selection, SelectionSettings, ShapeSettings, Size, SubTitleSettings, TextOption, Tile, TitleSettings, ToggleLegendSettings, TooltipSettings, Zoom, ZoomSettings, ZoomToolbarButtonSettings, ZoomToolbarSettings, ZoomToolbarTooltipSettings, acos, aitoff, animate, animationComplete, annotationRendering, appendShape, beforePrint, bubbleClick, bubbleMouseMove, bubbleRendering, calculateBound, calculateCenterFromPixel, calculatePolygonPath, calculateScale, calculateShapes, calculateSize, calculateZoomLevel, changeBorderWidth, changeNavaigationLineWidth, checkPropertyPath, checkShapeDataFields, click, clusterSeparate, clusterTemplate, compareZoomFactor, convertElement, convertElementFromLabel, convertGeoToPoint, convertStringToValue, convertTileLatLongToPoint, createStyle, createSvg, createTooltip, customizeStyle, dataLabelRendering, degreesToRadians, doubleClick, drawBalloon, drawCircle, drawCross, drawDiamond, drawHorizontalLine, drawLine, drawPath, drawPattern, drawPolygon, drawPolyline, drawRectangle, drawStar, drawSymbol, drawSymbols, drawTriangle, drawVerticalLine, elementAnimate, filter, findMidPointOfPolygon, findPosition, fixInitialScaleForTile, formatValue, getClientElement, getDistance, getElement, getElementByID, getElementOffset, getElementsByClassName, getFieldData, getHexColor, getMousePosition, getProcessedMarginValue, getRatioOfBubble, getShapeData, getTargetElement, getTemplateFunction, getTouchCenter, getTouches, getTranslate, getValueFromObject, getZoomTranslate, isCustomPath, itemHighlight, itemSelection, layerRendering, legendRendering, load, loaded, maintainSelection, maintainStyleClass, maintainToggleSelection, marker, markerBoundsComparer, markerClick, markerClusterClick, markerClusterListHandler, markerClusterMouseMove, markerClusterRendering, markerColorChoose, markerDragEnd, markerDragStart, markerMouseMove, markerRendering, markerShapeChoose, markerTemplate, measureText, measureTextElement, mergeSeparateCluster, mousedown, mousemove, mouseup, onclick, pan, panComplete, processResult, querySelector, radiansToDegrees, removeClass, removeElement, renderLegendShape, renderTextElement, resize, rightClick, roundTo, shapeHighlight, shapeRendering, shapeSelected, showTooltip, sinci, smoothTranslate, stringToNumber, sum, targetTouches, textTrim, timeout, tooltipRender, triggerDownload, triggerItemSelectionEvent, triggerShapeEvent, wordWrap, xToCoordinate, yToCoordinate, zoomAnimate, zoomComplete, zoomIn, zoomOut };
|
|
17767
17787
|
//# sourceMappingURL=ej2-maps.es2015.js.map
|