@syncfusion/ej2-maps 25.1.37 → 25.1.41
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/.eslintrc.json +260 -0
- package/CHANGELOG.md +18 -0
- 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 +520 -301
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +501 -283
- 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 +7 -7
- package/src/maps/layers/bubble.d.ts +17 -2
- package/src/maps/layers/bubble.js +20 -5
- package/src/maps/layers/color-mapping.d.ts +1 -1
- package/src/maps/layers/color-mapping.js +4 -0
- package/src/maps/layers/data-label.d.ts +2 -2
- package/src/maps/layers/data-label.js +5 -7
- package/src/maps/layers/layer-panel.d.ts +8 -7
- package/src/maps/layers/layer-panel.js +21 -23
- package/src/maps/layers/legend.d.ts +7 -6
- package/src/maps/layers/legend.js +41 -24
- package/src/maps/layers/marker.d.ts +7 -2
- package/src/maps/layers/marker.js +14 -10
- package/src/maps/layers/navigation-selected-line.js +1 -0
- package/src/maps/layers/polygon.js +5 -1
- package/src/maps/maps-model.d.ts +9 -9
- package/src/maps/maps.d.ts +30 -12
- package/src/maps/maps.js +88 -59
- package/src/maps/model/base-model.d.ts +3 -2
- package/src/maps/model/base.d.ts +10 -9
- package/src/maps/model/base.js +1 -1
- package/src/maps/model/export-image.js +1 -1
- package/src/maps/model/export-pdf.js +3 -3
- package/src/maps/model/interface.d.ts +1 -0
- package/src/maps/model/print.js +2 -0
- package/src/maps/model/theme.js +12 -12
- package/src/maps/user-interaction/annotation.d.ts +5 -0
- package/src/maps/user-interaction/annotation.js +6 -2
- package/src/maps/user-interaction/highlight.d.ts +13 -1
- package/src/maps/user-interaction/highlight.js +12 -2
- package/src/maps/user-interaction/selection.d.ts +13 -1
- package/src/maps/user-interaction/selection.js +19 -13
- package/src/maps/user-interaction/tooltip.d.ts +14 -0
- package/src/maps/user-interaction/tooltip.js +16 -1
- package/src/maps/user-interaction/zoom.d.ts +55 -10
- package/src/maps/user-interaction/zoom.js +146 -104
- package/src/maps/utils/helper.d.ts +64 -36
- package/src/maps/utils/helper.js +84 -54
- package/tslint.json +111 -0
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -54,7 +54,7 @@ function stringToNumber(value, containerSize) {
|
|
|
54
54
|
function calculateSize(maps) {
|
|
55
55
|
maps.element.style.height = !isNullOrUndefined(maps.height) ? maps.height : 'auto';
|
|
56
56
|
maps.element.style.width = !isNullOrUndefined(maps.width) ? maps.width : 'auto';
|
|
57
|
-
maps.element.style.setProperty(
|
|
57
|
+
maps.element.style.setProperty('display', 'block');
|
|
58
58
|
var containerWidth = maps.element.clientWidth;
|
|
59
59
|
var containerHeight = maps.element.clientHeight;
|
|
60
60
|
var containerElementWidth = stringToNumber(maps.element.style.width, containerWidth);
|
|
@@ -214,6 +214,11 @@ function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
|
|
|
214
214
|
return new Point(x, y);
|
|
215
215
|
}
|
|
216
216
|
/**
|
|
217
|
+
* @param {Maps} maps - Specifies the map control.
|
|
218
|
+
* @param {number} factor - Specifies the factor.
|
|
219
|
+
* @param {LayerSettings} currentLayer - Specifies the current layer.
|
|
220
|
+
* @param {Coordinate} markerData - Specifies the marker data.
|
|
221
|
+
* @returns {string} - Returns the path.
|
|
217
222
|
* @private
|
|
218
223
|
*/
|
|
219
224
|
function calculatePolygonPath(maps, factor, currentLayer, markerData) {
|
|
@@ -426,9 +431,14 @@ function measureText(text, font) {
|
|
|
426
431
|
'; visibility: hidden; top: -100; left: 0; whiteSpace: nowrap; lineHeight: normal';
|
|
427
432
|
return new Size(measureObject.clientWidth, measureObject.clientHeight);
|
|
428
433
|
}
|
|
429
|
-
/**
|
|
434
|
+
/**
|
|
435
|
+
* @param {string} text - Specifies the text.
|
|
436
|
+
* @param {FontModel} font - Specifies the font.
|
|
437
|
+
* @returns {Size} - Returns the size of text.
|
|
438
|
+
* @private */
|
|
430
439
|
function measureTextElement(text, font) {
|
|
431
440
|
var canvas = document.createElement('canvas');
|
|
441
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
432
442
|
var context = canvas.getContext('2d');
|
|
433
443
|
context.font = font.fontStyle + " " + font.fontWeight + " " + (typeof font.size === 'number' ? font.size + 'px' : font.size) + " " + font.fontFamily;
|
|
434
444
|
var metrics = context.measureText(text);
|
|
@@ -700,15 +710,15 @@ function renderTextElement(option, style, color, parent, isMinus) {
|
|
|
700
710
|
return htmlObject;
|
|
701
711
|
}
|
|
702
712
|
/**
|
|
703
|
-
* @param {HTMLCollection} element Specifies the html collection
|
|
704
|
-
* @param {string} markerId Specifies the marker id
|
|
705
|
-
* @param {
|
|
706
|
-
* @param {number} index Specifies the index
|
|
707
|
-
* @param {Maps} mapObj Specifies the map object
|
|
708
|
-
* @
|
|
713
|
+
* @param {HTMLCollection} element - Specifies the html collection
|
|
714
|
+
* @param {string} markerId - Specifies the marker id
|
|
715
|
+
* @param {object} data - Specifies the data
|
|
716
|
+
* @param {number} index - Specifies the index
|
|
717
|
+
* @param {Maps} mapObj - Specifies the map object
|
|
718
|
+
* @param {string} templateType - Specifies the template type
|
|
719
|
+
* @returns {HTMLElement} - Returns the html element
|
|
709
720
|
* @private
|
|
710
721
|
*/
|
|
711
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
712
722
|
function convertElement(element, markerId, data, index, mapObj, templateType) {
|
|
713
723
|
var childElement = createElement('div', {
|
|
714
724
|
id: markerId, className: mapObj.element.id + '_marker_template_element'
|
|
@@ -719,6 +729,7 @@ function convertElement(element, markerId, data, index, mapObj, templateType) {
|
|
|
719
729
|
childElement.appendChild(element[0]);
|
|
720
730
|
elementLength--;
|
|
721
731
|
}
|
|
732
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
722
733
|
if (!mapObj.isReact || templateType !== 'function') {
|
|
723
734
|
var templateHtml = childElement.innerHTML;
|
|
724
735
|
var properties = Object.keys(data);
|
|
@@ -760,12 +771,11 @@ function formatValue(value, maps) {
|
|
|
760
771
|
*
|
|
761
772
|
* @param {string} stringTemplate - Specifies the template
|
|
762
773
|
* @param {string} format - Specifies the format
|
|
763
|
-
* @param {
|
|
774
|
+
* @param {object} data - Specifies the data
|
|
764
775
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
765
776
|
* @returns {string} - Returns the string value
|
|
766
777
|
* @private
|
|
767
778
|
*/
|
|
768
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
769
779
|
function convertStringToValue(stringTemplate, format, data, maps) {
|
|
770
780
|
var templateHtml = (stringTemplate === '') ? format : stringTemplate;
|
|
771
781
|
var templateValue = (stringTemplate === '') ? templateHtml.split('${') : templateHtml.split('{{:');
|
|
@@ -790,14 +800,11 @@ function convertStringToValue(stringTemplate, format, data, maps) {
|
|
|
790
800
|
*
|
|
791
801
|
* @param {Element} element - Specifies the element
|
|
792
802
|
* @param {string} labelId - Specifies the label id
|
|
793
|
-
* @param {
|
|
794
|
-
* @param {number} index - Specifies the index
|
|
795
|
-
* @param {Maps} mapObj - Specifies the map object
|
|
803
|
+
* @param {object} data - Specifies the data
|
|
796
804
|
* @returns {HTMLElement} - Returns the html element
|
|
797
805
|
* @private
|
|
798
806
|
*/
|
|
799
|
-
|
|
800
|
-
function convertElementFromLabel(element, labelId, data, index, mapObj) {
|
|
807
|
+
function convertElementFromLabel(element, labelId, data) {
|
|
801
808
|
var labelEle = isNullOrUndefined(element.childElementCount) ? element[0] : element;
|
|
802
809
|
var templateHtml = labelEle.outerHTML;
|
|
803
810
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -826,7 +833,7 @@ function convertElementFromLabel(element, labelId, data, index, mapObj) {
|
|
|
826
833
|
* @returns {Element} - Returns the element
|
|
827
834
|
* @private
|
|
828
835
|
*/
|
|
829
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
836
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
830
837
|
function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCollection, maps) {
|
|
831
838
|
var markerEle;
|
|
832
839
|
var x;
|
|
@@ -868,7 +875,7 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
|
|
|
868
875
|
}
|
|
869
876
|
/**
|
|
870
877
|
*
|
|
871
|
-
* @param {
|
|
878
|
+
* @param {object} data - Specifies the data
|
|
872
879
|
* @param {string} value - Specifies the value
|
|
873
880
|
* @returns {any} - Returns the data
|
|
874
881
|
* @private
|
|
@@ -891,11 +898,10 @@ function getValueFromObject(data, value) {
|
|
|
891
898
|
/**
|
|
892
899
|
*
|
|
893
900
|
* @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
|
|
894
|
-
* @param {
|
|
901
|
+
* @param {object} data - Specifies the data
|
|
895
902
|
* @returns {IMarkerRenderingEventArgs} - Returns the arguments
|
|
896
903
|
* @private
|
|
897
904
|
*/
|
|
898
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
899
905
|
function markerColorChoose(eventArgs, data) {
|
|
900
906
|
var color = (!isNullOrUndefined(eventArgs.colorValuePath)) ? ((eventArgs.colorValuePath.indexOf('.') > -1) ? (getValueFromObject(data, eventArgs.colorValuePath)).toString() :
|
|
901
907
|
data[eventArgs.colorValuePath]) : data[eventArgs.colorValuePath];
|
|
@@ -908,11 +914,10 @@ function markerColorChoose(eventArgs, data) {
|
|
|
908
914
|
/**
|
|
909
915
|
*
|
|
910
916
|
* @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
|
|
911
|
-
* @param {
|
|
917
|
+
* @param {object} data - Specifies the data
|
|
912
918
|
* @returns {IMarkerRenderingEventArgs} - Returns the arguments
|
|
913
919
|
* @private
|
|
914
920
|
*/
|
|
915
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
916
921
|
function markerShapeChoose(eventArgs, data) {
|
|
917
922
|
if (!isNullOrUndefined(eventArgs.shapeValuePath) && !isNullOrUndefined(data[eventArgs.shapeValuePath])) {
|
|
918
923
|
var shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
|
|
@@ -945,7 +950,7 @@ function markerShapeChoose(eventArgs, data) {
|
|
|
945
950
|
* @param {Element} layerElement - Specifies the layer element
|
|
946
951
|
* @param {boolean} check - Specifies the boolean value
|
|
947
952
|
* @param {boolean} zoomCheck - Specifies the boolean value
|
|
948
|
-
* @returns {
|
|
953
|
+
* @returns {boolean} -Returns boolean for cluster completion
|
|
949
954
|
* @private
|
|
950
955
|
*/
|
|
951
956
|
function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerCollection, layerElement, check, zoomCheck) {
|
|
@@ -975,14 +980,15 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
975
980
|
data: data, maps: maps, cluster: clusters, border: clusters.border
|
|
976
981
|
};
|
|
977
982
|
var containerRect = maps.element.getBoundingClientRect();
|
|
978
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
979
|
-
|
|
983
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
984
|
+
(maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
|
|
980
985
|
var factor;
|
|
981
986
|
if (!maps.isTileMap) {
|
|
982
987
|
factor = maps.mapLayerPanel.calculateFactor(currentLayer);
|
|
983
988
|
}
|
|
984
989
|
var isClusteringCompleted = false;
|
|
985
990
|
var currentZoomFactor = !maps.isTileMap ? maps.mapScaleValue : maps.tileZoomLevel;
|
|
991
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
986
992
|
maps.trigger('markerClusterRendering', eventArg, function (clusterargs) {
|
|
987
993
|
Array.prototype.forEach.call(markerTemplate.childNodes, function (markerElement, o) {
|
|
988
994
|
indexCollection = [];
|
|
@@ -995,7 +1001,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
995
1001
|
|| (maps.markerModule.initialMarkerCluster.length > 0 && maps.markerModule.initialMarkerCluster[layerIndex] && maps.markerModule.initialMarkerCluster[layerIndex][o] && maps.markerModule.initialMarkerCluster[layerIndex][o].length > 0) ?
|
|
996
1002
|
(maps.previousScale < currentZoomFactor ? maps.markerModule.zoomedMarkerCluster[layerIndex][o] : maps.markerModule.initialMarkerCluster[layerIndex][o]) : null;
|
|
997
1003
|
if (!isNullOrUndefined(list) && list.length !== 0) {
|
|
998
|
-
Array.prototype.forEach.call(list, function (currentIndex
|
|
1004
|
+
Array.prototype.forEach.call(list, function (currentIndex) {
|
|
999
1005
|
if (o !== currentIndex) {
|
|
1000
1006
|
var otherMarkerElement = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
1001
1007
|
+ 0 + '_dataIndex_' + currentIndex);
|
|
@@ -1178,9 +1184,16 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1178
1184
|
});
|
|
1179
1185
|
return isClusteringCompleted;
|
|
1180
1186
|
}
|
|
1181
|
-
/**
|
|
1187
|
+
/**
|
|
1188
|
+
* @param {Maps} maps - Specifies the map control.
|
|
1189
|
+
* @param {number} currentZoomFactor - Specifies the current zoom factor.
|
|
1190
|
+
* @param {number} layerIndex - Specifies the layer index.
|
|
1191
|
+
* @param {number} index - Specifies the index.
|
|
1192
|
+
* @param {number} indexCollection - Specifies the index Collection.
|
|
1193
|
+
* @returns {void}
|
|
1194
|
+
* @private */
|
|
1182
1195
|
function markerClusterListHandler(maps, currentZoomFactor, layerIndex, index, indexCollection) {
|
|
1183
|
-
if (currentZoomFactor
|
|
1196
|
+
if (currentZoomFactor === 1) {
|
|
1184
1197
|
var initialMarkerClusterList = isNullOrUndefined(maps.markerModule.initialMarkerCluster[layerIndex][index]) ? [] : indexCollection.length > 1 ? indexCollection : [];
|
|
1185
1198
|
maps.markerModule.initialMarkerCluster[layerIndex][index] = initialMarkerClusterList;
|
|
1186
1199
|
var zoomedMarkerClusterList = isNullOrUndefined(maps.markerModule.zoomedMarkerCluster[layerIndex][index]) ? [] : indexCollection.length > 1 ? indexCollection : [];
|
|
@@ -1190,8 +1203,16 @@ function markerClusterListHandler(maps, currentZoomFactor, layerIndex, index, in
|
|
|
1190
1203
|
maps.markerModule.zoomedMarkerCluster[layerIndex][index] = indexCollection.length > 1 ? indexCollection : [];
|
|
1191
1204
|
}
|
|
1192
1205
|
}
|
|
1193
|
-
/**
|
|
1206
|
+
/**
|
|
1207
|
+
* @param {Element} tempElement - Specifies the temp element.
|
|
1208
|
+
* @param {ClientRect} markerBounds - Specifies the marker bounds.
|
|
1209
|
+
* @param {ClientRect} colloideBounds - Specifies the colloide Bounds.
|
|
1210
|
+
* @param {number[]} indexCollection - Specifies the index collection.
|
|
1211
|
+
* @param {number} p - Specifies the p.
|
|
1212
|
+
* @returns {void}
|
|
1213
|
+
* @private */
|
|
1194
1214
|
function markerBoundsComparer(tempElement, markerBounds, colloideBounds, indexCollection, p) {
|
|
1215
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
1195
1216
|
var currentMarkerBound = tempElement.getBoundingClientRect();
|
|
1196
1217
|
if (!isNullOrUndefined(currentMarkerBound)) {
|
|
1197
1218
|
if (!(markerBounds.left > currentMarkerBound.right || markerBounds.right < currentMarkerBound.left
|
|
@@ -1206,11 +1227,10 @@ function markerBoundsComparer(tempElement, markerBounds, colloideBounds, indexCo
|
|
|
1206
1227
|
*
|
|
1207
1228
|
* @param {MarkerClusterData[]} sameMarkerData - Specifies the marker data
|
|
1208
1229
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1209
|
-
* @param {Element | HTMLElement} markerElement - Specifies the marker element
|
|
1210
1230
|
* @returns {void}
|
|
1211
1231
|
* @private
|
|
1212
1232
|
*/
|
|
1213
|
-
function mergeSeparateCluster(sameMarkerData, maps
|
|
1233
|
+
function mergeSeparateCluster(sameMarkerData, maps) {
|
|
1214
1234
|
var layerIndex = sameMarkerData[0].layerIndex;
|
|
1215
1235
|
var clusterIndex = sameMarkerData[0].targetClusterIndex;
|
|
1216
1236
|
var markerIndex = sameMarkerData[0].markerIndex;
|
|
@@ -1374,7 +1394,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1374
1394
|
* @returns {HTMLElement} - Returns the html element
|
|
1375
1395
|
* @private
|
|
1376
1396
|
*/
|
|
1377
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1397
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
1378
1398
|
function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
|
|
1379
1399
|
templateFn = getTemplateFunction(eventArgs.template, maps);
|
|
1380
1400
|
if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
|
|
@@ -1792,8 +1812,10 @@ function getFieldData(dataSource, fields) {
|
|
|
1792
1812
|
* @returns {number} - Returns the number
|
|
1793
1813
|
* @private
|
|
1794
1814
|
*/
|
|
1795
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1796
|
-
function checkShapeDataFields(dataSource, properties, dataPath, propertyPath,
|
|
1815
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
1816
|
+
function checkShapeDataFields(dataSource, properties, dataPath, propertyPath,
|
|
1817
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1818
|
+
layer) {
|
|
1797
1819
|
if (!(isNullOrUndefined(properties))) {
|
|
1798
1820
|
for (var i = 0; i < dataSource.length; i++) {
|
|
1799
1821
|
var shapeDataPath = ((dataPath.indexOf('.') > -1) ? getValueFromObject(dataSource[i], dataPath) :
|
|
@@ -1814,10 +1836,9 @@ function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, la
|
|
|
1814
1836
|
*
|
|
1815
1837
|
* @param {string} shapeData - Specifies the shape data
|
|
1816
1838
|
* @param {string | string[]} shapePropertyPath - Specifies the shape property path
|
|
1817
|
-
* @param {
|
|
1839
|
+
* @param {object} shape - Specifies the shape
|
|
1818
1840
|
* @returns {string} - Returns the string value
|
|
1819
1841
|
*/
|
|
1820
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1821
1842
|
function checkPropertyPath(shapeData, shapePropertyPath, shape) {
|
|
1822
1843
|
if (!isNullOrUndefined(shapeData) && !isNullOrUndefined(shape)) {
|
|
1823
1844
|
if (!isNullOrUndefined(shapePropertyPath)) {
|
|
@@ -1912,9 +1933,10 @@ function findMidPointOfPolygon(points, type, geometryType) {
|
|
|
1912
1933
|
ySum = ySum + Math.abs(((startY + startY1) * (((startX * startY1) - (startX1 * startY)))));
|
|
1913
1934
|
}
|
|
1914
1935
|
sum = 0.5 * sum;
|
|
1936
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
1915
1937
|
var pointValue = points.some(function (point) { return point.x < 5 && point.y < 5; }) && geometryType === 'Normal' ? 6 : 4;
|
|
1916
|
-
xSum = (1 / (pointValue * sum)) * xSum;
|
|
1917
|
-
ySum = (1 / (pointValue * sum)) * ySum;
|
|
1938
|
+
xSum = sum !== 0 ? (1 / (pointValue * sum)) * xSum : 0;
|
|
1939
|
+
ySum = sum !== 0 ? (1 / (pointValue * sum)) * ySum : 0;
|
|
1918
1940
|
/* Code for finding nearest points in polygon related to midPoint*/
|
|
1919
1941
|
var rightMinPoint = { x: 0, y: 0 };
|
|
1920
1942
|
var rightMaxPoint = { x: 0, y: 0 };
|
|
@@ -1979,7 +2001,7 @@ function findMidPointOfPolygon(points, type, geometryType) {
|
|
|
1979
2001
|
function isCustomPath(layerData) {
|
|
1980
2002
|
var customPath = false;
|
|
1981
2003
|
if (Object.prototype.toString.call(layerData) === '[object Array]') {
|
|
1982
|
-
Array.prototype.forEach.call(layerData, function (layer
|
|
2004
|
+
Array.prototype.forEach.call(layerData, function (layer) {
|
|
1983
2005
|
if (!isNullOrUndefined(layer['geometry']) && layer['geometry']['type'] === 'Path') {
|
|
1984
2006
|
customPath = true;
|
|
1985
2007
|
}
|
|
@@ -1993,6 +2015,9 @@ function isCustomPath(layerData) {
|
|
|
1993
2015
|
* @param {number} maxWidth - Specifies the maximum width
|
|
1994
2016
|
* @param {string} text - Specifies the text
|
|
1995
2017
|
* @param {FontModel} font - Specifies the font
|
|
2018
|
+
* @param {number} width - Specifies the width of text
|
|
2019
|
+
* @param {boolean} isCanvasMeasure - checks the canvas measure
|
|
2020
|
+
* @param {number[]} widthList - Specifies the width list
|
|
1996
2021
|
* @returns {string} - Returns the string
|
|
1997
2022
|
* @private
|
|
1998
2023
|
*/
|
|
@@ -2107,6 +2132,7 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
2107
2132
|
}
|
|
2108
2133
|
if (mapObject.zoomSettings.shouldZoomInitially && mapObject.zoomSettings.enable) {
|
|
2109
2134
|
mapObject.mapScaleValue = scaleFactor = zoomFactorValue = ((mapObject.zoomSettings.shouldZoomInitially || mapObject.enablePersistence) && mapObject.scale === 1)
|
|
2135
|
+
// eslint-disable-next-line radix
|
|
2110
2136
|
? mapObject.scale : (isNullOrUndefined(mapObject.markerZoomFactor)) ? 1 : (mapObject.markerZoomedState ? mapObject.markerZoomFactor : parseInt(mapObject.scale.toString()));
|
|
2111
2137
|
if (mapObject.markerZoomedState && mapObject.mapScaleValue !== mapObject.markerZoomFactor && !mapObject.enablePersistence) {
|
|
2112
2138
|
mapObject.mapScaleValue = zoomFactorValue = mapObject.markerZoomFactor;
|
|
@@ -2464,9 +2490,9 @@ function Internalize(maps, value) {
|
|
|
2464
2490
|
/**
|
|
2465
2491
|
* Function to compile the template function for maps.
|
|
2466
2492
|
*
|
|
2467
|
-
* @param {string} template - Specifies the template
|
|
2493
|
+
* @param {string | Function} template - Specifies the template
|
|
2468
2494
|
* @param {Maps} maps - Specifies the Maps instance.
|
|
2469
|
-
* @returns {
|
|
2495
|
+
* @returns {any} - Returns the template function
|
|
2470
2496
|
* @private
|
|
2471
2497
|
*/
|
|
2472
2498
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2505,7 +2531,7 @@ function getElement(id) {
|
|
|
2505
2531
|
*
|
|
2506
2532
|
* @param {string} targetId - Specifies the target id
|
|
2507
2533
|
* @param {Maps} map - Specifies the instance of the maps
|
|
2508
|
-
* @returns {
|
|
2534
|
+
* @returns {object} - Returns the object
|
|
2509
2535
|
* @private
|
|
2510
2536
|
*/
|
|
2511
2537
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2668,14 +2694,12 @@ function customizeStyle(id, className, eventArgs) {
|
|
|
2668
2694
|
* @param {SelectionSettingsModel} selectionSettings - Specifies the selection settings
|
|
2669
2695
|
* @param {Maps} map - Specifies the instance of the maps
|
|
2670
2696
|
* @param {Element} targetElement - Specifies the target element
|
|
2671
|
-
* @param {
|
|
2672
|
-
* @param {
|
|
2697
|
+
* @param {object} shapeData - Specifies the shape data
|
|
2698
|
+
* @param {object} data - Specifies the data
|
|
2673
2699
|
* @returns {void}
|
|
2674
2700
|
* @private
|
|
2675
2701
|
*/
|
|
2676
|
-
function triggerItemSelectionEvent(selectionSettings, map, targetElement,
|
|
2677
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2678
|
-
shapeData, data) {
|
|
2702
|
+
function triggerItemSelectionEvent(selectionSettings, map, targetElement, shapeData, data) {
|
|
2679
2703
|
var border = {
|
|
2680
2704
|
color: selectionSettings.border.color,
|
|
2681
2705
|
width: selectionSettings.border.width / map.scale,
|
|
@@ -2692,6 +2716,7 @@ shapeData, data) {
|
|
|
2692
2716
|
data: data,
|
|
2693
2717
|
maps: map
|
|
2694
2718
|
};
|
|
2719
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2695
2720
|
map.trigger('itemSelection', eventArgs, function (observedArgs) {
|
|
2696
2721
|
eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity :
|
|
2697
2722
|
selectionSettings.border.opacity;
|
|
@@ -2749,6 +2774,7 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius) {
|
|
|
2749
2774
|
' ) scale(' + height + ')');
|
|
2750
2775
|
}
|
|
2751
2776
|
},
|
|
2777
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2752
2778
|
end: function (model) {
|
|
2753
2779
|
element.setAttribute('transform', transform);
|
|
2754
2780
|
if (!ele) {
|
|
@@ -2889,15 +2915,17 @@ function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
|
|
|
2889
2915
|
/**
|
|
2890
2916
|
* @param {string} id - Specifies the id
|
|
2891
2917
|
* @param {string} text - Specifies the text
|
|
2892
|
-
* @param {
|
|
2893
|
-
* @param {
|
|
2918
|
+
* @param {number} top - Specifies the top
|
|
2919
|
+
* @param {number} left - Specifies the left
|
|
2894
2920
|
* @param {ZoomToolbarTooltipSettingsModel} settings - Specifies the tooltip settings.
|
|
2895
2921
|
* @returns {void}
|
|
2896
2922
|
* @private
|
|
2897
2923
|
*/
|
|
2898
2924
|
function createTooltip(id, text, top, left, settings) {
|
|
2899
2925
|
var tooltip = getElement(id);
|
|
2926
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2900
2927
|
var borderColor = getHexColor(settings.borderColor);
|
|
2928
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2901
2929
|
var fontColor = getHexColor(settings.fontColor);
|
|
2902
2930
|
var style = 'top:' + top.toString() + 'px;' +
|
|
2903
2931
|
'left:' + left.toString() + 'px;' +
|
|
@@ -2924,10 +2952,14 @@ function createTooltip(id, text, top, left, settings) {
|
|
|
2924
2952
|
}
|
|
2925
2953
|
}
|
|
2926
2954
|
/**
|
|
2955
|
+
* @param {string} color - Specifies the color
|
|
2956
|
+
* @returns {any} - Returns the color in rgb
|
|
2927
2957
|
* @private
|
|
2928
2958
|
*/
|
|
2959
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2929
2960
|
function getHexColor(color) {
|
|
2930
2961
|
if (color.indexOf('#') !== -1 && color.toLowerCase().indexOf('rgb') === -1) {
|
|
2962
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2931
2963
|
var colorArray = (/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i).exec(color);
|
|
2932
2964
|
return colorArray ? { r: parseInt(colorArray[1], 16), g: parseInt(colorArray[2], 16), b: parseInt(colorArray[3], 16) } : null;
|
|
2933
2965
|
}
|
|
@@ -3124,7 +3156,6 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
3124
3156
|
else {
|
|
3125
3157
|
var currentStroke = void 0;
|
|
3126
3158
|
var value = 0;
|
|
3127
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3128
3159
|
var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
|
|
3129
3160
|
var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
|
|
3130
3161
|
var circleRadius = maps.layersCollection[index].shapeSettings.circleRadius;
|
|
@@ -3325,14 +3356,13 @@ function zoomAnimate(element, delay, duration, point, scale, size, maps) {
|
|
|
3325
3356
|
* @returns {void}
|
|
3326
3357
|
* @private
|
|
3327
3358
|
*/
|
|
3328
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3329
3359
|
function animate(element, delay, duration, process, end) {
|
|
3330
3360
|
var _this = this;
|
|
3331
3361
|
var start = null;
|
|
3332
3362
|
// eslint-disable-next-line prefer-const
|
|
3333
3363
|
var clearAnimation;
|
|
3334
3364
|
var markerStyle = 'visibility:visible';
|
|
3335
|
-
duration = animationMode ===
|
|
3365
|
+
duration = animationMode === 'Disable' ? 0 : duration;
|
|
3336
3366
|
var startAnimation = function (timestamp) {
|
|
3337
3367
|
if (!start) {
|
|
3338
3368
|
start = timestamp;
|
|
@@ -3435,6 +3465,7 @@ function compareZoomFactor(scaleFactor, maps) {
|
|
|
3435
3465
|
* @param {number} mapWidth - Specifies the width of the maps
|
|
3436
3466
|
* @param {number} mapHeight - Specifies the height of the maps
|
|
3437
3467
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
3468
|
+
* @param {boolean} isZoomToCoordinates - Checks for the zoom to coordinates
|
|
3438
3469
|
* @returns {number} - Returns the scale factor
|
|
3439
3470
|
* @private
|
|
3440
3471
|
*/
|
|
@@ -3476,7 +3507,7 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
|
|
|
3476
3507
|
* @returns {any} - Returns the data value
|
|
3477
3508
|
* @private
|
|
3478
3509
|
*/
|
|
3479
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3510
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
3480
3511
|
function processResult(e) {
|
|
3481
3512
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3482
3513
|
var dataValue;
|
|
@@ -3849,7 +3880,7 @@ function getThemeStyle(theme) {
|
|
|
3849
3880
|
shapeFill: '#A6A6A6',
|
|
3850
3881
|
rectangleZoomFillColor: '#d3d3d3',
|
|
3851
3882
|
rectangleZoomFillOpacity: 0.5,
|
|
3852
|
-
rectangleZoomBorderColor:
|
|
3883
|
+
rectangleZoomBorderColor: '#009900'
|
|
3853
3884
|
};
|
|
3854
3885
|
break;
|
|
3855
3886
|
case 'highcontrast':
|
|
@@ -3874,7 +3905,7 @@ function getThemeStyle(theme) {
|
|
|
3874
3905
|
shapeFill: '#A6A6A6',
|
|
3875
3906
|
rectangleZoomFillColor: '#d3d3d3',
|
|
3876
3907
|
rectangleZoomFillOpacity: 0.5,
|
|
3877
|
-
rectangleZoomBorderColor:
|
|
3908
|
+
rectangleZoomBorderColor: '#009900'
|
|
3878
3909
|
};
|
|
3879
3910
|
break;
|
|
3880
3911
|
case 'bootstrap4':
|
|
@@ -3902,7 +3933,7 @@ function getThemeStyle(theme) {
|
|
|
3902
3933
|
shapeFill: '#A6A6A6',
|
|
3903
3934
|
rectangleZoomFillColor: '#d3d3d3',
|
|
3904
3935
|
rectangleZoomFillOpacity: 0.5,
|
|
3905
|
-
rectangleZoomBorderColor:
|
|
3936
|
+
rectangleZoomBorderColor: '#009900'
|
|
3906
3937
|
};
|
|
3907
3938
|
break;
|
|
3908
3939
|
case 'tailwind':
|
|
@@ -3930,7 +3961,7 @@ function getThemeStyle(theme) {
|
|
|
3930
3961
|
shapeFill: '#E5E7EB',
|
|
3931
3962
|
rectangleZoomFillColor: '#d3d3d3',
|
|
3932
3963
|
rectangleZoomFillOpacity: 0.5,
|
|
3933
|
-
rectangleZoomBorderColor:
|
|
3964
|
+
rectangleZoomBorderColor: '#009900'
|
|
3934
3965
|
};
|
|
3935
3966
|
break;
|
|
3936
3967
|
case 'tailwinddark':
|
|
@@ -3958,7 +3989,7 @@ function getThemeStyle(theme) {
|
|
|
3958
3989
|
shapeFill: '#374151',
|
|
3959
3990
|
rectangleZoomFillColor: '#d3d3d3',
|
|
3960
3991
|
rectangleZoomFillOpacity: 0.5,
|
|
3961
|
-
rectangleZoomBorderColor:
|
|
3992
|
+
rectangleZoomBorderColor: '#009900'
|
|
3962
3993
|
};
|
|
3963
3994
|
break;
|
|
3964
3995
|
case 'bootstrap5':
|
|
@@ -3986,7 +4017,7 @@ function getThemeStyle(theme) {
|
|
|
3986
4017
|
shapeFill: '#E9ECEF',
|
|
3987
4018
|
rectangleZoomFillColor: '#d3d3d3',
|
|
3988
4019
|
rectangleZoomFillOpacity: 0.5,
|
|
3989
|
-
rectangleZoomBorderColor:
|
|
4020
|
+
rectangleZoomBorderColor: '#009900'
|
|
3990
4021
|
};
|
|
3991
4022
|
break;
|
|
3992
4023
|
case 'bootstrap5dark':
|
|
@@ -4014,7 +4045,7 @@ function getThemeStyle(theme) {
|
|
|
4014
4045
|
shapeFill: '#495057',
|
|
4015
4046
|
rectangleZoomFillColor: '#d3d3d3',
|
|
4016
4047
|
rectangleZoomFillOpacity: 0.5,
|
|
4017
|
-
rectangleZoomBorderColor:
|
|
4048
|
+
rectangleZoomBorderColor: '#009900'
|
|
4018
4049
|
};
|
|
4019
4050
|
break;
|
|
4020
4051
|
case 'fluent':
|
|
@@ -4042,7 +4073,7 @@ function getThemeStyle(theme) {
|
|
|
4042
4073
|
shapeFill: '#F3F2F1',
|
|
4043
4074
|
rectangleZoomFillColor: '#d3d3d3',
|
|
4044
4075
|
rectangleZoomFillOpacity: 0.5,
|
|
4045
|
-
rectangleZoomBorderColor:
|
|
4076
|
+
rectangleZoomBorderColor: '#009900'
|
|
4046
4077
|
};
|
|
4047
4078
|
break;
|
|
4048
4079
|
case 'fluentdark':
|
|
@@ -4070,7 +4101,7 @@ function getThemeStyle(theme) {
|
|
|
4070
4101
|
shapeFill: '#252423',
|
|
4071
4102
|
rectangleZoomFillColor: '#d3d3d3',
|
|
4072
4103
|
rectangleZoomFillOpacity: 0.5,
|
|
4073
|
-
rectangleZoomBorderColor:
|
|
4104
|
+
rectangleZoomBorderColor: '#009900'
|
|
4074
4105
|
};
|
|
4075
4106
|
break;
|
|
4076
4107
|
case 'material3':
|
|
@@ -4099,7 +4130,7 @@ function getThemeStyle(theme) {
|
|
|
4099
4130
|
shapeFill: '#E7E0EC',
|
|
4100
4131
|
rectangleZoomFillColor: '#6750A4',
|
|
4101
4132
|
rectangleZoomFillOpacity: 0.24,
|
|
4102
|
-
rectangleZoomBorderColor:
|
|
4133
|
+
rectangleZoomBorderColor: '#6750A4'
|
|
4103
4134
|
};
|
|
4104
4135
|
break;
|
|
4105
4136
|
case 'material3dark':
|
|
@@ -4128,7 +4159,7 @@ function getThemeStyle(theme) {
|
|
|
4128
4159
|
shapeFill: '#49454F',
|
|
4129
4160
|
rectangleZoomFillColor: '#D0BCFF',
|
|
4130
4161
|
rectangleZoomFillOpacity: 0.24,
|
|
4131
|
-
rectangleZoomBorderColor:
|
|
4162
|
+
rectangleZoomBorderColor: '#D0BCFF'
|
|
4132
4163
|
};
|
|
4133
4164
|
break;
|
|
4134
4165
|
default:
|
|
@@ -4153,7 +4184,7 @@ function getThemeStyle(theme) {
|
|
|
4153
4184
|
shapeFill: '#A6A6A6',
|
|
4154
4185
|
rectangleZoomFillColor: '#d3d3d3',
|
|
4155
4186
|
rectangleZoomFillOpacity: 0.5,
|
|
4156
|
-
rectangleZoomBorderColor:
|
|
4187
|
+
rectangleZoomBorderColor: '#009900'
|
|
4157
4188
|
};
|
|
4158
4189
|
break;
|
|
4159
4190
|
}
|
|
@@ -5282,7 +5313,7 @@ var MarkerBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
5282
5313
|
*/
|
|
5283
5314
|
var MarkerSettings = /** @__PURE__ @class */ (function (_super) {
|
|
5284
5315
|
__extends$2(MarkerSettings, _super);
|
|
5285
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5316
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
5286
5317
|
function MarkerSettings(parent, propName, defaultValue, isArray) {
|
|
5287
5318
|
return _super.call(this, parent, propName, defaultValue, isArray) || this;
|
|
5288
5319
|
}
|
|
@@ -5687,8 +5718,12 @@ var BingMap = /** @__PURE__ @class */ (function () {
|
|
|
5687
5718
|
* ColorMapping class
|
|
5688
5719
|
*/
|
|
5689
5720
|
var ColorMapping = /** @__PURE__ @class */ (function () {
|
|
5721
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5722
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
5690
5723
|
function ColorMapping(maps) {
|
|
5691
5724
|
}
|
|
5725
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5726
|
+
/* eslint-enable @typescript-eslint/no-empty-function */
|
|
5692
5727
|
/**
|
|
5693
5728
|
* To get color based on shape settings.
|
|
5694
5729
|
*
|
|
@@ -6117,7 +6152,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6117
6152
|
if (panel.mapObject.markerModule) {
|
|
6118
6153
|
panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
|
|
6119
6154
|
}
|
|
6120
|
-
panel.translateLayerElements(panel.layerObject
|
|
6155
|
+
panel.translateLayerElements(panel.layerObject);
|
|
6121
6156
|
panel.layerGroup.appendChild(panel.layerObject);
|
|
6122
6157
|
};
|
|
6123
6158
|
LayerPanel.prototype.processLayers = function (layer, layerIndex) {
|
|
@@ -6145,6 +6180,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6145
6180
|
cancel: false, name: layerRendering, index: layerIndex,
|
|
6146
6181
|
layer: layer, maps: this.mapObject, visible: layer.visible
|
|
6147
6182
|
};
|
|
6183
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6148
6184
|
this.mapObject.trigger('layerRendering', eventArgs, function (observedArgs) {
|
|
6149
6185
|
if (!eventArgs.cancel && eventArgs.visible) {
|
|
6150
6186
|
if (layer.layerType === 'OSM') {
|
|
@@ -6271,9 +6307,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6271
6307
|
}
|
|
6272
6308
|
this.rectBounds = null;
|
|
6273
6309
|
var shapeSettings = this.currentLayer.shapeSettings;
|
|
6274
|
-
var bubbleSettings = this.currentLayer.bubbleSettings;
|
|
6275
6310
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6276
|
-
Array.prototype.forEach.call(renderData, function (geometryData
|
|
6311
|
+
Array.prototype.forEach.call(renderData, function (geometryData) {
|
|
6277
6312
|
if (!isNullOrUndefined(geometryData['geometry']) || !isNullOrUndefined(geometryData['coordinates'])) {
|
|
6278
6313
|
var type = !isNullOrUndefined(geometryData['geometry']) ? geometryData['geometry']['type'] : geometryData['type'];
|
|
6279
6314
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -6480,7 +6515,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6480
6515
|
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
|
|
6481
6516
|
circleOptions = new CircleOption((shapeID + '_multiLine_' + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
|
|
6482
6517
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
6483
|
-
_this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData
|
|
6518
|
+
_this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData);
|
|
6484
6519
|
});
|
|
6485
6520
|
break;
|
|
6486
6521
|
case 'Path':
|
|
@@ -6490,7 +6525,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6490
6525
|
break;
|
|
6491
6526
|
}
|
|
6492
6527
|
if (!isNullOrUndefined(pathEle) && drawingType !== 'MultiPoint') {
|
|
6493
|
-
_this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData
|
|
6528
|
+
_this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData);
|
|
6494
6529
|
}
|
|
6495
6530
|
if (i === _this.currentLayer.layerData.length - 1) {
|
|
6496
6531
|
_this.layerFeatures(layerIndex, colors, renderData, labelTemplateEle);
|
|
@@ -6515,12 +6550,11 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6515
6550
|
* @param {Element} pathEle - Specifies the svg element.
|
|
6516
6551
|
* @param {string} drawingType - Specifies the data type.
|
|
6517
6552
|
* @param {any} currentShapeData - Specifies the layer of shapedata.
|
|
6518
|
-
* @param {number} index - Specifies the tab index.
|
|
6519
6553
|
* @returns {void}
|
|
6520
6554
|
*/
|
|
6521
6555
|
LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType,
|
|
6522
6556
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6523
|
-
currentShapeData
|
|
6557
|
+
currentShapeData) {
|
|
6524
6558
|
var property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
|
|
6525
6559
|
this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
|
|
6526
6560
|
var properties;
|
|
@@ -6564,7 +6598,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6564
6598
|
*
|
|
6565
6599
|
* @param {number} layerIndex - Specifies the layer index
|
|
6566
6600
|
* @param {string[]} colors - Specifies the colors
|
|
6567
|
-
* @param {
|
|
6601
|
+
* @param {any[]} renderData - Specifies the render data
|
|
6568
6602
|
* @param {HTMLElement} labelTemplateEle - Specifies the label template element
|
|
6569
6603
|
* @returns {void}
|
|
6570
6604
|
*/
|
|
@@ -6574,7 +6608,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6574
6608
|
var _this = this;
|
|
6575
6609
|
var bubbleG;
|
|
6576
6610
|
if (this.mapObject.polygonModule) {
|
|
6577
|
-
this.groupElements.push(this.mapObject.polygonModule.polygonRender(this.mapObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
|
|
6611
|
+
this.groupElements.push(this.mapObject.polygonModule.polygonRender(this.mapObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
|
|
6612
|
+
: this.currentFactor)));
|
|
6578
6613
|
}
|
|
6579
6614
|
if (this.currentLayer.bubbleSettings.length && this.mapObject.bubbleModule) {
|
|
6580
6615
|
var length_1 = this.currentLayer.bubbleSettings.length;
|
|
@@ -6588,7 +6623,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6588
6623
|
this_2.bubbleCalculation(bubble_1, range);
|
|
6589
6624
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6590
6625
|
var bubbleDataSource = bubble_1.dataSource;
|
|
6591
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6592
6626
|
this_2.mapObject.bubbleModule.bubbleCollection = [];
|
|
6593
6627
|
bubbleDataSource.map(function (bubbleData, i) {
|
|
6594
6628
|
_this.renderBubble(_this.currentLayer, bubbleData, colors[i % colors.length], range, j, i, bubbleG, layerIndex, bubble_1);
|
|
@@ -6626,7 +6660,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6626
6660
|
this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor) :
|
|
6627
6661
|
this.currentFactor), null);
|
|
6628
6662
|
}
|
|
6629
|
-
this.translateLayerElements(this.layerObject
|
|
6663
|
+
this.translateLayerElements(this.layerObject);
|
|
6630
6664
|
this.layerGroup.appendChild(this.layerObject);
|
|
6631
6665
|
};
|
|
6632
6666
|
/**
|
|
@@ -6675,6 +6709,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6675
6709
|
* @param {object} bubbleData - Specifies the bubble data
|
|
6676
6710
|
* @param {string} color - Specifies the color
|
|
6677
6711
|
* @param {number} range - Specifies the range
|
|
6712
|
+
* @param {number} range.min - Specifies the minimum range
|
|
6713
|
+
* @param {number} range.max - Specifies the maximum range
|
|
6678
6714
|
* @param {number} bubbleIndex - Specifies the bubble index
|
|
6679
6715
|
* @param {number} dataIndex - Specifies the data index
|
|
6680
6716
|
* @param {number} group - Specifies the group
|
|
@@ -6697,9 +6733,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6697
6733
|
* To get the shape color from color mapping module
|
|
6698
6734
|
*
|
|
6699
6735
|
* @param {LayerSettingsModel} layer - Specifies the layer
|
|
6700
|
-
* @param {
|
|
6736
|
+
* @param {any} shape - Specifies the shape
|
|
6701
6737
|
* @param {string} color - Specifies the color
|
|
6702
|
-
* @returns {
|
|
6738
|
+
* @returns {any} - Returns the object
|
|
6703
6739
|
*/
|
|
6704
6740
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6705
6741
|
LayerPanel.prototype.getShapeColorMapping = function (layer, shape, color) {
|
|
@@ -6725,7 +6761,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6725
6761
|
switch (type.toLowerCase()) {
|
|
6726
6762
|
case 'polygon':
|
|
6727
6763
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6728
|
-
newData = this.calculatePolygonBox(coordinates[0]
|
|
6764
|
+
newData = this.calculatePolygonBox(coordinates[0]);
|
|
6729
6765
|
if (newData.length > 0) {
|
|
6730
6766
|
newData['property'] = properties;
|
|
6731
6767
|
newData['type'] = type;
|
|
@@ -6739,7 +6775,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6739
6775
|
for (var i = 0; i < coordinates.length; i++) {
|
|
6740
6776
|
for (var j = 0; j < coordinates[i].length; j++) {
|
|
6741
6777
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6742
|
-
newData = this.calculatePolygonBox(coordinates[i][j]
|
|
6778
|
+
newData = this.calculatePolygonBox(coordinates[i][j]);
|
|
6743
6779
|
if (newData.length > 0) {
|
|
6744
6780
|
multiPolygonDatas.push(newData);
|
|
6745
6781
|
}
|
|
@@ -6883,7 +6919,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6883
6919
|
}
|
|
6884
6920
|
return (Math.min(verFactor, horFactor));
|
|
6885
6921
|
};
|
|
6886
|
-
LayerPanel.prototype.translateLayerElements = function (layerElement
|
|
6922
|
+
LayerPanel.prototype.translateLayerElements = function (layerElement) {
|
|
6887
6923
|
var childNode;
|
|
6888
6924
|
this.mapObject.translateType = 'layer';
|
|
6889
6925
|
if (!isNullOrUndefined(this.mapObject.baseMapRectBounds)) {
|
|
@@ -6944,7 +6980,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6944
6980
|
LayerPanel.prototype.calculateRectBounds = function (layerData) {
|
|
6945
6981
|
var _this = this;
|
|
6946
6982
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6947
|
-
Array.prototype.forEach.call(layerData, function (obj
|
|
6983
|
+
Array.prototype.forEach.call(layerData, function (obj) {
|
|
6948
6984
|
if (!isNullOrUndefined(obj['geometry']) || !isNullOrUndefined(obj['coordinates'])) {
|
|
6949
6985
|
var type = !isNullOrUndefined(obj['geometry']) ? obj['geometry']['type'] : obj['type'];
|
|
6950
6986
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -6956,13 +6992,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6956
6992
|
break;
|
|
6957
6993
|
case 'multipolygon':
|
|
6958
6994
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6959
|
-
coordinates.map(function (point
|
|
6995
|
+
coordinates.map(function (point) {
|
|
6960
6996
|
_this.calculateRectBox(point[0]);
|
|
6961
6997
|
});
|
|
6962
6998
|
break;
|
|
6963
6999
|
case 'multilinestring':
|
|
6964
7000
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6965
|
-
coordinates.map(function (multiPoint
|
|
7001
|
+
coordinates.map(function (multiPoint) {
|
|
6966
7002
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6967
7003
|
multiPoint.map(function (point, index) {
|
|
6968
7004
|
_this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
|
|
@@ -6989,7 +7025,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6989
7025
|
});
|
|
6990
7026
|
};
|
|
6991
7027
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6992
|
-
LayerPanel.prototype.calculatePolygonBox = function (coordinates
|
|
7028
|
+
LayerPanel.prototype.calculatePolygonBox = function (coordinates) {
|
|
6993
7029
|
var _this = this;
|
|
6994
7030
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6995
7031
|
var newData = [];
|
|
@@ -7452,10 +7488,14 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7452
7488
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7453
7489
|
this.map.renderReactTemplates();
|
|
7454
7490
|
};
|
|
7455
|
-
// eslint-disable-next-line valid-jsdoc
|
|
7456
7491
|
/**
|
|
7457
7492
|
* To create annotation elements
|
|
7458
7493
|
*
|
|
7494
|
+
* @param {HTMLElement} parentElement - Specifies the parent element in the map.
|
|
7495
|
+
* @param {Annotation} annotation - Specifies the options for customizing the annotation element in maps.
|
|
7496
|
+
* @param {number} annotationIndex - Specifies the index of the annotation.
|
|
7497
|
+
* @returns {void}
|
|
7498
|
+
*
|
|
7459
7499
|
* @private
|
|
7460
7500
|
*/
|
|
7461
7501
|
Annotations.prototype.createAnnotationTemplate = function (parentElement, annotation, annotationIndex) {
|
|
@@ -7467,7 +7507,6 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7467
7507
|
var map = this.map;
|
|
7468
7508
|
var templateElement;
|
|
7469
7509
|
var availSize = map.availableSize;
|
|
7470
|
-
var id = map.element.id + '_Annotation_' + annotationIndex;
|
|
7471
7510
|
var childElement = createElement('div', {
|
|
7472
7511
|
id: map.element.id + '_Annotation_' + annotationIndex
|
|
7473
7512
|
});
|
|
@@ -7476,6 +7515,7 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7476
7515
|
cancel: false, name: annotationRendering, content: annotation.content,
|
|
7477
7516
|
annotation: annotation
|
|
7478
7517
|
};
|
|
7518
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7479
7519
|
this.map.trigger(annotationRendering, argsData, function (annotationArgs) {
|
|
7480
7520
|
if (argsData.cancel) {
|
|
7481
7521
|
return;
|
|
@@ -7873,16 +7913,19 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7873
7913
|
}
|
|
7874
7914
|
});
|
|
7875
7915
|
};
|
|
7876
|
-
|
|
7916
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7877
7917
|
Maps.prototype.processAjaxRequest = function (layer, localAjax, type) {
|
|
7878
7918
|
var _this = this;
|
|
7879
7919
|
this.serverProcess['request']++;
|
|
7880
7920
|
var fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
|
|
7921
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7881
7922
|
fetchApiModule.onSuccess = function (args) {
|
|
7882
7923
|
if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
|
|
7883
7924
|
var reader_1 = new FileReader();
|
|
7925
|
+
//eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
7884
7926
|
var map_1 = _this;
|
|
7885
|
-
|
|
7927
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
7928
|
+
reader_1.onload = function () {
|
|
7886
7929
|
args = JSON.parse(reader_1.result.toString());
|
|
7887
7930
|
map_1.processResponseJsonData('Fetch', args, layer, type);
|
|
7888
7931
|
};
|
|
@@ -7904,13 +7947,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7904
7947
|
* @returns {void}
|
|
7905
7948
|
* @private
|
|
7906
7949
|
*/
|
|
7907
|
-
Maps.prototype.processResponseJsonData = function (processType,
|
|
7950
|
+
Maps.prototype.processResponseJsonData = function (processType,
|
|
7951
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7952
|
+
data, layer, dataType) {
|
|
7908
7953
|
this.serverProcess['response']++;
|
|
7909
7954
|
if (processType) {
|
|
7910
7955
|
if (dataType === 'ShapeData') {
|
|
7956
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7911
7957
|
layer.shapeData = (processType === 'DataManager') ? processResult(data) : data;
|
|
7912
7958
|
}
|
|
7913
7959
|
else {
|
|
7960
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7914
7961
|
layer.dataSource = (processType === 'DataManager') ? processResult(data) : data;
|
|
7915
7962
|
}
|
|
7916
7963
|
}
|
|
@@ -8049,12 +8096,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8049
8096
|
Maps.prototype.triggerZoomEvent = function () {
|
|
8050
8097
|
var loadedArgs;
|
|
8051
8098
|
var minMaxLatitudeLongitude = this.getMinMaxLatitudeLongitude();
|
|
8099
|
+
// eslint-disable-next-line prefer-const
|
|
8052
8100
|
loadedArgs = {
|
|
8053
8101
|
maps: this, isResized: this.isResize, minLatitude: minMaxLatitudeLongitude.minLatitude,
|
|
8054
8102
|
maxLatitude: minMaxLatitudeLongitude.maxLatitude, minLongitude: minMaxLatitudeLongitude.minLongitude,
|
|
8055
8103
|
maxLongitude: minMaxLatitudeLongitude.maxLongitude, cancel: false, name: 'Loaded'
|
|
8056
8104
|
};
|
|
8057
8105
|
this.trigger('loaded', loadedArgs);
|
|
8106
|
+
//eslint-enable @typescript-eslint/prefer-const
|
|
8058
8107
|
};
|
|
8059
8108
|
/**
|
|
8060
8109
|
* To apply color to the initial selected marker
|
|
@@ -8062,7 +8111,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8062
8111
|
* @param {SelectionSettingsModel} selectionSettings - Specifies the selection settings
|
|
8063
8112
|
* @param {Maps} map - Specifies the instance of the maps
|
|
8064
8113
|
* @param {Element} targetElement - Specifies the target element
|
|
8065
|
-
* @param {
|
|
8114
|
+
* @param {object} data - Specifies the data
|
|
8066
8115
|
* @returns {void}
|
|
8067
8116
|
* @private
|
|
8068
8117
|
*/
|
|
@@ -8113,6 +8162,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8113
8162
|
var selectionSettings = markerSettings.selectionSettings;
|
|
8114
8163
|
if (selectionSettings.enable) {
|
|
8115
8164
|
for (var i = 0; i < markerSettings.dataSource['length']; i++) {
|
|
8165
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8116
8166
|
var data = markerSettings.dataSource[i];
|
|
8117
8167
|
if (data['latitude'] === latitude && data['longitude'] === longitude) {
|
|
8118
8168
|
var targetId = this.element.id + '_' + 'LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex +
|
|
@@ -8234,7 +8284,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8234
8284
|
var mapsElement = document.getElementById(this.element.id);
|
|
8235
8285
|
if (!isNullOrUndefined(mapsElement)) {
|
|
8236
8286
|
var element = mapsElement.getBoundingClientRect();
|
|
8237
|
-
var minPosition = this.isTileMap ?
|
|
8287
|
+
var minPosition = this.isTileMap ?
|
|
8288
|
+
this.pointToLatLong((this.mapAreaRect.x - this.margin.left), -this.mapAreaRect.y) :
|
|
8289
|
+
this.getGeoLocation(0, (this.mapAreaRect.x + element.left), this.mapAreaRect.y);
|
|
8238
8290
|
var maxPosition = this.isTileMap ? this.pointToLatLong(this.mapAreaRect.width, (this.mapAreaRect.height - this.mapAreaRect.y)) :
|
|
8239
8291
|
this.getGeoLocation(0, (this.mapAreaRect.x + element.left + this.mapAreaRect.width), (this.mapAreaRect.y + this.mapAreaRect.height));
|
|
8240
8292
|
var MinMaxLatitudeLongitude = {
|
|
@@ -8260,7 +8312,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8260
8312
|
var templateElements = document.getElementsByClassName(this.element.id + '_template');
|
|
8261
8313
|
if (!isNullOrUndefined(templateElements) && templateElements.length > 0 &&
|
|
8262
8314
|
getElementByID(this.element.id + '_Layer_Collections') && !this.isTileMap) {
|
|
8263
|
-
Array.prototype.forEach.call(templateElements, function (templateGroupEle
|
|
8315
|
+
Array.prototype.forEach.call(templateElements, function (templateGroupEle) {
|
|
8264
8316
|
var offSetLetValue = 0;
|
|
8265
8317
|
var offSetTopValue = 0;
|
|
8266
8318
|
if (!isNullOrUndefined(templateGroupEle) && templateGroupEle.childElementCount > 0) {
|
|
@@ -8272,9 +8324,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8272
8324
|
offSetTopValue = _this.isTileMap ? 0 : (layerOffset.top < elementOffset.top) ?
|
|
8273
8325
|
-(Math.abs(elementOffset.top - layerOffset.top)) : Math.abs(elementOffset.top - layerOffset.top);
|
|
8274
8326
|
}
|
|
8275
|
-
Array.prototype.forEach.call(templateGroupEle.childNodes, function (currentTemplate
|
|
8327
|
+
Array.prototype.forEach.call(templateGroupEle.childNodes, function (currentTemplate) {
|
|
8276
8328
|
if (currentTemplate.id.indexOf('Marker') !== -1) {
|
|
8277
|
-
if (currentTemplate.style.visibility
|
|
8329
|
+
if (currentTemplate.style.visibility !== 'hidden') {
|
|
8278
8330
|
var elementOffset_1 = getElementByID(currentTemplate.id).getBoundingClientRect();
|
|
8279
8331
|
currentTemplate.style.left = parseFloat(currentTemplate.style.left) - (_this.isTileMap ? 0 : elementOffset_1.width / 2) + 'px';
|
|
8280
8332
|
currentTemplate.style.top = parseFloat(currentTemplate.style.top) - (_this.isTileMap ? 0 : elementOffset_1.height / 2) + 'px';
|
|
@@ -8333,6 +8385,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8333
8385
|
Maps.prototype.findBaseAndSubLayers = function () {
|
|
8334
8386
|
var _this = this;
|
|
8335
8387
|
var baseIndex = this.baseLayerIndex;
|
|
8388
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8336
8389
|
var mainLayers = [];
|
|
8337
8390
|
var subLayers = [];
|
|
8338
8391
|
this.layersCollection = [];
|
|
@@ -8507,6 +8560,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8507
8560
|
* @returns {void}
|
|
8508
8561
|
* @private
|
|
8509
8562
|
*/
|
|
8563
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8510
8564
|
Maps.prototype.mouseLeaveOnMap = function (e) {
|
|
8511
8565
|
if (document.getElementsByClassName('highlightMapStyle').length > 0 && this.legendModule) {
|
|
8512
8566
|
this.legendModule.removeShapeHighlightCollection();
|
|
@@ -8532,7 +8586,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8532
8586
|
Maps.prototype.keyboardHighlightSelection = function (id, key) {
|
|
8533
8587
|
var layerIndex = parseInt(id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
8534
8588
|
var shapeIndex = parseInt(id.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
8535
|
-
//
|
|
8589
|
+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8536
8590
|
var shapeData = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
|
|
8537
8591
|
this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
|
|
8538
8592
|
var dataIndex = parseInt(id.split('_dataIndex_')[1].split('_')[0], 10);
|
|
@@ -8662,11 +8716,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8662
8716
|
};
|
|
8663
8717
|
if (this.onclick) {
|
|
8664
8718
|
eventArgs_1.name = onclick;
|
|
8719
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8665
8720
|
this.trigger('onclick', eventArgs_1, function (mouseArgs) {
|
|
8666
8721
|
_this.clickHandler(e, eventArgs_1, targetEle);
|
|
8667
8722
|
});
|
|
8668
8723
|
}
|
|
8669
8724
|
else {
|
|
8725
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8670
8726
|
this.trigger('click', eventArgs_1, function (mouseArgs) {
|
|
8671
8727
|
_this.clickHandler(e, eventArgs_1, targetEle);
|
|
8672
8728
|
});
|
|
@@ -8711,7 +8767,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8711
8767
|
};
|
|
8712
8768
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8713
8769
|
Maps.prototype.getMarkerClickLocation = function (pageX, pageY, x, y, marker$$1, isDragEnd) {
|
|
8714
|
-
document.getElementById(this.element.id +
|
|
8770
|
+
document.getElementById(this.element.id + '_svg').style.cursor = 'grabbing';
|
|
8715
8771
|
var targetElement = getElement(marker$$1.targetId);
|
|
8716
8772
|
var latLongValue = this.getClickLocation(marker$$1.targetId, pageX, pageY, targetElement, x, y);
|
|
8717
8773
|
var location = (this.isTileMap) ? convertTileLatLongToPoint(new MapLocation(latLongValue.longitude, latLongValue.latitude), this.tileZoomLevel, this.tileTranslatePoint, true) : convertGeoToPoint(latLongValue.latitude, latLongValue.longitude, this.mapLayerPanel.currentFactor, this.layersCollection[marker$$1.layerIndex], this);
|
|
@@ -8730,9 +8786,24 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8730
8786
|
}
|
|
8731
8787
|
return latLongValue;
|
|
8732
8788
|
};
|
|
8733
|
-
/**
|
|
8789
|
+
/**
|
|
8790
|
+
* Gets the location of the mouse click
|
|
8791
|
+
*
|
|
8792
|
+
* @param {string} targetId - Specifies the ID for the target.
|
|
8793
|
+
* @param {number} pageX - Defines the page X position.
|
|
8794
|
+
* @param {number} pageY - Defines the page Y position.
|
|
8795
|
+
* @param {HTMLElement} targetElement - Specifies the target element on the event.
|
|
8796
|
+
* @param {number} x - Defines the x position in pixel.
|
|
8797
|
+
* @param {number} y - Defines the y position in pixel.
|
|
8798
|
+
* @param {string} type - Specifies the type.
|
|
8799
|
+
* @returns {GeoPosition} - Returns the position of the event
|
|
8800
|
+
*
|
|
8801
|
+
* @private
|
|
8802
|
+
*
|
|
8803
|
+
*/
|
|
8734
8804
|
Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y, type) {
|
|
8735
8805
|
var layerIndex = 0;
|
|
8806
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8736
8807
|
var latLongValue;
|
|
8737
8808
|
if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap && (!isNullOrUndefined(type) ||
|
|
8738
8809
|
((parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
|
|
@@ -8740,6 +8811,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8740
8811
|
layerIndex = parseFloat(targetId.split('_LayerIndex_')[1].split('_')[0]);
|
|
8741
8812
|
if (this.layers[layerIndex].geometryType === 'Normal') {
|
|
8742
8813
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
8814
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8743
8815
|
var immediateParent = targetElement.parentElement;
|
|
8744
8816
|
var parentElement = immediateParent.id.indexOf('_Point_Group') > -1 || immediateParent.id.indexOf('_LineString_Group') > -1
|
|
8745
8817
|
|| immediateParent.id.indexOf('_MultiLineString_Group') > -1 || immediateParent.id.indexOf('_Polygon_Group') > -1 ?
|
|
@@ -8753,9 +8825,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8753
8825
|
longitude: Math.abs((location_2.x / zoomScaleValue) + this.baseMapBounds.longitude.min)
|
|
8754
8826
|
};
|
|
8755
8827
|
if (this.baseMapBounds.longitude.min < 0 && minLongitude > location_2.x) {
|
|
8828
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8756
8829
|
latLongValue.longitude = -latLongValue.longitude;
|
|
8757
8830
|
}
|
|
8758
8831
|
if (this.baseMapBounds.latitude.min < 0 && minLatitude > location_2.y) {
|
|
8832
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8759
8833
|
latLongValue.latitude = -latLongValue.latitude;
|
|
8760
8834
|
}
|
|
8761
8835
|
}
|
|
@@ -8763,6 +8837,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8763
8837
|
var markerIndex = parseInt(targetId.split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
8764
8838
|
var dataIndex = parseInt(targetId.split('_dataIndex_')[1].split('_')[0], 10);
|
|
8765
8839
|
if (!isNaN(markerIndex) && !isNaN(dataIndex)) {
|
|
8840
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8766
8841
|
var dataObject = this.layers[layerIndex].markerSettings[markerIndex].dataSource[dataIndex];
|
|
8767
8842
|
latLongValue = { latitude: dataObject['latitude'], longitude: dataObject.longitude };
|
|
8768
8843
|
}
|
|
@@ -8777,13 +8852,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8777
8852
|
var minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * this.mapLayerPanel.currentFactor);
|
|
8778
8853
|
var minLatitude = Math.abs(this.baseMapBounds.latitude.max * this.mapLayerPanel.currentFactor);
|
|
8779
8854
|
latLongValue = {
|
|
8780
|
-
latitude: Math.abs(this.baseMapBounds.latitude.max
|
|
8781
|
-
|
|
8855
|
+
latitude: Math.abs(this.baseMapBounds.latitude.max
|
|
8856
|
+
- (location_3.y / (this.mapLayerPanel.currentFactor * this.scale))),
|
|
8857
|
+
longitude: Math.abs((location_3.x / (this.mapLayerPanel.currentFactor * this.scale))
|
|
8858
|
+
+ this.baseMapBounds.longitude.min)
|
|
8782
8859
|
};
|
|
8783
8860
|
if (this.baseMapBounds.longitude.min < 0 && minLongitude > location_3.x) {
|
|
8861
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8784
8862
|
latLongValue.longitude = -latLongValue.longitude;
|
|
8785
8863
|
}
|
|
8786
8864
|
if (this.baseMapBounds.latitude.min < 0 && minLatitude > location_3.y) {
|
|
8865
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8787
8866
|
latLongValue.latitude = -latLongValue.latitude;
|
|
8788
8867
|
}
|
|
8789
8868
|
}
|
|
@@ -8819,25 +8898,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8819
8898
|
* @private
|
|
8820
8899
|
*/
|
|
8821
8900
|
Maps.prototype.mouseEndOnMap = function (e) {
|
|
8822
|
-
var targetEle = e.target;
|
|
8823
|
-
var targetId = targetEle.id;
|
|
8824
8901
|
var pageX;
|
|
8825
|
-
var latitude = null;
|
|
8826
|
-
var longitude = null;
|
|
8827
8902
|
var pageY;
|
|
8828
|
-
var target;
|
|
8829
8903
|
var touchArg;
|
|
8830
8904
|
var layerX = 0;
|
|
8831
8905
|
var layerY = 0;
|
|
8832
|
-
var rect = this.element.getBoundingClientRect();
|
|
8833
|
-
var element = e.target;
|
|
8834
8906
|
if (e.type.indexOf('touch') !== -1) {
|
|
8835
8907
|
this.isTouch = true;
|
|
8836
8908
|
touchArg = e;
|
|
8837
8909
|
layerX = pageX = touchArg.changedTouches[0].pageX;
|
|
8838
8910
|
pageY = touchArg.changedTouches[0].pageY;
|
|
8839
8911
|
layerY = pageY - (this.isTileMap ? 10 : 0);
|
|
8840
|
-
target = touchArg.target;
|
|
8841
8912
|
this.mouseClickEvent = { x: pageX, y: pageY };
|
|
8842
8913
|
}
|
|
8843
8914
|
else {
|
|
@@ -8846,19 +8917,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8846
8917
|
pageY = e.pageY;
|
|
8847
8918
|
layerX = e['layerX'];
|
|
8848
8919
|
layerY = e['layerY'] - (this.isTileMap ? 10 : 0);
|
|
8849
|
-
target = e.target;
|
|
8850
8920
|
}
|
|
8851
8921
|
if (this.isTileMap) {
|
|
8852
8922
|
this.removeTileMap();
|
|
8853
8923
|
}
|
|
8854
8924
|
if (this.isTouch) {
|
|
8855
|
-
if (targetEle.id.indexOf('_ToolBar') === -1) {
|
|
8856
|
-
var latLongValue = this.getClickLocation(targetId, pageX, pageY, targetEle, pageX, pageY);
|
|
8857
|
-
if (!isNullOrUndefined(latLongValue)) {
|
|
8858
|
-
latitude = latLongValue.latitude;
|
|
8859
|
-
longitude = latLongValue.longitude;
|
|
8860
|
-
}
|
|
8861
|
-
}
|
|
8862
8925
|
this.titleTooltip(e, pageX, pageY, true);
|
|
8863
8926
|
if (!isNullOrUndefined(this.legendModule)) {
|
|
8864
8927
|
this.legendTooltip(e, e.pageX, e.pageY, true);
|
|
@@ -8869,12 +8932,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8869
8932
|
e.preventDefault();
|
|
8870
8933
|
}
|
|
8871
8934
|
if (!isNullOrUndefined(this.markerDragArgument)) {
|
|
8935
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8872
8936
|
var marker$$1 = this.markerDragArgument;
|
|
8873
8937
|
this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
|
|
8874
8938
|
this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
|
|
8875
8939
|
var latLongValue = this.getMarkerClickLocation(pageX, pageY, layerX, layerY, this.markerDragArgument, true);
|
|
8876
8940
|
var markerObject = this.layers[marker$$1.layerIndex].markerSettings[marker$$1.markerIndex];
|
|
8877
|
-
document.getElementById(this.element.id +
|
|
8941
|
+
document.getElementById(this.element.id + '_svg').style.cursor = markerObject.enableDrag ? 'pointer' : 'grabbing';
|
|
8878
8942
|
var dragEventArgs = {
|
|
8879
8943
|
name: 'markerDragEnd', x: pageX, y: pageY,
|
|
8880
8944
|
latitude: latLongValue.latitude, longitude: latLongValue.longitude,
|
|
@@ -8901,7 +8965,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8901
8965
|
this.trigger('markerDragEnd', dragEventArgs);
|
|
8902
8966
|
}
|
|
8903
8967
|
else {
|
|
8904
|
-
document.getElementById(this.element.id +
|
|
8968
|
+
document.getElementById(this.element.id + '_svg').style.cursor = 'auto';
|
|
8905
8969
|
}
|
|
8906
8970
|
if (this.zoomModule && this.isDevice) {
|
|
8907
8971
|
this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.scale, this.element.id + '_Zooming_');
|
|
@@ -8918,13 +8982,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8918
8982
|
*/
|
|
8919
8983
|
Maps.prototype.mouseDownOnMap = function (e) {
|
|
8920
8984
|
this.mouseDownEvent = { x: e.x, y: e.y };
|
|
8985
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8921
8986
|
if (e.type.indexOf('touch') !== -1 && e.changedTouches) {
|
|
8987
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8922
8988
|
this.mouseDownEvent = { x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY };
|
|
8923
8989
|
}
|
|
8924
8990
|
if (this.isDevice && !isNullOrUndefined(this.mapsTooltipModule)) {
|
|
8925
8991
|
this.mapsTooltipModule.renderTooltip(e);
|
|
8926
8992
|
}
|
|
8927
|
-
var rect = this.element.getBoundingClientRect();
|
|
8928
8993
|
var element = e.target;
|
|
8929
8994
|
this.markerDragId = element.id;
|
|
8930
8995
|
var animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
|
|
@@ -8955,7 +9020,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8955
9020
|
Maps.prototype.mergeCluster = function () {
|
|
8956
9021
|
if (this.markerModule && (this.markerModule.sameMarkerData.length > 0) &&
|
|
8957
9022
|
(this.zoomModule ? this.zoomModule.isSingleClick : true)) {
|
|
8958
|
-
mergeSeparateCluster(this.markerModule.sameMarkerData, this
|
|
9023
|
+
mergeSeparateCluster(this.markerModule.sameMarkerData, this);
|
|
8959
9024
|
this.markerModule.sameMarkerData = [];
|
|
8960
9025
|
}
|
|
8961
9026
|
};
|
|
@@ -8996,6 +9061,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8996
9061
|
var targetElement = e.target;
|
|
8997
9062
|
var targetId = targetElement.id;
|
|
8998
9063
|
var layerIndex = 0;
|
|
9064
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8999
9065
|
var latLongValue;
|
|
9000
9066
|
var latitude = null;
|
|
9001
9067
|
var longitude = null;
|
|
@@ -9041,8 +9107,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9041
9107
|
if (this.bubbleModule) {
|
|
9042
9108
|
this.bubbleModule.bubbleMove(e);
|
|
9043
9109
|
}
|
|
9044
|
-
if (target.id.indexOf('MarkerIndex')
|
|
9045
|
-
document.getElementById(this.element.id +
|
|
9110
|
+
if (target.id.indexOf('MarkerIndex') === -1) {
|
|
9111
|
+
document.getElementById(this.element.id + '_svg').style.cursor = 'auto';
|
|
9046
9112
|
}
|
|
9047
9113
|
this.onMouseMove(e);
|
|
9048
9114
|
this.notify(Browser.touchMoveEvent, e);
|
|
@@ -9062,7 +9128,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9062
9128
|
var touches = null;
|
|
9063
9129
|
var layerX = 0;
|
|
9064
9130
|
var layerY = 0;
|
|
9065
|
-
if (e.type.indexOf('touch')
|
|
9131
|
+
if (e.type.indexOf('touch') === -1) {
|
|
9066
9132
|
pageX = e.pageX;
|
|
9067
9133
|
pageY = e.pageY;
|
|
9068
9134
|
layerX = e['layerX'];
|
|
@@ -9078,6 +9144,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9078
9144
|
layerY = pageY = touches[0].clientY - (this.isTileMap ? 10 : 0);
|
|
9079
9145
|
}
|
|
9080
9146
|
if (!isNullOrUndefined(this.markerDragArgument)) {
|
|
9147
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9081
9148
|
var marker$$1 = this.markerDragArgument;
|
|
9082
9149
|
this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
|
|
9083
9150
|
this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
|
|
@@ -9093,6 +9160,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9093
9160
|
var legendText;
|
|
9094
9161
|
var page = this.legendModule.currentPage;
|
|
9095
9162
|
var legendIndex = event.target.id.split('_Index_')[1];
|
|
9163
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9096
9164
|
var collection;
|
|
9097
9165
|
page = this.legendModule.totalPages.length <= this.legendModule.currentPage
|
|
9098
9166
|
? this.legendModule.totalPages.length - 1 : this.legendModule.currentPage < 0 ?
|
|
@@ -9135,6 +9203,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9135
9203
|
*
|
|
9136
9204
|
* @param e - Specifies the arguments of window resize event.
|
|
9137
9205
|
*/
|
|
9206
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9138
9207
|
Maps.prototype.mapsOnResize = function (e) {
|
|
9139
9208
|
var _this = this;
|
|
9140
9209
|
if (!this.isDestroyed && !this.isExportInitialTileMap) {
|
|
@@ -9169,6 +9238,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9169
9238
|
* This method is used to zoom the map by specifying the center position.
|
|
9170
9239
|
*
|
|
9171
9240
|
* @param {number} centerPosition - Specifies the location of the maps to be zoomed as geographical coordinates.
|
|
9241
|
+
* @param {number} centerPosition.longitude - Specifies the longitude of the location to be zoomed.
|
|
9242
|
+
* @param {number} centerPosition.latitude - Specifies the latitude of the location to be zoomed.
|
|
9172
9243
|
* @param {number} zoomFactor - Specifies the zoom factor for the maps.
|
|
9173
9244
|
* @returns {void}
|
|
9174
9245
|
*/
|
|
@@ -9317,9 +9388,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9317
9388
|
var dataIndex = void 0;
|
|
9318
9389
|
var shapeIndex = void 0;
|
|
9319
9390
|
var indexValue = void 0;
|
|
9391
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9320
9392
|
var shapeDataValue = void 0;
|
|
9321
9393
|
var data = void 0;
|
|
9322
9394
|
var shapeData = this.layers[layerIndex].shapeData['features'];
|
|
9395
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
9323
9396
|
for (var i = 0; i < shapeData.length; i++) {
|
|
9324
9397
|
for (var j = 0; j < popertyNameArray.length; j++) {
|
|
9325
9398
|
var propertyName_1 = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
|
|
@@ -9329,7 +9402,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9329
9402
|
var k = void 0;
|
|
9330
9403
|
if (propertyName_1 === shapeName) {
|
|
9331
9404
|
if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
|
|
9332
|
-
k = checkShapeDataFields(
|
|
9405
|
+
k = checkShapeDataFields(
|
|
9406
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9407
|
+
this.layers[layerIndex].dataSource, shapeData[i]['properties'], this.layers[layerIndex].shapeDataPath, this.layers[layerIndex].shapePropertyPath, this.layers[layerIndex]);
|
|
9333
9408
|
}
|
|
9334
9409
|
var baseLayer = this.layers[layerIndex];
|
|
9335
9410
|
if (this.baseLayerIndex >= 0 && baseLayer.isBaseLayer) {
|
|
@@ -9611,11 +9686,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9611
9686
|
var isMarker = false;
|
|
9612
9687
|
var isLayer = false;
|
|
9613
9688
|
var isStaticMapType = false;
|
|
9614
|
-
var layerEle = void 0;
|
|
9615
|
-
if (newProp['layers']) {
|
|
9616
|
-
var newLayerLength = Object.keys(newProp['layers']).length;
|
|
9617
|
-
layerEle = document.getElementById(this.element.id + '_LayerIndex_' + (newLayerLength - 1));
|
|
9618
|
-
}
|
|
9619
9689
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
9620
9690
|
var prop = _a[_i];
|
|
9621
9691
|
switch (prop) {
|
|
@@ -9882,6 +9952,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9882
9952
|
};
|
|
9883
9953
|
/**
|
|
9884
9954
|
* To find marker visibility
|
|
9955
|
+
*
|
|
9956
|
+
* @returns {boolean} - Returns whether the bubble is visible or not.
|
|
9885
9957
|
*/
|
|
9886
9958
|
Maps.prototype.isBubbleVisible = function () {
|
|
9887
9959
|
var isVisible = false;
|
|
@@ -9939,12 +10011,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9939
10011
|
allowDownload = true;
|
|
9940
10012
|
}
|
|
9941
10013
|
if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
|
|
9942
|
-
|
|
10014
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10015
|
+
return new Promise(function (resolve) {
|
|
9943
10016
|
resolve(_this.imageExportModule.export(_this, type, fileName, allowDownload));
|
|
9944
10017
|
});
|
|
9945
10018
|
}
|
|
9946
10019
|
else if ((this.allowPdfExport) && (this.pdfExportModule)) {
|
|
9947
|
-
|
|
10020
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10021
|
+
return new Promise(function (resolve) {
|
|
9948
10022
|
resolve(_this.pdfExportModule.export(_this, type, fileName, allowDownload, orientation));
|
|
9949
10023
|
});
|
|
9950
10024
|
}
|
|
@@ -9960,10 +10034,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9960
10034
|
Maps.prototype.getBingUrlTemplate = function (url) {
|
|
9961
10035
|
var promise;
|
|
9962
10036
|
if (!this.isDestroyed) {
|
|
9963
|
-
|
|
10037
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10038
|
+
promise = new Promise(function (resolve) {
|
|
9964
10039
|
var fetchApi = new Fetch({
|
|
9965
10040
|
url: url
|
|
9966
|
-
});
|
|
10041
|
+
}); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9967
10042
|
fetchApi.onSuccess = function (json) {
|
|
9968
10043
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9969
10044
|
var resource = json['resourceSets'][0]['resources'][0];
|
|
@@ -9983,7 +10058,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9983
10058
|
* @param {boolean} istooltipVisible - Specifies whether the tooltip is visible or not.
|
|
9984
10059
|
* @param {boolean} isSelection - Specifies whether the shape is selectd or not.
|
|
9985
10060
|
* @param {boolean} isHighlight - Specfies whether the shape is highlighted or not.
|
|
9986
|
-
* @returns {
|
|
10061
|
+
* @returns {object} - Returns the boolean values in object.
|
|
9987
10062
|
*/
|
|
9988
10063
|
Maps.prototype.findVisibleLayers = function (layers, isLayerVisible, isBubblevisible, istooltipVisible, isSelection, isHighlight) {
|
|
9989
10064
|
if (isLayerVisible === void 0) { isLayerVisible = false; }
|
|
@@ -10005,8 +10080,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10005
10080
|
for (var _a = 0, navigationLine_1 = navigationLine; _a < navigationLine_1.length; _a++) {
|
|
10006
10081
|
var navigation = navigationLine_1[_a];
|
|
10007
10082
|
if (navigation.visible) {
|
|
10008
|
-
isSelection = (!isNullOrUndefined(navigation.highlightSettings) &&
|
|
10009
|
-
|
|
10083
|
+
isSelection = (!isNullOrUndefined(navigation.highlightSettings) &&
|
|
10084
|
+
navigation.highlightSettings.enable) || isSelection;
|
|
10085
|
+
isHighlight = (!isNullOrUndefined(navigation.selectionSettings) &&
|
|
10086
|
+
navigation.selectionSettings.enable) || isHighlight;
|
|
10010
10087
|
}
|
|
10011
10088
|
}
|
|
10012
10089
|
for (var _b = 0, _c = polygonSetting.polygons; _b < _c.length; _b++) {
|
|
@@ -10068,6 +10145,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10068
10145
|
var pageX = x - (isNullOrUndefined(this.markerDragArgument) ? container.offsetLeft : 0);
|
|
10069
10146
|
var pageY = y - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop : 0);
|
|
10070
10147
|
var currentLayer = this.layersCollection[layerIndex];
|
|
10148
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10071
10149
|
var translate = getTranslate(this, currentLayer, false);
|
|
10072
10150
|
var translatePoint = translate['location'];
|
|
10073
10151
|
var translatePointX = translatePoint.x * this.scale;
|
|
@@ -10097,6 +10175,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10097
10175
|
if (!this.isDestroyed) {
|
|
10098
10176
|
var container = document.getElementById(this.element.id);
|
|
10099
10177
|
var ele = document.getElementById(this.element.id + '_tile_parent');
|
|
10178
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10100
10179
|
var latLong = this.pointToLatLong(x + this.mapAreaRect.x - (ele.offsetLeft - (isNullOrUndefined(this.markerDragArgument) ? container.offsetLeft : 0)), y + this.mapAreaRect.y - (ele.offsetTop - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop : 0)));
|
|
10101
10180
|
latitude = latLong['latitude'];
|
|
10102
10181
|
longitude = latLong['longitude'];
|
|
@@ -10311,21 +10390,33 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
10311
10390
|
function Bubble(maps) {
|
|
10312
10391
|
/**
|
|
10313
10392
|
* Bubble Id for current layer
|
|
10393
|
+
*
|
|
10314
10394
|
* @private
|
|
10315
10395
|
*/
|
|
10316
10396
|
this.id = '';
|
|
10317
10397
|
this.maps = maps;
|
|
10318
10398
|
this.bubbleCollection = [];
|
|
10319
10399
|
}
|
|
10320
|
-
// eslint-disable-next-line valid-jsdoc
|
|
10321
10400
|
/**
|
|
10322
10401
|
* To render bubble
|
|
10323
10402
|
*
|
|
10403
|
+
* @param {BubbleSettingsModel} bubbleSettings - Specifies the bubble data to be rendered
|
|
10404
|
+
* @param {object} shapeData - Specifies the data about the shape
|
|
10405
|
+
* @param {string} color - Specifies the color of the bubble
|
|
10406
|
+
* @param {number} range - Specifies the range of the bubble
|
|
10407
|
+
* @param {number} range.min - Specifies the minimum range of the bubble
|
|
10408
|
+
* @param {number} range.max - Specifies the maximum range of the bubble
|
|
10409
|
+
* @param {number} bubbleIndex - Specifies the index of the bubble
|
|
10410
|
+
* @param {number} dataIndex - Specifies the index of the data
|
|
10411
|
+
* @param {number} layerIndex - Specifies the index of the layer
|
|
10412
|
+
* @param {LayerSettings} layer - Specifies the layer data
|
|
10413
|
+
* @param {Element} group - Specifies the element group
|
|
10414
|
+
* @param {string} bubbleID - Specifies the ID of the bubble
|
|
10415
|
+
* @returns {void}
|
|
10416
|
+
*
|
|
10324
10417
|
* @private
|
|
10325
10418
|
*/
|
|
10326
|
-
Bubble.prototype.renderBubble = function (
|
|
10327
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10328
|
-
bubbleSettings, shapeData, color, range, bubbleIndex, dataIndex, layerIndex, layer, group, bubbleID) {
|
|
10419
|
+
Bubble.prototype.renderBubble = function (bubbleSettings, shapeData, color, range, bubbleIndex, dataIndex, layerIndex, layer, group, bubbleID) {
|
|
10329
10420
|
var _this = this;
|
|
10330
10421
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10331
10422
|
var layerData = layer.layerData;
|
|
@@ -10425,6 +10516,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
10425
10516
|
return;
|
|
10426
10517
|
}
|
|
10427
10518
|
}
|
|
10519
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10428
10520
|
this.maps.trigger('bubbleRendering', eventArgs, function (bubbleArgs) {
|
|
10429
10521
|
if (eventArgs.cancel) {
|
|
10430
10522
|
return;
|
|
@@ -10463,7 +10555,9 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
10463
10555
|
var bubbleDataSource = bubbleSettings.dataSource;
|
|
10464
10556
|
var scale = translate['scale'];
|
|
10465
10557
|
var transPoint = translate['location'];
|
|
10466
|
-
var position = new MapLocation((_this.maps.isTileMap ? ((eventArgs.cx + _this.maps.translatePoint.x) * _this.maps.tileZoomLevel)
|
|
10558
|
+
var position = new MapLocation((_this.maps.isTileMap ? ((eventArgs.cx + _this.maps.translatePoint.x) * _this.maps.tileZoomLevel)
|
|
10559
|
+
: ((eventArgs.cx + transPoint.x) * scale)), (_this.maps.isTileMap ? ((eventArgs.cy + _this.maps.translatePoint.y) * _this.maps.tileZoomLevel)
|
|
10560
|
+
: ((eventArgs.cy + transPoint.y) * scale)));
|
|
10467
10561
|
bubbleElement.setAttribute('transform', 'translate( ' + (position.x) + ' ' + (position.y) + ' )');
|
|
10468
10562
|
var bubble = (bubbleDataSource.length - 1) === dataIndex ? 'bubble' : null;
|
|
10469
10563
|
if (bubbleSettings.bubbleType === 'Square') {
|
|
@@ -10638,6 +10732,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10638
10732
|
border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
|
|
10639
10733
|
shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
|
|
10640
10734
|
};
|
|
10735
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10641
10736
|
maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
10642
10737
|
eventArgs = markerColorChoose(eventArgs, data);
|
|
10643
10738
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
@@ -10861,6 +10956,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10861
10956
|
};
|
|
10862
10957
|
/**
|
|
10863
10958
|
* To check and trigger marker click event
|
|
10959
|
+
*
|
|
10864
10960
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
10865
10961
|
* @returns {void}
|
|
10866
10962
|
* @private
|
|
@@ -10881,7 +10977,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10881
10977
|
return;
|
|
10882
10978
|
}
|
|
10883
10979
|
if (options.marker.enableDrag) {
|
|
10884
|
-
document.getElementById(this.maps.element.id +
|
|
10980
|
+
document.getElementById(this.maps.element.id + '_svg').style.cursor = 'grabbing';
|
|
10885
10981
|
}
|
|
10886
10982
|
var eventArgs = {
|
|
10887
10983
|
cancel: false, name: markerClick, data: options.data, maps: this.maps,
|
|
@@ -10898,7 +10994,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10898
10994
|
var dataIndex_1 = parseInt(target.split('_dataIndex_')[1].split('_')[0], 10);
|
|
10899
10995
|
var marker_1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
|
|
10900
10996
|
if (this.sameMarkerData.length > 0) {
|
|
10901
|
-
isCluster = (this.sameMarkerData[0].data.filter(function (el) { return (el['index']
|
|
10997
|
+
isCluster = (this.sameMarkerData[0].data.filter(function (el) { return (el['index'] === dataIndex_1); })).length > 0 &&
|
|
10902
10998
|
this.sameMarkerData[0].layerIndex === layerIndex && this.sameMarkerData[0].markerIndex === markerIndex;
|
|
10903
10999
|
}
|
|
10904
11000
|
if (!isCluster) {
|
|
@@ -10913,7 +11009,8 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10913
11009
|
targetId: target, x: e.clientX, y: e.clientY,
|
|
10914
11010
|
latitude: options.data['latitude'] || options.data['Latitude'],
|
|
10915
11011
|
longitude: options.data['longitude'] || options.data['Longitude'],
|
|
10916
|
-
shape: isNullOrUndefined(marker_1.shapeValuePath) ? marker_1.shape
|
|
11012
|
+
shape: isNullOrUndefined(marker_1.shapeValuePath) ? marker_1.shape
|
|
11013
|
+
: marker_1.dataSource[dataIndex_1][marker_1.shapeValuePath],
|
|
10917
11014
|
layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex_1
|
|
10918
11015
|
};
|
|
10919
11016
|
}
|
|
@@ -10921,6 +11018,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10921
11018
|
};
|
|
10922
11019
|
/**
|
|
10923
11020
|
* To check and trigger Cluster click event
|
|
11021
|
+
*
|
|
10924
11022
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
10925
11023
|
* @returns {void}
|
|
10926
11024
|
* @private
|
|
@@ -10941,7 +11039,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10941
11039
|
}
|
|
10942
11040
|
if (this.sameMarkerData.length > 0 && !this.maps.markerClusterExpandCheck) {
|
|
10943
11041
|
this.maps.markerClusterExpandCheck = true;
|
|
10944
|
-
mergeSeparateCluster(this.sameMarkerData, this.maps
|
|
11042
|
+
mergeSeparateCluster(this.sameMarkerData, this.maps);
|
|
10945
11043
|
}
|
|
10946
11044
|
else {
|
|
10947
11045
|
this.sameMarkerData = options.clusterCollection;
|
|
@@ -10961,7 +11059,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10961
11059
|
* To get marker from target id
|
|
10962
11060
|
*
|
|
10963
11061
|
* @param {string} target - Specifies the target
|
|
10964
|
-
* @returns {
|
|
11062
|
+
* @returns {object} - Returns the marker, data, clusterCollection, markCollection
|
|
10965
11063
|
*/
|
|
10966
11064
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10967
11065
|
Marker.prototype.getMarker = function (target) {
|
|
@@ -11030,7 +11128,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
11030
11128
|
return;
|
|
11031
11129
|
}
|
|
11032
11130
|
if (options.marker.enableDrag) {
|
|
11033
|
-
document.getElementById(this.maps.element.id +
|
|
11131
|
+
document.getElementById(this.maps.element.id + '_svg').style.cursor = isNullOrUndefined(this.maps.markerDragArgument) ?
|
|
11034
11132
|
'pointer' : 'grabbing';
|
|
11035
11133
|
}
|
|
11036
11134
|
var eventArgs = {
|
|
@@ -11064,7 +11162,10 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
11064
11162
|
};
|
|
11065
11163
|
this.maps.trigger(markerClusterMouseMove, eventArgs);
|
|
11066
11164
|
};
|
|
11067
|
-
/** @private
|
|
11165
|
+
/** @private
|
|
11166
|
+
*
|
|
11167
|
+
* @returns {void}
|
|
11168
|
+
*/
|
|
11068
11169
|
Marker.prototype.initializeMarkerClusterList = function () {
|
|
11069
11170
|
for (var i = 0; i < this.maps.layers.length; i++) {
|
|
11070
11171
|
this.initialMarkerCluster[i] = [];
|
|
@@ -11100,8 +11201,12 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
11100
11201
|
* When injected, this module will be used to render polygon shapes over the Maps.
|
|
11101
11202
|
*/
|
|
11102
11203
|
var Polygon = /** @__PURE__ @class */ (function () {
|
|
11204
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
11205
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
11103
11206
|
function Polygon(maps) {
|
|
11104
11207
|
}
|
|
11208
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
11209
|
+
/* eslint-enable @typescript-eslint/no-empty-function */
|
|
11105
11210
|
/**
|
|
11106
11211
|
* To render polygon for maps
|
|
11107
11212
|
*
|
|
@@ -11120,7 +11225,6 @@ var Polygon = /** @__PURE__ @class */ (function () {
|
|
|
11120
11225
|
var polygonSVGObject = maps.renderer.createGroup({
|
|
11121
11226
|
id: maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group_' + polygonIndex
|
|
11122
11227
|
});
|
|
11123
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11124
11228
|
var polygonData = polygonSetting.points;
|
|
11125
11229
|
var path = calculatePolygonPath(maps, factor, currentLayer, polygonData);
|
|
11126
11230
|
var pathOptions = new PathOption(maps.element.id + '_LayerIndex_' + layerIndex + '_PolygonIndex_' + polygonIndex, polygonSetting.fill, (polygonSetting.borderWidth / factor), polygonSetting.borderColor, polygonSetting.opacity, polygonSetting.borderOpacity, '', path);
|
|
@@ -11145,6 +11249,7 @@ var Polygon = /** @__PURE__ @class */ (function () {
|
|
|
11145
11249
|
* @returns {void}
|
|
11146
11250
|
* @private
|
|
11147
11251
|
*/
|
|
11252
|
+
//eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
11148
11253
|
Polygon.prototype.destroy = function () {
|
|
11149
11254
|
};
|
|
11150
11255
|
return Polygon;
|
|
@@ -11184,7 +11289,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11184
11289
|
*
|
|
11185
11290
|
* @param {LayerSettings} layer - Specifies the layer settings
|
|
11186
11291
|
* @param {number} layerIndex - Specifies the layer index.
|
|
11187
|
-
* @param {
|
|
11292
|
+
* @param {object} shape - Specifies the shape.
|
|
11188
11293
|
* @param {any[]} layerData - Specifies the layer data.
|
|
11189
11294
|
* @param {Element} group Specifies the element.
|
|
11190
11295
|
* @param {HTMLElement} labelTemplateElement - Specifies the template element.
|
|
@@ -11193,9 +11298,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11193
11298
|
* @returns {void}
|
|
11194
11299
|
* @private
|
|
11195
11300
|
*/
|
|
11196
|
-
DataLabel.prototype.renderLabel = function (
|
|
11197
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11198
|
-
layer, layerIndex, shape,
|
|
11301
|
+
DataLabel.prototype.renderLabel = function (layer, layerIndex, shape,
|
|
11199
11302
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11200
11303
|
layerData, group, labelTemplateElement, index, intersect) {
|
|
11201
11304
|
var _this = this;
|
|
@@ -11338,7 +11441,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11338
11441
|
location['y'] = ((location['y'] + zoomTransPoint['y']) * scale);
|
|
11339
11442
|
}
|
|
11340
11443
|
location['y'] = (this.maps.projectionType === 'Mercator') || layer.geometryType === 'Normal' ? location['y'] : (-location['y']);
|
|
11341
|
-
if (!isNullOrUndefined(this.maps.format) && !isNaN(parseFloat(text))) {
|
|
11444
|
+
if (!isNullOrUndefined(this.maps.format) && !isNaN(Number(text)) && !isNaN(parseFloat(text))) {
|
|
11342
11445
|
if (this.maps.useGroupingSeparator) {
|
|
11343
11446
|
text = Internalize(this.maps, parseFloat(text));
|
|
11344
11447
|
if (!isNullOrUndefined(datasrcObj)) {
|
|
@@ -11398,7 +11501,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11398
11501
|
var templateElement = templateFn ? templateFn(!isNullOrUndefined(datasrcObj) ?
|
|
11399
11502
|
datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
|
|
11400
11503
|
templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
|
|
11401
|
-
labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties']
|
|
11504
|
+
labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties']);
|
|
11402
11505
|
if (_this.maps.isTileMap) {
|
|
11403
11506
|
labelElement.style.left = (((location['x'] + transPoint['x']) * scale) - (textSize['width'] / 2)) + 'px';
|
|
11404
11507
|
labelElement.style.top = (((location['y'] + transPoint['y']) * scale) - textSize['height']) + 'px';
|
|
@@ -11552,7 +11655,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11552
11655
|
element.setAttribute(isRect ? 'fill-opacity' : 'opacity', (opacity * height).toString());
|
|
11553
11656
|
}
|
|
11554
11657
|
},
|
|
11555
|
-
end: function (
|
|
11658
|
+
end: function () {
|
|
11556
11659
|
element.style.visibility = 'visible';
|
|
11557
11660
|
element.setAttribute(isRect ? 'fill-opacity' : 'opacity', opacity.toString());
|
|
11558
11661
|
}
|
|
@@ -11720,6 +11823,7 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
|
|
|
11720
11823
|
pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
|
|
11721
11824
|
navigationEle = this.maps.renderer.drawPath(pathOption);
|
|
11722
11825
|
if (!isNullOrUndefined(arrowPosition)) {
|
|
11826
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11723
11827
|
var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
|
|
11724
11828
|
: navigationEle.setAttribute('marker-end', endArrow);
|
|
11725
11829
|
}
|
|
@@ -12119,9 +12223,9 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12119
12223
|
* Get the legend collections
|
|
12120
12224
|
*
|
|
12121
12225
|
* @param {number} layerIndex - Specifies the layer index
|
|
12122
|
-
* @param {
|
|
12226
|
+
* @param {any[]} layerData - Specifies the layer data
|
|
12123
12227
|
* @param {ColorMappingSettings[]} colorMapping - Specifies the color mapping
|
|
12124
|
-
* @param {
|
|
12228
|
+
* @param {any[]} dataSource - Specifies the data source
|
|
12125
12229
|
* @param {string} dataPath - Specifies the data path
|
|
12126
12230
|
* @param {string} colorValuePath - Specifies the color value path
|
|
12127
12231
|
* @param {string | string[]} propertyPath - Specifies the property path
|
|
@@ -12163,6 +12267,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12163
12267
|
// eslint-disable-next-line valid-jsdoc
|
|
12164
12268
|
/**
|
|
12165
12269
|
* To draw the legend shape and text.
|
|
12270
|
+
*
|
|
12166
12271
|
* @private
|
|
12167
12272
|
*/
|
|
12168
12273
|
Legend.prototype.drawLegend = function () {
|
|
@@ -12207,7 +12312,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12207
12312
|
}
|
|
12208
12313
|
};
|
|
12209
12314
|
/**
|
|
12210
|
-
* @param {
|
|
12315
|
+
* @param {number} page - Specifies the legend page.
|
|
12211
12316
|
* @returns {void}
|
|
12212
12317
|
* @private
|
|
12213
12318
|
*/
|
|
@@ -12231,8 +12336,6 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12231
12336
|
var legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
|
|
12232
12337
|
var legendText = collection['DisplayText'];
|
|
12233
12338
|
var pagingArrowPadding = 4;
|
|
12234
|
-
var shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
|
|
12235
|
-
legend.shape : 'Image') : collection['legendShape']);
|
|
12236
12339
|
var strokeColor = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
|
|
12237
12340
|
|| legend.shape === 'Cross') ? isNullOrUndefined(legend.fill) ? '#000000' : legend.fill : shapeBorder.color;
|
|
12238
12341
|
var strokeWidth = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
|
|
@@ -12617,9 +12720,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12617
12720
|
}
|
|
12618
12721
|
}
|
|
12619
12722
|
};
|
|
12620
|
-
Legend.prototype.shapeHighLightAndSelection = function (
|
|
12621
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12622
|
-
targetElement, data, module, getValue, layerIndex) {
|
|
12723
|
+
Legend.prototype.shapeHighLightAndSelection = function (targetElement, data, module, getValue, layerIndex) {
|
|
12623
12724
|
if (data !== undefined) {
|
|
12624
12725
|
this.updateLegendElement();
|
|
12625
12726
|
this.shapeToggled = true;
|
|
@@ -13045,9 +13146,12 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13045
13146
|
}
|
|
13046
13147
|
if (legendTitle) {
|
|
13047
13148
|
textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
|
|
13048
|
-
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily
|
|
13049
|
-
|
|
13050
|
-
textStyle.
|
|
13149
|
+
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily
|
|
13150
|
+
: this.maps.themeStyle.fontFamily;
|
|
13151
|
+
textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size
|
|
13152
|
+
: this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
|
|
13153
|
+
textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight
|
|
13154
|
+
: this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
|
|
13051
13155
|
textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
|
|
13052
13156
|
var element = renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
13053
13157
|
element.setAttribute('aria-label', legendTitle);
|
|
@@ -13151,6 +13255,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13151
13255
|
var field = marker$$1.legendText;
|
|
13152
13256
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13153
13257
|
var templateFn;
|
|
13258
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13154
13259
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
13155
13260
|
var imageSrc = null;
|
|
13156
13261
|
var showLegend = isNullOrUndefined(data[_this.maps.legendSettings.showLegendPath]) ? true :
|
|
@@ -13161,6 +13266,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13161
13266
|
var templateElement = templateFn(_this.maps);
|
|
13162
13267
|
var markerEle = isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] :
|
|
13163
13268
|
templateElement;
|
|
13269
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13164
13270
|
imageSrc = markerEle.querySelector('img').src;
|
|
13165
13271
|
}
|
|
13166
13272
|
var text = isNullOrUndefined(data[field]) ? '' : data[field];
|
|
@@ -13358,7 +13464,6 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13358
13464
|
}
|
|
13359
13465
|
});
|
|
13360
13466
|
if (outOfRangeValues.length === 0) {
|
|
13361
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13362
13467
|
var range_1 = false;
|
|
13363
13468
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13364
13469
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
@@ -13599,7 +13704,12 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13599
13704
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
13600
13705
|
}
|
|
13601
13706
|
else {
|
|
13602
|
-
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
13707
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
13708
|
+
? 0 : this.maps.layers[k].shapeSettings.border.width,
|
|
13709
|
+
/* eslint-disable-next-line max-len */
|
|
13710
|
+
isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
13711
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
13712
|
+
: this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[k].shapeSettings.fill);
|
|
13603
13713
|
}
|
|
13604
13714
|
}
|
|
13605
13715
|
}
|
|
@@ -13668,7 +13778,12 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13668
13778
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
13669
13779
|
}
|
|
13670
13780
|
else {
|
|
13671
|
-
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width)
|
|
13781
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width)
|
|
13782
|
+
? 0 : this.maps.layers[j].shapeSettings.border.width,
|
|
13783
|
+
/* eslint-disable-next-line max-len */
|
|
13784
|
+
isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity)
|
|
13785
|
+
? this.maps.layers[j].shapeSettings.opacity
|
|
13786
|
+
: this.maps.layers[j].shapeSettings.border.opacity, this.maps.layers[j].shapeSettings.fill);
|
|
13672
13787
|
}
|
|
13673
13788
|
}
|
|
13674
13789
|
}
|
|
@@ -13746,7 +13861,15 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13746
13861
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
13747
13862
|
}
|
|
13748
13863
|
else {
|
|
13749
|
-
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color,
|
|
13864
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color,
|
|
13865
|
+
/* eslint-disable-next-line max-len */
|
|
13866
|
+
(isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
13867
|
+
? 0
|
|
13868
|
+
: this.maps.layers[k].shapeSettings.border.width),
|
|
13869
|
+
/* eslint-disable-next-line max-len */
|
|
13870
|
+
(isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
13871
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
13872
|
+
: this.maps.layers[k].shapeSettings.border.opacity), this.maps.layers[k].shapeSettings.fill);
|
|
13750
13873
|
}
|
|
13751
13874
|
}
|
|
13752
13875
|
}
|
|
@@ -13817,7 +13940,13 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13817
13940
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
13818
13941
|
}
|
|
13819
13942
|
else {
|
|
13820
|
-
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
13943
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
13944
|
+
? 0
|
|
13945
|
+
: this.maps.layers[k].shapeSettings.border.width,
|
|
13946
|
+
/* eslint-disable-next-line max-len */
|
|
13947
|
+
isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
13948
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
13949
|
+
: this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[0].shapeSettings.fill);
|
|
13821
13950
|
}
|
|
13822
13951
|
}
|
|
13823
13952
|
}
|
|
@@ -14026,9 +14155,13 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
14026
14155
|
this.maps.off(Browser.touchMoveEvent, this.mouseMove);
|
|
14027
14156
|
this.maps.off(Browser.touchStartEvent, this.mouseMove);
|
|
14028
14157
|
};
|
|
14029
|
-
// eslint-disable-next-line valid-jsdoc
|
|
14030
14158
|
/**
|
|
14031
14159
|
* Public method for highlight module
|
|
14160
|
+
*
|
|
14161
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
14162
|
+
* @param {string} name - Specifies the name.
|
|
14163
|
+
* @param {boolean} enable - Specifies the enabling of highlight in map.
|
|
14164
|
+
* @returns {void}
|
|
14032
14165
|
* @private
|
|
14033
14166
|
*/
|
|
14034
14167
|
Highlight.prototype.addHighlight = function (layerIndex, name, enable) {
|
|
@@ -14135,9 +14268,15 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
14135
14268
|
}
|
|
14136
14269
|
};
|
|
14137
14270
|
/**
|
|
14271
|
+
* Handles the highlighting events in map
|
|
14272
|
+
*
|
|
14273
|
+
* @param {Element} targetElement - Specifies the target element.
|
|
14274
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
14275
|
+
* @param {object} data - Specifies the data for the map.
|
|
14276
|
+
* @param {object} shapeData - Specifies the data for the map to render.
|
|
14277
|
+
* @returns {void}
|
|
14138
14278
|
* @private
|
|
14139
14279
|
*/
|
|
14140
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14141
14280
|
Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
|
|
14142
14281
|
if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule
|
|
14143
14282
|
&& this.maps.legendSettings.type === 'Layers') {
|
|
@@ -14350,9 +14489,15 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14350
14489
|
}
|
|
14351
14490
|
};
|
|
14352
14491
|
/**
|
|
14492
|
+
* Selects the element in the map
|
|
14493
|
+
*
|
|
14494
|
+
* @param {Element} targetElement - Specifies the target element.
|
|
14495
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
14496
|
+
* @param {object} data - Specifies the data for the map.
|
|
14497
|
+
* @param {object} shapeData - Specifies the data for the map to render.
|
|
14498
|
+
* @returns {void}
|
|
14353
14499
|
* @private
|
|
14354
14500
|
*/
|
|
14355
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14356
14501
|
Selection.prototype.selectElement = function (targetElement, layerIndex, data, shapeData) {
|
|
14357
14502
|
this.maps.mapSelect = targetElement ? true : false;
|
|
14358
14503
|
if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
@@ -14364,9 +14509,13 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14364
14509
|
this.selectMap(targetElement, shapeData, data);
|
|
14365
14510
|
}
|
|
14366
14511
|
};
|
|
14367
|
-
// eslint-disable-next-line valid-jsdoc
|
|
14368
14512
|
/**
|
|
14369
14513
|
* Public method for selection
|
|
14514
|
+
*
|
|
14515
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
14516
|
+
* @param {string} name - Specifies the name.
|
|
14517
|
+
* @param {boolean} enable - Specifies the enabling of selection in map.
|
|
14518
|
+
* @returns {void}
|
|
14370
14519
|
* @private
|
|
14371
14520
|
*/
|
|
14372
14521
|
Selection.prototype.addSelection = function (layerIndex, name, enable) {
|
|
@@ -14389,9 +14538,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14389
14538
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14390
14539
|
Selection.prototype.selectMap = function (targetElement, shapeData, data) {
|
|
14391
14540
|
var _this = this;
|
|
14392
|
-
var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
14393
14541
|
var isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
|
|
14394
|
-
var selectionsettings = this.selectionsettings;
|
|
14395
14542
|
var border = {
|
|
14396
14543
|
color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) :
|
|
14397
14544
|
this.selectionsettings.border.color,
|
|
@@ -14410,6 +14557,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14410
14557
|
data: data,
|
|
14411
14558
|
maps: this.maps
|
|
14412
14559
|
};
|
|
14560
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14413
14561
|
this.maps.trigger('itemSelection', eventArgs, function (observedArgs) {
|
|
14414
14562
|
eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ?
|
|
14415
14563
|
_this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
|
|
@@ -14426,9 +14574,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14426
14574
|
}
|
|
14427
14575
|
if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
14428
14576
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
14429
|
-
var
|
|
14430
|
-
targetElement.setAttribute('stroke-width', _this.maps.layers[
|
|
14431
|
-
targetElement.setAttribute('stroke', _this.maps.layers[
|
|
14577
|
+
var layerIndex = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
14578
|
+
targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex].navigationLineSettings[index].width.toString());
|
|
14579
|
+
targetElement.setAttribute('stroke', _this.maps.layers[layerIndex].navigationLineSettings[index].color);
|
|
14432
14580
|
}
|
|
14433
14581
|
}
|
|
14434
14582
|
else {
|
|
@@ -14463,9 +14611,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14463
14611
|
}
|
|
14464
14612
|
if (ele.id.indexOf('NavigationIndex') > -1) {
|
|
14465
14613
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
14466
|
-
var
|
|
14467
|
-
ele.setAttribute('stroke-width', _this.maps.layers[
|
|
14468
|
-
ele.setAttribute('stroke', _this.maps.layers[
|
|
14614
|
+
var layerIndex = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
14615
|
+
ele.setAttribute('stroke-width', _this.maps.layers[layerIndex].navigationLineSettings[index].width.toString());
|
|
14616
|
+
ele.setAttribute('stroke', _this.maps.layers[layerIndex].navigationLineSettings[index].color);
|
|
14469
14617
|
}
|
|
14470
14618
|
}
|
|
14471
14619
|
if (!isLineStringShape) {
|
|
@@ -14582,6 +14730,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14582
14730
|
this.addEventListener();
|
|
14583
14731
|
}
|
|
14584
14732
|
/**
|
|
14733
|
+
* @param {PointerEvent} e - Specifies the event.
|
|
14734
|
+
* @returns {void}
|
|
14585
14735
|
* @private
|
|
14586
14736
|
*/
|
|
14587
14737
|
MapsTooltip.prototype.renderTooltip = function (e) {
|
|
@@ -14771,6 +14921,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14771
14921
|
}
|
|
14772
14922
|
document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
|
|
14773
14923
|
}
|
|
14924
|
+
// eslint-disable-next-line no-constant-condition
|
|
14774
14925
|
if (typeof (isPolygon ? polygon.tooltipTemplate !== 'function' : option.template !== 'function') && (isPolygon ? polygon.tooltipTemplate !== null : option.template !== null) && Object.keys(typeof (isPolygon ? polygon.tooltipTemplate === 'object' : option.template === 'object') ? (isPolygon ? polygon.tooltipTemplate : option.template) : {}).length === 1) {
|
|
14775
14926
|
if (isPolygon) {
|
|
14776
14927
|
polygon.tooltipTemplate = polygon.tooltipTemplate[Object.keys(polygon.tooltipTemplate)[0]];
|
|
@@ -14930,6 +15081,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14930
15081
|
return format;
|
|
14931
15082
|
};
|
|
14932
15083
|
/**
|
|
15084
|
+
* Handles the mouse up
|
|
15085
|
+
*
|
|
15086
|
+
* @param {PointerEvent} e - Specifies the event
|
|
15087
|
+
* @returns {void}
|
|
14933
15088
|
* @private
|
|
14934
15089
|
*/
|
|
14935
15090
|
MapsTooltip.prototype.mouseUpHandler = function (e) {
|
|
@@ -14942,6 +15097,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14942
15097
|
}
|
|
14943
15098
|
};
|
|
14944
15099
|
/**
|
|
15100
|
+
* Removes the tooltip
|
|
15101
|
+
*
|
|
15102
|
+
* @returns {boolean} - Returns the boolean whether tooltip is removed or not.
|
|
14945
15103
|
* @private
|
|
14946
15104
|
*/
|
|
14947
15105
|
MapsTooltip.prototype.removeTooltip = function () {
|
|
@@ -14953,6 +15111,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14953
15111
|
return isTooltipRemoved;
|
|
14954
15112
|
};
|
|
14955
15113
|
MapsTooltip.prototype.clearTooltip = function (element) {
|
|
15114
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
14956
15115
|
var tooltipElement = element.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
|
|
14957
15116
|
if (isNullOrUndefined(tooltipElement)) {
|
|
14958
15117
|
var isTooltipRemoved = this.removeTooltip();
|
|
@@ -14962,9 +15121,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14962
15121
|
}
|
|
14963
15122
|
}
|
|
14964
15123
|
};
|
|
14965
|
-
// eslint-disable-next-line valid-jsdoc
|
|
14966
15124
|
/**
|
|
14967
15125
|
* To bind events for tooltip module
|
|
15126
|
+
*
|
|
15127
|
+
* @returns {void}
|
|
14968
15128
|
* @private
|
|
14969
15129
|
*/
|
|
14970
15130
|
MapsTooltip.prototype.addEventListener = function () {
|
|
@@ -14984,6 +15144,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14984
15144
|
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
14985
15145
|
};
|
|
14986
15146
|
/**
|
|
15147
|
+
* Removes the event listeners
|
|
15148
|
+
*
|
|
15149
|
+
* @returns {void}
|
|
14987
15150
|
* @private
|
|
14988
15151
|
*/
|
|
14989
15152
|
MapsTooltip.prototype.removeEventListener = function () {
|
|
@@ -15043,7 +15206,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15043
15206
|
this.rectZoomingStart = false;
|
|
15044
15207
|
/** @private */
|
|
15045
15208
|
this.browserName = Browser.info.name;
|
|
15046
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
15047
15209
|
/** @private */
|
|
15048
15210
|
this.isPointer = Browser.isPointer;
|
|
15049
15211
|
this.handled = false;
|
|
@@ -15053,10 +15215,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15053
15215
|
this.pinchFactor = 1;
|
|
15054
15216
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15055
15217
|
this.startTouches = [];
|
|
15056
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15057
15218
|
/** @private */
|
|
15058
15219
|
this.mouseDownLatLong = { x: 0, y: 0 };
|
|
15059
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15060
15220
|
/** @private */
|
|
15061
15221
|
this.mouseMoveLatLong = { x: 0, y: 0 };
|
|
15062
15222
|
/** @private */
|
|
@@ -15173,7 +15333,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15173
15333
|
}
|
|
15174
15334
|
this.markerLineAnimation(map);
|
|
15175
15335
|
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
15176
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
15177
15336
|
var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
|
|
15178
15337
|
setTimeout(function () {
|
|
15179
15338
|
// if (type === 'ZoomOut') {
|
|
@@ -15252,6 +15411,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15252
15411
|
position.y - ((y * totalSize) / 100);
|
|
15253
15412
|
};
|
|
15254
15413
|
/**
|
|
15414
|
+
* @returns {void}
|
|
15255
15415
|
* @private
|
|
15256
15416
|
*/
|
|
15257
15417
|
Zoom.prototype.performRectZooming = function () {
|
|
@@ -15331,26 +15491,29 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15331
15491
|
}
|
|
15332
15492
|
};
|
|
15333
15493
|
/**
|
|
15494
|
+
* @param {PointerEvent} e - Specifies the vent in the map
|
|
15495
|
+
* @returns {void}
|
|
15334
15496
|
* @private
|
|
15335
15497
|
*/
|
|
15498
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15336
15499
|
Zoom.prototype.performPinchZooming = function (e) {
|
|
15337
15500
|
var map = this.maps;
|
|
15338
15501
|
var prevLevel = map.tileZoomLevel;
|
|
15339
|
-
var availSize = map.mapAreaRect;
|
|
15340
|
-
map.isMarkerZoomCompleted = false;
|
|
15341
|
-
map.previousScale = map.scale;
|
|
15342
|
-
map.previousPoint = map.translatePoint;
|
|
15343
|
-
map.previousProjection = map.projectionType;
|
|
15344
|
-
var prevTilePoint = map.tileTranslatePoint;
|
|
15345
|
-
var scale = calculateScale(this.touchStartList, this.touchMoveList);
|
|
15346
|
-
var touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
|
|
15347
|
-
var newScale = scale / this.lastScale;
|
|
15348
|
-
this.lastScale = scale;
|
|
15349
|
-
this.pinchFactor *= newScale;
|
|
15350
|
-
this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
|
|
15351
15502
|
var zoomCalculationFactor = this.pinchFactor;
|
|
15352
15503
|
var isZoomCancelled;
|
|
15504
|
+
var prevTilePoint = map.tileTranslatePoint;
|
|
15353
15505
|
if (!map.isTileMap) {
|
|
15506
|
+
var availSize = map.mapAreaRect;
|
|
15507
|
+
map.isMarkerZoomCompleted = false;
|
|
15508
|
+
map.previousScale = map.scale;
|
|
15509
|
+
map.previousPoint = map.translatePoint;
|
|
15510
|
+
map.previousProjection = map.projectionType;
|
|
15511
|
+
var scale = calculateScale(this.touchStartList, this.touchMoveList);
|
|
15512
|
+
var touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
|
|
15513
|
+
var newScale = scale / this.lastScale;
|
|
15514
|
+
this.lastScale = scale;
|
|
15515
|
+
this.pinchFactor *= newScale;
|
|
15516
|
+
this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
|
|
15354
15517
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15355
15518
|
var minBounds = map.baseMapRectBounds['min'];
|
|
15356
15519
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -15385,24 +15548,38 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15385
15548
|
}
|
|
15386
15549
|
}
|
|
15387
15550
|
else {
|
|
15388
|
-
var
|
|
15389
|
-
this.
|
|
15390
|
-
map.tileZoomLevel
|
|
15391
|
-
|
|
15392
|
-
(
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
|
|
15551
|
+
var touchCenter = this.getTouchCenterPoint();
|
|
15552
|
+
var distance = Math.sqrt(Math.pow((this.touchMoveList[0].pageX - this.touchMoveList[1].pageX), 2) + Math.pow((this.touchMoveList[0].pageY - this.touchMoveList[1].pageY), 2));
|
|
15553
|
+
var factor = map.tileZoomLevel;
|
|
15554
|
+
if (!isNullOrUndefined(this.pinchDistance)) {
|
|
15555
|
+
if (this.pinchDistance > distance) {
|
|
15556
|
+
factor = factor - 1;
|
|
15557
|
+
}
|
|
15558
|
+
else if (this.pinchDistance < distance) {
|
|
15559
|
+
factor = factor + 1;
|
|
15560
|
+
}
|
|
15561
|
+
factor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.maps.zoomSettings.minZoom, factor));
|
|
15562
|
+
if (factor !== map.tileZoomLevel) {
|
|
15563
|
+
this.pinchFactor = factor;
|
|
15564
|
+
map.previousScale = map.scale;
|
|
15565
|
+
map.tileZoomLevel = this.pinchFactor;
|
|
15566
|
+
map.scale = Math.pow(2, map.tileZoomLevel - 1);
|
|
15567
|
+
this.getTileTranslatePosition(prevLevel, this.pinchFactor, { x: touchCenter.x, y: touchCenter.y }, null);
|
|
15568
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.scale)) / map.scale;
|
|
15569
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.scale)) / map.scale;
|
|
15570
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
15571
|
+
if (isZoomCancelled) {
|
|
15572
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
15573
|
+
map.scale = map.previousScale;
|
|
15574
|
+
map.tileZoomLevel = prevLevel;
|
|
15575
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
15576
|
+
}
|
|
15577
|
+
else {
|
|
15578
|
+
map.mapLayerPanel.generateTiles(factor, map.tileTranslatePoint);
|
|
15579
|
+
}
|
|
15580
|
+
}
|
|
15405
15581
|
}
|
|
15582
|
+
this.pinchDistance = distance;
|
|
15406
15583
|
}
|
|
15407
15584
|
map.mapScaleValue = zoomCalculationFactor;
|
|
15408
15585
|
if (!isZoomCancelled) {
|
|
@@ -15413,6 +15590,16 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15413
15590
|
this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
|
|
15414
15591
|
}
|
|
15415
15592
|
};
|
|
15593
|
+
Zoom.prototype.getTouchCenterPoint = function () {
|
|
15594
|
+
var touchList = [];
|
|
15595
|
+
for (var i = 0; i < this.touchMoveList.length; i++) {
|
|
15596
|
+
touchList.push(this.getMousePosition(this.touchMoveList[i].pageX, this.touchMoveList[i].pageY));
|
|
15597
|
+
}
|
|
15598
|
+
return {
|
|
15599
|
+
x: (touchList[0].x + touchList[1].x) / 2,
|
|
15600
|
+
y: (touchList[0].y + touchList[1].y) / 2
|
|
15601
|
+
};
|
|
15602
|
+
};
|
|
15416
15603
|
Zoom.prototype.triggerZoomComplete = function (map, prevLevel, type) {
|
|
15417
15604
|
if (map.zoomSettings.enable) {
|
|
15418
15605
|
var zoomArgs = void 0;
|
|
@@ -15444,6 +15631,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15444
15631
|
}
|
|
15445
15632
|
};
|
|
15446
15633
|
/**
|
|
15634
|
+
* @returns {void}
|
|
15447
15635
|
* @private
|
|
15448
15636
|
*/
|
|
15449
15637
|
Zoom.prototype.drawZoomRectangle = function () {
|
|
@@ -15456,7 +15644,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15456
15644
|
var height = Math.abs(move.y - down.y);
|
|
15457
15645
|
var x = ((move.x > down.x) ? down.x : down.x - width);
|
|
15458
15646
|
var y = ((move.y > down.y) ? down.y : down.y - height);
|
|
15459
|
-
var elementRect = getElementByID(map.element.id).getBoundingClientRect();
|
|
15460
15647
|
if ((x > map.mapAreaRect.x && x < (map.mapAreaRect.x + map.mapAreaRect.width)) &&
|
|
15461
15648
|
(y > map.mapAreaRect.y) && (y < map.mapAreaRect.y + map.mapAreaRect.height)) {
|
|
15462
15649
|
this.zoomingRect = new Rect(x, y, width, height);
|
|
@@ -15494,6 +15681,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15494
15681
|
}
|
|
15495
15682
|
};
|
|
15496
15683
|
/**
|
|
15684
|
+
* @param {Maps} maps - Specifies the Map control
|
|
15685
|
+
* @param {boolean} animate - Specifies the animation is available or not
|
|
15686
|
+
* @param {boolean} isPanning - Specifies that it is panning or not
|
|
15687
|
+
* @returns {void}
|
|
15497
15688
|
* @private
|
|
15498
15689
|
*/
|
|
15499
15690
|
Zoom.prototype.applyTransform = function (maps, animate$$1, isPanning) {
|
|
@@ -15505,14 +15696,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15505
15696
|
var x = maps.translatePoint.x;
|
|
15506
15697
|
var y = maps.translatePoint.y;
|
|
15507
15698
|
var currentLabelIndex = 0;
|
|
15508
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15509
15699
|
maps.zoomShapeCollection = [];
|
|
15510
15700
|
if (document.getElementById(maps.element.id + '_mapsTooltip')) {
|
|
15511
15701
|
removeElement(maps.element.id + '_mapsTooltip');
|
|
15512
15702
|
}
|
|
15513
15703
|
if (this.layerCollectionEle) {
|
|
15514
|
-
var _loop_1 = function (
|
|
15515
|
-
var layerElement = this_1.layerCollectionEle.childNodes[
|
|
15704
|
+
var _loop_1 = function (i) {
|
|
15705
|
+
var layerElement = this_1.layerCollectionEle.childNodes[i];
|
|
15516
15706
|
if (layerElement.tagName === 'g') {
|
|
15517
15707
|
this_1.templateCount++;
|
|
15518
15708
|
this_1.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
|
|
@@ -15551,14 +15741,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15551
15741
|
}
|
|
15552
15742
|
else if (currentEle.id.indexOf('_Markers_Group') > -1) {
|
|
15553
15743
|
if ((!this_1.isPanModeEnabled) && !isNullOrUndefined(currentEle.childNodes[0])) {
|
|
15554
|
-
this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement
|
|
15744
|
+
this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement);
|
|
15555
15745
|
}
|
|
15556
15746
|
currentEle = layerElement.childNodes[j];
|
|
15557
15747
|
var markerAnimation_1;
|
|
15558
15748
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
15559
15749
|
Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
|
|
15560
15750
|
_this.markerTranslate(childNode, factor_1, x, y, scale, 'Marker', animate$$1);
|
|
15561
|
-
var layerIndex = parseInt(childNode['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
15562
15751
|
var dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
15563
15752
|
var markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
15564
15753
|
markerAnimation_1 = _this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
|
|
@@ -15651,7 +15840,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15651
15840
|
maps.zoomLabelPositions = [];
|
|
15652
15841
|
maps.zoomLabelPositions = maps.dataLabelModule.dataLabelCollections;
|
|
15653
15842
|
var labelAnimate_1 = !maps.isTileMap && animate$$1;
|
|
15843
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15654
15844
|
var intersect_1 = [];
|
|
15845
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15655
15846
|
Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
|
|
15656
15847
|
if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
|
|
15657
15848
|
var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
|
|
@@ -15687,8 +15878,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15687
15878
|
maps.arrangeTemplate();
|
|
15688
15879
|
};
|
|
15689
15880
|
var this_1 = this;
|
|
15690
|
-
for (var
|
|
15691
|
-
_loop_1(
|
|
15881
|
+
for (var i = 0; i < this.layerCollectionEle.childElementCount; i++) {
|
|
15882
|
+
_loop_1(i);
|
|
15692
15883
|
}
|
|
15693
15884
|
if (!isNullOrUndefined(this.currentLayer)) {
|
|
15694
15885
|
if (!animate$$1 || this.currentLayer.animationDuration === 0 || maps.isTileMap) {
|
|
@@ -15697,9 +15888,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15697
15888
|
}
|
|
15698
15889
|
}
|
|
15699
15890
|
};
|
|
15700
|
-
Zoom.prototype.markerTranslates = function (element, factor, x, y, scale, type, layerElement
|
|
15891
|
+
Zoom.prototype.markerTranslates = function (element, factor, x, y, scale, type, layerElement) {
|
|
15701
15892
|
var _this = this;
|
|
15702
|
-
if (animate$$1 === void 0) { animate$$1 = false; }
|
|
15703
15893
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15704
15894
|
var templateFn;
|
|
15705
15895
|
var nullCount = 0;
|
|
@@ -15743,6 +15933,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15743
15933
|
};
|
|
15744
15934
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
15745
15935
|
eventArgs = markerColorChoose(eventArgs, data);
|
|
15936
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15746
15937
|
_this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
15747
15938
|
if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
|
|
15748
15939
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
@@ -15855,6 +16046,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15855
16046
|
}
|
|
15856
16047
|
}
|
|
15857
16048
|
};
|
|
16049
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15858
16050
|
Zoom.prototype.dataLabelTranslate = function (element, factor, x, y, scale, type, animate$$1, currentLabelIndex, isPanning, intersect) {
|
|
15859
16051
|
if (animate$$1 === void 0) { animate$$1 = false; }
|
|
15860
16052
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -16102,11 +16294,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16102
16294
|
* @param {PanDirection} direction - Specifies the direction of the panning.
|
|
16103
16295
|
* @param {number} xDifference - Specifies the distance moved in the horizontal direction.
|
|
16104
16296
|
* @param {number} yDifference - Specifies the distance moved in the vertical direction.
|
|
16105
|
-
* @param {PointerEvent | TouchEvent | KeyboardEvent}
|
|
16297
|
+
* @param {PointerEvent | TouchEvent | KeyboardEvent} event - Specifies the pointer event argument.
|
|
16106
16298
|
* @returns {void}
|
|
16107
16299
|
* @private
|
|
16108
16300
|
*/
|
|
16109
|
-
Zoom.prototype.panning = function (direction, xDifference, yDifference,
|
|
16301
|
+
Zoom.prototype.panning = function (direction, xDifference, yDifference, event) {
|
|
16110
16302
|
var map = this.maps;
|
|
16111
16303
|
var panArgs;
|
|
16112
16304
|
var down = this.mouseDownPoints;
|
|
@@ -16122,6 +16314,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16122
16314
|
var y;
|
|
16123
16315
|
xDifference = !isNullOrUndefined(xDifference) ? xDifference : (down.x - move.x);
|
|
16124
16316
|
yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
|
|
16317
|
+
var layerX = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerX'] : event.touches[0].pageX;
|
|
16318
|
+
var layerY = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerY'] : event.touches[0].pageY;
|
|
16125
16319
|
this.maps.mergeCluster();
|
|
16126
16320
|
if (!map.isTileMap) {
|
|
16127
16321
|
var legendElement = document.getElementById(map.element.id + '_Legend_Group');
|
|
@@ -16135,7 +16329,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16135
16329
|
var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
|
|
16136
16330
|
((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
|
|
16137
16331
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16138
|
-
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1,
|
|
16332
|
+
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, layerX, layerY);
|
|
16139
16333
|
var minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
|
|
16140
16334
|
panArgs = {
|
|
16141
16335
|
cancel: false, name: pan, maps: map,
|
|
@@ -16164,8 +16358,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16164
16358
|
else if (this.maps.tileZoomLevel > 1) {
|
|
16165
16359
|
x = map.tileTranslatePoint.x - xDifference;
|
|
16166
16360
|
y = map.tileTranslatePoint.y - yDifference;
|
|
16167
|
-
this.distanceX = x - map.tileTranslatePoint.x;
|
|
16168
|
-
this.distanceY = y - map.tileTranslatePoint.y;
|
|
16169
16361
|
map.tileTranslatePoint.x = x;
|
|
16170
16362
|
map.tileTranslatePoint.y = y;
|
|
16171
16363
|
if ((map.tileTranslatePoint.y > -10 && yDifference < 0) || ((map.tileTranslatePoint.y < -((Math.pow(2, this.maps.tileZoomLevel) - 2) * 256) && yDifference > 0))) {
|
|
@@ -16175,7 +16367,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16175
16367
|
map.translatePoint.x = (map.tileTranslatePoint.x) / map.scale;
|
|
16176
16368
|
map.translatePoint.y = (map.tileTranslatePoint.y) / map.scale;
|
|
16177
16369
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16178
|
-
var location_4 = this.maps.getTileGeoLocation(
|
|
16370
|
+
var location_4 = this.maps.getTileGeoLocation(layerX, layerY);
|
|
16179
16371
|
var minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
|
|
16180
16372
|
panArgs = {
|
|
16181
16373
|
cancel: false, name: pan, maps: map,
|
|
@@ -16195,14 +16387,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16195
16387
|
this.mouseDownPoints = this.mouseMovePoints;
|
|
16196
16388
|
this.isSingleClick = false;
|
|
16197
16389
|
};
|
|
16198
|
-
Zoom.prototype.toAlignSublayer = function () {
|
|
16199
|
-
this.maps.translatePoint.x = !isNullOrUndefined(this.distanceX) ? (this.maps.translatePoint.x -
|
|
16200
|
-
(this.distanceX / this.maps.scale)) : this.maps.translatePoint.x;
|
|
16201
|
-
this.maps.translatePoint.y = !isNullOrUndefined(this.distanceY) ? this.maps.translatePoint.y -
|
|
16202
|
-
(this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
|
|
16203
|
-
this.applyTransform(this.maps, false);
|
|
16204
|
-
};
|
|
16205
16390
|
/**
|
|
16391
|
+
* @param {number} zoomFactor - Specifies the factor for zooming
|
|
16392
|
+
* @param {string} type - Specifies the type
|
|
16393
|
+
* @returns {void}
|
|
16206
16394
|
* @private
|
|
16207
16395
|
*/
|
|
16208
16396
|
Zoom.prototype.toolBarZooming = function (zoomFactor, type) {
|
|
@@ -16296,7 +16484,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16296
16484
|
}
|
|
16297
16485
|
this.markerLineAnimation(map);
|
|
16298
16486
|
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
16299
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
16300
16487
|
var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
|
|
16301
16488
|
setTimeout(function () {
|
|
16302
16489
|
_this.applyTransform(_this.maps, true);
|
|
@@ -16312,12 +16499,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16312
16499
|
this.triggerZoomComplete(map, prevLevel, type);
|
|
16313
16500
|
};
|
|
16314
16501
|
/**
|
|
16502
|
+
* @returns {void}
|
|
16315
16503
|
* @private
|
|
16316
16504
|
*/
|
|
16317
16505
|
Zoom.prototype.createZoomingToolbars = function () {
|
|
16318
16506
|
var map = this.maps;
|
|
16319
|
-
var zoomInElements;
|
|
16320
|
-
var zoomOutElements;
|
|
16321
16507
|
this.toolBarGroup = map.renderer.createGroup({
|
|
16322
16508
|
id: map.element.id + '_Zooming_KitCollection',
|
|
16323
16509
|
opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
|
|
@@ -16377,37 +16563,33 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16377
16563
|
this.selectionColor = this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor;
|
|
16378
16564
|
switch (toolbar_1.toLowerCase()) {
|
|
16379
16565
|
case 'zoom': {
|
|
16380
|
-
var
|
|
16566
|
+
var fillColor = void 0;
|
|
16381
16567
|
var strokeColor = void 0;
|
|
16382
16568
|
direction = 'M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,';
|
|
16383
16569
|
direction += '5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571';
|
|
16384
16570
|
direction = direction + 'L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,';
|
|
16385
16571
|
this.currentToolbarEle.setAttribute('class', (this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : ''));
|
|
16386
16572
|
if (this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
|
|
16387
|
-
|
|
16573
|
+
fillColor = fill;
|
|
16388
16574
|
strokeColor = pathStroke;
|
|
16389
16575
|
}
|
|
16390
16576
|
else if (this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
|
|
16391
|
-
|
|
16577
|
+
fillColor = fill;
|
|
16392
16578
|
strokeColor = pathStroke;
|
|
16393
16579
|
}
|
|
16394
16580
|
else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
|
|
16395
|
-
|
|
16581
|
+
fillColor = fill;
|
|
16396
16582
|
strokeColor = pathStroke;
|
|
16397
16583
|
}
|
|
16398
16584
|
else if (!this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
|
|
16399
|
-
|
|
16400
|
-
strokeColor = pathStroke;
|
|
16401
|
-
}
|
|
16402
|
-
else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
|
|
16403
|
-
fillColor_1 = fill;
|
|
16585
|
+
fillColor = this.maps.themeStyle.zoomFillColor;
|
|
16404
16586
|
strokeColor = pathStroke;
|
|
16405
16587
|
}
|
|
16406
16588
|
else {
|
|
16407
|
-
|
|
16589
|
+
fillColor = this.selectionColor;
|
|
16408
16590
|
strokeColor = this.selectionColor;
|
|
16409
16591
|
}
|
|
16410
|
-
var zoomPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1,
|
|
16592
|
+
var zoomPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fillColor, 1, strokeColor, opacity, opacity, null, direction + '4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z'));
|
|
16411
16593
|
zoomPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
16412
16594
|
this.currentToolbarEle.appendChild(zoomPath);
|
|
16413
16595
|
this.zoomElements = this.currentToolbarEle;
|
|
@@ -16416,18 +16598,20 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16416
16598
|
}
|
|
16417
16599
|
case 'zoomin':
|
|
16418
16600
|
direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
|
|
16601
|
+
/* eslint-disable no-case-declarations */
|
|
16419
16602
|
var zoomInPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Path', fill, 3, pathStroke, 1, 1, null, direction));
|
|
16603
|
+
/* eslint-enable no-case-declarations */
|
|
16420
16604
|
zoomInPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
16421
16605
|
this.currentToolbarEle.appendChild(zoomInPath);
|
|
16422
|
-
zoomInElements = this.currentToolbarEle;
|
|
16423
16606
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
16424
16607
|
break;
|
|
16425
16608
|
case 'zoomout':
|
|
16426
16609
|
direction = 'M 0, 8 L 16, 8';
|
|
16610
|
+
/* eslint-disable no-case-declarations */
|
|
16427
16611
|
var zoomOutPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fill, 3, pathStroke, 1, 1, null, direction));
|
|
16612
|
+
/* eslint-enable no-case-declarations */
|
|
16428
16613
|
zoomOutPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
16429
16614
|
this.currentToolbarEle.appendChild(zoomOutPath);
|
|
16430
|
-
zoomOutElements = this.currentToolbarEle;
|
|
16431
16615
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
16432
16616
|
break;
|
|
16433
16617
|
case 'pan': {
|
|
@@ -16457,7 +16641,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16457
16641
|
direction = 'M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,';
|
|
16458
16642
|
direction += '1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,';
|
|
16459
16643
|
direction += '13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,';
|
|
16644
|
+
/* eslint-disable no-case-declarations */
|
|
16460
16645
|
var resetPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fill, null, pathStroke, 1, 1, null, direction + '3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z'));
|
|
16646
|
+
/* eslint-enable no-case-declarations */
|
|
16461
16647
|
resetPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
16462
16648
|
this.currentToolbarEle.appendChild(resetPath);
|
|
16463
16649
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
@@ -16467,6 +16653,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16467
16653
|
}
|
|
16468
16654
|
};
|
|
16469
16655
|
/**
|
|
16656
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
16657
|
+
* @returns {void}
|
|
16470
16658
|
* @private
|
|
16471
16659
|
*/
|
|
16472
16660
|
Zoom.prototype.performToolBarAction = function (e) {
|
|
@@ -16480,13 +16668,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16480
16668
|
isToolbarPerform = (this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) + 1 <= this.maps.zoomSettings.maxZoom;
|
|
16481
16669
|
break;
|
|
16482
16670
|
case 'zoomout':
|
|
16671
|
+
/* eslint-disable no-case-declarations */
|
|
16483
16672
|
var scaleValue = this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale;
|
|
16673
|
+
/* eslint-enable no-case-declarations */
|
|
16484
16674
|
isToolbarPerform = (this.maps.projectionType === 'Miller' || this.maps.projectionType === 'Winkel3' ||
|
|
16485
16675
|
this.maps.projectionType === 'AitOff') ? Math.round(scaleValue) - 1 >= this.maps.zoomSettings.minZoom :
|
|
16486
16676
|
(scaleValue) - 1 >= this.maps.zoomSettings.minZoom;
|
|
16487
16677
|
break;
|
|
16488
16678
|
case 'reset':
|
|
16489
|
-
isToolbarPerform = Math.round(this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale)
|
|
16679
|
+
isToolbarPerform = Math.round(this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) !== this.maps.zoomSettings.minZoom;
|
|
16490
16680
|
break;
|
|
16491
16681
|
}
|
|
16492
16682
|
if (isTouch && isToolbarPerform) {
|
|
@@ -16620,6 +16810,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16620
16810
|
}
|
|
16621
16811
|
};
|
|
16622
16812
|
/**
|
|
16813
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
16814
|
+
* @returns {void}
|
|
16623
16815
|
* @private
|
|
16624
16816
|
*/
|
|
16625
16817
|
Zoom.prototype.showTooltip = function (e) {
|
|
@@ -16648,6 +16840,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16648
16840
|
}
|
|
16649
16841
|
};
|
|
16650
16842
|
/**
|
|
16843
|
+
* @returns {void}
|
|
16651
16844
|
* @private
|
|
16652
16845
|
*/
|
|
16653
16846
|
Zoom.prototype.removeTooltip = function () {
|
|
@@ -16656,6 +16849,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16656
16849
|
}
|
|
16657
16850
|
};
|
|
16658
16851
|
/**
|
|
16852
|
+
* @returns {void}
|
|
16659
16853
|
* @private
|
|
16660
16854
|
*/
|
|
16661
16855
|
Zoom.prototype.alignToolBar = function () {
|
|
@@ -16715,6 +16909,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16715
16909
|
element.appendChild(style);
|
|
16716
16910
|
};
|
|
16717
16911
|
/**
|
|
16912
|
+
* @param {number} factor - Specifies the factor for toolbar
|
|
16913
|
+
* @param {string} id - Specifies the id
|
|
16914
|
+
* @returns {void}
|
|
16718
16915
|
* @private
|
|
16719
16916
|
*/
|
|
16720
16917
|
Zoom.prototype.removeToolbarOpacity = function (factor, id) {
|
|
@@ -16816,6 +17013,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16816
17013
|
this.setOpacity('_Zooming_ToolBar_Reset_Rect', '_Zooming_ToolBar_Reset', resetStrokeOpacity, resetOpacity);
|
|
16817
17014
|
};
|
|
16818
17015
|
/**
|
|
17016
|
+
* @param {string} zoomClassStyle - Specifies the style for zoom class.
|
|
17017
|
+
* @param {string} zoomInClassStyle - Specifies the style for zoom in.
|
|
17018
|
+
* @param {string} zoomOutClassStyle - Specifies the style for zoom out.
|
|
17019
|
+
* @param {string} panClassStyle - Specifies the style for pan.
|
|
17020
|
+
* @param {string} resetClassStyle - Specifies the style for reset.
|
|
17021
|
+
* @returns {void}
|
|
16819
17022
|
* @private
|
|
16820
17023
|
*/
|
|
16821
17024
|
Zoom.prototype.removeToolbarClass = function (zoomClassStyle, zoomInClassStyle, zoomOutClassStyle, panClassStyle, resetClassStyle) {
|
|
@@ -16853,30 +17056,30 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16853
17056
|
* To bind events.
|
|
16854
17057
|
*
|
|
16855
17058
|
* @param {Element} element - Specifies the element.
|
|
16856
|
-
* @param {
|
|
17059
|
+
* @param {Function} process - Specifies the process.
|
|
16857
17060
|
* @returns {void}
|
|
16858
17061
|
* @private
|
|
16859
17062
|
*/
|
|
16860
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16861
17063
|
Zoom.prototype.wireEvents = function (element, process) {
|
|
16862
17064
|
EventHandler.add(element, Browser.touchStartEvent, process, this);
|
|
16863
17065
|
EventHandler.add(element, 'mouseover', this.showTooltip, this);
|
|
16864
17066
|
EventHandler.add(element, 'mouseout', this.removeTooltip, this);
|
|
16865
17067
|
};
|
|
16866
17068
|
/**
|
|
17069
|
+
* @param {WheelEvent} e - Specifies the wheel event in the map for zooming
|
|
17070
|
+
* @returns {void}
|
|
16867
17071
|
* @private
|
|
16868
17072
|
*/
|
|
16869
17073
|
Zoom.prototype.mapMouseWheel = function (e) {
|
|
16870
17074
|
if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
|
|
16871
17075
|
var map = this.maps;
|
|
16872
|
-
var size = map.availableSize;
|
|
16873
17076
|
map.markerZoomedState = false;
|
|
16874
17077
|
map.zoomPersistence = map.enablePersistence;
|
|
16875
17078
|
var position = this.getMousePosition(e.pageX, e.pageY);
|
|
16876
17079
|
var prevLevel = map.tileZoomLevel;
|
|
16877
17080
|
var prevScale = map.scale;
|
|
16878
17081
|
var delta = 1;
|
|
16879
|
-
var staticMaxZoomLevel =
|
|
17082
|
+
var staticMaxZoomLevel = map.zoomSettings.maxZoom;
|
|
16880
17083
|
var value = (map.isTileMap) ? prevLevel : prevScale;
|
|
16881
17084
|
if (((position.x > map.mapAreaRect.x) && (position.x < (map.mapAreaRect.x + map.mapAreaRect.width))) &&
|
|
16882
17085
|
(position.y > map.mapAreaRect.y) && position.y < (map.mapAreaRect.y + map.mapAreaRect.height)) {
|
|
@@ -16889,8 +17092,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16889
17092
|
map.staticMapZoom = map.tileZoomLevel;
|
|
16890
17093
|
if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
|
|
16891
17094
|
map.staticMapZoom += 1;
|
|
17095
|
+
this.performZooming(position, (value + delta), direction);
|
|
16892
17096
|
}
|
|
16893
|
-
this.performZooming(position, (value + delta), direction);
|
|
16894
17097
|
}
|
|
16895
17098
|
else {
|
|
16896
17099
|
map.mapScaleValue = value - delta;
|
|
@@ -16911,18 +17114,18 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16911
17114
|
}
|
|
16912
17115
|
};
|
|
16913
17116
|
/**
|
|
17117
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17118
|
+
* @returns {void}
|
|
16914
17119
|
* @private
|
|
16915
17120
|
*/
|
|
16916
17121
|
Zoom.prototype.doubleClick = function (e) {
|
|
16917
17122
|
var pageX = e.pageX;
|
|
16918
17123
|
var pageY = e.pageY;
|
|
16919
|
-
var target = e.target;
|
|
16920
17124
|
var tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
|
|
16921
17125
|
if (this.maps.zoomSettings.enable && this.maps.zoomSettings.doubleClickZoom
|
|
16922
17126
|
&& !(e.target['id'].indexOf('_Zooming_') > -1) && isNullOrUndefined(tooltipElement)) {
|
|
16923
17127
|
var position = this.getMousePosition(pageX, pageY);
|
|
16924
17128
|
var map = this.maps;
|
|
16925
|
-
var size = map.availableSize;
|
|
16926
17129
|
var prevLevel = map.tileZoomLevel;
|
|
16927
17130
|
var prevScale = map.scale;
|
|
16928
17131
|
map.mapScaleValue = map.mapScaleValue + 1;
|
|
@@ -16934,6 +17137,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16934
17137
|
}
|
|
16935
17138
|
};
|
|
16936
17139
|
/**
|
|
17140
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17141
|
+
* @returns {void}
|
|
16937
17142
|
* @private
|
|
16938
17143
|
*/
|
|
16939
17144
|
Zoom.prototype.mouseDownHandler = function (e) {
|
|
@@ -16941,6 +17146,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16941
17146
|
var pageY;
|
|
16942
17147
|
var target;
|
|
16943
17148
|
var touches = null;
|
|
17149
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16944
17150
|
var element = e.target;
|
|
16945
17151
|
if (e.type === 'touchstart') {
|
|
16946
17152
|
this.isTouch = true;
|
|
@@ -16952,6 +17158,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16952
17158
|
else {
|
|
16953
17159
|
pageX = e.pageX;
|
|
16954
17160
|
pageY = e.pageY;
|
|
17161
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16955
17162
|
target = e.target;
|
|
16956
17163
|
}
|
|
16957
17164
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
@@ -16965,7 +17172,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16965
17172
|
var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
16966
17173
|
this.rectZoomingStart = ((this.isZoomSelection && scale < this.maps.zoomSettings.maxZoom) && this.maps.zoomSettings.enable);
|
|
16967
17174
|
this.mouseDownPoints = this.getMousePosition(pageX, pageY);
|
|
16968
|
-
if (this.isTouch) {
|
|
17175
|
+
if (this.isTouch && touches !== null) {
|
|
16969
17176
|
this.firstMove = true;
|
|
16970
17177
|
this.pinchFactor = this.maps.scale;
|
|
16971
17178
|
this.fingers = touches.length;
|
|
@@ -16973,12 +17180,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16973
17180
|
this.isSingleClick = true;
|
|
16974
17181
|
};
|
|
16975
17182
|
/**
|
|
17183
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17184
|
+
* @returns {void}
|
|
16976
17185
|
* @private
|
|
16977
17186
|
*/
|
|
16978
17187
|
Zoom.prototype.mouseMoveHandler = function (e) {
|
|
16979
17188
|
var pageX;
|
|
16980
17189
|
var pageY;
|
|
16981
17190
|
var map = this.maps;
|
|
17191
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16982
17192
|
var target;
|
|
16983
17193
|
var touches = null;
|
|
16984
17194
|
var zoom = this.maps.zoomSettings;
|
|
@@ -17003,7 +17213,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17003
17213
|
}
|
|
17004
17214
|
}
|
|
17005
17215
|
if (this.isTouch) {
|
|
17006
|
-
if (this.maps.zoomSettings.pinchZooming) {
|
|
17216
|
+
if (this.maps.zoomSettings.pinchZooming && touches !== null) {
|
|
17007
17217
|
if (this.firstMove && touches.length === 2) {
|
|
17008
17218
|
this.rectZoomingStart = false;
|
|
17009
17219
|
this.updateInteraction();
|
|
@@ -17019,9 +17229,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17019
17229
|
}
|
|
17020
17230
|
}
|
|
17021
17231
|
this.mouseMovePoints = this.getMousePosition(pageX, pageY);
|
|
17022
|
-
|
|
17023
|
-
var targetEle = e.target;
|
|
17024
|
-
if (zoom.enable && this.isPanModeEnabled && this.maps.markerDragId.indexOf('_MarkerIndex_') == -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
|
|
17232
|
+
if (zoom.enable && this.isPanModeEnabled && this.maps.markerDragId.indexOf('_MarkerIndex_') === -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
|
|
17025
17233
|
e.preventDefault();
|
|
17026
17234
|
this.maps.element.style.cursor = 'pointer';
|
|
17027
17235
|
this.mouseMoveLatLong = { x: pageX, y: pageY };
|
|
@@ -17033,7 +17241,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17033
17241
|
this.mouseDownLatLong['y'] = pageY;
|
|
17034
17242
|
}
|
|
17035
17243
|
}
|
|
17036
|
-
if (this.isTouch ? (touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
|
|
17244
|
+
if (this.isTouch ? (touches !== null && touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
|
|
17037
17245
|
e.preventDefault();
|
|
17038
17246
|
var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
17039
17247
|
if (this.maps.zoomSettings.enableSelectionZooming && scale < this.maps.zoomSettings.maxZoom) {
|
|
@@ -17046,10 +17254,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17046
17254
|
}
|
|
17047
17255
|
};
|
|
17048
17256
|
/**
|
|
17257
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17258
|
+
* @returns {void}
|
|
17049
17259
|
* @private
|
|
17050
17260
|
*/
|
|
17051
17261
|
Zoom.prototype.mouseUpHandler = function (e) {
|
|
17052
|
-
var map = this.maps;
|
|
17053
17262
|
this.rectZoomingStart = false;
|
|
17054
17263
|
this.isSingleClick = this.isSingleClick ? true : false;
|
|
17055
17264
|
this.isTouch = false;
|
|
@@ -17057,7 +17266,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17057
17266
|
this.touchMoveList = [];
|
|
17058
17267
|
this.lastScale = 1;
|
|
17059
17268
|
this.maps.element.style.cursor = 'auto';
|
|
17060
|
-
// eslint-disable-next-line max-len
|
|
17061
17269
|
if (this.isPanModeEnabled && this.maps.zoomSettings.enablePanning && !isNullOrUndefined(this.maps.previousPoint) &&
|
|
17062
17270
|
(this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)) {
|
|
17063
17271
|
var pageX = void 0;
|
|
@@ -17065,7 +17273,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17065
17273
|
var layerX = 0;
|
|
17066
17274
|
var layerY = 0;
|
|
17067
17275
|
var target = void 0;
|
|
17068
|
-
var rect = this.maps.element.getBoundingClientRect();
|
|
17069
17276
|
var element = e.target;
|
|
17070
17277
|
if (e.type.indexOf('touch') !== -1) {
|
|
17071
17278
|
var touchArg = e;
|
|
@@ -17080,6 +17287,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17080
17287
|
pageY = e.pageY;
|
|
17081
17288
|
layerX = e['layerX'];
|
|
17082
17289
|
layerY = e['layerY'] - (this.maps.isTileMap ? 10 : 0);
|
|
17290
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17083
17291
|
target = e.target;
|
|
17084
17292
|
}
|
|
17085
17293
|
var panCompleteEventArgs = void 0;
|
|
@@ -17111,10 +17319,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17111
17319
|
this.maps.trigger('panComplete', panCompleteEventArgs);
|
|
17112
17320
|
}
|
|
17113
17321
|
this.isPanModeEnabled = false;
|
|
17114
|
-
if ((!isNullOrUndefined(this.distanceX) || !isNullOrUndefined(this.distanceY)) && (!isNullOrUndefined(this.currentLayer) && this.currentLayer.type === 'SubLayer')) {
|
|
17115
|
-
this.toAlignSublayer();
|
|
17116
|
-
this.distanceX = this.distanceY = null;
|
|
17117
|
-
}
|
|
17118
17322
|
var zoomRectElement = getElementByID(this.maps.element.id + '_Selection_Rect_Zooming');
|
|
17119
17323
|
if (zoomRectElement && this.maps.zoomSettings.enable && this.maps.zoomSettings.enableSelectionZooming) {
|
|
17120
17324
|
remove(zoomRectElement);
|
|
@@ -17122,10 +17326,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17122
17326
|
}
|
|
17123
17327
|
this.mouseMoveLatLong = { x: 0, y: 0 };
|
|
17124
17328
|
this.mouseDownLatLong = { x: 0, y: 0 };
|
|
17329
|
+
this.pinchDistance = null;
|
|
17125
17330
|
};
|
|
17126
17331
|
/**
|
|
17332
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17333
|
+
* @returns {void}
|
|
17127
17334
|
* @private
|
|
17128
17335
|
*/
|
|
17336
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17129
17337
|
Zoom.prototype.mouseCancelHandler = function (e) {
|
|
17130
17338
|
this.isPanModeEnabled = false;
|
|
17131
17339
|
this.isTouch = false;
|
|
@@ -17166,6 +17374,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17166
17374
|
}
|
|
17167
17375
|
};
|
|
17168
17376
|
/**
|
|
17377
|
+
* Gets the Mouse Position
|
|
17378
|
+
*
|
|
17379
|
+
* @param {number} pageX - Specifies the Page x in map
|
|
17380
|
+
* @param {number} pageY - Specifies the Page y in map
|
|
17381
|
+
* @returns {Point} - returns the mouse point position
|
|
17169
17382
|
* @private
|
|
17170
17383
|
*/
|
|
17171
17384
|
Zoom.prototype.getMousePosition = function (pageX, pageY) {
|
|
@@ -17180,6 +17393,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17180
17393
|
return new Point(Math.abs(pageX - positionX), Math.abs(pageY - positionY));
|
|
17181
17394
|
};
|
|
17182
17395
|
/**
|
|
17396
|
+
* @returns {void}
|
|
17183
17397
|
* @private
|
|
17184
17398
|
*/
|
|
17185
17399
|
Zoom.prototype.addEventListener = function () {
|
|
@@ -17195,6 +17409,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17195
17409
|
EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this);
|
|
17196
17410
|
};
|
|
17197
17411
|
/**
|
|
17412
|
+
* @returns {void}
|
|
17198
17413
|
* @private
|
|
17199
17414
|
*/
|
|
17200
17415
|
Zoom.prototype.removeEventListener = function () {
|
|
@@ -17241,6 +17456,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17241
17456
|
this.removeEventListener();
|
|
17242
17457
|
this.layerCollectionEle = null;
|
|
17243
17458
|
this.currentLayer = null;
|
|
17459
|
+
this.pinchDistance = null;
|
|
17244
17460
|
this.maps = null;
|
|
17245
17461
|
};
|
|
17246
17462
|
return Zoom;
|
|
@@ -17275,6 +17491,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
17275
17491
|
var argsData = {
|
|
17276
17492
|
cancel: false, htmlContent: this.getHTMLContent(maps, elements), name: beforePrint
|
|
17277
17493
|
};
|
|
17494
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17278
17495
|
maps.trigger('beforePrint', argsData, function (beforePrintArgs) {
|
|
17279
17496
|
if (!argsData.cancel) {
|
|
17280
17497
|
print(argsData.htmlContent, printWindow);
|
|
@@ -17292,6 +17509,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
17292
17509
|
Print.prototype.getHTMLContent = function (maps, elements) {
|
|
17293
17510
|
var div = createElement('div');
|
|
17294
17511
|
var divElement = maps.element.cloneNode(true);
|
|
17512
|
+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17295
17513
|
var backgroundElement = (!maps.isTileMap ? divElement.getElementsByTagName('svg')[0] : divElement.getElementsByTagName('svg')[1]);
|
|
17296
17514
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
17297
17515
|
backgroundElement = backgroundElement.childNodes[0];
|
|
@@ -17543,7 +17761,7 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
17543
17761
|
* @returns {void}
|
|
17544
17762
|
* @private
|
|
17545
17763
|
*/
|
|
17546
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
17764
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17547
17765
|
ImageExport.prototype.destroy = function () { };
|
|
17548
17766
|
return ImageExport;
|
|
17549
17767
|
}());
|
|
@@ -17558,7 +17776,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
17558
17776
|
* Constructor for Maps
|
|
17559
17777
|
*
|
|
17560
17778
|
*/
|
|
17561
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
17779
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17562
17780
|
function PdfExport() {
|
|
17563
17781
|
}
|
|
17564
17782
|
/**
|
|
@@ -17574,7 +17792,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
17574
17792
|
*/
|
|
17575
17793
|
PdfExport.prototype.export = function (maps, type, fileName, allowDownload, orientation) {
|
|
17576
17794
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17577
|
-
var promise = new Promise(function (resolve
|
|
17795
|
+
var promise = new Promise(function (resolve) {
|
|
17578
17796
|
if (maps.isTileMap) {
|
|
17579
17797
|
maps.isExportInitialTileMap = true;
|
|
17580
17798
|
}
|
|
@@ -17713,7 +17931,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
17713
17931
|
* @returns {void}
|
|
17714
17932
|
* @private
|
|
17715
17933
|
*/
|
|
17716
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
17934
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17717
17935
|
PdfExport.prototype.destroy = function () { };
|
|
17718
17936
|
return PdfExport;
|
|
17719
17937
|
}());
|