@syncfusion/ej2-maps 25.1.37 → 25.1.40
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 +9 -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 +620 -396
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +601 -378
- 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 +4 -6
- package/src/maps/layers/layer-panel.d.ts +9 -7
- package/src/maps/layers/layer-panel.js +124 -121
- 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 +82 -52
- 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,6 +1933,7 @@ 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
1938
|
xSum = (1 / (pointValue * sum)) * xSum;
|
|
1917
1939
|
ySum = (1 / (pointValue * sum)) * ySum;
|
|
@@ -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 = [];
|
|
@@ -7144,121 +7180,126 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
7144
7180
|
};
|
|
7145
7181
|
LayerPanel.prototype.arrangeTiles = function (type, x, y) {
|
|
7146
7182
|
var _this = this;
|
|
7147
|
-
var element = document.getElementById(this.mapObject.element.id + '_tile_parent');
|
|
7148
|
-
var element1 = document.getElementById(this.mapObject.element.id + '_tiles');
|
|
7149
7183
|
var timeOut;
|
|
7150
7184
|
if (!isNullOrUndefined(type) && type !== 'Pan') {
|
|
7151
7185
|
this.tileAnimation(type, x, y);
|
|
7152
7186
|
timeOut = animationMode === 'Disable' ? 0 : (this.mapObject.layersCollection[0].animationDuration === 0 &&
|
|
7153
7187
|
animationMode === 'Enable') ? 1000 : this.mapObject.layersCollection[0].animationDuration;
|
|
7154
7188
|
}
|
|
7155
|
-
else {
|
|
7156
|
-
timeOut = 0;
|
|
7157
|
-
}
|
|
7158
7189
|
if (this.mapObject.layers[this.mapObject.baseLayerIndex].layerType === 'GoogleStaticMap') {
|
|
7159
7190
|
this.renderGoogleMap(this.mapObject.layers[0].key, this.mapObject.staticMapZoom);
|
|
7160
7191
|
}
|
|
7161
7192
|
else {
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7193
|
+
if (type === 'Pan') {
|
|
7194
|
+
this.arrangeTilesLayer(type);
|
|
7195
|
+
}
|
|
7196
|
+
else {
|
|
7197
|
+
setTimeout(function () {
|
|
7198
|
+
_this.arrangeTilesLayer(type);
|
|
7199
|
+
}, timeOut);
|
|
7200
|
+
}
|
|
7201
|
+
}
|
|
7202
|
+
};
|
|
7203
|
+
LayerPanel.prototype.arrangeTilesLayer = function (type) {
|
|
7204
|
+
var element = document.getElementById(this.mapObject.element.id + '_tile_parent');
|
|
7205
|
+
var element1 = document.getElementById(this.mapObject.element.id + '_tiles');
|
|
7206
|
+
if (element) {
|
|
7207
|
+
element.style.zIndex = '1';
|
|
7208
|
+
}
|
|
7209
|
+
if (element1) {
|
|
7210
|
+
element1.style.zIndex = '0';
|
|
7211
|
+
}
|
|
7212
|
+
var animateElement;
|
|
7213
|
+
if (!document.getElementById(this.mapObject.element.id + '_animated_tiles') && element) {
|
|
7214
|
+
animateElement = createElement('div', { id: this.mapObject.element.id + '_animated_tiles' });
|
|
7215
|
+
element.appendChild(animateElement);
|
|
7216
|
+
}
|
|
7217
|
+
else {
|
|
7218
|
+
if (type !== 'Pan' && element1 && element) {
|
|
7219
|
+
element1.appendChild(element.children[0]);
|
|
7220
|
+
if (!this.mapObject.isAddLayer && !isNullOrUndefined(document.getElementById(this.mapObject.element.id + '_animated_tiles'))) {
|
|
7221
|
+
document.getElementById(this.mapObject.element.id + '_animated_tiles').id =
|
|
7222
|
+
this.mapObject.element.id + '_animated_tiles_old';
|
|
7168
7223
|
}
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7224
|
+
animateElement = createElement('div', { id: this.mapObject.element.id + '_animated_tiles' });
|
|
7225
|
+
element.appendChild(animateElement);
|
|
7226
|
+
}
|
|
7227
|
+
else {
|
|
7228
|
+
animateElement = element ? element.children[0] : null;
|
|
7229
|
+
}
|
|
7230
|
+
}
|
|
7231
|
+
for (var id = 0; id < this.tiles.length; id++) {
|
|
7232
|
+
var tile = this.tiles[id];
|
|
7233
|
+
var imgElement = null;
|
|
7234
|
+
var mapId = this.mapObject.element.id;
|
|
7235
|
+
if (type === 'Pan') {
|
|
7236
|
+
var child = document.getElementById(mapId + '_tile_' + id);
|
|
7237
|
+
var isNewTile = false;
|
|
7238
|
+
if (isNullOrUndefined(child)) {
|
|
7239
|
+
isNewTile = true;
|
|
7240
|
+
child = createElement('div', { id: mapId + '_tile_' + id });
|
|
7241
|
+
imgElement = createElement('img');
|
|
7173
7242
|
}
|
|
7174
7243
|
else {
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7244
|
+
child.style.removeProperty('display');
|
|
7245
|
+
imgElement = child.children[0];
|
|
7246
|
+
}
|
|
7247
|
+
if (!isNewTile && imgElement && imgElement.src !== tile.src) {
|
|
7248
|
+
imgElement.src = tile.src;
|
|
7249
|
+
}
|
|
7250
|
+
child.style.position = 'absolute';
|
|
7251
|
+
child.style.left = tile.left + 'px';
|
|
7252
|
+
child.style.top = tile.top + 'px';
|
|
7253
|
+
child.style.height = tile.height + 'px';
|
|
7254
|
+
child.style.width = tile.width + 'px';
|
|
7255
|
+
if (isNewTile) {
|
|
7256
|
+
imgElement.setAttribute('height', '256px');
|
|
7257
|
+
imgElement.setAttribute('width', '256px');
|
|
7258
|
+
imgElement.setAttribute('src', tile.src);
|
|
7259
|
+
imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7260
|
+
imgElement.style.setProperty('user-select', 'none');
|
|
7261
|
+
child.appendChild(imgElement);
|
|
7262
|
+
animateElement.appendChild(child);
|
|
7187
7263
|
}
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
child.appendChild(imgElement);
|
|
7219
|
-
animateElement.appendChild(child);
|
|
7220
|
-
}
|
|
7221
|
-
}
|
|
7222
|
-
else {
|
|
7223
|
-
imgElement = createElement('img');
|
|
7224
|
-
imgElement.setAttribute('height', '256px');
|
|
7225
|
-
imgElement.setAttribute('width', '256px');
|
|
7226
|
-
imgElement.setAttribute('src', tile.src);
|
|
7227
|
-
imgElement.style.setProperty('user-select', 'none');
|
|
7228
|
-
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7229
|
-
var child = createElement('div', { id: mapId + '_tile_' + id });
|
|
7230
|
-
child.style.position = 'absolute';
|
|
7231
|
-
child.style.left = tile.left + 'px';
|
|
7232
|
-
child.style.top = tile.top + 'px';
|
|
7233
|
-
child.style.height = tile.height + 'px';
|
|
7234
|
-
child.style.width = tile.width + 'px';
|
|
7235
|
-
child.appendChild(imgElement);
|
|
7236
|
-
if (animateElement) {
|
|
7237
|
-
animateElement.appendChild(child);
|
|
7238
|
-
}
|
|
7239
|
-
}
|
|
7240
|
-
if (id === (_this.tiles.length - 1) && document.getElementById(_this.mapObject.element.id + '_animated_tiles_old')) {
|
|
7241
|
-
removeElement(_this.mapObject.element.id + '_animated_tiles_old');
|
|
7264
|
+
}
|
|
7265
|
+
else {
|
|
7266
|
+
imgElement = createElement('img');
|
|
7267
|
+
imgElement.setAttribute('height', '256px');
|
|
7268
|
+
imgElement.setAttribute('width', '256px');
|
|
7269
|
+
imgElement.setAttribute('src', tile.src);
|
|
7270
|
+
imgElement.style.setProperty('user-select', 'none');
|
|
7271
|
+
imgElement.setAttribute('alt', this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7272
|
+
var child = createElement('div', { id: mapId + '_tile_' + id });
|
|
7273
|
+
child.style.position = 'absolute';
|
|
7274
|
+
child.style.left = tile.left + 'px';
|
|
7275
|
+
child.style.top = tile.top + 'px';
|
|
7276
|
+
child.style.height = tile.height + 'px';
|
|
7277
|
+
child.style.width = tile.width + 'px';
|
|
7278
|
+
child.appendChild(imgElement);
|
|
7279
|
+
if (animateElement) {
|
|
7280
|
+
animateElement.appendChild(child);
|
|
7281
|
+
}
|
|
7282
|
+
}
|
|
7283
|
+
if (id === (this.tiles.length - 1) && document.getElementById(this.mapObject.element.id + '_animated_tiles_old')) {
|
|
7284
|
+
removeElement(this.mapObject.element.id + '_animated_tiles_old');
|
|
7285
|
+
}
|
|
7286
|
+
}
|
|
7287
|
+
if (!isNullOrUndefined(this.mapObject.currentTiles)) {
|
|
7288
|
+
for (var l = this.tiles.length; l < animateElement.childElementCount; l++) {
|
|
7289
|
+
var isExistingElement = false;
|
|
7290
|
+
for (var a = 0; a < this.mapObject.currentTiles.childElementCount; a++) {
|
|
7291
|
+
if (!isExistingElement &&
|
|
7292
|
+
this.mapObject.currentTiles.children[a].id === animateElement.children[l].id) {
|
|
7293
|
+
isExistingElement = true;
|
|
7242
7294
|
}
|
|
7243
7295
|
}
|
|
7244
|
-
if (
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
_this.mapObject.currentTiles.children[a].id === animateElement.children[l].id) {
|
|
7250
|
-
isExistingElement = true;
|
|
7251
|
-
}
|
|
7252
|
-
}
|
|
7253
|
-
if (isExistingElement) {
|
|
7254
|
-
animateElement.children[l].style.display = 'none';
|
|
7255
|
-
}
|
|
7256
|
-
else {
|
|
7257
|
-
animateElement.removeChild(animateElement.children[l]);
|
|
7258
|
-
}
|
|
7259
|
-
}
|
|
7296
|
+
if (isExistingElement) {
|
|
7297
|
+
animateElement.children[l].style.display = 'none';
|
|
7298
|
+
}
|
|
7299
|
+
else {
|
|
7300
|
+
animateElement.removeChild(animateElement.children[l]);
|
|
7260
7301
|
}
|
|
7261
|
-
}
|
|
7302
|
+
}
|
|
7262
7303
|
}
|
|
7263
7304
|
};
|
|
7264
7305
|
/**
|
|
@@ -7452,10 +7493,14 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7452
7493
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7453
7494
|
this.map.renderReactTemplates();
|
|
7454
7495
|
};
|
|
7455
|
-
// eslint-disable-next-line valid-jsdoc
|
|
7456
7496
|
/**
|
|
7457
7497
|
* To create annotation elements
|
|
7458
7498
|
*
|
|
7499
|
+
* @param {HTMLElement} parentElement - Specifies the parent element in the map.
|
|
7500
|
+
* @param {Annotation} annotation - Specifies the options for customizing the annotation element in maps.
|
|
7501
|
+
* @param {number} annotationIndex - Specifies the index of the annotation.
|
|
7502
|
+
* @returns {void}
|
|
7503
|
+
*
|
|
7459
7504
|
* @private
|
|
7460
7505
|
*/
|
|
7461
7506
|
Annotations.prototype.createAnnotationTemplate = function (parentElement, annotation, annotationIndex) {
|
|
@@ -7467,7 +7512,6 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7467
7512
|
var map = this.map;
|
|
7468
7513
|
var templateElement;
|
|
7469
7514
|
var availSize = map.availableSize;
|
|
7470
|
-
var id = map.element.id + '_Annotation_' + annotationIndex;
|
|
7471
7515
|
var childElement = createElement('div', {
|
|
7472
7516
|
id: map.element.id + '_Annotation_' + annotationIndex
|
|
7473
7517
|
});
|
|
@@ -7476,6 +7520,7 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7476
7520
|
cancel: false, name: annotationRendering, content: annotation.content,
|
|
7477
7521
|
annotation: annotation
|
|
7478
7522
|
};
|
|
7523
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7479
7524
|
this.map.trigger(annotationRendering, argsData, function (annotationArgs) {
|
|
7480
7525
|
if (argsData.cancel) {
|
|
7481
7526
|
return;
|
|
@@ -7873,16 +7918,19 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7873
7918
|
}
|
|
7874
7919
|
});
|
|
7875
7920
|
};
|
|
7876
|
-
|
|
7921
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7877
7922
|
Maps.prototype.processAjaxRequest = function (layer, localAjax, type) {
|
|
7878
7923
|
var _this = this;
|
|
7879
7924
|
this.serverProcess['request']++;
|
|
7880
7925
|
var fetchApiModule = new Fetch(localAjax.dataOptions, localAjax.type, localAjax.contentType);
|
|
7926
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7881
7927
|
fetchApiModule.onSuccess = function (args) {
|
|
7882
7928
|
if (!isNullOrUndefined(args.type) && args.type === 'application/octet-stream') {
|
|
7883
7929
|
var reader_1 = new FileReader();
|
|
7930
|
+
//eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
7884
7931
|
var map_1 = _this;
|
|
7885
|
-
|
|
7932
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
7933
|
+
reader_1.onload = function () {
|
|
7886
7934
|
args = JSON.parse(reader_1.result.toString());
|
|
7887
7935
|
map_1.processResponseJsonData('Fetch', args, layer, type);
|
|
7888
7936
|
};
|
|
@@ -7904,13 +7952,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7904
7952
|
* @returns {void}
|
|
7905
7953
|
* @private
|
|
7906
7954
|
*/
|
|
7907
|
-
Maps.prototype.processResponseJsonData = function (processType,
|
|
7955
|
+
Maps.prototype.processResponseJsonData = function (processType,
|
|
7956
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7957
|
+
data, layer, dataType) {
|
|
7908
7958
|
this.serverProcess['response']++;
|
|
7909
7959
|
if (processType) {
|
|
7910
7960
|
if (dataType === 'ShapeData') {
|
|
7961
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7911
7962
|
layer.shapeData = (processType === 'DataManager') ? processResult(data) : data;
|
|
7912
7963
|
}
|
|
7913
7964
|
else {
|
|
7965
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7914
7966
|
layer.dataSource = (processType === 'DataManager') ? processResult(data) : data;
|
|
7915
7967
|
}
|
|
7916
7968
|
}
|
|
@@ -8049,12 +8101,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8049
8101
|
Maps.prototype.triggerZoomEvent = function () {
|
|
8050
8102
|
var loadedArgs;
|
|
8051
8103
|
var minMaxLatitudeLongitude = this.getMinMaxLatitudeLongitude();
|
|
8104
|
+
// eslint-disable-next-line prefer-const
|
|
8052
8105
|
loadedArgs = {
|
|
8053
8106
|
maps: this, isResized: this.isResize, minLatitude: minMaxLatitudeLongitude.minLatitude,
|
|
8054
8107
|
maxLatitude: minMaxLatitudeLongitude.maxLatitude, minLongitude: minMaxLatitudeLongitude.minLongitude,
|
|
8055
8108
|
maxLongitude: minMaxLatitudeLongitude.maxLongitude, cancel: false, name: 'Loaded'
|
|
8056
8109
|
};
|
|
8057
8110
|
this.trigger('loaded', loadedArgs);
|
|
8111
|
+
//eslint-enable @typescript-eslint/prefer-const
|
|
8058
8112
|
};
|
|
8059
8113
|
/**
|
|
8060
8114
|
* To apply color to the initial selected marker
|
|
@@ -8062,7 +8116,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8062
8116
|
* @param {SelectionSettingsModel} selectionSettings - Specifies the selection settings
|
|
8063
8117
|
* @param {Maps} map - Specifies the instance of the maps
|
|
8064
8118
|
* @param {Element} targetElement - Specifies the target element
|
|
8065
|
-
* @param {
|
|
8119
|
+
* @param {object} data - Specifies the data
|
|
8066
8120
|
* @returns {void}
|
|
8067
8121
|
* @private
|
|
8068
8122
|
*/
|
|
@@ -8113,6 +8167,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8113
8167
|
var selectionSettings = markerSettings.selectionSettings;
|
|
8114
8168
|
if (selectionSettings.enable) {
|
|
8115
8169
|
for (var i = 0; i < markerSettings.dataSource['length']; i++) {
|
|
8170
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8116
8171
|
var data = markerSettings.dataSource[i];
|
|
8117
8172
|
if (data['latitude'] === latitude && data['longitude'] === longitude) {
|
|
8118
8173
|
var targetId = this.element.id + '_' + 'LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex +
|
|
@@ -8234,7 +8289,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8234
8289
|
var mapsElement = document.getElementById(this.element.id);
|
|
8235
8290
|
if (!isNullOrUndefined(mapsElement)) {
|
|
8236
8291
|
var element = mapsElement.getBoundingClientRect();
|
|
8237
|
-
var minPosition = this.isTileMap ?
|
|
8292
|
+
var minPosition = this.isTileMap ?
|
|
8293
|
+
this.pointToLatLong((this.mapAreaRect.x - this.margin.left), -this.mapAreaRect.y) :
|
|
8294
|
+
this.getGeoLocation(0, (this.mapAreaRect.x + element.left), this.mapAreaRect.y);
|
|
8238
8295
|
var maxPosition = this.isTileMap ? this.pointToLatLong(this.mapAreaRect.width, (this.mapAreaRect.height - this.mapAreaRect.y)) :
|
|
8239
8296
|
this.getGeoLocation(0, (this.mapAreaRect.x + element.left + this.mapAreaRect.width), (this.mapAreaRect.y + this.mapAreaRect.height));
|
|
8240
8297
|
var MinMaxLatitudeLongitude = {
|
|
@@ -8260,7 +8317,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8260
8317
|
var templateElements = document.getElementsByClassName(this.element.id + '_template');
|
|
8261
8318
|
if (!isNullOrUndefined(templateElements) && templateElements.length > 0 &&
|
|
8262
8319
|
getElementByID(this.element.id + '_Layer_Collections') && !this.isTileMap) {
|
|
8263
|
-
Array.prototype.forEach.call(templateElements, function (templateGroupEle
|
|
8320
|
+
Array.prototype.forEach.call(templateElements, function (templateGroupEle) {
|
|
8264
8321
|
var offSetLetValue = 0;
|
|
8265
8322
|
var offSetTopValue = 0;
|
|
8266
8323
|
if (!isNullOrUndefined(templateGroupEle) && templateGroupEle.childElementCount > 0) {
|
|
@@ -8272,9 +8329,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8272
8329
|
offSetTopValue = _this.isTileMap ? 0 : (layerOffset.top < elementOffset.top) ?
|
|
8273
8330
|
-(Math.abs(elementOffset.top - layerOffset.top)) : Math.abs(elementOffset.top - layerOffset.top);
|
|
8274
8331
|
}
|
|
8275
|
-
Array.prototype.forEach.call(templateGroupEle.childNodes, function (currentTemplate
|
|
8332
|
+
Array.prototype.forEach.call(templateGroupEle.childNodes, function (currentTemplate) {
|
|
8276
8333
|
if (currentTemplate.id.indexOf('Marker') !== -1) {
|
|
8277
|
-
if (currentTemplate.style.visibility
|
|
8334
|
+
if (currentTemplate.style.visibility !== 'hidden') {
|
|
8278
8335
|
var elementOffset_1 = getElementByID(currentTemplate.id).getBoundingClientRect();
|
|
8279
8336
|
currentTemplate.style.left = parseFloat(currentTemplate.style.left) - (_this.isTileMap ? 0 : elementOffset_1.width / 2) + 'px';
|
|
8280
8337
|
currentTemplate.style.top = parseFloat(currentTemplate.style.top) - (_this.isTileMap ? 0 : elementOffset_1.height / 2) + 'px';
|
|
@@ -8333,6 +8390,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8333
8390
|
Maps.prototype.findBaseAndSubLayers = function () {
|
|
8334
8391
|
var _this = this;
|
|
8335
8392
|
var baseIndex = this.baseLayerIndex;
|
|
8393
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8336
8394
|
var mainLayers = [];
|
|
8337
8395
|
var subLayers = [];
|
|
8338
8396
|
this.layersCollection = [];
|
|
@@ -8507,6 +8565,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8507
8565
|
* @returns {void}
|
|
8508
8566
|
* @private
|
|
8509
8567
|
*/
|
|
8568
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8510
8569
|
Maps.prototype.mouseLeaveOnMap = function (e) {
|
|
8511
8570
|
if (document.getElementsByClassName('highlightMapStyle').length > 0 && this.legendModule) {
|
|
8512
8571
|
this.legendModule.removeShapeHighlightCollection();
|
|
@@ -8532,7 +8591,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8532
8591
|
Maps.prototype.keyboardHighlightSelection = function (id, key) {
|
|
8533
8592
|
var layerIndex = parseInt(id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
8534
8593
|
var shapeIndex = parseInt(id.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
8535
|
-
//
|
|
8594
|
+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8536
8595
|
var shapeData = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
|
|
8537
8596
|
this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
|
|
8538
8597
|
var dataIndex = parseInt(id.split('_dataIndex_')[1].split('_')[0], 10);
|
|
@@ -8662,11 +8721,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8662
8721
|
};
|
|
8663
8722
|
if (this.onclick) {
|
|
8664
8723
|
eventArgs_1.name = onclick;
|
|
8724
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8665
8725
|
this.trigger('onclick', eventArgs_1, function (mouseArgs) {
|
|
8666
8726
|
_this.clickHandler(e, eventArgs_1, targetEle);
|
|
8667
8727
|
});
|
|
8668
8728
|
}
|
|
8669
8729
|
else {
|
|
8730
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8670
8731
|
this.trigger('click', eventArgs_1, function (mouseArgs) {
|
|
8671
8732
|
_this.clickHandler(e, eventArgs_1, targetEle);
|
|
8672
8733
|
});
|
|
@@ -8711,7 +8772,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8711
8772
|
};
|
|
8712
8773
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8713
8774
|
Maps.prototype.getMarkerClickLocation = function (pageX, pageY, x, y, marker$$1, isDragEnd) {
|
|
8714
|
-
document.getElementById(this.element.id +
|
|
8775
|
+
document.getElementById(this.element.id + '_svg').style.cursor = 'grabbing';
|
|
8715
8776
|
var targetElement = getElement(marker$$1.targetId);
|
|
8716
8777
|
var latLongValue = this.getClickLocation(marker$$1.targetId, pageX, pageY, targetElement, x, y);
|
|
8717
8778
|
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 +8791,24 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8730
8791
|
}
|
|
8731
8792
|
return latLongValue;
|
|
8732
8793
|
};
|
|
8733
|
-
/**
|
|
8794
|
+
/**
|
|
8795
|
+
* Gets the location of the mouse click
|
|
8796
|
+
*
|
|
8797
|
+
* @param {string} targetId - Specifies the ID for the target.
|
|
8798
|
+
* @param {number} pageX - Defines the page X position.
|
|
8799
|
+
* @param {number} pageY - Defines the page Y position.
|
|
8800
|
+
* @param {HTMLElement} targetElement - Specifies the target element on the event.
|
|
8801
|
+
* @param {number} x - Defines the x position in pixel.
|
|
8802
|
+
* @param {number} y - Defines the y position in pixel.
|
|
8803
|
+
* @param {string} type - Specifies the type.
|
|
8804
|
+
* @returns {GeoPosition} - Returns the position of the event
|
|
8805
|
+
*
|
|
8806
|
+
* @private
|
|
8807
|
+
*
|
|
8808
|
+
*/
|
|
8734
8809
|
Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y, type) {
|
|
8735
8810
|
var layerIndex = 0;
|
|
8811
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8736
8812
|
var latLongValue;
|
|
8737
8813
|
if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap && (!isNullOrUndefined(type) ||
|
|
8738
8814
|
((parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
|
|
@@ -8740,6 +8816,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8740
8816
|
layerIndex = parseFloat(targetId.split('_LayerIndex_')[1].split('_')[0]);
|
|
8741
8817
|
if (this.layers[layerIndex].geometryType === 'Normal') {
|
|
8742
8818
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
8819
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8743
8820
|
var immediateParent = targetElement.parentElement;
|
|
8744
8821
|
var parentElement = immediateParent.id.indexOf('_Point_Group') > -1 || immediateParent.id.indexOf('_LineString_Group') > -1
|
|
8745
8822
|
|| immediateParent.id.indexOf('_MultiLineString_Group') > -1 || immediateParent.id.indexOf('_Polygon_Group') > -1 ?
|
|
@@ -8753,9 +8830,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8753
8830
|
longitude: Math.abs((location_2.x / zoomScaleValue) + this.baseMapBounds.longitude.min)
|
|
8754
8831
|
};
|
|
8755
8832
|
if (this.baseMapBounds.longitude.min < 0 && minLongitude > location_2.x) {
|
|
8833
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8756
8834
|
latLongValue.longitude = -latLongValue.longitude;
|
|
8757
8835
|
}
|
|
8758
8836
|
if (this.baseMapBounds.latitude.min < 0 && minLatitude > location_2.y) {
|
|
8837
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8759
8838
|
latLongValue.latitude = -latLongValue.latitude;
|
|
8760
8839
|
}
|
|
8761
8840
|
}
|
|
@@ -8763,6 +8842,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8763
8842
|
var markerIndex = parseInt(targetId.split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
8764
8843
|
var dataIndex = parseInt(targetId.split('_dataIndex_')[1].split('_')[0], 10);
|
|
8765
8844
|
if (!isNaN(markerIndex) && !isNaN(dataIndex)) {
|
|
8845
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8766
8846
|
var dataObject = this.layers[layerIndex].markerSettings[markerIndex].dataSource[dataIndex];
|
|
8767
8847
|
latLongValue = { latitude: dataObject['latitude'], longitude: dataObject.longitude };
|
|
8768
8848
|
}
|
|
@@ -8777,13 +8857,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8777
8857
|
var minLongitude = Math.abs((-this.baseMapBounds.longitude.min) * this.mapLayerPanel.currentFactor);
|
|
8778
8858
|
var minLatitude = Math.abs(this.baseMapBounds.latitude.max * this.mapLayerPanel.currentFactor);
|
|
8779
8859
|
latLongValue = {
|
|
8780
|
-
latitude: Math.abs(this.baseMapBounds.latitude.max
|
|
8781
|
-
|
|
8860
|
+
latitude: Math.abs(this.baseMapBounds.latitude.max
|
|
8861
|
+
- (location_3.y / (this.mapLayerPanel.currentFactor * this.scale))),
|
|
8862
|
+
longitude: Math.abs((location_3.x / (this.mapLayerPanel.currentFactor * this.scale))
|
|
8863
|
+
+ this.baseMapBounds.longitude.min)
|
|
8782
8864
|
};
|
|
8783
8865
|
if (this.baseMapBounds.longitude.min < 0 && minLongitude > location_3.x) {
|
|
8866
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8784
8867
|
latLongValue.longitude = -latLongValue.longitude;
|
|
8785
8868
|
}
|
|
8786
8869
|
if (this.baseMapBounds.latitude.min < 0 && minLatitude > location_3.y) {
|
|
8870
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8787
8871
|
latLongValue.latitude = -latLongValue.latitude;
|
|
8788
8872
|
}
|
|
8789
8873
|
}
|
|
@@ -8819,25 +8903,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8819
8903
|
* @private
|
|
8820
8904
|
*/
|
|
8821
8905
|
Maps.prototype.mouseEndOnMap = function (e) {
|
|
8822
|
-
var targetEle = e.target;
|
|
8823
|
-
var targetId = targetEle.id;
|
|
8824
8906
|
var pageX;
|
|
8825
|
-
var latitude = null;
|
|
8826
|
-
var longitude = null;
|
|
8827
8907
|
var pageY;
|
|
8828
|
-
var target;
|
|
8829
8908
|
var touchArg;
|
|
8830
8909
|
var layerX = 0;
|
|
8831
8910
|
var layerY = 0;
|
|
8832
|
-
var rect = this.element.getBoundingClientRect();
|
|
8833
|
-
var element = e.target;
|
|
8834
8911
|
if (e.type.indexOf('touch') !== -1) {
|
|
8835
8912
|
this.isTouch = true;
|
|
8836
8913
|
touchArg = e;
|
|
8837
8914
|
layerX = pageX = touchArg.changedTouches[0].pageX;
|
|
8838
8915
|
pageY = touchArg.changedTouches[0].pageY;
|
|
8839
8916
|
layerY = pageY - (this.isTileMap ? 10 : 0);
|
|
8840
|
-
target = touchArg.target;
|
|
8841
8917
|
this.mouseClickEvent = { x: pageX, y: pageY };
|
|
8842
8918
|
}
|
|
8843
8919
|
else {
|
|
@@ -8846,19 +8922,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8846
8922
|
pageY = e.pageY;
|
|
8847
8923
|
layerX = e['layerX'];
|
|
8848
8924
|
layerY = e['layerY'] - (this.isTileMap ? 10 : 0);
|
|
8849
|
-
target = e.target;
|
|
8850
8925
|
}
|
|
8851
8926
|
if (this.isTileMap) {
|
|
8852
8927
|
this.removeTileMap();
|
|
8853
8928
|
}
|
|
8854
8929
|
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
8930
|
this.titleTooltip(e, pageX, pageY, true);
|
|
8863
8931
|
if (!isNullOrUndefined(this.legendModule)) {
|
|
8864
8932
|
this.legendTooltip(e, e.pageX, e.pageY, true);
|
|
@@ -8869,12 +8937,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8869
8937
|
e.preventDefault();
|
|
8870
8938
|
}
|
|
8871
8939
|
if (!isNullOrUndefined(this.markerDragArgument)) {
|
|
8940
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8872
8941
|
var marker$$1 = this.markerDragArgument;
|
|
8873
8942
|
this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
|
|
8874
8943
|
this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
|
|
8875
8944
|
var latLongValue = this.getMarkerClickLocation(pageX, pageY, layerX, layerY, this.markerDragArgument, true);
|
|
8876
8945
|
var markerObject = this.layers[marker$$1.layerIndex].markerSettings[marker$$1.markerIndex];
|
|
8877
|
-
document.getElementById(this.element.id +
|
|
8946
|
+
document.getElementById(this.element.id + '_svg').style.cursor = markerObject.enableDrag ? 'pointer' : 'grabbing';
|
|
8878
8947
|
var dragEventArgs = {
|
|
8879
8948
|
name: 'markerDragEnd', x: pageX, y: pageY,
|
|
8880
8949
|
latitude: latLongValue.latitude, longitude: latLongValue.longitude,
|
|
@@ -8901,7 +8970,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8901
8970
|
this.trigger('markerDragEnd', dragEventArgs);
|
|
8902
8971
|
}
|
|
8903
8972
|
else {
|
|
8904
|
-
document.getElementById(this.element.id +
|
|
8973
|
+
document.getElementById(this.element.id + '_svg').style.cursor = 'auto';
|
|
8905
8974
|
}
|
|
8906
8975
|
if (this.zoomModule && this.isDevice) {
|
|
8907
8976
|
this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.scale, this.element.id + '_Zooming_');
|
|
@@ -8918,13 +8987,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8918
8987
|
*/
|
|
8919
8988
|
Maps.prototype.mouseDownOnMap = function (e) {
|
|
8920
8989
|
this.mouseDownEvent = { x: e.x, y: e.y };
|
|
8990
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8921
8991
|
if (e.type.indexOf('touch') !== -1 && e.changedTouches) {
|
|
8992
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8922
8993
|
this.mouseDownEvent = { x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY };
|
|
8923
8994
|
}
|
|
8924
8995
|
if (this.isDevice && !isNullOrUndefined(this.mapsTooltipModule)) {
|
|
8925
8996
|
this.mapsTooltipModule.renderTooltip(e);
|
|
8926
8997
|
}
|
|
8927
|
-
var rect = this.element.getBoundingClientRect();
|
|
8928
8998
|
var element = e.target;
|
|
8929
8999
|
this.markerDragId = element.id;
|
|
8930
9000
|
var animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
|
|
@@ -8955,7 +9025,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8955
9025
|
Maps.prototype.mergeCluster = function () {
|
|
8956
9026
|
if (this.markerModule && (this.markerModule.sameMarkerData.length > 0) &&
|
|
8957
9027
|
(this.zoomModule ? this.zoomModule.isSingleClick : true)) {
|
|
8958
|
-
mergeSeparateCluster(this.markerModule.sameMarkerData, this
|
|
9028
|
+
mergeSeparateCluster(this.markerModule.sameMarkerData, this);
|
|
8959
9029
|
this.markerModule.sameMarkerData = [];
|
|
8960
9030
|
}
|
|
8961
9031
|
};
|
|
@@ -8996,6 +9066,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8996
9066
|
var targetElement = e.target;
|
|
8997
9067
|
var targetId = targetElement.id;
|
|
8998
9068
|
var layerIndex = 0;
|
|
9069
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8999
9070
|
var latLongValue;
|
|
9000
9071
|
var latitude = null;
|
|
9001
9072
|
var longitude = null;
|
|
@@ -9041,8 +9112,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9041
9112
|
if (this.bubbleModule) {
|
|
9042
9113
|
this.bubbleModule.bubbleMove(e);
|
|
9043
9114
|
}
|
|
9044
|
-
if (target.id.indexOf('MarkerIndex')
|
|
9045
|
-
document.getElementById(this.element.id +
|
|
9115
|
+
if (target.id.indexOf('MarkerIndex') === -1) {
|
|
9116
|
+
document.getElementById(this.element.id + '_svg').style.cursor = 'auto';
|
|
9046
9117
|
}
|
|
9047
9118
|
this.onMouseMove(e);
|
|
9048
9119
|
this.notify(Browser.touchMoveEvent, e);
|
|
@@ -9062,7 +9133,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9062
9133
|
var touches = null;
|
|
9063
9134
|
var layerX = 0;
|
|
9064
9135
|
var layerY = 0;
|
|
9065
|
-
if (e.type.indexOf('touch')
|
|
9136
|
+
if (e.type.indexOf('touch') === -1) {
|
|
9066
9137
|
pageX = e.pageX;
|
|
9067
9138
|
pageY = e.pageY;
|
|
9068
9139
|
layerX = e['layerX'];
|
|
@@ -9078,6 +9149,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9078
9149
|
layerY = pageY = touches[0].clientY - (this.isTileMap ? 10 : 0);
|
|
9079
9150
|
}
|
|
9080
9151
|
if (!isNullOrUndefined(this.markerDragArgument)) {
|
|
9152
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9081
9153
|
var marker$$1 = this.markerDragArgument;
|
|
9082
9154
|
this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
|
|
9083
9155
|
this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
|
|
@@ -9093,6 +9165,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9093
9165
|
var legendText;
|
|
9094
9166
|
var page = this.legendModule.currentPage;
|
|
9095
9167
|
var legendIndex = event.target.id.split('_Index_')[1];
|
|
9168
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9096
9169
|
var collection;
|
|
9097
9170
|
page = this.legendModule.totalPages.length <= this.legendModule.currentPage
|
|
9098
9171
|
? this.legendModule.totalPages.length - 1 : this.legendModule.currentPage < 0 ?
|
|
@@ -9135,6 +9208,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9135
9208
|
*
|
|
9136
9209
|
* @param e - Specifies the arguments of window resize event.
|
|
9137
9210
|
*/
|
|
9211
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9138
9212
|
Maps.prototype.mapsOnResize = function (e) {
|
|
9139
9213
|
var _this = this;
|
|
9140
9214
|
if (!this.isDestroyed && !this.isExportInitialTileMap) {
|
|
@@ -9169,6 +9243,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9169
9243
|
* This method is used to zoom the map by specifying the center position.
|
|
9170
9244
|
*
|
|
9171
9245
|
* @param {number} centerPosition - Specifies the location of the maps to be zoomed as geographical coordinates.
|
|
9246
|
+
* @param {number} centerPosition.longitude - Specifies the longitude of the location to be zoomed.
|
|
9247
|
+
* @param {number} centerPosition.latitude - Specifies the latitude of the location to be zoomed.
|
|
9172
9248
|
* @param {number} zoomFactor - Specifies the zoom factor for the maps.
|
|
9173
9249
|
* @returns {void}
|
|
9174
9250
|
*/
|
|
@@ -9317,9 +9393,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9317
9393
|
var dataIndex = void 0;
|
|
9318
9394
|
var shapeIndex = void 0;
|
|
9319
9395
|
var indexValue = void 0;
|
|
9396
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9320
9397
|
var shapeDataValue = void 0;
|
|
9321
9398
|
var data = void 0;
|
|
9322
9399
|
var shapeData = this.layers[layerIndex].shapeData['features'];
|
|
9400
|
+
/* eslint-enable @typescript-eslint/no-explicit-any */
|
|
9323
9401
|
for (var i = 0; i < shapeData.length; i++) {
|
|
9324
9402
|
for (var j = 0; j < popertyNameArray.length; j++) {
|
|
9325
9403
|
var propertyName_1 = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
|
|
@@ -9329,7 +9407,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9329
9407
|
var k = void 0;
|
|
9330
9408
|
if (propertyName_1 === shapeName) {
|
|
9331
9409
|
if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
|
|
9332
|
-
k = checkShapeDataFields(
|
|
9410
|
+
k = checkShapeDataFields(
|
|
9411
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9412
|
+
this.layers[layerIndex].dataSource, shapeData[i]['properties'], this.layers[layerIndex].shapeDataPath, this.layers[layerIndex].shapePropertyPath, this.layers[layerIndex]);
|
|
9333
9413
|
}
|
|
9334
9414
|
var baseLayer = this.layers[layerIndex];
|
|
9335
9415
|
if (this.baseLayerIndex >= 0 && baseLayer.isBaseLayer) {
|
|
@@ -9611,11 +9691,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9611
9691
|
var isMarker = false;
|
|
9612
9692
|
var isLayer = false;
|
|
9613
9693
|
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
9694
|
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
9620
9695
|
var prop = _a[_i];
|
|
9621
9696
|
switch (prop) {
|
|
@@ -9882,6 +9957,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9882
9957
|
};
|
|
9883
9958
|
/**
|
|
9884
9959
|
* To find marker visibility
|
|
9960
|
+
*
|
|
9961
|
+
* @returns {boolean} - Returns whether the bubble is visible or not.
|
|
9885
9962
|
*/
|
|
9886
9963
|
Maps.prototype.isBubbleVisible = function () {
|
|
9887
9964
|
var isVisible = false;
|
|
@@ -9939,12 +10016,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9939
10016
|
allowDownload = true;
|
|
9940
10017
|
}
|
|
9941
10018
|
if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
|
|
9942
|
-
|
|
10019
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10020
|
+
return new Promise(function (resolve) {
|
|
9943
10021
|
resolve(_this.imageExportModule.export(_this, type, fileName, allowDownload));
|
|
9944
10022
|
});
|
|
9945
10023
|
}
|
|
9946
10024
|
else if ((this.allowPdfExport) && (this.pdfExportModule)) {
|
|
9947
|
-
|
|
10025
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10026
|
+
return new Promise(function (resolve) {
|
|
9948
10027
|
resolve(_this.pdfExportModule.export(_this, type, fileName, allowDownload, orientation));
|
|
9949
10028
|
});
|
|
9950
10029
|
}
|
|
@@ -9960,10 +10039,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9960
10039
|
Maps.prototype.getBingUrlTemplate = function (url) {
|
|
9961
10040
|
var promise;
|
|
9962
10041
|
if (!this.isDestroyed) {
|
|
9963
|
-
|
|
10042
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10043
|
+
promise = new Promise(function (resolve) {
|
|
9964
10044
|
var fetchApi = new Fetch({
|
|
9965
10045
|
url: url
|
|
9966
|
-
});
|
|
10046
|
+
}); // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9967
10047
|
fetchApi.onSuccess = function (json) {
|
|
9968
10048
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9969
10049
|
var resource = json['resourceSets'][0]['resources'][0];
|
|
@@ -9983,7 +10063,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9983
10063
|
* @param {boolean} istooltipVisible - Specifies whether the tooltip is visible or not.
|
|
9984
10064
|
* @param {boolean} isSelection - Specifies whether the shape is selectd or not.
|
|
9985
10065
|
* @param {boolean} isHighlight - Specfies whether the shape is highlighted or not.
|
|
9986
|
-
* @returns {
|
|
10066
|
+
* @returns {object} - Returns the boolean values in object.
|
|
9987
10067
|
*/
|
|
9988
10068
|
Maps.prototype.findVisibleLayers = function (layers, isLayerVisible, isBubblevisible, istooltipVisible, isSelection, isHighlight) {
|
|
9989
10069
|
if (isLayerVisible === void 0) { isLayerVisible = false; }
|
|
@@ -10005,8 +10085,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10005
10085
|
for (var _a = 0, navigationLine_1 = navigationLine; _a < navigationLine_1.length; _a++) {
|
|
10006
10086
|
var navigation = navigationLine_1[_a];
|
|
10007
10087
|
if (navigation.visible) {
|
|
10008
|
-
isSelection = (!isNullOrUndefined(navigation.highlightSettings) &&
|
|
10009
|
-
|
|
10088
|
+
isSelection = (!isNullOrUndefined(navigation.highlightSettings) &&
|
|
10089
|
+
navigation.highlightSettings.enable) || isSelection;
|
|
10090
|
+
isHighlight = (!isNullOrUndefined(navigation.selectionSettings) &&
|
|
10091
|
+
navigation.selectionSettings.enable) || isHighlight;
|
|
10010
10092
|
}
|
|
10011
10093
|
}
|
|
10012
10094
|
for (var _b = 0, _c = polygonSetting.polygons; _b < _c.length; _b++) {
|
|
@@ -10068,6 +10150,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10068
10150
|
var pageX = x - (isNullOrUndefined(this.markerDragArgument) ? container.offsetLeft : 0);
|
|
10069
10151
|
var pageY = y - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop : 0);
|
|
10070
10152
|
var currentLayer = this.layersCollection[layerIndex];
|
|
10153
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10071
10154
|
var translate = getTranslate(this, currentLayer, false);
|
|
10072
10155
|
var translatePoint = translate['location'];
|
|
10073
10156
|
var translatePointX = translatePoint.x * this.scale;
|
|
@@ -10097,6 +10180,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10097
10180
|
if (!this.isDestroyed) {
|
|
10098
10181
|
var container = document.getElementById(this.element.id);
|
|
10099
10182
|
var ele = document.getElementById(this.element.id + '_tile_parent');
|
|
10183
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10100
10184
|
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
10185
|
latitude = latLong['latitude'];
|
|
10102
10186
|
longitude = latLong['longitude'];
|
|
@@ -10311,21 +10395,33 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
10311
10395
|
function Bubble(maps) {
|
|
10312
10396
|
/**
|
|
10313
10397
|
* Bubble Id for current layer
|
|
10398
|
+
*
|
|
10314
10399
|
* @private
|
|
10315
10400
|
*/
|
|
10316
10401
|
this.id = '';
|
|
10317
10402
|
this.maps = maps;
|
|
10318
10403
|
this.bubbleCollection = [];
|
|
10319
10404
|
}
|
|
10320
|
-
// eslint-disable-next-line valid-jsdoc
|
|
10321
10405
|
/**
|
|
10322
10406
|
* To render bubble
|
|
10323
10407
|
*
|
|
10408
|
+
* @param {BubbleSettingsModel} bubbleSettings - Specifies the bubble data to be rendered
|
|
10409
|
+
* @param {object} shapeData - Specifies the data about the shape
|
|
10410
|
+
* @param {string} color - Specifies the color of the bubble
|
|
10411
|
+
* @param {number} range - Specifies the range of the bubble
|
|
10412
|
+
* @param {number} range.min - Specifies the minimum range of the bubble
|
|
10413
|
+
* @param {number} range.max - Specifies the maximum range of the bubble
|
|
10414
|
+
* @param {number} bubbleIndex - Specifies the index of the bubble
|
|
10415
|
+
* @param {number} dataIndex - Specifies the index of the data
|
|
10416
|
+
* @param {number} layerIndex - Specifies the index of the layer
|
|
10417
|
+
* @param {LayerSettings} layer - Specifies the layer data
|
|
10418
|
+
* @param {Element} group - Specifies the element group
|
|
10419
|
+
* @param {string} bubbleID - Specifies the ID of the bubble
|
|
10420
|
+
* @returns {void}
|
|
10421
|
+
*
|
|
10324
10422
|
* @private
|
|
10325
10423
|
*/
|
|
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) {
|
|
10424
|
+
Bubble.prototype.renderBubble = function (bubbleSettings, shapeData, color, range, bubbleIndex, dataIndex, layerIndex, layer, group, bubbleID) {
|
|
10329
10425
|
var _this = this;
|
|
10330
10426
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10331
10427
|
var layerData = layer.layerData;
|
|
@@ -10425,6 +10521,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
10425
10521
|
return;
|
|
10426
10522
|
}
|
|
10427
10523
|
}
|
|
10524
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10428
10525
|
this.maps.trigger('bubbleRendering', eventArgs, function (bubbleArgs) {
|
|
10429
10526
|
if (eventArgs.cancel) {
|
|
10430
10527
|
return;
|
|
@@ -10463,7 +10560,9 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
10463
10560
|
var bubbleDataSource = bubbleSettings.dataSource;
|
|
10464
10561
|
var scale = translate['scale'];
|
|
10465
10562
|
var transPoint = translate['location'];
|
|
10466
|
-
var position = new MapLocation((_this.maps.isTileMap ? ((eventArgs.cx + _this.maps.translatePoint.x) * _this.maps.tileZoomLevel)
|
|
10563
|
+
var position = new MapLocation((_this.maps.isTileMap ? ((eventArgs.cx + _this.maps.translatePoint.x) * _this.maps.tileZoomLevel)
|
|
10564
|
+
: ((eventArgs.cx + transPoint.x) * scale)), (_this.maps.isTileMap ? ((eventArgs.cy + _this.maps.translatePoint.y) * _this.maps.tileZoomLevel)
|
|
10565
|
+
: ((eventArgs.cy + transPoint.y) * scale)));
|
|
10467
10566
|
bubbleElement.setAttribute('transform', 'translate( ' + (position.x) + ' ' + (position.y) + ' )');
|
|
10468
10567
|
var bubble = (bubbleDataSource.length - 1) === dataIndex ? 'bubble' : null;
|
|
10469
10568
|
if (bubbleSettings.bubbleType === 'Square') {
|
|
@@ -10638,6 +10737,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10638
10737
|
border: markerSettings.border, colorValuePath: markerSettings.colorValuePath,
|
|
10639
10738
|
shapeValuePath: markerSettings.shapeValuePath, imageUrlValuePath: markerSettings.imageUrlValuePath
|
|
10640
10739
|
};
|
|
10740
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10641
10741
|
maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
10642
10742
|
eventArgs = markerColorChoose(eventArgs, data);
|
|
10643
10743
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
@@ -10861,6 +10961,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10861
10961
|
};
|
|
10862
10962
|
/**
|
|
10863
10963
|
* To check and trigger marker click event
|
|
10964
|
+
*
|
|
10864
10965
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
10865
10966
|
* @returns {void}
|
|
10866
10967
|
* @private
|
|
@@ -10881,7 +10982,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10881
10982
|
return;
|
|
10882
10983
|
}
|
|
10883
10984
|
if (options.marker.enableDrag) {
|
|
10884
|
-
document.getElementById(this.maps.element.id +
|
|
10985
|
+
document.getElementById(this.maps.element.id + '_svg').style.cursor = 'grabbing';
|
|
10885
10986
|
}
|
|
10886
10987
|
var eventArgs = {
|
|
10887
10988
|
cancel: false, name: markerClick, data: options.data, maps: this.maps,
|
|
@@ -10898,7 +10999,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10898
10999
|
var dataIndex_1 = parseInt(target.split('_dataIndex_')[1].split('_')[0], 10);
|
|
10899
11000
|
var marker_1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
|
|
10900
11001
|
if (this.sameMarkerData.length > 0) {
|
|
10901
|
-
isCluster = (this.sameMarkerData[0].data.filter(function (el) { return (el['index']
|
|
11002
|
+
isCluster = (this.sameMarkerData[0].data.filter(function (el) { return (el['index'] === dataIndex_1); })).length > 0 &&
|
|
10902
11003
|
this.sameMarkerData[0].layerIndex === layerIndex && this.sameMarkerData[0].markerIndex === markerIndex;
|
|
10903
11004
|
}
|
|
10904
11005
|
if (!isCluster) {
|
|
@@ -10913,7 +11014,8 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10913
11014
|
targetId: target, x: e.clientX, y: e.clientY,
|
|
10914
11015
|
latitude: options.data['latitude'] || options.data['Latitude'],
|
|
10915
11016
|
longitude: options.data['longitude'] || options.data['Longitude'],
|
|
10916
|
-
shape: isNullOrUndefined(marker_1.shapeValuePath) ? marker_1.shape
|
|
11017
|
+
shape: isNullOrUndefined(marker_1.shapeValuePath) ? marker_1.shape
|
|
11018
|
+
: marker_1.dataSource[dataIndex_1][marker_1.shapeValuePath],
|
|
10917
11019
|
layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex_1
|
|
10918
11020
|
};
|
|
10919
11021
|
}
|
|
@@ -10921,6 +11023,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10921
11023
|
};
|
|
10922
11024
|
/**
|
|
10923
11025
|
* To check and trigger Cluster click event
|
|
11026
|
+
*
|
|
10924
11027
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
10925
11028
|
* @returns {void}
|
|
10926
11029
|
* @private
|
|
@@ -10941,7 +11044,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10941
11044
|
}
|
|
10942
11045
|
if (this.sameMarkerData.length > 0 && !this.maps.markerClusterExpandCheck) {
|
|
10943
11046
|
this.maps.markerClusterExpandCheck = true;
|
|
10944
|
-
mergeSeparateCluster(this.sameMarkerData, this.maps
|
|
11047
|
+
mergeSeparateCluster(this.sameMarkerData, this.maps);
|
|
10945
11048
|
}
|
|
10946
11049
|
else {
|
|
10947
11050
|
this.sameMarkerData = options.clusterCollection;
|
|
@@ -10961,7 +11064,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
10961
11064
|
* To get marker from target id
|
|
10962
11065
|
*
|
|
10963
11066
|
* @param {string} target - Specifies the target
|
|
10964
|
-
* @returns {
|
|
11067
|
+
* @returns {object} - Returns the marker, data, clusterCollection, markCollection
|
|
10965
11068
|
*/
|
|
10966
11069
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10967
11070
|
Marker.prototype.getMarker = function (target) {
|
|
@@ -11030,7 +11133,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
11030
11133
|
return;
|
|
11031
11134
|
}
|
|
11032
11135
|
if (options.marker.enableDrag) {
|
|
11033
|
-
document.getElementById(this.maps.element.id +
|
|
11136
|
+
document.getElementById(this.maps.element.id + '_svg').style.cursor = isNullOrUndefined(this.maps.markerDragArgument) ?
|
|
11034
11137
|
'pointer' : 'grabbing';
|
|
11035
11138
|
}
|
|
11036
11139
|
var eventArgs = {
|
|
@@ -11064,7 +11167,10 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
11064
11167
|
};
|
|
11065
11168
|
this.maps.trigger(markerClusterMouseMove, eventArgs);
|
|
11066
11169
|
};
|
|
11067
|
-
/** @private
|
|
11170
|
+
/** @private
|
|
11171
|
+
*
|
|
11172
|
+
* @returns {void}
|
|
11173
|
+
*/
|
|
11068
11174
|
Marker.prototype.initializeMarkerClusterList = function () {
|
|
11069
11175
|
for (var i = 0; i < this.maps.layers.length; i++) {
|
|
11070
11176
|
this.initialMarkerCluster[i] = [];
|
|
@@ -11100,8 +11206,12 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
11100
11206
|
* When injected, this module will be used to render polygon shapes over the Maps.
|
|
11101
11207
|
*/
|
|
11102
11208
|
var Polygon = /** @__PURE__ @class */ (function () {
|
|
11209
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
11210
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
11103
11211
|
function Polygon(maps) {
|
|
11104
11212
|
}
|
|
11213
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
11214
|
+
/* eslint-enable @typescript-eslint/no-empty-function */
|
|
11105
11215
|
/**
|
|
11106
11216
|
* To render polygon for maps
|
|
11107
11217
|
*
|
|
@@ -11120,7 +11230,6 @@ var Polygon = /** @__PURE__ @class */ (function () {
|
|
|
11120
11230
|
var polygonSVGObject = maps.renderer.createGroup({
|
|
11121
11231
|
id: maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group_' + polygonIndex
|
|
11122
11232
|
});
|
|
11123
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11124
11233
|
var polygonData = polygonSetting.points;
|
|
11125
11234
|
var path = calculatePolygonPath(maps, factor, currentLayer, polygonData);
|
|
11126
11235
|
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 +11254,7 @@ var Polygon = /** @__PURE__ @class */ (function () {
|
|
|
11145
11254
|
* @returns {void}
|
|
11146
11255
|
* @private
|
|
11147
11256
|
*/
|
|
11257
|
+
//eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
11148
11258
|
Polygon.prototype.destroy = function () {
|
|
11149
11259
|
};
|
|
11150
11260
|
return Polygon;
|
|
@@ -11184,7 +11294,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11184
11294
|
*
|
|
11185
11295
|
* @param {LayerSettings} layer - Specifies the layer settings
|
|
11186
11296
|
* @param {number} layerIndex - Specifies the layer index.
|
|
11187
|
-
* @param {
|
|
11297
|
+
* @param {object} shape - Specifies the shape.
|
|
11188
11298
|
* @param {any[]} layerData - Specifies the layer data.
|
|
11189
11299
|
* @param {Element} group Specifies the element.
|
|
11190
11300
|
* @param {HTMLElement} labelTemplateElement - Specifies the template element.
|
|
@@ -11193,9 +11303,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11193
11303
|
* @returns {void}
|
|
11194
11304
|
* @private
|
|
11195
11305
|
*/
|
|
11196
|
-
DataLabel.prototype.renderLabel = function (
|
|
11197
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11198
|
-
layer, layerIndex, shape,
|
|
11306
|
+
DataLabel.prototype.renderLabel = function (layer, layerIndex, shape,
|
|
11199
11307
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11200
11308
|
layerData, group, labelTemplateElement, index, intersect) {
|
|
11201
11309
|
var _this = this;
|
|
@@ -11398,7 +11506,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11398
11506
|
var templateElement = templateFn ? templateFn(!isNullOrUndefined(datasrcObj) ?
|
|
11399
11507
|
datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
|
|
11400
11508
|
templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
|
|
11401
|
-
labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties']
|
|
11509
|
+
labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties']);
|
|
11402
11510
|
if (_this.maps.isTileMap) {
|
|
11403
11511
|
labelElement.style.left = (((location['x'] + transPoint['x']) * scale) - (textSize['width'] / 2)) + 'px';
|
|
11404
11512
|
labelElement.style.top = (((location['y'] + transPoint['y']) * scale) - textSize['height']) + 'px';
|
|
@@ -11552,7 +11660,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
11552
11660
|
element.setAttribute(isRect ? 'fill-opacity' : 'opacity', (opacity * height).toString());
|
|
11553
11661
|
}
|
|
11554
11662
|
},
|
|
11555
|
-
end: function (
|
|
11663
|
+
end: function () {
|
|
11556
11664
|
element.style.visibility = 'visible';
|
|
11557
11665
|
element.setAttribute(isRect ? 'fill-opacity' : 'opacity', opacity.toString());
|
|
11558
11666
|
}
|
|
@@ -11720,6 +11828,7 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
|
|
|
11720
11828
|
pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
|
|
11721
11829
|
navigationEle = this.maps.renderer.drawPath(pathOption);
|
|
11722
11830
|
if (!isNullOrUndefined(arrowPosition)) {
|
|
11831
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11723
11832
|
var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
|
|
11724
11833
|
: navigationEle.setAttribute('marker-end', endArrow);
|
|
11725
11834
|
}
|
|
@@ -12119,9 +12228,9 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12119
12228
|
* Get the legend collections
|
|
12120
12229
|
*
|
|
12121
12230
|
* @param {number} layerIndex - Specifies the layer index
|
|
12122
|
-
* @param {
|
|
12231
|
+
* @param {any[]} layerData - Specifies the layer data
|
|
12123
12232
|
* @param {ColorMappingSettings[]} colorMapping - Specifies the color mapping
|
|
12124
|
-
* @param {
|
|
12233
|
+
* @param {any[]} dataSource - Specifies the data source
|
|
12125
12234
|
* @param {string} dataPath - Specifies the data path
|
|
12126
12235
|
* @param {string} colorValuePath - Specifies the color value path
|
|
12127
12236
|
* @param {string | string[]} propertyPath - Specifies the property path
|
|
@@ -12163,6 +12272,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12163
12272
|
// eslint-disable-next-line valid-jsdoc
|
|
12164
12273
|
/**
|
|
12165
12274
|
* To draw the legend shape and text.
|
|
12275
|
+
*
|
|
12166
12276
|
* @private
|
|
12167
12277
|
*/
|
|
12168
12278
|
Legend.prototype.drawLegend = function () {
|
|
@@ -12207,7 +12317,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12207
12317
|
}
|
|
12208
12318
|
};
|
|
12209
12319
|
/**
|
|
12210
|
-
* @param {
|
|
12320
|
+
* @param {number} page - Specifies the legend page.
|
|
12211
12321
|
* @returns {void}
|
|
12212
12322
|
* @private
|
|
12213
12323
|
*/
|
|
@@ -12231,8 +12341,6 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12231
12341
|
var legendElement = render.createGroup({ id: map.element.id + '_Legend_Index_' + collection['idIndex'] });
|
|
12232
12342
|
var legendText = collection['DisplayText'];
|
|
12233
12343
|
var pagingArrowPadding = 4;
|
|
12234
|
-
var shape = ((legend.type === 'Markers') ? ((isNullOrUndefined(collection['ImageSrc'])) ?
|
|
12235
|
-
legend.shape : 'Image') : collection['legendShape']);
|
|
12236
12344
|
var strokeColor = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
|
|
12237
12345
|
|| legend.shape === 'Cross') ? isNullOrUndefined(legend.fill) ? '#000000' : legend.fill : shapeBorder.color;
|
|
12238
12346
|
var strokeWidth = (legend.shape === 'HorizontalLine' || legend.shape === 'VerticalLine'
|
|
@@ -12617,9 +12725,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12617
12725
|
}
|
|
12618
12726
|
}
|
|
12619
12727
|
};
|
|
12620
|
-
Legend.prototype.shapeHighLightAndSelection = function (
|
|
12621
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12622
|
-
targetElement, data, module, getValue, layerIndex) {
|
|
12728
|
+
Legend.prototype.shapeHighLightAndSelection = function (targetElement, data, module, getValue, layerIndex) {
|
|
12623
12729
|
if (data !== undefined) {
|
|
12624
12730
|
this.updateLegendElement();
|
|
12625
12731
|
this.shapeToggled = true;
|
|
@@ -13045,9 +13151,12 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13045
13151
|
}
|
|
13046
13152
|
if (legendTitle) {
|
|
13047
13153
|
textStyle.color = (textStyle.color !== null) ? textStyle.color : this.maps.themeStyle.legendTitleFontColor;
|
|
13048
|
-
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily
|
|
13049
|
-
|
|
13050
|
-
textStyle.
|
|
13154
|
+
textStyle.fontFamily = !isNullOrUndefined(textStyle.fontFamily) ? textStyle.fontFamily
|
|
13155
|
+
: this.maps.themeStyle.fontFamily;
|
|
13156
|
+
textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size
|
|
13157
|
+
: this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
|
|
13158
|
+
textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight
|
|
13159
|
+
: this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
|
|
13051
13160
|
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
13161
|
var element = renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
13053
13162
|
element.setAttribute('aria-label', legendTitle);
|
|
@@ -13151,6 +13260,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13151
13260
|
var field = marker$$1.legendText;
|
|
13152
13261
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13153
13262
|
var templateFn;
|
|
13263
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13154
13264
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
13155
13265
|
var imageSrc = null;
|
|
13156
13266
|
var showLegend = isNullOrUndefined(data[_this.maps.legendSettings.showLegendPath]) ? true :
|
|
@@ -13161,6 +13271,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13161
13271
|
var templateElement = templateFn(_this.maps);
|
|
13162
13272
|
var markerEle = isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] :
|
|
13163
13273
|
templateElement;
|
|
13274
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13164
13275
|
imageSrc = markerEle.querySelector('img').src;
|
|
13165
13276
|
}
|
|
13166
13277
|
var text = isNullOrUndefined(data[field]) ? '' : data[field];
|
|
@@ -13358,7 +13469,6 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13358
13469
|
}
|
|
13359
13470
|
});
|
|
13360
13471
|
if (outOfRangeValues.length === 0) {
|
|
13361
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13362
13472
|
var range_1 = false;
|
|
13363
13473
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13364
13474
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
@@ -13599,7 +13709,12 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13599
13709
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
13600
13710
|
}
|
|
13601
13711
|
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)
|
|
13712
|
+
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)
|
|
13713
|
+
? 0 : this.maps.layers[k].shapeSettings.border.width,
|
|
13714
|
+
/* eslint-disable-next-line max-len */
|
|
13715
|
+
isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
13716
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
13717
|
+
: this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[k].shapeSettings.fill);
|
|
13603
13718
|
}
|
|
13604
13719
|
}
|
|
13605
13720
|
}
|
|
@@ -13668,7 +13783,12 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13668
13783
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
13669
13784
|
}
|
|
13670
13785
|
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)
|
|
13786
|
+
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)
|
|
13787
|
+
? 0 : this.maps.layers[j].shapeSettings.border.width,
|
|
13788
|
+
/* eslint-disable-next-line max-len */
|
|
13789
|
+
isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity)
|
|
13790
|
+
? this.maps.layers[j].shapeSettings.opacity
|
|
13791
|
+
: this.maps.layers[j].shapeSettings.border.opacity, this.maps.layers[j].shapeSettings.fill);
|
|
13672
13792
|
}
|
|
13673
13793
|
}
|
|
13674
13794
|
}
|
|
@@ -13746,7 +13866,15 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13746
13866
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
13747
13867
|
}
|
|
13748
13868
|
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,
|
|
13869
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color,
|
|
13870
|
+
/* eslint-disable-next-line max-len */
|
|
13871
|
+
(isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width)
|
|
13872
|
+
? 0
|
|
13873
|
+
: this.maps.layers[k].shapeSettings.border.width),
|
|
13874
|
+
/* eslint-disable-next-line max-len */
|
|
13875
|
+
(isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
13876
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
13877
|
+
: this.maps.layers[k].shapeSettings.border.opacity), this.maps.layers[k].shapeSettings.fill);
|
|
13750
13878
|
}
|
|
13751
13879
|
}
|
|
13752
13880
|
}
|
|
@@ -13817,7 +13945,13 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
13817
13945
|
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
13818
13946
|
}
|
|
13819
13947
|
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)
|
|
13948
|
+
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)
|
|
13949
|
+
? 0
|
|
13950
|
+
: this.maps.layers[k].shapeSettings.border.width,
|
|
13951
|
+
/* eslint-disable-next-line max-len */
|
|
13952
|
+
isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity)
|
|
13953
|
+
? this.maps.layers[k].shapeSettings.opacity
|
|
13954
|
+
: this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[0].shapeSettings.fill);
|
|
13821
13955
|
}
|
|
13822
13956
|
}
|
|
13823
13957
|
}
|
|
@@ -14026,9 +14160,13 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
14026
14160
|
this.maps.off(Browser.touchMoveEvent, this.mouseMove);
|
|
14027
14161
|
this.maps.off(Browser.touchStartEvent, this.mouseMove);
|
|
14028
14162
|
};
|
|
14029
|
-
// eslint-disable-next-line valid-jsdoc
|
|
14030
14163
|
/**
|
|
14031
14164
|
* Public method for highlight module
|
|
14165
|
+
*
|
|
14166
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
14167
|
+
* @param {string} name - Specifies the name.
|
|
14168
|
+
* @param {boolean} enable - Specifies the enabling of highlight in map.
|
|
14169
|
+
* @returns {void}
|
|
14032
14170
|
* @private
|
|
14033
14171
|
*/
|
|
14034
14172
|
Highlight.prototype.addHighlight = function (layerIndex, name, enable) {
|
|
@@ -14135,9 +14273,15 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
14135
14273
|
}
|
|
14136
14274
|
};
|
|
14137
14275
|
/**
|
|
14276
|
+
* Handles the highlighting events in map
|
|
14277
|
+
*
|
|
14278
|
+
* @param {Element} targetElement - Specifies the target element.
|
|
14279
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
14280
|
+
* @param {object} data - Specifies the data for the map.
|
|
14281
|
+
* @param {object} shapeData - Specifies the data for the map to render.
|
|
14282
|
+
* @returns {void}
|
|
14138
14283
|
* @private
|
|
14139
14284
|
*/
|
|
14140
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14141
14285
|
Highlight.prototype.handleHighlight = function (targetElement, layerIndex, data, shapeData) {
|
|
14142
14286
|
if (this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1 && this.maps.legendModule
|
|
14143
14287
|
&& this.maps.legendSettings.type === 'Layers') {
|
|
@@ -14350,9 +14494,15 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14350
14494
|
}
|
|
14351
14495
|
};
|
|
14352
14496
|
/**
|
|
14497
|
+
* Selects the element in the map
|
|
14498
|
+
*
|
|
14499
|
+
* @param {Element} targetElement - Specifies the target element.
|
|
14500
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
14501
|
+
* @param {object} data - Specifies the data for the map.
|
|
14502
|
+
* @param {object} shapeData - Specifies the data for the map to render.
|
|
14503
|
+
* @returns {void}
|
|
14353
14504
|
* @private
|
|
14354
14505
|
*/
|
|
14355
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14356
14506
|
Selection.prototype.selectElement = function (targetElement, layerIndex, data, shapeData) {
|
|
14357
14507
|
this.maps.mapSelect = targetElement ? true : false;
|
|
14358
14508
|
if (this.maps.legendModule && this.maps.legendSettings.visible && targetElement.id.indexOf('_MarkerIndex_') === -1) {
|
|
@@ -14364,9 +14514,13 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14364
14514
|
this.selectMap(targetElement, shapeData, data);
|
|
14365
14515
|
}
|
|
14366
14516
|
};
|
|
14367
|
-
// eslint-disable-next-line valid-jsdoc
|
|
14368
14517
|
/**
|
|
14369
14518
|
* Public method for selection
|
|
14519
|
+
*
|
|
14520
|
+
* @param {number} layerIndex - Specifies the index of the layer.
|
|
14521
|
+
* @param {string} name - Specifies the name.
|
|
14522
|
+
* @param {boolean} enable - Specifies the enabling of selection in map.
|
|
14523
|
+
* @returns {void}
|
|
14370
14524
|
* @private
|
|
14371
14525
|
*/
|
|
14372
14526
|
Selection.prototype.addSelection = function (layerIndex, name, enable) {
|
|
@@ -14389,9 +14543,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14389
14543
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14390
14544
|
Selection.prototype.selectMap = function (targetElement, shapeData, data) {
|
|
14391
14545
|
var _this = this;
|
|
14392
|
-
var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
14393
14546
|
var isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
|
|
14394
|
-
var selectionsettings = this.selectionsettings;
|
|
14395
14547
|
var border = {
|
|
14396
14548
|
color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) :
|
|
14397
14549
|
this.selectionsettings.border.color,
|
|
@@ -14410,6 +14562,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14410
14562
|
data: data,
|
|
14411
14563
|
maps: this.maps
|
|
14412
14564
|
};
|
|
14565
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14413
14566
|
this.maps.trigger('itemSelection', eventArgs, function (observedArgs) {
|
|
14414
14567
|
eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ?
|
|
14415
14568
|
_this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
|
|
@@ -14426,9 +14579,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14426
14579
|
}
|
|
14427
14580
|
if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
14428
14581
|
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[
|
|
14582
|
+
var layerIndex = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
14583
|
+
targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex].navigationLineSettings[index].width.toString());
|
|
14584
|
+
targetElement.setAttribute('stroke', _this.maps.layers[layerIndex].navigationLineSettings[index].color);
|
|
14432
14585
|
}
|
|
14433
14586
|
}
|
|
14434
14587
|
else {
|
|
@@ -14463,9 +14616,9 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
14463
14616
|
}
|
|
14464
14617
|
if (ele.id.indexOf('NavigationIndex') > -1) {
|
|
14465
14618
|
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[
|
|
14619
|
+
var layerIndex = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
14620
|
+
ele.setAttribute('stroke-width', _this.maps.layers[layerIndex].navigationLineSettings[index].width.toString());
|
|
14621
|
+
ele.setAttribute('stroke', _this.maps.layers[layerIndex].navigationLineSettings[index].color);
|
|
14469
14622
|
}
|
|
14470
14623
|
}
|
|
14471
14624
|
if (!isLineStringShape) {
|
|
@@ -14582,6 +14735,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14582
14735
|
this.addEventListener();
|
|
14583
14736
|
}
|
|
14584
14737
|
/**
|
|
14738
|
+
* @param {PointerEvent} e - Specifies the event.
|
|
14739
|
+
* @returns {void}
|
|
14585
14740
|
* @private
|
|
14586
14741
|
*/
|
|
14587
14742
|
MapsTooltip.prototype.renderTooltip = function (e) {
|
|
@@ -14771,6 +14926,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14771
14926
|
}
|
|
14772
14927
|
document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
|
|
14773
14928
|
}
|
|
14929
|
+
// eslint-disable-next-line no-constant-condition
|
|
14774
14930
|
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
14931
|
if (isPolygon) {
|
|
14776
14932
|
polygon.tooltipTemplate = polygon.tooltipTemplate[Object.keys(polygon.tooltipTemplate)[0]];
|
|
@@ -14930,6 +15086,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14930
15086
|
return format;
|
|
14931
15087
|
};
|
|
14932
15088
|
/**
|
|
15089
|
+
* Handles the mouse up
|
|
15090
|
+
*
|
|
15091
|
+
* @param {PointerEvent} e - Specifies the event
|
|
15092
|
+
* @returns {void}
|
|
14933
15093
|
* @private
|
|
14934
15094
|
*/
|
|
14935
15095
|
MapsTooltip.prototype.mouseUpHandler = function (e) {
|
|
@@ -14942,6 +15102,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14942
15102
|
}
|
|
14943
15103
|
};
|
|
14944
15104
|
/**
|
|
15105
|
+
* Removes the tooltip
|
|
15106
|
+
*
|
|
15107
|
+
* @returns {boolean} - Returns the boolean whether tooltip is removed or not.
|
|
14945
15108
|
* @private
|
|
14946
15109
|
*/
|
|
14947
15110
|
MapsTooltip.prototype.removeTooltip = function () {
|
|
@@ -14953,6 +15116,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14953
15116
|
return isTooltipRemoved;
|
|
14954
15117
|
};
|
|
14955
15118
|
MapsTooltip.prototype.clearTooltip = function (element) {
|
|
15119
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
14956
15120
|
var tooltipElement = element.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
|
|
14957
15121
|
if (isNullOrUndefined(tooltipElement)) {
|
|
14958
15122
|
var isTooltipRemoved = this.removeTooltip();
|
|
@@ -14962,9 +15126,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14962
15126
|
}
|
|
14963
15127
|
}
|
|
14964
15128
|
};
|
|
14965
|
-
// eslint-disable-next-line valid-jsdoc
|
|
14966
15129
|
/**
|
|
14967
15130
|
* To bind events for tooltip module
|
|
15131
|
+
*
|
|
15132
|
+
* @returns {void}
|
|
14968
15133
|
* @private
|
|
14969
15134
|
*/
|
|
14970
15135
|
MapsTooltip.prototype.addEventListener = function () {
|
|
@@ -14984,6 +15149,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14984
15149
|
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
14985
15150
|
};
|
|
14986
15151
|
/**
|
|
15152
|
+
* Removes the event listeners
|
|
15153
|
+
*
|
|
15154
|
+
* @returns {void}
|
|
14987
15155
|
* @private
|
|
14988
15156
|
*/
|
|
14989
15157
|
MapsTooltip.prototype.removeEventListener = function () {
|
|
@@ -15043,7 +15211,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15043
15211
|
this.rectZoomingStart = false;
|
|
15044
15212
|
/** @private */
|
|
15045
15213
|
this.browserName = Browser.info.name;
|
|
15046
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
15047
15214
|
/** @private */
|
|
15048
15215
|
this.isPointer = Browser.isPointer;
|
|
15049
15216
|
this.handled = false;
|
|
@@ -15053,10 +15220,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15053
15220
|
this.pinchFactor = 1;
|
|
15054
15221
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15055
15222
|
this.startTouches = [];
|
|
15056
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15057
15223
|
/** @private */
|
|
15058
15224
|
this.mouseDownLatLong = { x: 0, y: 0 };
|
|
15059
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15060
15225
|
/** @private */
|
|
15061
15226
|
this.mouseMoveLatLong = { x: 0, y: 0 };
|
|
15062
15227
|
/** @private */
|
|
@@ -15173,7 +15338,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15173
15338
|
}
|
|
15174
15339
|
this.markerLineAnimation(map);
|
|
15175
15340
|
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
15176
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
15177
15341
|
var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
|
|
15178
15342
|
setTimeout(function () {
|
|
15179
15343
|
// if (type === 'ZoomOut') {
|
|
@@ -15252,6 +15416,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15252
15416
|
position.y - ((y * totalSize) / 100);
|
|
15253
15417
|
};
|
|
15254
15418
|
/**
|
|
15419
|
+
* @returns {void}
|
|
15255
15420
|
* @private
|
|
15256
15421
|
*/
|
|
15257
15422
|
Zoom.prototype.performRectZooming = function () {
|
|
@@ -15331,26 +15496,29 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15331
15496
|
}
|
|
15332
15497
|
};
|
|
15333
15498
|
/**
|
|
15499
|
+
* @param {PointerEvent} e - Specifies the vent in the map
|
|
15500
|
+
* @returns {void}
|
|
15334
15501
|
* @private
|
|
15335
15502
|
*/
|
|
15503
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15336
15504
|
Zoom.prototype.performPinchZooming = function (e) {
|
|
15337
15505
|
var map = this.maps;
|
|
15338
15506
|
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
15507
|
var zoomCalculationFactor = this.pinchFactor;
|
|
15352
15508
|
var isZoomCancelled;
|
|
15509
|
+
var prevTilePoint = map.tileTranslatePoint;
|
|
15353
15510
|
if (!map.isTileMap) {
|
|
15511
|
+
var availSize = map.mapAreaRect;
|
|
15512
|
+
map.isMarkerZoomCompleted = false;
|
|
15513
|
+
map.previousScale = map.scale;
|
|
15514
|
+
map.previousPoint = map.translatePoint;
|
|
15515
|
+
map.previousProjection = map.projectionType;
|
|
15516
|
+
var scale = calculateScale(this.touchStartList, this.touchMoveList);
|
|
15517
|
+
var touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
|
|
15518
|
+
var newScale = scale / this.lastScale;
|
|
15519
|
+
this.lastScale = scale;
|
|
15520
|
+
this.pinchFactor *= newScale;
|
|
15521
|
+
this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
|
|
15354
15522
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15355
15523
|
var minBounds = map.baseMapRectBounds['min'];
|
|
15356
15524
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -15385,24 +15553,38 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15385
15553
|
}
|
|
15386
15554
|
}
|
|
15387
15555
|
else {
|
|
15388
|
-
var
|
|
15389
|
-
this.
|
|
15390
|
-
map.tileZoomLevel
|
|
15391
|
-
|
|
15392
|
-
(
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15403
|
-
|
|
15404
|
-
|
|
15556
|
+
var touchCenter = this.getTouchCenterPoint();
|
|
15557
|
+
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));
|
|
15558
|
+
var factor = map.tileZoomLevel;
|
|
15559
|
+
if (!isNullOrUndefined(this.pinchDistance)) {
|
|
15560
|
+
if (this.pinchDistance > distance) {
|
|
15561
|
+
factor = factor - 1;
|
|
15562
|
+
}
|
|
15563
|
+
else if (this.pinchDistance < distance) {
|
|
15564
|
+
factor = factor + 1;
|
|
15565
|
+
}
|
|
15566
|
+
factor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.maps.zoomSettings.minZoom, factor));
|
|
15567
|
+
if (factor !== map.tileZoomLevel) {
|
|
15568
|
+
this.pinchFactor = factor;
|
|
15569
|
+
map.previousScale = map.scale;
|
|
15570
|
+
map.tileZoomLevel = this.pinchFactor;
|
|
15571
|
+
map.scale = Math.pow(2, map.tileZoomLevel - 1);
|
|
15572
|
+
this.getTileTranslatePosition(prevLevel, this.pinchFactor, { x: touchCenter.x, y: touchCenter.y }, null);
|
|
15573
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.scale)) / map.scale;
|
|
15574
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.scale)) / map.scale;
|
|
15575
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
15576
|
+
if (isZoomCancelled) {
|
|
15577
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
15578
|
+
map.scale = map.previousScale;
|
|
15579
|
+
map.tileZoomLevel = prevLevel;
|
|
15580
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
15581
|
+
}
|
|
15582
|
+
else {
|
|
15583
|
+
map.mapLayerPanel.generateTiles(factor, map.tileTranslatePoint);
|
|
15584
|
+
}
|
|
15585
|
+
}
|
|
15405
15586
|
}
|
|
15587
|
+
this.pinchDistance = distance;
|
|
15406
15588
|
}
|
|
15407
15589
|
map.mapScaleValue = zoomCalculationFactor;
|
|
15408
15590
|
if (!isZoomCancelled) {
|
|
@@ -15413,6 +15595,16 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15413
15595
|
this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
|
|
15414
15596
|
}
|
|
15415
15597
|
};
|
|
15598
|
+
Zoom.prototype.getTouchCenterPoint = function () {
|
|
15599
|
+
var touchList = [];
|
|
15600
|
+
for (var i = 0; i < this.touchMoveList.length; i++) {
|
|
15601
|
+
touchList.push(this.getMousePosition(this.touchMoveList[i].pageX, this.touchMoveList[i].pageY));
|
|
15602
|
+
}
|
|
15603
|
+
return {
|
|
15604
|
+
x: (touchList[0].x + touchList[1].x) / 2,
|
|
15605
|
+
y: (touchList[0].y + touchList[1].y) / 2
|
|
15606
|
+
};
|
|
15607
|
+
};
|
|
15416
15608
|
Zoom.prototype.triggerZoomComplete = function (map, prevLevel, type) {
|
|
15417
15609
|
if (map.zoomSettings.enable) {
|
|
15418
15610
|
var zoomArgs = void 0;
|
|
@@ -15444,6 +15636,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15444
15636
|
}
|
|
15445
15637
|
};
|
|
15446
15638
|
/**
|
|
15639
|
+
* @returns {void}
|
|
15447
15640
|
* @private
|
|
15448
15641
|
*/
|
|
15449
15642
|
Zoom.prototype.drawZoomRectangle = function () {
|
|
@@ -15456,7 +15649,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15456
15649
|
var height = Math.abs(move.y - down.y);
|
|
15457
15650
|
var x = ((move.x > down.x) ? down.x : down.x - width);
|
|
15458
15651
|
var y = ((move.y > down.y) ? down.y : down.y - height);
|
|
15459
|
-
var elementRect = getElementByID(map.element.id).getBoundingClientRect();
|
|
15460
15652
|
if ((x > map.mapAreaRect.x && x < (map.mapAreaRect.x + map.mapAreaRect.width)) &&
|
|
15461
15653
|
(y > map.mapAreaRect.y) && (y < map.mapAreaRect.y + map.mapAreaRect.height)) {
|
|
15462
15654
|
this.zoomingRect = new Rect(x, y, width, height);
|
|
@@ -15494,6 +15686,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15494
15686
|
}
|
|
15495
15687
|
};
|
|
15496
15688
|
/**
|
|
15689
|
+
* @param {Maps} maps - Specifies the Map control
|
|
15690
|
+
* @param {boolean} animate - Specifies the animation is available or not
|
|
15691
|
+
* @param {boolean} isPanning - Specifies that it is panning or not
|
|
15692
|
+
* @returns {void}
|
|
15497
15693
|
* @private
|
|
15498
15694
|
*/
|
|
15499
15695
|
Zoom.prototype.applyTransform = function (maps, animate$$1, isPanning) {
|
|
@@ -15505,14 +15701,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15505
15701
|
var x = maps.translatePoint.x;
|
|
15506
15702
|
var y = maps.translatePoint.y;
|
|
15507
15703
|
var currentLabelIndex = 0;
|
|
15508
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15509
15704
|
maps.zoomShapeCollection = [];
|
|
15510
15705
|
if (document.getElementById(maps.element.id + '_mapsTooltip')) {
|
|
15511
15706
|
removeElement(maps.element.id + '_mapsTooltip');
|
|
15512
15707
|
}
|
|
15513
15708
|
if (this.layerCollectionEle) {
|
|
15514
|
-
var _loop_1 = function (
|
|
15515
|
-
var layerElement = this_1.layerCollectionEle.childNodes[
|
|
15709
|
+
var _loop_1 = function (i) {
|
|
15710
|
+
var layerElement = this_1.layerCollectionEle.childNodes[i];
|
|
15516
15711
|
if (layerElement.tagName === 'g') {
|
|
15517
15712
|
this_1.templateCount++;
|
|
15518
15713
|
this_1.index = layerElement.id.indexOf('_LayerIndex_') > -1 && parseFloat(layerElement.id.split('_LayerIndex_')[1].split('_')[0]);
|
|
@@ -15551,14 +15746,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15551
15746
|
}
|
|
15552
15747
|
else if (currentEle.id.indexOf('_Markers_Group') > -1) {
|
|
15553
15748
|
if ((!this_1.isPanModeEnabled) && !isNullOrUndefined(currentEle.childNodes[0])) {
|
|
15554
|
-
this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement
|
|
15749
|
+
this_1.markerTranslates(currentEle.childNodes[0], factor_1, x, y, scale, 'Marker', layerElement);
|
|
15555
15750
|
}
|
|
15556
15751
|
currentEle = layerElement.childNodes[j];
|
|
15557
15752
|
var markerAnimation_1;
|
|
15558
15753
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
15559
15754
|
Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
|
|
15560
15755
|
_this.markerTranslate(childNode, factor_1, x, y, scale, 'Marker', animate$$1);
|
|
15561
|
-
var layerIndex = parseInt(childNode['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
15562
15756
|
var dataIndex = parseInt(childNode['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
15563
15757
|
var markerIndex = parseInt(childNode['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
15564
15758
|
markerAnimation_1 = _this.currentLayer.markerSettings[markerIndex].animationDuration > 0 || animationMode === 'Enable';
|
|
@@ -15651,7 +15845,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15651
15845
|
maps.zoomLabelPositions = [];
|
|
15652
15846
|
maps.zoomLabelPositions = maps.dataLabelModule.dataLabelCollections;
|
|
15653
15847
|
var labelAnimate_1 = !maps.isTileMap && animate$$1;
|
|
15848
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15654
15849
|
var intersect_1 = [];
|
|
15850
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15655
15851
|
Array.prototype.forEach.call(currentEle.childNodes, function (childNode, k) {
|
|
15656
15852
|
if (currentEle.childNodes[k]['id'].indexOf('_LabelIndex_') > -1) {
|
|
15657
15853
|
var labelIndex = parseFloat(currentEle.childNodes[k]['id'].split('_LabelIndex_')[1].split('_')[0]);
|
|
@@ -15687,8 +15883,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15687
15883
|
maps.arrangeTemplate();
|
|
15688
15884
|
};
|
|
15689
15885
|
var this_1 = this;
|
|
15690
|
-
for (var
|
|
15691
|
-
_loop_1(
|
|
15886
|
+
for (var i = 0; i < this.layerCollectionEle.childElementCount; i++) {
|
|
15887
|
+
_loop_1(i);
|
|
15692
15888
|
}
|
|
15693
15889
|
if (!isNullOrUndefined(this.currentLayer)) {
|
|
15694
15890
|
if (!animate$$1 || this.currentLayer.animationDuration === 0 || maps.isTileMap) {
|
|
@@ -15697,9 +15893,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15697
15893
|
}
|
|
15698
15894
|
}
|
|
15699
15895
|
};
|
|
15700
|
-
Zoom.prototype.markerTranslates = function (element, factor, x, y, scale, type, layerElement
|
|
15896
|
+
Zoom.prototype.markerTranslates = function (element, factor, x, y, scale, type, layerElement) {
|
|
15701
15897
|
var _this = this;
|
|
15702
|
-
if (animate$$1 === void 0) { animate$$1 = false; }
|
|
15703
15898
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15704
15899
|
var templateFn;
|
|
15705
15900
|
var nullCount = 0;
|
|
@@ -15743,6 +15938,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15743
15938
|
};
|
|
15744
15939
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
15745
15940
|
eventArgs = markerColorChoose(eventArgs, data);
|
|
15941
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15746
15942
|
_this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
15747
15943
|
if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
|
|
15748
15944
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
@@ -15855,6 +16051,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15855
16051
|
}
|
|
15856
16052
|
}
|
|
15857
16053
|
};
|
|
16054
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15858
16055
|
Zoom.prototype.dataLabelTranslate = function (element, factor, x, y, scale, type, animate$$1, currentLabelIndex, isPanning, intersect) {
|
|
15859
16056
|
if (animate$$1 === void 0) { animate$$1 = false; }
|
|
15860
16057
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -16102,11 +16299,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16102
16299
|
* @param {PanDirection} direction - Specifies the direction of the panning.
|
|
16103
16300
|
* @param {number} xDifference - Specifies the distance moved in the horizontal direction.
|
|
16104
16301
|
* @param {number} yDifference - Specifies the distance moved in the vertical direction.
|
|
16105
|
-
* @param {PointerEvent | TouchEvent | KeyboardEvent}
|
|
16302
|
+
* @param {PointerEvent | TouchEvent | KeyboardEvent} event - Specifies the pointer event argument.
|
|
16106
16303
|
* @returns {void}
|
|
16107
16304
|
* @private
|
|
16108
16305
|
*/
|
|
16109
|
-
Zoom.prototype.panning = function (direction, xDifference, yDifference,
|
|
16306
|
+
Zoom.prototype.panning = function (direction, xDifference, yDifference, event) {
|
|
16110
16307
|
var map = this.maps;
|
|
16111
16308
|
var panArgs;
|
|
16112
16309
|
var down = this.mouseDownPoints;
|
|
@@ -16122,6 +16319,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16122
16319
|
var y;
|
|
16123
16320
|
xDifference = !isNullOrUndefined(xDifference) ? xDifference : (down.x - move.x);
|
|
16124
16321
|
yDifference = !isNullOrUndefined(yDifference) ? yDifference : (down.y - move.y);
|
|
16322
|
+
var layerX = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerX'] : event.touches[0].pageX;
|
|
16323
|
+
var layerY = event.type.indexOf('mouse') > -1 || event.type.indexOf('key') > -1 ? event['layerY'] : event.touches[0].pageY;
|
|
16125
16324
|
this.maps.mergeCluster();
|
|
16126
16325
|
if (!map.isTileMap) {
|
|
16127
16326
|
var legendElement = document.getElementById(map.element.id + '_Legend_Group');
|
|
@@ -16135,7 +16334,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16135
16334
|
var panningYDirection = ((yDifference < 0 ? layerRect.top <= (elementRect.top + map.mapAreaRect.y) :
|
|
16136
16335
|
((layerRect.top + layerRect.height + legendHeight + map.margin.top) >= (elementRect.top + elementRect.height))));
|
|
16137
16336
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16138
|
-
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1,
|
|
16337
|
+
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, layerX, layerY);
|
|
16139
16338
|
var minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
|
|
16140
16339
|
panArgs = {
|
|
16141
16340
|
cancel: false, name: pan, maps: map,
|
|
@@ -16164,8 +16363,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16164
16363
|
else if (this.maps.tileZoomLevel > 1) {
|
|
16165
16364
|
x = map.tileTranslatePoint.x - xDifference;
|
|
16166
16365
|
y = map.tileTranslatePoint.y - yDifference;
|
|
16167
|
-
this.distanceX = x - map.tileTranslatePoint.x;
|
|
16168
|
-
this.distanceY = y - map.tileTranslatePoint.y;
|
|
16169
16366
|
map.tileTranslatePoint.x = x;
|
|
16170
16367
|
map.tileTranslatePoint.y = y;
|
|
16171
16368
|
if ((map.tileTranslatePoint.y > -10 && yDifference < 0) || ((map.tileTranslatePoint.y < -((Math.pow(2, this.maps.tileZoomLevel) - 2) * 256) && yDifference > 0))) {
|
|
@@ -16175,7 +16372,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16175
16372
|
map.translatePoint.x = (map.tileTranslatePoint.x) / map.scale;
|
|
16176
16373
|
map.translatePoint.y = (map.tileTranslatePoint.y) / map.scale;
|
|
16177
16374
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16178
|
-
var location_4 = this.maps.getTileGeoLocation(
|
|
16375
|
+
var location_4 = this.maps.getTileGeoLocation(layerX, layerY);
|
|
16179
16376
|
var minMaxLatitudeLongitude = this.maps.getMinMaxLatitudeLongitude();
|
|
16180
16377
|
panArgs = {
|
|
16181
16378
|
cancel: false, name: pan, maps: map,
|
|
@@ -16195,14 +16392,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16195
16392
|
this.mouseDownPoints = this.mouseMovePoints;
|
|
16196
16393
|
this.isSingleClick = false;
|
|
16197
16394
|
};
|
|
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
16395
|
/**
|
|
16396
|
+
* @param {number} zoomFactor - Specifies the factor for zooming
|
|
16397
|
+
* @param {string} type - Specifies the type
|
|
16398
|
+
* @returns {void}
|
|
16206
16399
|
* @private
|
|
16207
16400
|
*/
|
|
16208
16401
|
Zoom.prototype.toolBarZooming = function (zoomFactor, type) {
|
|
@@ -16296,7 +16489,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16296
16489
|
}
|
|
16297
16490
|
this.markerLineAnimation(map);
|
|
16298
16491
|
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
16299
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
16300
16492
|
var animationDuration = this.maps.layersCollection[0].animationDuration === 0 && animationMode === 'Enable' ? 1000 : this.maps.layersCollection[0].animationDuration;
|
|
16301
16493
|
setTimeout(function () {
|
|
16302
16494
|
_this.applyTransform(_this.maps, true);
|
|
@@ -16312,12 +16504,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16312
16504
|
this.triggerZoomComplete(map, prevLevel, type);
|
|
16313
16505
|
};
|
|
16314
16506
|
/**
|
|
16507
|
+
* @returns {void}
|
|
16315
16508
|
* @private
|
|
16316
16509
|
*/
|
|
16317
16510
|
Zoom.prototype.createZoomingToolbars = function () {
|
|
16318
16511
|
var map = this.maps;
|
|
16319
|
-
var zoomInElements;
|
|
16320
|
-
var zoomOutElements;
|
|
16321
16512
|
this.toolBarGroup = map.renderer.createGroup({
|
|
16322
16513
|
id: map.element.id + '_Zooming_KitCollection',
|
|
16323
16514
|
opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
|
|
@@ -16377,37 +16568,33 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16377
16568
|
this.selectionColor = this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor;
|
|
16378
16569
|
switch (toolbar_1.toLowerCase()) {
|
|
16379
16570
|
case 'zoom': {
|
|
16380
|
-
var
|
|
16571
|
+
var fillColor = void 0;
|
|
16381
16572
|
var strokeColor = void 0;
|
|
16382
16573
|
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
16574
|
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
16575
|
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
16576
|
this.currentToolbarEle.setAttribute('class', (this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : ''));
|
|
16386
16577
|
if (this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
|
|
16387
|
-
|
|
16578
|
+
fillColor = fill;
|
|
16388
16579
|
strokeColor = pathStroke;
|
|
16389
16580
|
}
|
|
16390
16581
|
else if (this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
|
|
16391
|
-
|
|
16582
|
+
fillColor = fill;
|
|
16392
16583
|
strokeColor = pathStroke;
|
|
16393
16584
|
}
|
|
16394
16585
|
else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
|
|
16395
|
-
|
|
16586
|
+
fillColor = fill;
|
|
16396
16587
|
strokeColor = pathStroke;
|
|
16397
16588
|
}
|
|
16398
16589
|
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;
|
|
16590
|
+
fillColor = this.maps.themeStyle.zoomFillColor;
|
|
16404
16591
|
strokeColor = pathStroke;
|
|
16405
16592
|
}
|
|
16406
16593
|
else {
|
|
16407
|
-
|
|
16594
|
+
fillColor = this.selectionColor;
|
|
16408
16595
|
strokeColor = this.selectionColor;
|
|
16409
16596
|
}
|
|
16410
|
-
var zoomPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1,
|
|
16597
|
+
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
16598
|
zoomPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
16412
16599
|
this.currentToolbarEle.appendChild(zoomPath);
|
|
16413
16600
|
this.zoomElements = this.currentToolbarEle;
|
|
@@ -16416,18 +16603,20 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16416
16603
|
}
|
|
16417
16604
|
case 'zoomin':
|
|
16418
16605
|
direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
|
|
16606
|
+
/* eslint-disable no-case-declarations */
|
|
16419
16607
|
var zoomInPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Path', fill, 3, pathStroke, 1, 1, null, direction));
|
|
16608
|
+
/* eslint-enable no-case-declarations */
|
|
16420
16609
|
zoomInPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
16421
16610
|
this.currentToolbarEle.appendChild(zoomInPath);
|
|
16422
|
-
zoomInElements = this.currentToolbarEle;
|
|
16423
16611
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
16424
16612
|
break;
|
|
16425
16613
|
case 'zoomout':
|
|
16426
16614
|
direction = 'M 0, 8 L 16, 8';
|
|
16615
|
+
/* eslint-disable no-case-declarations */
|
|
16427
16616
|
var zoomOutPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fill, 3, pathStroke, 1, 1, null, direction));
|
|
16617
|
+
/* eslint-enable no-case-declarations */
|
|
16428
16618
|
zoomOutPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
16429
16619
|
this.currentToolbarEle.appendChild(zoomOutPath);
|
|
16430
|
-
zoomOutElements = this.currentToolbarEle;
|
|
16431
16620
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
16432
16621
|
break;
|
|
16433
16622
|
case 'pan': {
|
|
@@ -16457,7 +16646,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16457
16646
|
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
16647
|
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
16648
|
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,';
|
|
16649
|
+
/* eslint-disable no-case-declarations */
|
|
16460
16650
|
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'));
|
|
16651
|
+
/* eslint-enable no-case-declarations */
|
|
16461
16652
|
resetPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
16462
16653
|
this.currentToolbarEle.appendChild(resetPath);
|
|
16463
16654
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
@@ -16467,6 +16658,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16467
16658
|
}
|
|
16468
16659
|
};
|
|
16469
16660
|
/**
|
|
16661
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
16662
|
+
* @returns {void}
|
|
16470
16663
|
* @private
|
|
16471
16664
|
*/
|
|
16472
16665
|
Zoom.prototype.performToolBarAction = function (e) {
|
|
@@ -16480,13 +16673,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16480
16673
|
isToolbarPerform = (this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) + 1 <= this.maps.zoomSettings.maxZoom;
|
|
16481
16674
|
break;
|
|
16482
16675
|
case 'zoomout':
|
|
16676
|
+
/* eslint-disable no-case-declarations */
|
|
16483
16677
|
var scaleValue = this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale;
|
|
16678
|
+
/* eslint-enable no-case-declarations */
|
|
16484
16679
|
isToolbarPerform = (this.maps.projectionType === 'Miller' || this.maps.projectionType === 'Winkel3' ||
|
|
16485
16680
|
this.maps.projectionType === 'AitOff') ? Math.round(scaleValue) - 1 >= this.maps.zoomSettings.minZoom :
|
|
16486
16681
|
(scaleValue) - 1 >= this.maps.zoomSettings.minZoom;
|
|
16487
16682
|
break;
|
|
16488
16683
|
case 'reset':
|
|
16489
|
-
isToolbarPerform = Math.round(this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale)
|
|
16684
|
+
isToolbarPerform = Math.round(this.maps.isTileMap ? this.maps.tileZoomLevel : this.maps.scale) !== this.maps.zoomSettings.minZoom;
|
|
16490
16685
|
break;
|
|
16491
16686
|
}
|
|
16492
16687
|
if (isTouch && isToolbarPerform) {
|
|
@@ -16620,6 +16815,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16620
16815
|
}
|
|
16621
16816
|
};
|
|
16622
16817
|
/**
|
|
16818
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
16819
|
+
* @returns {void}
|
|
16623
16820
|
* @private
|
|
16624
16821
|
*/
|
|
16625
16822
|
Zoom.prototype.showTooltip = function (e) {
|
|
@@ -16648,6 +16845,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16648
16845
|
}
|
|
16649
16846
|
};
|
|
16650
16847
|
/**
|
|
16848
|
+
* @returns {void}
|
|
16651
16849
|
* @private
|
|
16652
16850
|
*/
|
|
16653
16851
|
Zoom.prototype.removeTooltip = function () {
|
|
@@ -16656,6 +16854,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16656
16854
|
}
|
|
16657
16855
|
};
|
|
16658
16856
|
/**
|
|
16857
|
+
* @returns {void}
|
|
16659
16858
|
* @private
|
|
16660
16859
|
*/
|
|
16661
16860
|
Zoom.prototype.alignToolBar = function () {
|
|
@@ -16715,6 +16914,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16715
16914
|
element.appendChild(style);
|
|
16716
16915
|
};
|
|
16717
16916
|
/**
|
|
16917
|
+
* @param {number} factor - Specifies the factor for toolbar
|
|
16918
|
+
* @param {string} id - Specifies the id
|
|
16919
|
+
* @returns {void}
|
|
16718
16920
|
* @private
|
|
16719
16921
|
*/
|
|
16720
16922
|
Zoom.prototype.removeToolbarOpacity = function (factor, id) {
|
|
@@ -16816,6 +17018,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16816
17018
|
this.setOpacity('_Zooming_ToolBar_Reset_Rect', '_Zooming_ToolBar_Reset', resetStrokeOpacity, resetOpacity);
|
|
16817
17019
|
};
|
|
16818
17020
|
/**
|
|
17021
|
+
* @param {string} zoomClassStyle - Specifies the style for zoom class.
|
|
17022
|
+
* @param {string} zoomInClassStyle - Specifies the style for zoom in.
|
|
17023
|
+
* @param {string} zoomOutClassStyle - Specifies the style for zoom out.
|
|
17024
|
+
* @param {string} panClassStyle - Specifies the style for pan.
|
|
17025
|
+
* @param {string} resetClassStyle - Specifies the style for reset.
|
|
17026
|
+
* @returns {void}
|
|
16819
17027
|
* @private
|
|
16820
17028
|
*/
|
|
16821
17029
|
Zoom.prototype.removeToolbarClass = function (zoomClassStyle, zoomInClassStyle, zoomOutClassStyle, panClassStyle, resetClassStyle) {
|
|
@@ -16853,30 +17061,30 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16853
17061
|
* To bind events.
|
|
16854
17062
|
*
|
|
16855
17063
|
* @param {Element} element - Specifies the element.
|
|
16856
|
-
* @param {
|
|
17064
|
+
* @param {Function} process - Specifies the process.
|
|
16857
17065
|
* @returns {void}
|
|
16858
17066
|
* @private
|
|
16859
17067
|
*/
|
|
16860
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16861
17068
|
Zoom.prototype.wireEvents = function (element, process) {
|
|
16862
17069
|
EventHandler.add(element, Browser.touchStartEvent, process, this);
|
|
16863
17070
|
EventHandler.add(element, 'mouseover', this.showTooltip, this);
|
|
16864
17071
|
EventHandler.add(element, 'mouseout', this.removeTooltip, this);
|
|
16865
17072
|
};
|
|
16866
17073
|
/**
|
|
17074
|
+
* @param {WheelEvent} e - Specifies the wheel event in the map for zooming
|
|
17075
|
+
* @returns {void}
|
|
16867
17076
|
* @private
|
|
16868
17077
|
*/
|
|
16869
17078
|
Zoom.prototype.mapMouseWheel = function (e) {
|
|
16870
17079
|
if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
|
|
16871
17080
|
var map = this.maps;
|
|
16872
|
-
var size = map.availableSize;
|
|
16873
17081
|
map.markerZoomedState = false;
|
|
16874
17082
|
map.zoomPersistence = map.enablePersistence;
|
|
16875
17083
|
var position = this.getMousePosition(e.pageX, e.pageY);
|
|
16876
17084
|
var prevLevel = map.tileZoomLevel;
|
|
16877
17085
|
var prevScale = map.scale;
|
|
16878
17086
|
var delta = 1;
|
|
16879
|
-
var staticMaxZoomLevel =
|
|
17087
|
+
var staticMaxZoomLevel = map.zoomSettings.maxZoom;
|
|
16880
17088
|
var value = (map.isTileMap) ? prevLevel : prevScale;
|
|
16881
17089
|
if (((position.x > map.mapAreaRect.x) && (position.x < (map.mapAreaRect.x + map.mapAreaRect.width))) &&
|
|
16882
17090
|
(position.y > map.mapAreaRect.y) && position.y < (map.mapAreaRect.y + map.mapAreaRect.height)) {
|
|
@@ -16889,8 +17097,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16889
17097
|
map.staticMapZoom = map.tileZoomLevel;
|
|
16890
17098
|
if (map.staticMapZoom > 0 && map.staticMapZoom < staticMaxZoomLevel) {
|
|
16891
17099
|
map.staticMapZoom += 1;
|
|
17100
|
+
this.performZooming(position, (value + delta), direction);
|
|
16892
17101
|
}
|
|
16893
|
-
this.performZooming(position, (value + delta), direction);
|
|
16894
17102
|
}
|
|
16895
17103
|
else {
|
|
16896
17104
|
map.mapScaleValue = value - delta;
|
|
@@ -16911,18 +17119,18 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16911
17119
|
}
|
|
16912
17120
|
};
|
|
16913
17121
|
/**
|
|
17122
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17123
|
+
* @returns {void}
|
|
16914
17124
|
* @private
|
|
16915
17125
|
*/
|
|
16916
17126
|
Zoom.prototype.doubleClick = function (e) {
|
|
16917
17127
|
var pageX = e.pageX;
|
|
16918
17128
|
var pageY = e.pageY;
|
|
16919
|
-
var target = e.target;
|
|
16920
17129
|
var tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
|
|
16921
17130
|
if (this.maps.zoomSettings.enable && this.maps.zoomSettings.doubleClickZoom
|
|
16922
17131
|
&& !(e.target['id'].indexOf('_Zooming_') > -1) && isNullOrUndefined(tooltipElement)) {
|
|
16923
17132
|
var position = this.getMousePosition(pageX, pageY);
|
|
16924
17133
|
var map = this.maps;
|
|
16925
|
-
var size = map.availableSize;
|
|
16926
17134
|
var prevLevel = map.tileZoomLevel;
|
|
16927
17135
|
var prevScale = map.scale;
|
|
16928
17136
|
map.mapScaleValue = map.mapScaleValue + 1;
|
|
@@ -16934,6 +17142,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16934
17142
|
}
|
|
16935
17143
|
};
|
|
16936
17144
|
/**
|
|
17145
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17146
|
+
* @returns {void}
|
|
16937
17147
|
* @private
|
|
16938
17148
|
*/
|
|
16939
17149
|
Zoom.prototype.mouseDownHandler = function (e) {
|
|
@@ -16941,6 +17151,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16941
17151
|
var pageY;
|
|
16942
17152
|
var target;
|
|
16943
17153
|
var touches = null;
|
|
17154
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16944
17155
|
var element = e.target;
|
|
16945
17156
|
if (e.type === 'touchstart') {
|
|
16946
17157
|
this.isTouch = true;
|
|
@@ -16952,6 +17163,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16952
17163
|
else {
|
|
16953
17164
|
pageX = e.pageX;
|
|
16954
17165
|
pageY = e.pageY;
|
|
17166
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16955
17167
|
target = e.target;
|
|
16956
17168
|
}
|
|
16957
17169
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
@@ -16965,7 +17177,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16965
17177
|
var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
16966
17178
|
this.rectZoomingStart = ((this.isZoomSelection && scale < this.maps.zoomSettings.maxZoom) && this.maps.zoomSettings.enable);
|
|
16967
17179
|
this.mouseDownPoints = this.getMousePosition(pageX, pageY);
|
|
16968
|
-
if (this.isTouch) {
|
|
17180
|
+
if (this.isTouch && touches !== null) {
|
|
16969
17181
|
this.firstMove = true;
|
|
16970
17182
|
this.pinchFactor = this.maps.scale;
|
|
16971
17183
|
this.fingers = touches.length;
|
|
@@ -16973,12 +17185,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
16973
17185
|
this.isSingleClick = true;
|
|
16974
17186
|
};
|
|
16975
17187
|
/**
|
|
17188
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17189
|
+
* @returns {void}
|
|
16976
17190
|
* @private
|
|
16977
17191
|
*/
|
|
16978
17192
|
Zoom.prototype.mouseMoveHandler = function (e) {
|
|
16979
17193
|
var pageX;
|
|
16980
17194
|
var pageY;
|
|
16981
17195
|
var map = this.maps;
|
|
17196
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16982
17197
|
var target;
|
|
16983
17198
|
var touches = null;
|
|
16984
17199
|
var zoom = this.maps.zoomSettings;
|
|
@@ -17003,7 +17218,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17003
17218
|
}
|
|
17004
17219
|
}
|
|
17005
17220
|
if (this.isTouch) {
|
|
17006
|
-
if (this.maps.zoomSettings.pinchZooming) {
|
|
17221
|
+
if (this.maps.zoomSettings.pinchZooming && touches !== null) {
|
|
17007
17222
|
if (this.firstMove && touches.length === 2) {
|
|
17008
17223
|
this.rectZoomingStart = false;
|
|
17009
17224
|
this.updateInteraction();
|
|
@@ -17019,9 +17234,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17019
17234
|
}
|
|
17020
17235
|
}
|
|
17021
17236
|
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)) {
|
|
17237
|
+
if (zoom.enable && this.isPanModeEnabled && this.maps.markerDragId.indexOf('_MarkerIndex_') === -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
|
|
17025
17238
|
e.preventDefault();
|
|
17026
17239
|
this.maps.element.style.cursor = 'pointer';
|
|
17027
17240
|
this.mouseMoveLatLong = { x: pageX, y: pageY };
|
|
@@ -17033,7 +17246,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17033
17246
|
this.mouseDownLatLong['y'] = pageY;
|
|
17034
17247
|
}
|
|
17035
17248
|
}
|
|
17036
|
-
if (this.isTouch ? (touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
|
|
17249
|
+
if (this.isTouch ? (touches !== null && touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
|
|
17037
17250
|
e.preventDefault();
|
|
17038
17251
|
var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
17039
17252
|
if (this.maps.zoomSettings.enableSelectionZooming && scale < this.maps.zoomSettings.maxZoom) {
|
|
@@ -17046,10 +17259,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17046
17259
|
}
|
|
17047
17260
|
};
|
|
17048
17261
|
/**
|
|
17262
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17263
|
+
* @returns {void}
|
|
17049
17264
|
* @private
|
|
17050
17265
|
*/
|
|
17051
17266
|
Zoom.prototype.mouseUpHandler = function (e) {
|
|
17052
|
-
var map = this.maps;
|
|
17053
17267
|
this.rectZoomingStart = false;
|
|
17054
17268
|
this.isSingleClick = this.isSingleClick ? true : false;
|
|
17055
17269
|
this.isTouch = false;
|
|
@@ -17057,7 +17271,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17057
17271
|
this.touchMoveList = [];
|
|
17058
17272
|
this.lastScale = 1;
|
|
17059
17273
|
this.maps.element.style.cursor = 'auto';
|
|
17060
|
-
// eslint-disable-next-line max-len
|
|
17061
17274
|
if (this.isPanModeEnabled && this.maps.zoomSettings.enablePanning && !isNullOrUndefined(this.maps.previousPoint) &&
|
|
17062
17275
|
(this.maps.translatePoint.x !== this.maps.previousPoint.x && this.maps.translatePoint.y !== this.maps.previousPoint.y)) {
|
|
17063
17276
|
var pageX = void 0;
|
|
@@ -17065,7 +17278,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17065
17278
|
var layerX = 0;
|
|
17066
17279
|
var layerY = 0;
|
|
17067
17280
|
var target = void 0;
|
|
17068
|
-
var rect = this.maps.element.getBoundingClientRect();
|
|
17069
17281
|
var element = e.target;
|
|
17070
17282
|
if (e.type.indexOf('touch') !== -1) {
|
|
17071
17283
|
var touchArg = e;
|
|
@@ -17080,6 +17292,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17080
17292
|
pageY = e.pageY;
|
|
17081
17293
|
layerX = e['layerX'];
|
|
17082
17294
|
layerY = e['layerY'] - (this.maps.isTileMap ? 10 : 0);
|
|
17295
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17083
17296
|
target = e.target;
|
|
17084
17297
|
}
|
|
17085
17298
|
var panCompleteEventArgs = void 0;
|
|
@@ -17111,10 +17324,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17111
17324
|
this.maps.trigger('panComplete', panCompleteEventArgs);
|
|
17112
17325
|
}
|
|
17113
17326
|
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
17327
|
var zoomRectElement = getElementByID(this.maps.element.id + '_Selection_Rect_Zooming');
|
|
17119
17328
|
if (zoomRectElement && this.maps.zoomSettings.enable && this.maps.zoomSettings.enableSelectionZooming) {
|
|
17120
17329
|
remove(zoomRectElement);
|
|
@@ -17122,10 +17331,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17122
17331
|
}
|
|
17123
17332
|
this.mouseMoveLatLong = { x: 0, y: 0 };
|
|
17124
17333
|
this.mouseDownLatLong = { x: 0, y: 0 };
|
|
17334
|
+
this.pinchDistance = null;
|
|
17125
17335
|
};
|
|
17126
17336
|
/**
|
|
17337
|
+
* @param {PointerEvent} e - Specifies the event in the map
|
|
17338
|
+
* @returns {void}
|
|
17127
17339
|
* @private
|
|
17128
17340
|
*/
|
|
17341
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17129
17342
|
Zoom.prototype.mouseCancelHandler = function (e) {
|
|
17130
17343
|
this.isPanModeEnabled = false;
|
|
17131
17344
|
this.isTouch = false;
|
|
@@ -17166,6 +17379,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17166
17379
|
}
|
|
17167
17380
|
};
|
|
17168
17381
|
/**
|
|
17382
|
+
* Gets the Mouse Position
|
|
17383
|
+
*
|
|
17384
|
+
* @param {number} pageX - Specifies the Page x in map
|
|
17385
|
+
* @param {number} pageY - Specifies the Page y in map
|
|
17386
|
+
* @returns {Point} - returns the mouse point position
|
|
17169
17387
|
* @private
|
|
17170
17388
|
*/
|
|
17171
17389
|
Zoom.prototype.getMousePosition = function (pageX, pageY) {
|
|
@@ -17180,6 +17398,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17180
17398
|
return new Point(Math.abs(pageX - positionX), Math.abs(pageY - positionY));
|
|
17181
17399
|
};
|
|
17182
17400
|
/**
|
|
17401
|
+
* @returns {void}
|
|
17183
17402
|
* @private
|
|
17184
17403
|
*/
|
|
17185
17404
|
Zoom.prototype.addEventListener = function () {
|
|
@@ -17195,6 +17414,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17195
17414
|
EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this);
|
|
17196
17415
|
};
|
|
17197
17416
|
/**
|
|
17417
|
+
* @returns {void}
|
|
17198
17418
|
* @private
|
|
17199
17419
|
*/
|
|
17200
17420
|
Zoom.prototype.removeEventListener = function () {
|
|
@@ -17241,6 +17461,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
17241
17461
|
this.removeEventListener();
|
|
17242
17462
|
this.layerCollectionEle = null;
|
|
17243
17463
|
this.currentLayer = null;
|
|
17464
|
+
this.pinchDistance = null;
|
|
17244
17465
|
this.maps = null;
|
|
17245
17466
|
};
|
|
17246
17467
|
return Zoom;
|
|
@@ -17275,6 +17496,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
17275
17496
|
var argsData = {
|
|
17276
17497
|
cancel: false, htmlContent: this.getHTMLContent(maps, elements), name: beforePrint
|
|
17277
17498
|
};
|
|
17499
|
+
//eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17278
17500
|
maps.trigger('beforePrint', argsData, function (beforePrintArgs) {
|
|
17279
17501
|
if (!argsData.cancel) {
|
|
17280
17502
|
print(argsData.htmlContent, printWindow);
|
|
@@ -17292,6 +17514,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
17292
17514
|
Print.prototype.getHTMLContent = function (maps, elements) {
|
|
17293
17515
|
var div = createElement('div');
|
|
17294
17516
|
var divElement = maps.element.cloneNode(true);
|
|
17517
|
+
//eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17295
17518
|
var backgroundElement = (!maps.isTileMap ? divElement.getElementsByTagName('svg')[0] : divElement.getElementsByTagName('svg')[1]);
|
|
17296
17519
|
if (!isNullOrUndefined(backgroundElement)) {
|
|
17297
17520
|
backgroundElement = backgroundElement.childNodes[0];
|
|
@@ -17543,7 +17766,7 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
17543
17766
|
* @returns {void}
|
|
17544
17767
|
* @private
|
|
17545
17768
|
*/
|
|
17546
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
17769
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17547
17770
|
ImageExport.prototype.destroy = function () { };
|
|
17548
17771
|
return ImageExport;
|
|
17549
17772
|
}());
|
|
@@ -17558,7 +17781,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
17558
17781
|
* Constructor for Maps
|
|
17559
17782
|
*
|
|
17560
17783
|
*/
|
|
17561
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
17784
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17562
17785
|
function PdfExport() {
|
|
17563
17786
|
}
|
|
17564
17787
|
/**
|
|
@@ -17574,7 +17797,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
17574
17797
|
*/
|
|
17575
17798
|
PdfExport.prototype.export = function (maps, type, fileName, allowDownload, orientation) {
|
|
17576
17799
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17577
|
-
var promise = new Promise(function (resolve
|
|
17800
|
+
var promise = new Promise(function (resolve) {
|
|
17578
17801
|
if (maps.isTileMap) {
|
|
17579
17802
|
maps.isExportInitialTileMap = true;
|
|
17580
17803
|
}
|
|
@@ -17713,7 +17936,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
17713
17936
|
* @returns {void}
|
|
17714
17937
|
* @private
|
|
17715
17938
|
*/
|
|
17716
|
-
// eslint-disable-next-line @typescript-eslint/no-
|
|
17939
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
17717
17940
|
PdfExport.prototype.destroy = function () { };
|
|
17718
17941
|
return PdfExport;
|
|
17719
17942
|
}());
|