@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
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -35,7 +35,10 @@ var Size = /** @__PURE__ @class */ (function () {
|
|
|
35
35
|
* @private
|
|
36
36
|
*/
|
|
37
37
|
function stringToNumber(value, containerSize) {
|
|
38
|
-
if (
|
|
38
|
+
if (typeof value !== 'string') {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
if (!isNullOrUndefined(value)) {
|
|
39
42
|
return value.indexOf('%') !== -1 ? (containerSize / 100) * parseInt(value, 10) : parseInt(value, 10);
|
|
40
43
|
}
|
|
41
44
|
return null;
|
|
@@ -53,8 +56,10 @@ function calculateSize(maps) {
|
|
|
53
56
|
maps.element.style.setProperty('display', 'block');
|
|
54
57
|
var containerWidth = maps.element.clientWidth;
|
|
55
58
|
var containerHeight = maps.element.clientHeight;
|
|
56
|
-
var containerElementWidth =
|
|
57
|
-
|
|
59
|
+
var containerElementWidth = (typeof maps.element.style.width === 'string') ?
|
|
60
|
+
stringToNumber(maps.element.style.width, containerWidth) : maps.element.style.width;
|
|
61
|
+
var containerElementHeight = (typeof maps.element.style.height === 'string') ?
|
|
62
|
+
stringToNumber(maps.element.style.height, containerHeight) : maps.element.style.height;
|
|
58
63
|
var availableSize = new Size(0, 0);
|
|
59
64
|
if (maps.width === '0px' || maps.width === '0%' || maps.height === '0%' || maps.height === '0px') {
|
|
60
65
|
availableSize = new Size(0, 0);
|
|
@@ -147,7 +152,7 @@ function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
|
|
|
147
152
|
var latitudeMinMax = mapModel.baseMapBounds.latitude;
|
|
148
153
|
var latRadian = degreesToRadians(latitude);
|
|
149
154
|
var lngRadian = degreesToRadians(longitude);
|
|
150
|
-
var type = mapModel.projectionType;
|
|
155
|
+
var type = !isNullOrUndefined(mapModel.projectionType) ? mapModel.projectionType : 'Mercator';
|
|
151
156
|
var size = (mapModel.isTileMap) ? Math.pow(2, 1) * 256 : (isNullOrUndefined(factor)) ?
|
|
152
157
|
Math.min(mapSize.width, mapSize.height) : (Math.min(mapSize.width, mapSize.height) * factor);
|
|
153
158
|
if (layer.geometryType === 'Normal') {
|
|
@@ -919,26 +924,54 @@ function markerColorChoose(eventArgs, data) {
|
|
|
919
924
|
*/
|
|
920
925
|
function markerShapeChoose(eventArgs, data) {
|
|
921
926
|
if (!isNullOrUndefined(eventArgs.shapeValuePath) && !isNullOrUndefined(data[eventArgs.shapeValuePath])) {
|
|
922
|
-
|
|
923
|
-
(getValueFromObject(data, eventArgs.shapeValuePath).toString()) :
|
|
924
|
-
data[eventArgs.shapeValuePath]);
|
|
925
|
-
eventArgs.shape = (shape.toString() !== '') ? shape : eventArgs.shape;
|
|
927
|
+
updateShape(eventArgs, data);
|
|
926
928
|
if (data[eventArgs.shapeValuePath] === 'Image') {
|
|
927
|
-
eventArgs
|
|
928
|
-
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
929
|
-
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
929
|
+
updateImageUrl(eventArgs, data);
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
else {
|
|
933
|
-
|
|
934
|
-
eventArgs
|
|
935
|
-
var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
936
|
-
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
937
|
-
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
938
|
-
eventArgs.imageUrl = shapeImage;
|
|
933
|
+
updateShape(eventArgs, data);
|
|
934
|
+
updateImageUrl(eventArgs, data);
|
|
939
935
|
}
|
|
940
936
|
return eventArgs;
|
|
941
937
|
}
|
|
938
|
+
/**
|
|
939
|
+
*
|
|
940
|
+
* @param {any} path - contains a dot, it implies that the desired property is nested within the object.
|
|
941
|
+
* @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.
|
|
942
|
+
* @returns {any} - Returns the value of the property specified in the path.
|
|
943
|
+
* @private
|
|
944
|
+
*/
|
|
945
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
946
|
+
function getValue(path, data) {
|
|
947
|
+
return (path.indexOf('.') > -1) ? getValueFromObject(data, path).toString() : data[path];
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
*
|
|
951
|
+
* @param {any} eventArgs - Specifies the event arguments
|
|
952
|
+
* @param {any} data - Specifies the data
|
|
953
|
+
* @private
|
|
954
|
+
*/
|
|
955
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
956
|
+
function updateShape(eventArgs, data) {
|
|
957
|
+
if (!isNullOrUndefined(eventArgs.shapeValuePath)) {
|
|
958
|
+
var shape = getValue(eventArgs.shapeValuePath, data);
|
|
959
|
+
eventArgs.shape = (!isNullOrUndefined(shape) && shape.toString() !== '') ? shape : eventArgs.shape;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
*
|
|
964
|
+
* @param {any} eventArgs - Specifies the event arguments
|
|
965
|
+
* @param {any} data - Specifies the data
|
|
966
|
+
* @private
|
|
967
|
+
*/
|
|
968
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
969
|
+
function updateImageUrl(eventArgs, data) {
|
|
970
|
+
if (!isNullOrUndefined(eventArgs.imageUrlValuePath)) {
|
|
971
|
+
var imageUrl = getValue(eventArgs.imageUrlValuePath, data);
|
|
972
|
+
eventArgs.imageUrl = (!isNullOrUndefined(imageUrl)) ? imageUrl : eventArgs.imageUrl;
|
|
973
|
+
}
|
|
974
|
+
}
|
|
942
975
|
/**
|
|
943
976
|
*
|
|
944
977
|
* @param {LayerSettings} currentLayer - Specifies the current layer
|
|
@@ -1035,7 +1068,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1035
1068
|
var longitude = (!isNullOrUndefined(markerSetting.longitudeValuePath)) ?
|
|
1036
1069
|
Number(getValueFromObject(markerData, markerSetting.longitudeValuePath)) :
|
|
1037
1070
|
!isNullOrUndefined(markerData['longitude']) ? parseFloat(markerData['longitude']) :
|
|
1038
|
-
!isNullOrUndefined(markerData['
|
|
1071
|
+
!isNullOrUndefined(markerData['Longitude']) ? parseFloat(markerData['Longitude']) : 0;
|
|
1039
1072
|
var latitude = (!isNullOrUndefined(markerSetting.latitudeValuePath)) ?
|
|
1040
1073
|
Number(getValueFromObject(markerData, markerSetting.latitudeValuePath)) :
|
|
1041
1074
|
!isNullOrUndefined(markerData['latitude']) ? parseFloat(markerData['latitude']) :
|
|
@@ -1367,8 +1400,8 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1367
1400
|
};
|
|
1368
1401
|
removeElement(markerID);
|
|
1369
1402
|
var ele = drawSymbols(eventArgs.shape, eventArgs.imageUrl, { x: 0, y: 0 }, markerID, shapeCustom, markerCollection, maps);
|
|
1370
|
-
var x = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + (!isNullOrUndefined(offset.x) ? offset.x : 0);
|
|
1371
|
-
var y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + (!isNullOrUndefined(offset.y) ? offset.y : 0);
|
|
1403
|
+
var x = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + ((!isNullOrUndefined(offset) && !isNullOrUndefined(offset.x)) ? offset.x : 0);
|
|
1404
|
+
var y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + ((!isNullOrUndefined(offset) && !isNullOrUndefined(offset.y)) ? offset.y : 0);
|
|
1372
1405
|
ele.setAttribute('transform', 'translate( ' + x + ' ' + y + ' )');
|
|
1373
1406
|
maintainSelection(maps.selectedMarkerElementId, maps.markerSelectionClass, ele, 'MarkerselectionMapStyle');
|
|
1374
1407
|
if (maps.legendSettings.toggleLegendSettings.enable && maps.legendSettings.type === 'Markers') {
|
|
@@ -1735,9 +1768,9 @@ function drawVerticalLine(maps, options, size, location, element) {
|
|
|
1735
1768
|
*/
|
|
1736
1769
|
function drawStar(maps, options, size, location, element) {
|
|
1737
1770
|
options.d = 'M ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + (location.x - size.width / 2)
|
|
1738
|
-
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
|
|
1739
|
-
+ (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
|
|
1740
|
-
+ ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
1771
|
+
+ ' ' + (location.y - size.height / 6) + ' L ' + (location.x + size.width / 2) + ' ' + (location.y - size.height / 6)
|
|
1772
|
+
+ ' L ' + (location.x - size.width / 3) + ' ' + (location.y + size.height / 2) + ' L ' + location.x + ' ' +
|
|
1773
|
+
(location.y - size.height / 2) + ' L ' + (location.x + size.width / 3) + ' ' + (location.y + size.height / 2) + ' Z';
|
|
1741
1774
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1742
1775
|
}
|
|
1743
1776
|
/**
|
|
@@ -1836,7 +1869,7 @@ function getFieldData(dataSource, fields) {
|
|
|
1836
1869
|
function checkShapeDataFields(dataSource, properties, dataPath, propertyPath,
|
|
1837
1870
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1838
1871
|
layer) {
|
|
1839
|
-
if (!(isNullOrUndefined(properties)) && !isNullOrUndefined(dataSource)) {
|
|
1872
|
+
if (!(isNullOrUndefined(properties)) && !isNullOrUndefined(dataSource) && !isNullOrUndefined(dataPath)) {
|
|
1840
1873
|
for (var i = 0; i < dataSource.length; i++) {
|
|
1841
1874
|
var shapeDataPath = ((dataPath.indexOf('.') > -1) ? getValueFromObject(dataSource[i], dataPath) :
|
|
1842
1875
|
dataSource[i][dataPath]);
|
|
@@ -2170,9 +2203,9 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
2170
2203
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2171
2204
|
var max = !isNullOrUndefined(mapObject.baseMapRectBounds) ? mapObject.baseMapRectBounds['max'] : null;
|
|
2172
2205
|
var zoomFactor = animate ? 1 : mapObject.mapScaleValue;
|
|
2173
|
-
if (isNullOrUndefined(mapObject.currentShapeDataLength)) {
|
|
2206
|
+
if (isNullOrUndefined(mapObject.currentShapeDataLength) && !isNullOrUndefined(layer.shapeData)) {
|
|
2174
2207
|
mapObject.currentShapeDataLength = !isNullOrUndefined(layer.shapeData['features'])
|
|
2175
|
-
? layer.shapeData['features'].length : layer.shapeData['geometries'].length;
|
|
2208
|
+
? layer.shapeData['features'].length : !isNullOrUndefined(layer.shapeData['geometries']) ? layer.shapeData['geometries'].length : 0;
|
|
2176
2209
|
}
|
|
2177
2210
|
var size = (mapObject.totalRect && mapObject.legendSettings.visible) ? mapObject.totalRect : mapObject.mapAreaRect;
|
|
2178
2211
|
var availSize = mapObject.availableSize;
|
|
@@ -2252,7 +2285,8 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
2252
2285
|
x = size.x + ((-(min['x']))
|
|
2253
2286
|
+ ((size.width / 2) - (mapWidth / 2)));
|
|
2254
2287
|
}
|
|
2255
|
-
else if (mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width)
|
|
2288
|
+
else if ((mapObject.availableSize.height !== mapObject.heightBeforeRefresh || mapObject.widthBeforeRefresh !== mapObject.availableSize.width)
|
|
2289
|
+
&& !isNullOrUndefined(mapObject.translatePoint) && !isNullOrUndefined(mapObject.previousTranslate)) {
|
|
2256
2290
|
var cscaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2257
2291
|
var cmapWidth = mapWidth;
|
|
2258
2292
|
cmapWidth *= cscaleFactor;
|
|
@@ -2493,6 +2527,16 @@ function getClientElement(id) {
|
|
|
2493
2527
|
return null;
|
|
2494
2528
|
}
|
|
2495
2529
|
}
|
|
2530
|
+
/**
|
|
2531
|
+
* Function to return the number value for the string value.
|
|
2532
|
+
*
|
|
2533
|
+
* @param {string | number} marginValue - Specifies the margin value.
|
|
2534
|
+
* @returns {number} - Returns the number value.
|
|
2535
|
+
* @private
|
|
2536
|
+
*/
|
|
2537
|
+
function getProcessedMarginValue(marginValue) {
|
|
2538
|
+
return typeof marginValue === 'string' ? parseFloat(marginValue) : marginValue;
|
|
2539
|
+
}
|
|
2496
2540
|
/**
|
|
2497
2541
|
* To apply internalization.
|
|
2498
2542
|
*
|
|
@@ -2681,8 +2725,8 @@ function createStyle(id, className, eventArgs) {
|
|
|
2681
2725
|
id: id
|
|
2682
2726
|
});
|
|
2683
2727
|
styleEle.innerText = '.' + className + '{fill:'
|
|
2684
|
-
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
|
|
2685
|
-
'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
|
|
2728
|
+
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (!isNullOrUndefined(eventArgs['opacity']) ? (eventArgs['opacity']).toString() : '1') + ';' +
|
|
2729
|
+
'stroke-opacity:' + (!isNullOrUndefined(eventArgs['border']['opacity']) ? (eventArgs['border']['opacity']).toString() : '1') + ';' +
|
|
2686
2730
|
'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
|
|
2687
2731
|
'stroke:' + eventArgs['border']['color'] + ';' + '}';
|
|
2688
2732
|
return styleEle;
|
|
@@ -2701,9 +2745,9 @@ function customizeStyle(id, className, eventArgs) {
|
|
|
2701
2745
|
var styleEle = getElement(id);
|
|
2702
2746
|
if (!isNullOrUndefined(styleEle)) {
|
|
2703
2747
|
styleEle.innerText = '.' + className + '{fill:'
|
|
2704
|
-
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
|
|
2748
|
+
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (!isNullOrUndefined(eventArgs['opacity']) ? (eventArgs['opacity']).toString() : '1') + ';' +
|
|
2705
2749
|
'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
|
|
2706
|
-
'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
|
|
2750
|
+
'stroke-opacity:' + (!isNullOrUndefined(eventArgs['border']['opacity']) ? (eventArgs['border']['opacity']).toString() : '1') + ';' +
|
|
2707
2751
|
'stroke:' + eventArgs['border']['color'] + '}';
|
|
2708
2752
|
}
|
|
2709
2753
|
}
|
|
@@ -3725,14 +3769,6 @@ function getShapeColor(theme) {
|
|
|
3725
3769
|
themePalette = ['#10B981', '#22D3EE', '#2DD4BF', '#4ADE80', '#8B5CF6',
|
|
3726
3770
|
'#E879F9', '#F472B6', '#F87171', '#F97316', '#FCD34D'];
|
|
3727
3771
|
break;
|
|
3728
|
-
case 'bootstrap5':
|
|
3729
|
-
themePalette = ['#262E0B', '#668E1F', '#AF6E10', '#862C0B', '#1F2D50',
|
|
3730
|
-
'#64680B', '#311508', '#4C4C81', '#0C7DA0', '#862C0B'];
|
|
3731
|
-
break;
|
|
3732
|
-
case 'bootstrap5dark':
|
|
3733
|
-
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
3734
|
-
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
3735
|
-
break;
|
|
3736
3772
|
case 'fluent':
|
|
3737
3773
|
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
3738
3774
|
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
@@ -3758,6 +3794,11 @@ function getShapeColor(theme) {
|
|
|
3758
3794
|
themePalette = ['#9BB449', '#2A72D5', '#43B786', '#3F579A', '#584EC6',
|
|
3759
3795
|
'#E85F9C', '#6E7A89', '#EA6266', '#0B6A0B', '#C19C00'];
|
|
3760
3796
|
break;
|
|
3797
|
+
case 'bootstrap5':
|
|
3798
|
+
case 'bootstrap5dark':
|
|
3799
|
+
themePalette = ['#6610F2', '#6f42C1', '#D63384', '#DC3545',
|
|
3800
|
+
'#FD7E14', '#FFC107', '#198754', '#0DCAF0'];
|
|
3801
|
+
break;
|
|
3761
3802
|
default:
|
|
3762
3803
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
3763
3804
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -4054,68 +4095,72 @@ function getThemeStyle(theme) {
|
|
|
4054
4095
|
break;
|
|
4055
4096
|
case 'bootstrap5':
|
|
4056
4097
|
style = {
|
|
4057
|
-
backgroundColor: '
|
|
4058
|
-
areaBackgroundColor: '
|
|
4098
|
+
backgroundColor: 'transparent',
|
|
4099
|
+
areaBackgroundColor: 'transparent',
|
|
4059
4100
|
titleFontColor: '#212529',
|
|
4060
4101
|
subTitleFontColor: '#212529',
|
|
4061
4102
|
legendTitleFontColor: '#212529',
|
|
4062
4103
|
legendTextColor: '#212529',
|
|
4063
4104
|
dataLabelFontColor: '#212529',
|
|
4064
|
-
tooltipFontColor: '#
|
|
4065
|
-
tooltipFillColor: '#
|
|
4066
|
-
zoomFillColor: '#
|
|
4067
|
-
fontFamily: '
|
|
4068
|
-
fontSize: '
|
|
4069
|
-
fontWeight: '
|
|
4105
|
+
tooltipFontColor: '#FFFFFF',
|
|
4106
|
+
tooltipFillColor: '#000000',
|
|
4107
|
+
zoomFillColor: '#6E757D',
|
|
4108
|
+
fontFamily: 'Segoe UI',
|
|
4109
|
+
fontSize: '10px',
|
|
4110
|
+
fontWeight: '400',
|
|
4070
4111
|
titleFontSize: '14px',
|
|
4071
|
-
|
|
4072
|
-
|
|
4112
|
+
subTitleFontSize: '12px',
|
|
4113
|
+
legendFontSize: '10px',
|
|
4114
|
+
tooltipFillOpacity: 0.9,
|
|
4073
4115
|
tooltipTextOpacity: 1,
|
|
4074
|
-
labelFontFamily: '
|
|
4075
|
-
titleFontWeight: '
|
|
4076
|
-
zoomSelectionColor: '#
|
|
4116
|
+
labelFontFamily: 'Segoe UI',
|
|
4117
|
+
titleFontWeight: '400',
|
|
4118
|
+
zoomSelectionColor: '#212529',
|
|
4119
|
+
zoomBorderColor: '#DEE2E6',
|
|
4077
4120
|
shapeFill: '#E9ECEF',
|
|
4078
|
-
shapeBorderColor: '#
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4121
|
+
shapeBorderColor: '#DEE2E6',
|
|
4122
|
+
zoomButtonRadius: 32,
|
|
4123
|
+
rectangleZoomBorderColor: '#0D6EFD',
|
|
4124
|
+
rectangleZoomFillColor: '#86B7FE',
|
|
4125
|
+
rectangleZoomFillOpacity: 0.30,
|
|
4082
4126
|
legendBorderColor: '#000000',
|
|
4083
4127
|
legendBorderWidth: 0,
|
|
4084
|
-
tooltipBorderColor: 'transparent'
|
|
4085
|
-
zoomButtonRadius: 30
|
|
4128
|
+
tooltipBorderColor: 'transparent'
|
|
4086
4129
|
};
|
|
4087
4130
|
break;
|
|
4088
4131
|
case 'bootstrap5dark':
|
|
4089
4132
|
style = {
|
|
4090
|
-
backgroundColor: '
|
|
4091
|
-
areaBackgroundColor: '
|
|
4092
|
-
titleFontColor: '#
|
|
4093
|
-
subTitleFontColor: '#
|
|
4094
|
-
legendTitleFontColor: '#
|
|
4095
|
-
legendTextColor: '#
|
|
4096
|
-
dataLabelFontColor: '#
|
|
4133
|
+
backgroundColor: 'transparent',
|
|
4134
|
+
areaBackgroundColor: 'transparent',
|
|
4135
|
+
titleFontColor: '#DEE2E6',
|
|
4136
|
+
subTitleFontColor: '#DEE2E6',
|
|
4137
|
+
legendTitleFontColor: '#DEE2E6',
|
|
4138
|
+
legendTextColor: '#DEE2E6',
|
|
4139
|
+
dataLabelFontColor: '#DEE2E6',
|
|
4097
4140
|
tooltipFontColor: '#212529',
|
|
4098
|
-
tooltipFillColor: '#
|
|
4099
|
-
zoomFillColor: '#
|
|
4100
|
-
fontFamily: '
|
|
4101
|
-
fontSize: '
|
|
4102
|
-
fontWeight: '
|
|
4141
|
+
tooltipFillColor: '#FFFFFF',
|
|
4142
|
+
zoomFillColor: '#ADB5BD',
|
|
4143
|
+
fontFamily: 'Segoe UI',
|
|
4144
|
+
fontSize: '10px',
|
|
4145
|
+
fontWeight: '400',
|
|
4103
4146
|
titleFontSize: '14px',
|
|
4104
|
-
|
|
4105
|
-
|
|
4147
|
+
subTitleFontSize: '12px',
|
|
4148
|
+
legendFontSize: '10px',
|
|
4149
|
+
tooltipFillOpacity: 0.9,
|
|
4106
4150
|
tooltipTextOpacity: 1,
|
|
4107
|
-
labelFontFamily: '
|
|
4108
|
-
titleFontWeight: '
|
|
4109
|
-
zoomSelectionColor: '#
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4151
|
+
labelFontFamily: 'Segoe UI',
|
|
4152
|
+
titleFontWeight: '400',
|
|
4153
|
+
zoomSelectionColor: '#F8F9FA',
|
|
4154
|
+
zoomBorderColor: '#495057',
|
|
4155
|
+
shapeFill: '#343A40',
|
|
4156
|
+
shapeBorderColor: '#495057',
|
|
4157
|
+
zoomButtonRadius: 32,
|
|
4158
|
+
rectangleZoomFillColor: '#86B7FE',
|
|
4159
|
+
rectangleZoomBorderColor: '#0D6EFD',
|
|
4160
|
+
rectangleZoomFillOpacity: 0.30,
|
|
4115
4161
|
legendBorderColor: '#000000',
|
|
4116
4162
|
legendBorderWidth: 0,
|
|
4117
|
-
tooltipBorderColor: 'transparent'
|
|
4118
|
-
zoomButtonRadius: 30
|
|
4163
|
+
tooltipBorderColor: 'transparent'
|
|
4119
4164
|
};
|
|
4120
4165
|
break;
|
|
4121
4166
|
case 'fluent':
|
|
@@ -4344,8 +4389,8 @@ function getThemeStyle(theme) {
|
|
|
4344
4389
|
titleFontWeight: '600',
|
|
4345
4390
|
zoomSelectionColor: '#FFFFFF',
|
|
4346
4391
|
zoomBorderColor: '#FFFFFF',
|
|
4347
|
-
shapeFill: '#
|
|
4348
|
-
shapeBorderColor: '#
|
|
4392
|
+
shapeFill: '#FFFFFF',
|
|
4393
|
+
shapeBorderColor: '#FFFFFF',
|
|
4349
4394
|
rectangleZoomFillColor: '#1AEBFF',
|
|
4350
4395
|
rectangleZoomFillOpacity: 0.25,
|
|
4351
4396
|
rectangleZoomBorderColor: '#1AEBFF',
|
|
@@ -6380,7 +6425,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6380
6425
|
bing.imageUrl = layer.urlTemplate;
|
|
6381
6426
|
bing.subDomains = ['t0', 't1', 't2', 't3'];
|
|
6382
6427
|
bing.maxZoom = '21';
|
|
6383
|
-
proxy.mapObject
|
|
6428
|
+
proxy.mapObject.bingMap = bing;
|
|
6384
6429
|
proxy.renderTileLayer(proxy, layer, layerIndex, bing);
|
|
6385
6430
|
this.mapObject.arrangeTemplate();
|
|
6386
6431
|
if (this.mapObject.zoomModule && (this.mapObject.previousScale !== this.mapObject.scale)) {
|
|
@@ -6396,17 +6441,19 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6396
6441
|
Number(getValueFromObject(bubbleSettings.dataSource[i], bubbleSettings.valuePath)) :
|
|
6397
6442
|
parseFloat(bubbleSettings.dataSource[i][bubbleSettings.valuePath])) :
|
|
6398
6443
|
parseFloat(bubbleSettings.dataSource[i][bubbleSettings.valuePath]);
|
|
6399
|
-
if (
|
|
6400
|
-
if (
|
|
6401
|
-
range.max
|
|
6444
|
+
if (!isNaN(bubbledata)) {
|
|
6445
|
+
if (i !== 0) {
|
|
6446
|
+
if (bubbledata > range.max) {
|
|
6447
|
+
range.max = bubbledata;
|
|
6448
|
+
}
|
|
6449
|
+
else if (bubbledata < range.min) {
|
|
6450
|
+
range.min = bubbledata;
|
|
6451
|
+
}
|
|
6402
6452
|
}
|
|
6403
|
-
else
|
|
6404
|
-
range.min = bubbledata;
|
|
6453
|
+
else {
|
|
6454
|
+
range.max = range.min = bubbledata;
|
|
6405
6455
|
}
|
|
6406
6456
|
}
|
|
6407
|
-
else {
|
|
6408
|
-
range.max = range.min = bubbledata;
|
|
6409
|
-
}
|
|
6410
6457
|
}
|
|
6411
6458
|
}
|
|
6412
6459
|
};
|
|
@@ -6437,7 +6484,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6437
6484
|
if (isNullOrUndefined(this.mapObject.baseMapRectBounds) && this.currentLayer.isBaseLayer) {
|
|
6438
6485
|
this.mapObject.baseMapRectBounds = this.rectBounds;
|
|
6439
6486
|
}
|
|
6440
|
-
var colors = shapeSettings.palette.length > 1 ?
|
|
6487
|
+
var colors = (!isNullOrUndefined(shapeSettings.palette) && shapeSettings.palette.length > 1) ?
|
|
6488
|
+
shapeSettings.palette : getShapeColor(this.mapObject.theme);
|
|
6441
6489
|
var labelTemplateEle = createElement('div', {
|
|
6442
6490
|
id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_Label_Template_Group',
|
|
6443
6491
|
className: this.mapObject.element.id + '_template'
|
|
@@ -7221,7 +7269,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
7221
7269
|
var endX = Math.min(xcount, ((-tileTranslatePoint.x + size.width + (xRight * 256)) / 256) + 1);
|
|
7222
7270
|
var startX = (-((tileTranslatePoint.x + (xLeft * 256)) + 256) / 256);
|
|
7223
7271
|
var startY = (-(tileTranslatePoint.y + 256) / 256);
|
|
7224
|
-
bing = bing || this.bing || this.mapObject
|
|
7272
|
+
bing = bing || this.bing || this.mapObject.bingMap;
|
|
7225
7273
|
for (var i = Math.round(startX); i < Math.round(endX); i++) {
|
|
7226
7274
|
for (var j = Math.round(startY); j < Math.round(endY); j++) {
|
|
7227
7275
|
var x = 256 * i + tileTranslatePoint.x;
|
|
@@ -7235,10 +7283,11 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
7235
7283
|
var tile = new Tile(tileI % ycount, j);
|
|
7236
7284
|
tile.left = Math.round(x);
|
|
7237
7285
|
tile.top = Math.round(y);
|
|
7238
|
-
if ((bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
|
|
7286
|
+
if ((bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '' && baseLayer.urlTemplate.indexOf('quadkey') > -1)) {
|
|
7239
7287
|
tile.src = bing.getBingMap(tile, '', '', userLang, bing.imageUrl, bing.subDomains);
|
|
7240
7288
|
}
|
|
7241
7289
|
else {
|
|
7290
|
+
bing = null;
|
|
7242
7291
|
tile.src = this.urlTemplate.replace('level', zoomLevel.toString()).replace('tileX', tile.x.toString())
|
|
7243
7292
|
.replace('tileY', tile.y.toString());
|
|
7244
7293
|
}
|
|
@@ -7427,63 +7476,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
7427
7476
|
animatedTiles.style.transform = 'translate(' + translateX + 'px, ' + translateY + 'px) scale(' + scaleValue + ')';
|
|
7428
7477
|
}
|
|
7429
7478
|
};
|
|
7430
|
-
/**
|
|
7431
|
-
* Static map rendering.
|
|
7432
|
-
*
|
|
7433
|
-
* @param {string} apikey - Specifies the api key
|
|
7434
|
-
* @param {number} zoom - Specifies the zoom value
|
|
7435
|
-
* @returns {void}
|
|
7436
|
-
* @private
|
|
7437
|
-
*/
|
|
7438
|
-
LayerPanel.prototype.renderGoogleMap = function (apikey, zoom) {
|
|
7439
|
-
var map = this.mapObject;
|
|
7440
|
-
// zoom = this.mapObject.zoomSettings.shouldZoomInitially ? this.mapObject.markerZoomFactor : zoom;
|
|
7441
|
-
zoom = this.mapObject.tileZoomLevel;
|
|
7442
|
-
var totalSize = Math.pow(2, zoom) * 256;
|
|
7443
|
-
var x = (map.mapAreaRect.width / 2) - (totalSize / 2);
|
|
7444
|
-
var y = (map.mapAreaRect.height / 2) - (totalSize / 2);
|
|
7445
|
-
var centerPoint = new Point(null, null);
|
|
7446
|
-
var diffX = 0;
|
|
7447
|
-
var diffY = 0;
|
|
7448
|
-
var position = convertTileLatLongToPoint(centerPoint, zoom, { x: x, y: y }, this.isMapCoordinates);
|
|
7449
|
-
if (map.zoomModule && map.zoomSettings.enable) {
|
|
7450
|
-
diffX = map.zoomModule.mouseDownLatLong['x'] - map.zoomModule.mouseMoveLatLong['x'];
|
|
7451
|
-
diffY = map.zoomModule.mouseDownLatLong['y'] - map.zoomModule.mouseMoveLatLong['y'];
|
|
7452
|
-
}
|
|
7453
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7454
|
-
var panLatLng = map.pointToLatLong(position.x - diffX, position.y - diffY);
|
|
7455
|
-
map.centerPosition.latitude = panLatLng['latitude'];
|
|
7456
|
-
map.centerPosition.longitude = panLatLng['longitude'];
|
|
7457
|
-
var mapWidth;
|
|
7458
|
-
var mapHeight;
|
|
7459
|
-
if (isNullOrUndefined(parseInt(map.width, 10))) {
|
|
7460
|
-
mapWidth = parseInt(map.width, 10) - 22;
|
|
7461
|
-
}
|
|
7462
|
-
else {
|
|
7463
|
-
mapWidth = Math.round(map.mapAreaRect.width);
|
|
7464
|
-
}
|
|
7465
|
-
if (isNullOrUndefined(parseInt(map.height, 10))) {
|
|
7466
|
-
mapHeight = parseInt(map.height, 10) - 22;
|
|
7467
|
-
}
|
|
7468
|
-
else {
|
|
7469
|
-
mapHeight = Math.round(map.mapAreaRect.height);
|
|
7470
|
-
}
|
|
7471
|
-
var eleWidth = mapWidth > 640 ? (mapWidth - 640) / 2 : 0;
|
|
7472
|
-
var eleHeight = mapHeight > 640 ? (mapHeight - 640) / 2 : 0;
|
|
7473
|
-
var center;
|
|
7474
|
-
var mapType = 'roadmap';
|
|
7475
|
-
if (map.centerPosition.latitude && map.centerPosition.longitude) {
|
|
7476
|
-
center = map.centerPosition.latitude.toString() + ',' + map.centerPosition.longitude.toString();
|
|
7477
|
-
}
|
|
7478
|
-
else {
|
|
7479
|
-
center = '0,0';
|
|
7480
|
-
}
|
|
7481
|
-
var staticMapString = 'https://maps.googleapis.com/maps/api/staticmap?size=' + mapWidth + 'x' + mapHeight +
|
|
7482
|
-
'&zoom=' + zoom + '¢er=' + center + '&maptype=' + mapType + '&key=' + apikey;
|
|
7483
|
-
document.getElementById(this.mapObject.element.id + '_tile_parent').innerHTML
|
|
7484
|
-
= '<div id="' + this.mapObject.element.id + '_StaticGoogleMap"' + 'style="position:absolute; left:' + eleWidth + 'px; top:'
|
|
7485
|
-
+ eleHeight + 'px"><img src="' + staticMapString + '"' + 'alt="' + this.mapObject.getLocalizedLabel('ImageNotFound') + '"></div>';
|
|
7486
|
-
};
|
|
7487
7479
|
/**
|
|
7488
7480
|
* To find the tile translate point.
|
|
7489
7481
|
*
|
|
@@ -7638,10 +7630,12 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7638
7630
|
var bounds = map.svgObject.getBoundingClientRect();
|
|
7639
7631
|
left = Math.abs(bounds.left - elementRect.left);
|
|
7640
7632
|
top = Math.abs(bounds.top - elementRect.top);
|
|
7641
|
-
var
|
|
7642
|
-
|
|
7643
|
-
var
|
|
7644
|
-
parseFloat(
|
|
7633
|
+
var annotationX = !isNullOrUndefined(annotation.x) ? annotation.x : '0%';
|
|
7634
|
+
var annotationY = !isNullOrUndefined(annotation.y) ? annotation.y : '0%';
|
|
7635
|
+
var annotationXValue = (annotationX.indexOf('%') > -1) ? (availSize.width / 100) * parseFloat(annotationX) :
|
|
7636
|
+
parseFloat(annotationX);
|
|
7637
|
+
var annotationYValue = (annotationY.indexOf('%') > -1) ? (availSize.height / 100) * parseFloat(annotationY) :
|
|
7638
|
+
parseFloat(annotationY);
|
|
7645
7639
|
left = (annotation.horizontalAlignment === 'None') ? (left + annotationXValue) : left;
|
|
7646
7640
|
top = (annotation.verticalAlignment === 'None') ? (top + annotationYValue) : top;
|
|
7647
7641
|
switch (annotation.verticalAlignment) {
|
|
@@ -7759,8 +7753,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7759
7753
|
/** @private */
|
|
7760
7754
|
_this.centerPositionChanged = false;
|
|
7761
7755
|
/** @private */
|
|
7762
|
-
_this.isTileMapSubLayer = false;
|
|
7763
|
-
/** @private */
|
|
7764
7756
|
_this.markerNullCount = 0;
|
|
7765
7757
|
/** @private */
|
|
7766
7758
|
_this.tileTranslatePoint = new Point(0, 0);
|
|
@@ -8125,37 +8117,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8125
8117
|
var tileElement = document.getElementById(this.element.id + '_tile_parent');
|
|
8126
8118
|
var tileElement1 = document.getElementById(this.element.id + '_tiles');
|
|
8127
8119
|
var tile = tileElement.getBoundingClientRect();
|
|
8128
|
-
var bottom = void 0;
|
|
8129
8120
|
var top_1;
|
|
8130
8121
|
var left = void 0;
|
|
8131
8122
|
left = parseFloat(tileElement.style.left);
|
|
8132
|
-
var
|
|
8133
|
-
|
|
8134
|
-
if (this.isTileMap && this.isTileMapSubLayer && this.legendSettings.position === 'Bottom' && this.legendSettings.visible) {
|
|
8135
|
-
if (this.legendSettings.mode !== 'Default') {
|
|
8136
|
-
if (titleTextSize.width !== 0 && titleTextSize.height !== 0) {
|
|
8137
|
-
top_1 = parseFloat(tileElement.style.top) + (subTitleTextSize.height / 2)
|
|
8138
|
-
- (this.legendModule.legendBorderRect.height / 2);
|
|
8139
|
-
}
|
|
8140
|
-
else {
|
|
8141
|
-
top_1 = parseFloat(tileElement.style.top) - this.mapAreaRect.y;
|
|
8142
|
-
}
|
|
8143
|
-
}
|
|
8144
|
-
else {
|
|
8145
|
-
left = this.legendModule.legendBorderRect.x;
|
|
8146
|
-
if (titleTextSize.width !== 0 && titleTextSize.height !== 0) {
|
|
8147
|
-
top_1 = parseFloat(tileElement.style.top) + (subTitleTextSize['height'] / 2)
|
|
8148
|
-
- this.legendModule.legendBorderRect.y;
|
|
8149
|
-
}
|
|
8150
|
-
else {
|
|
8151
|
-
top_1 = parseFloat(tileElement.style.top) + (subTitleTextSize['height'] / 2);
|
|
8152
|
-
}
|
|
8153
|
-
}
|
|
8154
|
-
}
|
|
8155
|
-
else {
|
|
8156
|
-
bottom = svg.bottom - tile.bottom - element.offsetTop;
|
|
8157
|
-
top_1 = parseFloat(tileElement.style.top);
|
|
8158
|
-
}
|
|
8123
|
+
var bottom = svg.bottom - tile.bottom - element.offsetTop;
|
|
8124
|
+
top_1 = parseFloat(tileElement.style.top);
|
|
8159
8125
|
top_1 = (bottom <= 11) ? top_1 : (!isNullOrUndefined(this.legendModule) && this.legendSettings.position === 'Bottom') ? this.mapAreaRect.y : (top_1 * 2);
|
|
8160
8126
|
left = (bottom <= 11) ? left : !isNullOrUndefined(this.legendModule) ? left : (left * 2);
|
|
8161
8127
|
tileElement.style.top = top_1 + 'px';
|
|
@@ -8380,8 +8346,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8380
8346
|
var mapsElement = document.getElementById(this.element.id);
|
|
8381
8347
|
if (!isNullOrUndefined(mapsElement)) {
|
|
8382
8348
|
var element = mapsElement.getBoundingClientRect();
|
|
8349
|
+
var marginLeft = getProcessedMarginValue(this.margin.left);
|
|
8383
8350
|
var minPosition = this.isTileMap ?
|
|
8384
|
-
this.pointToLatLong((this.mapAreaRect.x -
|
|
8351
|
+
this.pointToLatLong((this.mapAreaRect.x - marginLeft), -this.mapAreaRect.y) :
|
|
8385
8352
|
this.getGeoLocation(0, (this.mapAreaRect.x + element.left), this.mapAreaRect.y);
|
|
8386
8353
|
var maxPosition = this.isTileMap ? this.pointToLatLong(this.mapAreaRect.width, (this.mapAreaRect.height - this.mapAreaRect.y)) :
|
|
8387
8354
|
this.getGeoLocation(0, (this.mapAreaRect.x + element.left + this.mapAreaRect.width), (this.mapAreaRect.y + this.mapAreaRect.height));
|
|
@@ -8448,8 +8415,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8448
8415
|
var ele = createElement('div', {
|
|
8449
8416
|
id: this.element.id + '_tile_parent'
|
|
8450
8417
|
});
|
|
8418
|
+
var marginRight = getProcessedMarginValue(this.margin.right);
|
|
8451
8419
|
ele.style.cssText = 'position: absolute; left: ' +
|
|
8452
|
-
(this.mapAreaRect.x) + 'px; right: ' + (
|
|
8420
|
+
(this.mapAreaRect.x) + 'px; right: ' + (marginRight) + 'px; top: '
|
|
8453
8421
|
+ (this.mapAreaRect.y + padding) + 'px; height: ' +
|
|
8454
8422
|
(this.mapAreaRect.height) + 'px; width: '
|
|
8455
8423
|
+ (this.mapAreaRect.width) + 'px; overflow: hidden;';
|
|
@@ -8457,7 +8425,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8457
8425
|
id: this.element.id + '_tiles'
|
|
8458
8426
|
});
|
|
8459
8427
|
ele1.style.cssText = 'position: absolute; left: ' +
|
|
8460
|
-
(this.mapAreaRect.x) + 'px; right: ' + (
|
|
8428
|
+
(this.mapAreaRect.x) + 'px; right: ' + (marginRight) + 'px; top: '
|
|
8461
8429
|
+ (this.mapAreaRect.y + padding) + 'px; height: ' + (this.mapAreaRect.height) + 'px; width: '
|
|
8462
8430
|
+ (this.mapAreaRect.width) + 'px; overflow: hidden;';
|
|
8463
8431
|
this.element.appendChild(ele);
|
|
@@ -8548,7 +8516,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8548
8516
|
opacity: title.textStyle.opacity
|
|
8549
8517
|
};
|
|
8550
8518
|
var height;
|
|
8551
|
-
var
|
|
8519
|
+
var marginTop = getProcessedMarginValue(this.margin.top);
|
|
8520
|
+
var marginBottom = getProcessedMarginValue(this.margin.bottom);
|
|
8521
|
+
var marginLeft = getProcessedMarginValue(this.margin.left);
|
|
8522
|
+
var marginRight = getProcessedMarginValue(this.margin.right);
|
|
8523
|
+
var width = Math.abs((marginLeft + marginRight) - this.availableSize.width);
|
|
8552
8524
|
style.fontFamily = !isNullOrUndefined(style.fontFamily) ? style.fontFamily : this.themeStyle.fontFamily;
|
|
8553
8525
|
style.fontWeight = type === 'title' ? style.fontWeight || this.themeStyle.titleFontWeight : style.fontWeight || this.themeStyle.titleFontWeight;
|
|
8554
8526
|
style.size = type === 'title' ? (style.size || this.themeStyle.titleFontSize) : (style.size || this.themeStyle.subTitleFontSize || Theme.mapsSubTitleFont.size);
|
|
@@ -8558,16 +8530,16 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8558
8530
|
}
|
|
8559
8531
|
var trimmedTitle = textTrim(width, title.text, style);
|
|
8560
8532
|
var elementSize = measureText(trimmedTitle, style);
|
|
8561
|
-
var rect = (isNullOrUndefined(bounds)) ? new Rect(
|
|
8562
|
-
var location_1 = findPosition(rect, title.alignment, elementSize, type);
|
|
8533
|
+
var rect = (isNullOrUndefined(bounds)) ? new Rect(marginLeft, marginTop, this.availableSize.width, this.availableSize.height) : bounds;
|
|
8534
|
+
var location_1 = findPosition(rect, !isNullOrUndefined(title.alignment) ? title.alignment : 'Center', elementSize, type);
|
|
8563
8535
|
var options = new TextOption(this.element.id + '_Map_' + type, location_1.x, location_1.y, 'start', trimmedTitle);
|
|
8564
8536
|
var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
|
|
8565
8537
|
var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
|
|
8566
8538
|
element.setAttribute('aria-label', title.text);
|
|
8567
8539
|
element.setAttribute('role', 'region');
|
|
8568
8540
|
if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
|
|
8569
|
-
height = Math.abs((titleBounds.y +
|
|
8570
|
-
this.mapAreaRect = new Rect(
|
|
8541
|
+
height = Math.abs((titleBounds.y + marginBottom) - this.availableSize.height);
|
|
8542
|
+
this.mapAreaRect = new Rect(marginLeft, titleBounds.y + 10, width, height - 10);
|
|
8571
8543
|
}
|
|
8572
8544
|
if (type !== 'subtitle' && title.subtitleSettings.text) {
|
|
8573
8545
|
this.renderTitle(title.subtitleSettings, 'subtitle', titleBounds, groupEle);
|
|
@@ -8577,8 +8549,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8577
8549
|
}
|
|
8578
8550
|
}
|
|
8579
8551
|
else {
|
|
8580
|
-
height = Math.abs((
|
|
8581
|
-
this.mapAreaRect = new Rect(
|
|
8552
|
+
height = Math.abs((marginTop + marginBottom) - this.availableSize.height);
|
|
8553
|
+
this.mapAreaRect = new Rect(marginLeft, marginTop, width, height);
|
|
8582
8554
|
}
|
|
8583
8555
|
};
|
|
8584
8556
|
/**
|
|
@@ -8662,13 +8634,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8662
8634
|
removeClass(document.getElementsByClassName('highlightMapStyle')[0]);
|
|
8663
8635
|
}
|
|
8664
8636
|
};
|
|
8637
|
+
/**
|
|
8638
|
+
* This method is used to perform operations when keyboard key from maps.
|
|
8639
|
+
*
|
|
8640
|
+
* @param {KeyboardEvent} event - Specifies the keyboard event on maps.
|
|
8641
|
+
* @returns {void}
|
|
8642
|
+
* @private
|
|
8643
|
+
*/
|
|
8665
8644
|
Maps.prototype.keyUpHandler = function (event) {
|
|
8666
8645
|
var id = event.target['id'];
|
|
8667
8646
|
if (this.isTileMap) {
|
|
8668
8647
|
this.removeTileMap();
|
|
8669
8648
|
}
|
|
8670
8649
|
if (event.code === 'Tab' && id.indexOf('_LayerIndex_') > -1 && id.indexOf('shapeIndex') > -1) {
|
|
8671
|
-
this.keyboardHighlightSelection(id, event
|
|
8650
|
+
this.keyboardHighlightSelection(id, event);
|
|
8672
8651
|
}
|
|
8673
8652
|
else if (id.indexOf('_LayerIndex_') === -1 && id.indexOf('shapeIndex') === -1 &&
|
|
8674
8653
|
getElementsByClassName('highlightMapStyle').length > 0) {
|
|
@@ -8678,7 +8657,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8678
8657
|
}
|
|
8679
8658
|
}
|
|
8680
8659
|
};
|
|
8681
|
-
Maps.prototype.keyboardHighlightSelection = function (id,
|
|
8660
|
+
Maps.prototype.keyboardHighlightSelection = function (id, event) {
|
|
8661
|
+
var key = event.type;
|
|
8682
8662
|
var layerIndex = parseInt(id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
8683
8663
|
var shapeIndex = parseInt(id.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
8684
8664
|
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -8698,6 +8678,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8698
8678
|
this.highlightModule.handleHighlight(event.target, layerIndex, data, shapeData);
|
|
8699
8679
|
}
|
|
8700
8680
|
};
|
|
8681
|
+
/**
|
|
8682
|
+
* This method is used to perform operations when keyboard down from maps.
|
|
8683
|
+
*
|
|
8684
|
+
* @param {KeyboardEvent} event - Specifies the keyboard event on maps.
|
|
8685
|
+
* @returns {void}
|
|
8686
|
+
* @private
|
|
8687
|
+
*/
|
|
8701
8688
|
Maps.prototype.keyDownHandler = function (event) {
|
|
8702
8689
|
var zoom = this.zoomModule;
|
|
8703
8690
|
var id = event.target['id'];
|
|
@@ -8763,7 +8750,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8763
8750
|
}
|
|
8764
8751
|
}
|
|
8765
8752
|
if (id.indexOf('shapeIndex') > -1) {
|
|
8766
|
-
this.keyboardHighlightSelection(id, event
|
|
8753
|
+
this.keyboardHighlightSelection(id, event);
|
|
8767
8754
|
}
|
|
8768
8755
|
}
|
|
8769
8756
|
if (this.zoomModule) {
|
|
@@ -9457,7 +9444,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9457
9444
|
* @returns {void}
|
|
9458
9445
|
*/
|
|
9459
9446
|
Maps.prototype.shapeSelection = function (layerIndex, propertyName, name, enable) {
|
|
9460
|
-
if (!this.isDestroyed) {
|
|
9447
|
+
if (!this.isDestroyed && !isNullOrUndefined(this.layers[layerIndex])) {
|
|
9461
9448
|
var targetEle = void 0;
|
|
9462
9449
|
var subLayerIndex = void 0;
|
|
9463
9450
|
var popertyNameArray = Array.isArray(propertyName) ? propertyName : Array(propertyName);
|
|
@@ -9476,7 +9463,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9476
9463
|
}
|
|
9477
9464
|
}
|
|
9478
9465
|
}
|
|
9479
|
-
if (selectionsettings.enable) {
|
|
9466
|
+
if (!isNullOrUndefined(selectionsettings) && selectionsettings.enable) {
|
|
9480
9467
|
var targetId = void 0;
|
|
9481
9468
|
var dataIndex = void 0;
|
|
9482
9469
|
var shapeIndex = void 0;
|
|
@@ -9682,6 +9669,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9682
9669
|
if (!isNullOrUndefined(this.mapsTooltipModule)) {
|
|
9683
9670
|
this.mapsTooltipModule.removeEventListener();
|
|
9684
9671
|
}
|
|
9672
|
+
if (!isNullOrUndefined(this.bingMap)) {
|
|
9673
|
+
this.bingMap.destroy();
|
|
9674
|
+
}
|
|
9685
9675
|
_super.prototype.destroy.call(this);
|
|
9686
9676
|
this.shapeSelectionItem = [];
|
|
9687
9677
|
this.toggledElementId = [];
|
|
@@ -10223,16 +10213,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10223
10213
|
* @returns {GeoPosition}- Returns the geographical coordinates.
|
|
10224
10214
|
*/
|
|
10225
10215
|
Maps.prototype.getGeoLocation = function (layerIndex, x, y) {
|
|
10226
|
-
var latitude =
|
|
10227
|
-
var longitude =
|
|
10228
|
-
if (!this.isDestroyed) {
|
|
10216
|
+
var latitude = null;
|
|
10217
|
+
var longitude = null;
|
|
10218
|
+
if (!this.isDestroyed && !this.isTileMap) {
|
|
10229
10219
|
var container = document.getElementById(this.element.id);
|
|
10230
10220
|
var elementClientRect = this.element.getBoundingClientRect();
|
|
10231
|
-
var
|
|
10232
|
-
var
|
|
10233
|
-
(elementClientRect.left - bodyClientRect.left) : 0);
|
|
10234
|
-
var pageY = y - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop ||
|
|
10235
|
-
(elementClientRect.top - bodyClientRect.top) : 0);
|
|
10221
|
+
var pageX = x - container.offsetLeft - (elementClientRect.left - container.offsetLeft) - window.scrollX;
|
|
10222
|
+
var pageY = y - container.offsetTop - (elementClientRect.top - container.offsetTop) - window.scrollY;
|
|
10236
10223
|
var currentLayer = this.layersCollection[layerIndex];
|
|
10237
10224
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10238
10225
|
var translate = getTranslate(this, currentLayer, false);
|
|
@@ -10259,15 +10246,16 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10259
10246
|
* @returns {GeoPosition} - Returns the geographical coordinates.
|
|
10260
10247
|
*/
|
|
10261
10248
|
Maps.prototype.getTileGeoLocation = function (x, y) {
|
|
10262
|
-
var latitude =
|
|
10263
|
-
var longitude =
|
|
10264
|
-
if (
|
|
10265
|
-
var
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10249
|
+
var latitude = null;
|
|
10250
|
+
var longitude = null;
|
|
10251
|
+
if (this.isTileMap) {
|
|
10252
|
+
var element = document.getElementById(this.element.id + '_tile_parent');
|
|
10253
|
+
if (!this.isDestroyed && !isNullOrUndefined(element)) {
|
|
10254
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10255
|
+
var latLong = this.pointToLatLong(x + this.mapAreaRect.x - element.offsetLeft, y + this.mapAreaRect.y - element.offsetTop);
|
|
10256
|
+
latitude = latLong['latitude'];
|
|
10257
|
+
longitude = latLong['longitude'];
|
|
10258
|
+
}
|
|
10271
10259
|
}
|
|
10272
10260
|
return { latitude: latitude, longitude: longitude };
|
|
10273
10261
|
};
|
|
@@ -10283,7 +10271,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10283
10271
|
var longitude = 0;
|
|
10284
10272
|
if (!this.isDestroyed && !isNullOrUndefined(this.translatePoint)) {
|
|
10285
10273
|
var padding = 10;
|
|
10286
|
-
pageY = pageY + padding;
|
|
10274
|
+
pageY = !isNullOrUndefined(this.markerDragArgument) ? pageY + padding : pageY;
|
|
10287
10275
|
var mapSize = 256 * Math.pow(2, this.tileZoomLevel);
|
|
10288
10276
|
var x1 = (this.clip(pageX - (this.translatePoint.x * this.scale), 0, mapSize - 1) / mapSize) - 0.5;
|
|
10289
10277
|
var y1 = 0.5 - (this.clip(pageY - (this.translatePoint.y * this.scale), 0, mapSize - 1) / mapSize);
|
|
@@ -11045,7 +11033,8 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
11045
11033
|
&& this.maps.mapScaleValue <= 1) {
|
|
11046
11034
|
this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ? (this.maps.isZoomByPosition ? this.maps.tileZoomLevel : 1)
|
|
11047
11035
|
: this.maps.mapScaleValue;
|
|
11048
|
-
if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1
|
|
11036
|
+
if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1 &&
|
|
11037
|
+
!isNullOrUndefined(this.maps.tileTranslatePoint)) {
|
|
11049
11038
|
this.maps.tileTranslatePoint.x = 0;
|
|
11050
11039
|
this.maps.tileTranslatePoint.y = 0;
|
|
11051
11040
|
}
|
|
@@ -11606,22 +11595,26 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11606
11595
|
labelTemplateElement.appendChild(labelElement);
|
|
11607
11596
|
}
|
|
11608
11597
|
else {
|
|
11609
|
-
|
|
11598
|
+
var smartLabelMode = !isNullOrUndefined(dataLabelSettings.smartLabelMode) ? dataLabelSettings.smartLabelMode.toString() : 'None';
|
|
11599
|
+
if (smartLabelMode === 'Trim') {
|
|
11610
11600
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11611
11601
|
var textType = typeof text === 'number' ? text.toString() : text;
|
|
11612
11602
|
trimmedLable = textTrim(width, textType, style, null, true);
|
|
11613
11603
|
elementSize = measureTextElement(trimmedLable, style);
|
|
11614
11604
|
options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', trimmedLable, '', '');
|
|
11615
11605
|
}
|
|
11616
|
-
if (
|
|
11606
|
+
if (smartLabelMode === 'None') {
|
|
11617
11607
|
options = new TextOption(labelId, (textLocation.x), textLocation.y, 'middle', text, '', '');
|
|
11618
11608
|
}
|
|
11619
|
-
if (
|
|
11609
|
+
if (smartLabelMode === 'Hide') {
|
|
11620
11610
|
text = (width >= textSize['width']) ? text : '';
|
|
11621
11611
|
options = new TextOption(labelId, (textLocation.x), (textLocation.y), 'middle', text, '', '');
|
|
11622
11612
|
}
|
|
11623
|
-
|
|
11624
|
-
|
|
11613
|
+
if (!isNullOrUndefined(options)) {
|
|
11614
|
+
text = options['text'];
|
|
11615
|
+
}
|
|
11616
|
+
var intersectionAction = !isNullOrUndefined(dataLabelSettings.intersectionAction) ? dataLabelSettings.intersectionAction.toString() : 'None';
|
|
11617
|
+
if (intersectionAction === 'Hide') {
|
|
11625
11618
|
for (var i = 0; i < intersect.length; i++) {
|
|
11626
11619
|
if (!isNullOrUndefined(intersect[i])) {
|
|
11627
11620
|
if (!(_this.value[index]['leftWidth'] > intersect[i]['rightWidth']
|
|
@@ -11637,7 +11630,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11637
11630
|
options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', text, '', '');
|
|
11638
11631
|
}
|
|
11639
11632
|
var difference = void 0;
|
|
11640
|
-
if (
|
|
11633
|
+
if (intersectionAction === 'Trim') {
|
|
11641
11634
|
for (var j = 0; j < intersect.length; j++) {
|
|
11642
11635
|
if (!isNullOrUndefined(intersect[j])) {
|
|
11643
11636
|
if (intersect[j]['rightWidth'] < _this.value[index]['leftWidth']
|
|
@@ -11667,7 +11660,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11667
11660
|
intersect.push(_this.value[index]);
|
|
11668
11661
|
options = new TextOption(labelId, textLocation.x, (textLocation.y), 'middle', trimmedLable, '', '');
|
|
11669
11662
|
}
|
|
11670
|
-
if (
|
|
11663
|
+
if (intersectionAction === 'None') {
|
|
11671
11664
|
options = new TextOption(labelId, (textLocation.x), (textLocation.y), 'middle', text, '', '');
|
|
11672
11665
|
}
|
|
11673
11666
|
if (trimmedLable.length > 1) {
|
|
@@ -11881,7 +11874,7 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
|
|
|
11881
11874
|
}
|
|
11882
11875
|
if (showArrow) {
|
|
11883
11876
|
arrowColor = arrowSettings.color;
|
|
11884
|
-
arrowSize = arrowSettings.size;
|
|
11877
|
+
arrowSize = !isNullOrUndefined(arrowSettings.size) ? arrowSettings.size : 0;
|
|
11885
11878
|
offSetValue = !isNullOrUndefined(arrowSettings.offSet) ? arrowSettings.offSet : 0;
|
|
11886
11879
|
var divide = (Math.round(arrowSize / 2));
|
|
11887
11880
|
arrowPosition = arrowSettings.position;
|
|
@@ -12193,7 +12186,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12193
12186
|
shapeBorder: this.legendCollection[i]['shapeBorder']
|
|
12194
12187
|
});
|
|
12195
12188
|
}
|
|
12196
|
-
if (this.legendCollection.length === 1) {
|
|
12189
|
+
if (this.legendCollection.length === 1 && !(map.theme === 'Fluent2HighContrast' && legend.position === 'Bottom')) {
|
|
12197
12190
|
legendHeight = rectHeight;
|
|
12198
12191
|
legendWidth = rectWidth;
|
|
12199
12192
|
}
|
|
@@ -12392,7 +12385,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12392
12385
|
var rectOptions = new RectOption(itemId, item['fill'], item['shapeBorder'], legend.opacity, bounds);
|
|
12393
12386
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'middle', item['text'], '', '');
|
|
12394
12387
|
textFont.fontFamily = !isNullOrUndefined(textFont.fontFamily) ? textFont.fontFamily : this.maps.themeStyle.fontFamily;
|
|
12395
|
-
textFont.size = map.themeStyle.legendFontSize
|
|
12388
|
+
textFont.size = textFont.size || map.themeStyle.legendFontSize;
|
|
12396
12389
|
var textElement = renderTextElement(textOptions, textFont, textFont.color, this.legendGroup);
|
|
12397
12390
|
textElement.setAttribute('aria-label', item['text']);
|
|
12398
12391
|
textElement.setAttribute('role', 'region');
|
|
@@ -12452,7 +12445,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12452
12445
|
this.maps.themeStyle.legendTextColor;
|
|
12453
12446
|
legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
|
|
12454
12447
|
this.maps.themeStyle.fontFamily;
|
|
12455
|
-
legendTextStyle.size = map.themeStyle.legendFontSize
|
|
12448
|
+
legendTextStyle.size = legendTextStyle.size || map.themeStyle.legendFontSize;
|
|
12456
12449
|
legendTextStyle.fontWeight = legendTextStyle.fontWeight || map.themeStyle.fontWeight;
|
|
12457
12450
|
if (i === 0) {
|
|
12458
12451
|
this.renderLegendBorder();
|
|
@@ -12969,7 +12962,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12969
12962
|
}
|
|
12970
12963
|
else {
|
|
12971
12964
|
this.removeShapeHighlightCollection();
|
|
12972
|
-
this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
12965
|
+
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');
|
|
12973
12966
|
}
|
|
12974
12967
|
}
|
|
12975
12968
|
else if (getValue === 'selection') {
|
|
@@ -13034,7 +13027,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13034
13027
|
this.maps.legendSelectionClass = module;
|
|
13035
13028
|
this.removeLegend(this.shapeHighlightCollection);
|
|
13036
13029
|
if (!isNullOrUndefined(legendShape)) {
|
|
13037
|
-
this.setColor(legendShape, !isNullOrUndefined(module.fill) ? module.fill : legendShape.getAttribute('fill'), module.opacity.toString(), module.border.color, module.border.width.toString(), 'selection');
|
|
13030
|
+
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');
|
|
13038
13031
|
var legendSelectionIndex = this.getIndexofLegend(this.maps.legendSelectionCollection, legendShape);
|
|
13039
13032
|
this.maps.legendSelectionCollection[legendSelectionIndex]['MapShapeCollection']['Elements'].push(targetElement);
|
|
13040
13033
|
}
|
|
@@ -13107,10 +13100,10 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13107
13100
|
var collection = this.maps.legendModule.legendCollection;
|
|
13108
13101
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13109
13102
|
var currentCollection;
|
|
13110
|
-
if (legendType === 'Default' && !isNullOrUndefined(this.maps.legendModule.totalPages)) {
|
|
13103
|
+
if (legendType === 'Default' && !isNullOrUndefined(this.maps.legendModule.totalPages) && (this.maps.legendModule.totalPages.length > 0)) {
|
|
13111
13104
|
currentCollection = this.maps.legendModule.totalPages[this.maps.legendModule.currentPage]['Collection'];
|
|
13112
13105
|
}
|
|
13113
|
-
var currentCollectionLength = legendType === 'Default' ? currentCollection['length'] : 1;
|
|
13106
|
+
var currentCollectionLength = (legendType === 'Default' && !isNullOrUndefined(currentCollection)) ? currentCollection['length'] : 1;
|
|
13114
13107
|
for (var i = 0; i < collection.length; i++) {
|
|
13115
13108
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13116
13109
|
var dataValue = collection[i]['data'];
|
|
@@ -13261,7 +13254,18 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13261
13254
|
var spacing = 10;
|
|
13262
13255
|
var trimTitle = textTrim((this.legendItemRect.width + (spacing * 2)), legendTitle, textStyle);
|
|
13263
13256
|
var textSize = measureText(trimTitle, textStyle);
|
|
13264
|
-
|
|
13257
|
+
var sameTextWidth = false;
|
|
13258
|
+
for (var i = 0; i < this.legendRenderingCollections.length; i++) {
|
|
13259
|
+
if (this.legendRenderingCollections[i].textWidth !== this.legendRenderingCollections[0].textWidth) {
|
|
13260
|
+
sameTextWidth = false;
|
|
13261
|
+
break;
|
|
13262
|
+
}
|
|
13263
|
+
else {
|
|
13264
|
+
sameTextWidth = true;
|
|
13265
|
+
}
|
|
13266
|
+
}
|
|
13267
|
+
this.legendBorderRect = new Rect((map.theme === 'Fluent2HighContrast' && !sameTextWidth && (legend.position === 'Left' || legend.position === 'Right') && legend.mode === 'Interactive')
|
|
13268
|
+
? (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 +
|
|
13265
13269
|
(legend.mode === 'Interactive' ? 0 : (this.page !== 0) ? spacing : 0));
|
|
13266
13270
|
var legendBorder = {
|
|
13267
13271
|
color: legend.border.color || this.maps.themeStyle.legendBorderColor, opacity: legend.border.opacity,
|
|
@@ -13553,7 +13557,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13553
13557
|
if (!isNullOrUndefined(dataSource) && dataSource.length > 0) {
|
|
13554
13558
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13555
13559
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
13556
|
-
var equalValue = ((colorValuePath.indexOf('.') > -1) ? (getValueFromObject(data, colorValuePath)) :
|
|
13560
|
+
var equalValue = ((colorValuePath && colorValuePath.indexOf('.') > -1) ? (getValueFromObject(data, colorValuePath)) :
|
|
13557
13561
|
(data[colorValuePath]));
|
|
13558
13562
|
if (equalValue === colorMap.value) {
|
|
13559
13563
|
eqaulColorProcess_1 = true;
|
|
@@ -13651,7 +13655,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13651
13655
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13652
13656
|
var newData = [];
|
|
13653
13657
|
var legendFill = (isNullOrUndefined(fill)) ? dataValue : fill;
|
|
13654
|
-
if (!isNullOrUndefined(dataValue) && colorMapping.length === 0
|
|
13658
|
+
if (!isNullOrUndefined(dataValue) && colorMapping.length === 0 &&
|
|
13659
|
+
(!isNullOrUndefined(valuePath) || !isNullOrUndefined(dataPath))) {
|
|
13655
13660
|
legendText = !isNullOrUndefined(data[valuePath]) ? ((valuePath.indexOf('.') > -1) ?
|
|
13656
13661
|
getValueFromObject(data, valuePath) : data[valuePath]) : ((dataPath.indexOf('.') > -1) ?
|
|
13657
13662
|
getValueFromObject(data, dataPath) : data[dataPath]);
|
|
@@ -13701,7 +13706,11 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13701
13706
|
var arrowElement_1 = querySelector(id, this_3.maps.element.id);
|
|
13702
13707
|
if (this_3.maps.isDevice && !(isNullOrUndefined(arrowElement_1))) {
|
|
13703
13708
|
clearTimeout(this_3.arrowTimer);
|
|
13704
|
-
this_3.arrowTimer = setTimeout(function () {
|
|
13709
|
+
this_3.arrowTimer = setTimeout(function () {
|
|
13710
|
+
if (!isNullOrUndefined(arrowElement_1.parentNode)) {
|
|
13711
|
+
remove(arrowElement_1);
|
|
13712
|
+
}
|
|
13713
|
+
}, 2000);
|
|
13705
13714
|
}
|
|
13706
13715
|
return "break";
|
|
13707
13716
|
}
|
|
@@ -14995,7 +15004,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14995
15004
|
layer.shapePropertyPath : [layer.shapePropertyPath]);
|
|
14996
15005
|
if (!isNullOrUndefined(properties)) {
|
|
14997
15006
|
for (var k = 0; k < properties.length; k++) {
|
|
14998
|
-
if (!isNullOrUndefined(layer.dataSource)) {
|
|
15007
|
+
if (!isNullOrUndefined(layer.dataSource) && !isNullOrUndefined(layer.shapeDataPath)) {
|
|
14999
15008
|
for (var i = 0; i < layer['dataSource']['length']; i++) {
|
|
15000
15009
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15001
15010
|
var data = layer.dataSource[i];
|
|
@@ -15041,7 +15050,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
15041
15050
|
formatValue(((option.valuePath.indexOf('.') > -1) ?
|
|
15042
15051
|
(getValueFromObject(layer.dataSource[index], option.valuePath)) :
|
|
15043
15052
|
layer.dataSource[index][option.valuePath]), this.maps) : value[shapePath];
|
|
15044
|
-
if (isNullOrUndefined(currentData)) {
|
|
15053
|
+
if (isNullOrUndefined(currentData) && !isNullOrUndefined(option.valuePath)) {
|
|
15045
15054
|
currentData = (option.valuePath.indexOf('.') > -1) ?
|
|
15046
15055
|
(getValueFromObject(value, option.valuePath)) : value[option.valuePath];
|
|
15047
15056
|
}
|
|
@@ -15064,10 +15073,12 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
15064
15073
|
currentData = marker.template.split('>')[1].split('<')[0];
|
|
15065
15074
|
}
|
|
15066
15075
|
else {
|
|
15067
|
-
|
|
15068
|
-
|
|
15069
|
-
(
|
|
15070
|
-
|
|
15076
|
+
if (!isNullOrUndefined(marker.tooltipSettings.valuePath)) {
|
|
15077
|
+
currentData =
|
|
15078
|
+
formatValue(((marker.tooltipSettings.valuePath.indexOf('.') > -1) ?
|
|
15079
|
+
(getValueFromObject(marker.dataSource[dataIndex], marker.tooltipSettings.valuePath)) :
|
|
15080
|
+
marker.dataSource[dataIndex][marker.tooltipSettings.valuePath]), this.maps);
|
|
15081
|
+
}
|
|
15071
15082
|
}
|
|
15072
15083
|
}
|
|
15073
15084
|
}
|
|
@@ -15084,10 +15095,12 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
15084
15095
|
currentData = this.formatter(bubble.tooltipSettings.format, bubble.dataSource[dataIndex]);
|
|
15085
15096
|
}
|
|
15086
15097
|
else {
|
|
15087
|
-
|
|
15088
|
-
|
|
15089
|
-
(
|
|
15090
|
-
|
|
15098
|
+
if (!isNullOrUndefined(bubble.tooltipSettings.valuePath)) {
|
|
15099
|
+
currentData =
|
|
15100
|
+
formatValue(((bubble.tooltipSettings.valuePath.indexOf('.') > -1) ?
|
|
15101
|
+
(getValueFromObject(bubble.dataSource[dataIndex], bubble.tooltipSettings.valuePath)) :
|
|
15102
|
+
bubble.dataSource[dataIndex][bubble.tooltipSettings.valuePath]), this.maps);
|
|
15103
|
+
}
|
|
15091
15104
|
}
|
|
15092
15105
|
}
|
|
15093
15106
|
//location.y = this.template(option, location);
|
|
@@ -15137,7 +15150,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
15137
15150
|
options: tooltipOption,
|
|
15138
15151
|
fill: isPolygon ? polygonFill : option.fill,
|
|
15139
15152
|
maps: this.maps, latitude: latitude, longitude: longitude,
|
|
15140
|
-
element: target, eventArgs: e, content: isPolygon ? polygon.tooltipText
|
|
15153
|
+
element: target, eventArgs: e, content: isPolygon ? (!isNullOrUndefined(polygon.tooltipText) ? polygon.tooltipText : '') :
|
|
15154
|
+
!isNullOrUndefined(currentData) ? currentData.toString() : ''
|
|
15141
15155
|
};
|
|
15142
15156
|
if (tooltipArgs.content !== '' || tooltipArgs.options['template'] !== '') {
|
|
15143
15157
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -16517,6 +16531,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16517
16531
|
var layerY = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerY'] : event.touches[0].pageY;
|
|
16518
16532
|
this.maps.mergeCluster();
|
|
16519
16533
|
if (!map.isTileMap) {
|
|
16534
|
+
var marginTop = getProcessedMarginValue(map.margin.top);
|
|
16520
16535
|
var legendElement = document.getElementById(map.element.id + '_Legend_Group');
|
|
16521
16536
|
var legendHeight = !isNullOrUndefined(legendElement) ? legendElement.getClientRects()[0].height : 0;
|
|
16522
16537
|
x = translatePoint.x - xDifference / scale;
|
|
@@ -16526,7 +16541,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16526
16541
|
var panningXDirection = ((xDifference < 0 ? layerRect.left <= (elementRect.left + map.mapAreaRect.x) :
|
|
16527
16542
|
((layerRect.left + layerRect.width + map.mapAreaRect.x) >= (elementRect.width))));
|
|
16528
16543
|
var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
|
|
16529
|
-
((layerRect.top + layerRect.height + legendHeight +
|
|
16544
|
+
((layerRect.top + layerRect.height + legendHeight + marginTop) >= (elementRect.top + elementRect.height))));
|
|
16530
16545
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16531
16546
|
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, layerX, layerY);
|
|
16532
16547
|
var minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
|
|
@@ -17119,7 +17134,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17119
17134
|
* @private
|
|
17120
17135
|
*/
|
|
17121
17136
|
Zoom.prototype.removeToolbarOpacity = function (factor, id) {
|
|
17122
|
-
if (this.maps.zoomModule && this.maps.zoomSettings.enable) {
|
|
17137
|
+
if (!isNullOrUndefined(this.maps) && this.maps.zoomModule && this.maps.zoomSettings.enable) {
|
|
17123
17138
|
if (getElementByID(this.maps.element.id + '_Zooming_KitCollection') && id.indexOf(this.maps.element.id + '_Zooming_') > -1) {
|
|
17124
17139
|
if (this.maps.isDevice) {
|
|
17125
17140
|
getElementByID(this.maps.element.id + '_Zooming_KitCollection').setAttribute('opacity', '1');
|
|
@@ -17370,6 +17385,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17370
17385
|
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17371
17386
|
target = e.target;
|
|
17372
17387
|
}
|
|
17388
|
+
if (!this.isTouch) {
|
|
17389
|
+
e.preventDefault();
|
|
17390
|
+
}
|
|
17373
17391
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
17374
17392
|
this.isPan = this.isPanModeEnabled = this.panColor !== this.selectionColor ? this.maps.zoomSettings.enablePanning
|
|
17375
17393
|
: this.zoomColor === this.selectionColor;
|
|
@@ -17723,7 +17741,8 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
17723
17741
|
backgroundElement = backgroundElement.childNodes[0];
|
|
17724
17742
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
17725
17743
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
17726
|
-
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
|
|
17744
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
|
|
17745
|
+
maps.theme === 'Fluent2')
|
|
17727
17746
|
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
17728
17747
|
backgroundElement.setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
17729
17748
|
}
|
|
@@ -18023,7 +18042,8 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
18023
18042
|
var exportElement = maps.svgObject.cloneNode(true);
|
|
18024
18043
|
var backgroundElement = exportElement.childNodes[0];
|
|
18025
18044
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
18026
|
-
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
|
|
18045
|
+
if ((maps.theme === 'Tailwind' || maps.theme === 'Bootstrap5' || maps.theme === 'Fluent' || maps.theme === 'Material3' ||
|
|
18046
|
+
maps.theme === 'Fluent2')
|
|
18027
18047
|
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
18028
18048
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
18029
18049
|
}
|
|
@@ -18153,5 +18173,5 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
18153
18173
|
return PdfExport;
|
|
18154
18174
|
}());
|
|
18155
18175
|
|
|
18156
|
-
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 };
|
|
18176
|
+
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 };
|
|
18157
18177
|
//# sourceMappingURL=ej2-maps.es5.js.map
|