@syncfusion/ej2-maps 20.4.49 → 21.1.35
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/CHANGELOG.md +4 -20
- 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 +993 -236
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +1008 -236
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/maps/layers/bubble.d.ts +2 -0
- package/src/maps/layers/bubble.js +2 -1
- package/src/maps/layers/color-mapping.d.ts +1 -0
- package/src/maps/layers/color-mapping.js +1 -0
- package/src/maps/layers/data-label.d.ts +1 -0
- package/src/maps/layers/data-label.js +9 -4
- package/src/maps/layers/layer-panel.js +1 -0
- package/src/maps/layers/legend.d.ts +2 -0
- package/src/maps/layers/legend.js +2 -0
- package/src/maps/layers/marker.d.ts +5 -0
- package/src/maps/layers/marker.js +42 -3
- package/src/maps/layers/navigation-selected-line.d.ts +1 -0
- package/src/maps/layers/navigation-selected-line.js +1 -0
- package/src/maps/maps-model.d.ts +47 -33
- package/src/maps/maps.d.ts +144 -88
- package/src/maps/maps.js +217 -61
- package/src/maps/model/base-model.d.ts +535 -230
- package/src/maps/model/base.d.ts +540 -263
- package/src/maps/model/base.js +168 -28
- package/src/maps/model/constants.d.ts +12 -0
- package/src/maps/model/constants.js +12 -0
- package/src/maps/model/export-image.d.ts +1 -1
- package/src/maps/model/export-image.js +1 -1
- package/src/maps/model/export-pdf.d.ts +2 -2
- package/src/maps/model/export-pdf.js +2 -2
- package/src/maps/model/interface.d.ts +137 -108
- package/src/maps/model/theme.d.ts +1 -0
- package/src/maps/model/theme.js +1 -0
- package/src/maps/user-interaction/annotation.d.ts +2 -0
- package/src/maps/user-interaction/annotation.js +2 -0
- package/src/maps/user-interaction/highlight.d.ts +1 -0
- package/src/maps/user-interaction/highlight.js +1 -0
- package/src/maps/user-interaction/selection.d.ts +1 -0
- package/src/maps/user-interaction/selection.js +1 -0
- package/src/maps/user-interaction/tooltip.d.ts +16 -0
- package/src/maps/user-interaction/tooltip.js +23 -6
- package/src/maps/user-interaction/zoom.d.ts +99 -3
- package/src/maps/user-interaction/zoom.js +405 -100
- package/src/maps/utils/enum.d.ts +105 -91
- package/src/maps/utils/helper.d.ts +76 -16
- package/src/maps/utils/helper.js +122 -37
- package/.eslintrc.json +0 -259
- package/tslint.json +0 -111
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ajax, Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, L10n, NotifyPropertyChanges, Property, compile, createElement, extend, isNullOrUndefined, merge, print, remove, setValue } from '@syncfusion/ej2-base';
|
|
1
|
+
import { Ajax, Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, compile, createElement, extend, isNullOrUndefined, merge, print, remove, setValue } from '@syncfusion/ej2-base';
|
|
2
2
|
import { SvgRenderer, Tooltip } from '@syncfusion/ej2-svg-base';
|
|
3
3
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
4
4
|
import { PdfBitmap, PdfDocument, PdfPageOrientation } from '@syncfusion/ej2-pdf-export';
|
|
@@ -21,7 +21,7 @@ var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
|
21
21
|
* Helper functions for maps control
|
|
22
22
|
*/
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Specifies the size information of an element.
|
|
25
25
|
*/
|
|
26
26
|
var Size = /** @__PURE__ @class */ (function () {
|
|
27
27
|
function Size(width, height) {
|
|
@@ -49,6 +49,7 @@ function stringToNumber(value, containerSize) {
|
|
|
49
49
|
*
|
|
50
50
|
* @param {Maps} maps Specifies the maps instance
|
|
51
51
|
* @returns {void}
|
|
52
|
+
* @private
|
|
52
53
|
*/
|
|
53
54
|
function calculateSize(maps) {
|
|
54
55
|
maps.element.style.height = !isNullOrUndefined(maps.height) ? maps.height : 'auto';
|
|
@@ -72,6 +73,7 @@ function calculateSize(maps) {
|
|
|
72
73
|
*
|
|
73
74
|
* @param {Maps} maps Specifies the map instance
|
|
74
75
|
* @returns {void}
|
|
76
|
+
* @private
|
|
75
77
|
*/
|
|
76
78
|
function createSvg(maps) {
|
|
77
79
|
maps.renderer = new SvgRenderer(maps.element.id);
|
|
@@ -93,6 +95,7 @@ function createSvg(maps) {
|
|
|
93
95
|
* @param {number} pageY - Specifies the pageY.
|
|
94
96
|
* @param {Element} element - Specifies the element.
|
|
95
97
|
* @returns {MapLocation} - Returns the location.
|
|
98
|
+
* @private
|
|
96
99
|
*/
|
|
97
100
|
function getMousePosition(pageX, pageY, element) {
|
|
98
101
|
var elementRect = element.getBoundingClientRect();
|
|
@@ -109,6 +112,7 @@ function getMousePosition(pageX, pageY, element) {
|
|
|
109
112
|
*
|
|
110
113
|
* @param {number} deg Specifies the degree value
|
|
111
114
|
* @returns {number} Returns the number
|
|
115
|
+
* @private
|
|
112
116
|
*/
|
|
113
117
|
function degreesToRadians(deg) {
|
|
114
118
|
return deg * (Math.PI / 180);
|
|
@@ -118,6 +122,7 @@ function degreesToRadians(deg) {
|
|
|
118
122
|
*
|
|
119
123
|
* @param {number} radian Specifies the radian value
|
|
120
124
|
* @returns {number} Returns the number
|
|
125
|
+
* @private
|
|
121
126
|
*/
|
|
122
127
|
function radiansToDegrees(radian) {
|
|
123
128
|
return radian * (180 / Math.PI);
|
|
@@ -131,6 +136,7 @@ function radiansToDegrees(radian) {
|
|
|
131
136
|
* @param {LayerSettings} layer - Specifies the layer settings.
|
|
132
137
|
* @param {Maps} mapModel - Specifies the maps.
|
|
133
138
|
* @returns {Point} - Returns the point values.
|
|
139
|
+
* @private
|
|
134
140
|
*/
|
|
135
141
|
function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
|
|
136
142
|
var mapSize = new Size(mapModel.mapAreaRect.width, mapModel.mapAreaRect.height);
|
|
@@ -214,6 +220,7 @@ function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
|
|
|
214
220
|
* @param {MapLocation} tileTranslatePoint Specifies the tile translate point
|
|
215
221
|
* @param {boolean} isMapCoordinates Specifies the boolean value
|
|
216
222
|
* @returns {MapLocation} Returns the location value
|
|
223
|
+
* @private
|
|
217
224
|
*/
|
|
218
225
|
function convertTileLatLongToPoint(center, zoomLevel, tileTranslatePoint, isMapCoordinates) {
|
|
219
226
|
var size = Math.pow(2, zoomLevel) * 256;
|
|
@@ -234,6 +241,7 @@ function convertTileLatLongToPoint(center, zoomLevel, tileTranslatePoint, isMapC
|
|
|
234
241
|
* @param {Maps} mapObject - Specifies the maps.
|
|
235
242
|
* @param {number} val - Specifies the value.
|
|
236
243
|
* @returns {number} - Returns the number.
|
|
244
|
+
* @private
|
|
237
245
|
*/
|
|
238
246
|
function xToCoordinate(mapObject, val) {
|
|
239
247
|
var longitudeMinMax = mapObject.baseMapBounds.longitude;
|
|
@@ -247,6 +255,7 @@ function xToCoordinate(mapObject, val) {
|
|
|
247
255
|
* @param {Maps} mapObject - Specifies the maps.
|
|
248
256
|
* @param {number} val - Specifies the value.
|
|
249
257
|
* @returns {number} - Returns the number.
|
|
258
|
+
* @private
|
|
250
259
|
*/
|
|
251
260
|
function yToCoordinate(mapObject, val) {
|
|
252
261
|
var latitudeMinMax = mapObject.baseMapBounds.latitude;
|
|
@@ -258,6 +267,7 @@ function yToCoordinate(mapObject, val) {
|
|
|
258
267
|
* @param {number} x - Specifies the x value.
|
|
259
268
|
* @param {number} y - Specifies the y value.
|
|
260
269
|
* @returns {Point} - Returns the point value.
|
|
270
|
+
* @private
|
|
261
271
|
*/
|
|
262
272
|
function aitoff(x, y) {
|
|
263
273
|
var cosy = Math.cos(y);
|
|
@@ -270,6 +280,7 @@ function aitoff(x, y) {
|
|
|
270
280
|
* @param {number} a - Specifies the a value
|
|
271
281
|
* @param {number} b - Specifies the b value
|
|
272
282
|
* @returns {number} - Returns the number
|
|
283
|
+
* @private
|
|
273
284
|
*/
|
|
274
285
|
function roundTo(a, b) {
|
|
275
286
|
var c = Math.pow(10, b);
|
|
@@ -279,6 +290,7 @@ function roundTo(a, b) {
|
|
|
279
290
|
*
|
|
280
291
|
* @param {number} x - Specifies the x value
|
|
281
292
|
* @returns {number} - Returns the number
|
|
293
|
+
* @private
|
|
282
294
|
*/
|
|
283
295
|
function sinci(x) {
|
|
284
296
|
return x / Math.sin(x);
|
|
@@ -287,6 +299,7 @@ function sinci(x) {
|
|
|
287
299
|
*
|
|
288
300
|
* @param {number} a - Specifies the a value
|
|
289
301
|
* @returns {number} - Returns the number
|
|
302
|
+
* @private
|
|
290
303
|
*/
|
|
291
304
|
function acos(a) {
|
|
292
305
|
return Math.acos(a);
|
|
@@ -298,6 +311,7 @@ function acos(a) {
|
|
|
298
311
|
* @param {number} min Specifies the minimum value
|
|
299
312
|
* @param {number} max Specifies the maximum value
|
|
300
313
|
* @returns {number} Returns the value
|
|
314
|
+
* @private
|
|
301
315
|
*/
|
|
302
316
|
function calculateBound(value, min, max) {
|
|
303
317
|
if (!isNullOrUndefined(min)) {
|
|
@@ -316,6 +330,7 @@ function calculateBound(value, min, max) {
|
|
|
316
330
|
* @param {string} url Specifies the url
|
|
317
331
|
* @param {boolean} isDownload Specifies whether download a file.
|
|
318
332
|
* @returns {void}
|
|
333
|
+
* @private
|
|
319
334
|
*/
|
|
320
335
|
function triggerDownload(fileName, type, url, isDownload) {
|
|
321
336
|
createElement('a', {
|
|
@@ -330,7 +345,7 @@ function triggerDownload(fileName, type, url, isDownload) {
|
|
|
330
345
|
}));
|
|
331
346
|
}
|
|
332
347
|
/**
|
|
333
|
-
*
|
|
348
|
+
* Specifies the information of the position of the point in maps.
|
|
334
349
|
*/
|
|
335
350
|
var Point = /** @__PURE__ @class */ (function () {
|
|
336
351
|
function Point(x, y) {
|
|
@@ -374,7 +389,7 @@ function measureText(text, font) {
|
|
|
374
389
|
measureObject = createElement('text', { id: 'mapsmeasuretext' });
|
|
375
390
|
document.body.appendChild(measureObject);
|
|
376
391
|
}
|
|
377
|
-
measureObject.
|
|
392
|
+
measureObject.innerText = text;
|
|
378
393
|
measureObject.style.position = 'absolute';
|
|
379
394
|
if (typeof (font.size) === 'number') {
|
|
380
395
|
measureObject.style.fontSize = (font.size) + 'px';
|
|
@@ -538,6 +553,7 @@ var LineOption = /** @__PURE__ @class */ (function (_super) {
|
|
|
538
553
|
* Internal use of line
|
|
539
554
|
*
|
|
540
555
|
* @property {number} Line - Specifies the line class
|
|
556
|
+
* @private
|
|
541
557
|
*/
|
|
542
558
|
var Line = /** @__PURE__ @class */ (function () {
|
|
543
559
|
function Line(x1, y1, x2, y2) {
|
|
@@ -551,6 +567,7 @@ var Line = /** @__PURE__ @class */ (function () {
|
|
|
551
567
|
/**
|
|
552
568
|
* Internal use of map location type
|
|
553
569
|
*
|
|
570
|
+
* @private
|
|
554
571
|
*/
|
|
555
572
|
var MapLocation = /** @__PURE__ @class */ (function () {
|
|
556
573
|
function MapLocation(x, y) {
|
|
@@ -577,6 +594,7 @@ var Rect = /** @__PURE__ @class */ (function () {
|
|
|
577
594
|
* Internal use for pattern creation.
|
|
578
595
|
*
|
|
579
596
|
* @property {PatternOptions} PatternOptions - Specifies the pattern option class.
|
|
597
|
+
* @private
|
|
580
598
|
*/
|
|
581
599
|
var PatternOptions = /** @__PURE__ @class */ (function () {
|
|
582
600
|
function PatternOptions(id, x, y, width, height, patternUnits, patternContentUnits, patternTransform, href) {
|
|
@@ -693,6 +711,7 @@ function convertElement(element, markerId, data, index, mapObj) {
|
|
|
693
711
|
* @param {string} value - Specifies the value
|
|
694
712
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
695
713
|
* @returns {string} - Returns the string value
|
|
714
|
+
* @private
|
|
696
715
|
*/
|
|
697
716
|
function formatValue(value, maps) {
|
|
698
717
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -714,6 +733,7 @@ function formatValue(value, maps) {
|
|
|
714
733
|
* @param {any} data - Specifies the data
|
|
715
734
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
716
735
|
* @returns {string} - Returns the string value
|
|
736
|
+
* @private
|
|
717
737
|
*/
|
|
718
738
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
719
739
|
function convertStringToValue(stringTemplate, format, data, maps) {
|
|
@@ -744,6 +764,7 @@ function convertStringToValue(stringTemplate, format, data, maps) {
|
|
|
744
764
|
* @param {number} index - Specifies the index
|
|
745
765
|
* @param {Maps} mapObj - Specifies the map object
|
|
746
766
|
* @returns {HTMLElement} - Returns the html element
|
|
767
|
+
* @private
|
|
747
768
|
*/
|
|
748
769
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
749
770
|
function convertElementFromLabel(element, labelId, data, index, mapObj) {
|
|
@@ -773,6 +794,7 @@ function convertElementFromLabel(element, labelId, data, index, mapObj) {
|
|
|
773
794
|
* @param {Element} markerCollection - Specifies the marker collection
|
|
774
795
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
775
796
|
* @returns {Element} - Returns the element
|
|
797
|
+
* @private
|
|
776
798
|
*/
|
|
777
799
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
778
800
|
function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCollection, maps) {
|
|
@@ -805,7 +827,7 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
|
|
|
805
827
|
}
|
|
806
828
|
else if (shape === 'Image') {
|
|
807
829
|
x = location.x - (size.width / 2);
|
|
808
|
-
y = location.y - size.height;
|
|
830
|
+
y = location.y - (size.height / 2);
|
|
809
831
|
merge(pathOptions, { 'href': imageUrl, 'height': size.height, 'width': size.width, x: x, y: y });
|
|
810
832
|
markerEle = maps.renderer.drawImage(pathOptions);
|
|
811
833
|
}
|
|
@@ -819,6 +841,7 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
|
|
|
819
841
|
* @param {any} data - Specifies the data
|
|
820
842
|
* @param {string} value - Specifies the value
|
|
821
843
|
* @returns {any} - Returns the data
|
|
844
|
+
* @private
|
|
822
845
|
*/
|
|
823
846
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
824
847
|
function getValueFromObject(data, value) {
|
|
@@ -840,6 +863,7 @@ function getValueFromObject(data, value) {
|
|
|
840
863
|
* @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
|
|
841
864
|
* @param {any} data - Specifies the data
|
|
842
865
|
* @returns {IMarkerRenderingEventArgs} - Returns the arguments
|
|
866
|
+
* @private
|
|
843
867
|
*/
|
|
844
868
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
845
869
|
function markerColorChoose(eventArgs, data) {
|
|
@@ -856,6 +880,7 @@ function markerColorChoose(eventArgs, data) {
|
|
|
856
880
|
* @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
|
|
857
881
|
* @param {any} data - Specifies the data
|
|
858
882
|
* @returns {IMarkerRenderingEventArgs} - Returns the arguments
|
|
883
|
+
* @private
|
|
859
884
|
*/
|
|
860
885
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
861
886
|
function markerShapeChoose(eventArgs, data) {
|
|
@@ -891,6 +916,7 @@ function markerShapeChoose(eventArgs, data) {
|
|
|
891
916
|
* @param {boolean} check - Specifies the boolean value
|
|
892
917
|
* @param {boolean} zoomCheck - Specifies the boolean value
|
|
893
918
|
* @returns {void}
|
|
919
|
+
* @private
|
|
894
920
|
*/
|
|
895
921
|
function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerCollection, layerElement, check, zoomCheck) {
|
|
896
922
|
var bounds1;
|
|
@@ -1016,14 +1042,13 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1016
1042
|
var clusterID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_cluster_' + (m);
|
|
1017
1043
|
var labelID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_cluster_' + (m) + '_datalabel_' + m;
|
|
1018
1044
|
m++;
|
|
1019
|
-
var
|
|
1020
|
-
var ele = drawSymbols(shapeCustom['shape'], shapeCustom['imageUrl'], { x: 0, y: imageShapeY }, clusterID, shapeCustom, markerCollection, maps);
|
|
1045
|
+
var ele = drawSymbols(shapeCustom['shape'], shapeCustom['imageUrl'], { x: 0, y: 0 }, clusterID, shapeCustom, markerCollection, maps);
|
|
1021
1046
|
ele.setAttribute('transform', 'translate( ' + tempX + ' ' + tempY + ' )');
|
|
1022
1047
|
if (eventArg.shape === 'Balloon') {
|
|
1023
|
-
ele.children[0].
|
|
1048
|
+
ele.children[0].innerText = indexCollection.toString();
|
|
1024
1049
|
}
|
|
1025
1050
|
else {
|
|
1026
|
-
ele.
|
|
1051
|
+
ele.innerText = indexCollection.toString();
|
|
1027
1052
|
}
|
|
1028
1053
|
options = new TextOption(labelID, (0), postionY, 'middle', (colloideBounds.length + 1).toString(), '', '');
|
|
1029
1054
|
textElement = renderTextElement(options, style, style.color, markerCollection);
|
|
@@ -1105,6 +1130,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1105
1130
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1106
1131
|
* @param {Element | HTMLElement} markerElement - Specifies the marker element
|
|
1107
1132
|
* @returns {void}
|
|
1133
|
+
* @private
|
|
1108
1134
|
*/
|
|
1109
1135
|
function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
|
|
1110
1136
|
var layerIndex = sameMarkerData[0].layerIndex;
|
|
@@ -1133,6 +1159,7 @@ function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
|
|
|
1133
1159
|
* @param {Element | HTMLElement} markerElement - Specifies the marker element
|
|
1134
1160
|
* @param {boolean} isDom - Specifies the boolean value
|
|
1135
1161
|
* @returns {void}
|
|
1162
|
+
* @private
|
|
1136
1163
|
*/
|
|
1137
1164
|
function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
|
|
1138
1165
|
var layerIndex = sameMarkerData[0].layerIndex;
|
|
@@ -1227,6 +1254,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
|
|
|
1227
1254
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1228
1255
|
* @param {Element} markerCollection - Specifies the marker collection
|
|
1229
1256
|
* @returns {Element} - Returns the element
|
|
1257
|
+
* @private
|
|
1230
1258
|
*/
|
|
1231
1259
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1232
1260
|
function marker(eventArgs, markerSettings, markerData, dataIndex, location, transPoint, markerID, offset, scale, maps, markerCollection) {
|
|
@@ -1266,6 +1294,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1266
1294
|
* @param {Point} offset - Specifies the offset value
|
|
1267
1295
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1268
1296
|
* @returns {HTMLElement} - Returns the html element
|
|
1297
|
+
* @private
|
|
1269
1298
|
*/
|
|
1270
1299
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1271
1300
|
function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
|
|
@@ -1334,11 +1363,12 @@ function maintainSelection(elementId, elementClass, element, className) {
|
|
|
1334
1363
|
function maintainStyleClass(id, idClass, fill, opacity, borderColor, borderWidth, maps) {
|
|
1335
1364
|
if (!getElement(id)) {
|
|
1336
1365
|
var styleClass = createElement('style', {
|
|
1337
|
-
id: id
|
|
1338
|
-
+ fill + ';' + 'opacity:' + opacity + ';' +
|
|
1339
|
-
'stroke-width:' + borderWidth + ';' +
|
|
1340
|
-
'stroke:' + borderColor + ';' + '}'
|
|
1366
|
+
id: id
|
|
1341
1367
|
});
|
|
1368
|
+
styleClass.innerText = '.' + idClass + '{fill:'
|
|
1369
|
+
+ fill + ';' + 'opacity:' + opacity + ';' +
|
|
1370
|
+
'stroke-width:' + borderWidth + ';' +
|
|
1371
|
+
'stroke:' + borderColor + ';' + '}';
|
|
1342
1372
|
maps.shapeSelectionClass = styleClass;
|
|
1343
1373
|
document.body.appendChild(styleClass);
|
|
1344
1374
|
}
|
|
@@ -1609,7 +1639,7 @@ function drawBalloon(maps, options, size, location, type, element) {
|
|
|
1609
1639
|
var height = size.height;
|
|
1610
1640
|
var pathElement;
|
|
1611
1641
|
location.x -= width / 2;
|
|
1612
|
-
location.y -= height;
|
|
1642
|
+
location.y -= height / 2;
|
|
1613
1643
|
options.d = 'M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16' +
|
|
1614
1644
|
'c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z';
|
|
1615
1645
|
var balloon = maps.renderer.drawPath(options);
|
|
@@ -1682,6 +1712,7 @@ function getFieldData(dataSource, fields) {
|
|
|
1682
1712
|
* @param {string | string[]} propertyPath - Specifies the property path
|
|
1683
1713
|
* @param {LayerSettingsModel} layer - Specifies the layer settings
|
|
1684
1714
|
* @returns {number} - Returns the number
|
|
1715
|
+
* @private
|
|
1685
1716
|
*/
|
|
1686
1717
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1687
1718
|
function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, layer) {
|
|
@@ -1734,6 +1765,7 @@ function checkPropertyPath(shapeData, shapePropertyPath, shape) {
|
|
|
1734
1765
|
* @param {number} start - Specifies the start value
|
|
1735
1766
|
* @param {number} end - Specifies the end value
|
|
1736
1767
|
* @returns {MapLocation[]} - Returns the location
|
|
1768
|
+
* @private
|
|
1737
1769
|
*/
|
|
1738
1770
|
function filter(points, start, end) {
|
|
1739
1771
|
var pointObject = [];
|
|
@@ -1753,6 +1785,7 @@ function filter(points, start, end) {
|
|
|
1753
1785
|
* @param {number} minValue - Specifies the minValue
|
|
1754
1786
|
* @param {number} maxValue -Specifies the maxValue
|
|
1755
1787
|
* @returns {number} - Returns the number
|
|
1788
|
+
* @private
|
|
1756
1789
|
*/
|
|
1757
1790
|
function getRatioOfBubble(min, max, value, minValue, maxValue) {
|
|
1758
1791
|
var percent = (100 / (maxValue - minValue)) * (value - minValue);
|
|
@@ -1769,6 +1802,7 @@ function getRatioOfBubble(min, max, value, minValue, maxValue) {
|
|
|
1769
1802
|
* @param {string} type - Specifies the type
|
|
1770
1803
|
* @param {string} geometryType - Specified the type of the geometry
|
|
1771
1804
|
* @returns {any} - Specifies the object
|
|
1805
|
+
* @private
|
|
1772
1806
|
*/
|
|
1773
1807
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1774
1808
|
function findMidPointOfPolygon(points, type, geometryType) {
|
|
@@ -1909,6 +1943,7 @@ function textTrim(maxWidth, text, font) {
|
|
|
1909
1943
|
* @param {Size} textSize - Specifies the text size
|
|
1910
1944
|
* @param {string} type - Specifies the type
|
|
1911
1945
|
* @returns {Point} - Returns the point values
|
|
1946
|
+
* @private
|
|
1912
1947
|
*/
|
|
1913
1948
|
function findPosition(location, alignment, textSize, type) {
|
|
1914
1949
|
var x;
|
|
@@ -1933,6 +1968,7 @@ function findPosition(location, alignment, textSize, type) {
|
|
|
1933
1968
|
*
|
|
1934
1969
|
* @param {string} id - Specifies the id
|
|
1935
1970
|
* @returns {void}
|
|
1971
|
+
* @private
|
|
1936
1972
|
*/
|
|
1937
1973
|
function removeElement(id) {
|
|
1938
1974
|
var element = document.getElementById(id);
|
|
@@ -1944,6 +1980,7 @@ function removeElement(id) {
|
|
|
1944
1980
|
* @param {Maps} mapObject - Specifies the map object
|
|
1945
1981
|
* @param {LayerSettings} layer - Specifies the layer settings
|
|
1946
1982
|
* @returns {Point} - Returns the x and y points
|
|
1983
|
+
* @private
|
|
1947
1984
|
*/
|
|
1948
1985
|
function calculateCenterFromPixel(mapObject, layer) {
|
|
1949
1986
|
var point1 = convertGeoToPoint(mapObject.minLatOfGivenLocation, mapObject.minLongOfGivenLocation, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
|
|
@@ -2272,6 +2309,7 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2272
2309
|
*
|
|
2273
2310
|
* @param {Maps} map - Specifies the instance of the maps
|
|
2274
2311
|
* @returns {void}
|
|
2312
|
+
* @private
|
|
2275
2313
|
*/
|
|
2276
2314
|
function fixInitialScaleForTile(map) {
|
|
2277
2315
|
map.tileZoomScale = map.tileZoomLevel = Math.floor(map.availableSize.height / 512) + 1;
|
|
@@ -2288,6 +2326,7 @@ function fixInitialScaleForTile(map) {
|
|
|
2288
2326
|
*
|
|
2289
2327
|
* @param {string} id - Specifies the id
|
|
2290
2328
|
* @returns {Element} - Returns the element
|
|
2329
|
+
* @private
|
|
2291
2330
|
*/
|
|
2292
2331
|
function getElementByID(id) {
|
|
2293
2332
|
return document.getElementById(id);
|
|
@@ -2314,6 +2353,7 @@ function getClientElement(id) {
|
|
|
2314
2353
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
2315
2354
|
* @param {number} value - Specifies the value
|
|
2316
2355
|
* @returns {string} - Returns the string
|
|
2356
|
+
* @private
|
|
2317
2357
|
*/
|
|
2318
2358
|
function Internalize(maps, value) {
|
|
2319
2359
|
maps.formatFunction =
|
|
@@ -2362,6 +2402,7 @@ function getElement(id) {
|
|
|
2362
2402
|
* @param {string} targetId - Specifies the target id
|
|
2363
2403
|
* @param {Maps} map - Specifies the instance of the maps
|
|
2364
2404
|
* @returns {any} - Returns the object
|
|
2405
|
+
* @private
|
|
2365
2406
|
*/
|
|
2366
2407
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2367
2408
|
function getShapeData(targetId, map) {
|
|
@@ -2427,6 +2468,7 @@ function triggerShapeEvent(targetId, selection, maps, eventName) {
|
|
|
2427
2468
|
*
|
|
2428
2469
|
* @param {string} className - Specifies the class name
|
|
2429
2470
|
* @returns {HTMLCollectionOf<Element>} - Returns the collection
|
|
2471
|
+
* @private
|
|
2430
2472
|
*/
|
|
2431
2473
|
function getElementsByClassName(className) {
|
|
2432
2474
|
return document.getElementsByClassName(className);
|
|
@@ -2443,6 +2485,7 @@ function getElementsByClassName(className) {
|
|
|
2443
2485
|
* @param {string} args - Specifies the args
|
|
2444
2486
|
* @param {string} elementSelector - Specifies the element selector
|
|
2445
2487
|
* @returns {Element} - Returns the element
|
|
2488
|
+
* @private
|
|
2446
2489
|
*/
|
|
2447
2490
|
function querySelector(args, elementSelector) {
|
|
2448
2491
|
var targetEle = null;
|
|
@@ -2459,6 +2502,7 @@ function querySelector(args, elementSelector) {
|
|
|
2459
2502
|
* @param {boolean} enable - Specifies the boolean value
|
|
2460
2503
|
* @param {Maps} map - Specifies the instance of the maps
|
|
2461
2504
|
* @returns {Element} - Returns the element
|
|
2505
|
+
* @private
|
|
2462
2506
|
*/
|
|
2463
2507
|
function getTargetElement(layerIndex, name, enable, map) {
|
|
2464
2508
|
var targetId;
|
|
@@ -2480,16 +2524,19 @@ function getTargetElement(layerIndex, name, enable, map) {
|
|
|
2480
2524
|
* @param {string} className - Specifies the class name
|
|
2481
2525
|
* @param {IShapeSelectedEventArgs | any} eventArgs - Specifies the event args
|
|
2482
2526
|
* @returns {Element} - Returns the element
|
|
2527
|
+
* @private
|
|
2483
2528
|
*/
|
|
2484
2529
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2485
2530
|
function createStyle(id, className, eventArgs) {
|
|
2486
|
-
|
|
2487
|
-
id: id
|
|
2488
|
-
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
|
|
2489
|
-
'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
|
|
2490
|
-
'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
|
|
2491
|
-
'stroke:' + eventArgs['border']['color'] + ';' + '}'
|
|
2531
|
+
var styleEle = createElement('style', {
|
|
2532
|
+
id: id
|
|
2492
2533
|
});
|
|
2534
|
+
styleEle.innerText = '.' + className + '{fill:'
|
|
2535
|
+
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
|
|
2536
|
+
'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
|
|
2537
|
+
'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
|
|
2538
|
+
'stroke:' + eventArgs['border']['color'] + ';' + '}';
|
|
2539
|
+
return styleEle;
|
|
2493
2540
|
}
|
|
2494
2541
|
/**
|
|
2495
2542
|
* Function to customize the style for highlight and selection
|
|
@@ -2498,12 +2545,13 @@ function createStyle(id, className, eventArgs) {
|
|
|
2498
2545
|
* @param {string} className - Specifies the class name
|
|
2499
2546
|
* @param {IShapeSelectedEventArgs | any} eventArgs - Specifies the event args
|
|
2500
2547
|
* @returns {void}
|
|
2548
|
+
* @private
|
|
2501
2549
|
*/
|
|
2502
2550
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2503
2551
|
function customizeStyle(id, className, eventArgs) {
|
|
2504
2552
|
var styleEle = getElement(id);
|
|
2505
2553
|
if (!isNullOrUndefined(styleEle)) {
|
|
2506
|
-
styleEle.
|
|
2554
|
+
styleEle.innerText = '.' + className + '{fill:'
|
|
2507
2555
|
+ eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
|
|
2508
2556
|
'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
|
|
2509
2557
|
'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
|
|
@@ -2519,6 +2567,7 @@ function customizeStyle(id, className, eventArgs) {
|
|
|
2519
2567
|
* @param {any} shapeData - Specifies the shape data
|
|
2520
2568
|
* @param {any} data - Specifies the data
|
|
2521
2569
|
* @returns {void}
|
|
2570
|
+
* @private
|
|
2522
2571
|
*/
|
|
2523
2572
|
function triggerItemSelectionEvent(selectionSettings, map, targetElement,
|
|
2524
2573
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2556,6 +2605,7 @@ shapeData, data) {
|
|
|
2556
2605
|
*
|
|
2557
2606
|
* @param {Element} element - Specifies the element
|
|
2558
2607
|
* @returns {void}
|
|
2608
|
+
* @private
|
|
2559
2609
|
*/
|
|
2560
2610
|
function removeClass(element) {
|
|
2561
2611
|
element.removeAttribute('class');
|
|
@@ -2610,6 +2660,7 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius) {
|
|
|
2610
2660
|
/**
|
|
2611
2661
|
* @param {string} id - Specifies the id
|
|
2612
2662
|
* @returns {void}
|
|
2663
|
+
* @private
|
|
2613
2664
|
*/
|
|
2614
2665
|
function timeout(id) {
|
|
2615
2666
|
removeElement(id);
|
|
@@ -2625,6 +2676,7 @@ function timeout(id) {
|
|
|
2625
2676
|
* @param {Element} element - Specifies the element
|
|
2626
2677
|
* @param {boolean} isTouch - Specifies the boolean value
|
|
2627
2678
|
* @returns {void}
|
|
2679
|
+
* @private
|
|
2628
2680
|
*/
|
|
2629
2681
|
function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element, isTouch) {
|
|
2630
2682
|
var location = getMousePosition(x, y, element);
|
|
@@ -2690,9 +2742,10 @@ function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element, isTou
|
|
|
2690
2742
|
* @param {number} areaWidth - Specifies the area width
|
|
2691
2743
|
* @param {Element} element - Specifies the element
|
|
2692
2744
|
* @returns {void}
|
|
2745
|
+
* @private
|
|
2693
2746
|
*/
|
|
2694
2747
|
function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
|
|
2695
|
-
tooltip.
|
|
2748
|
+
tooltip.innerText = text;
|
|
2696
2749
|
tooltip.style.top = tooltip.id.indexOf('_Legend') !== -1 ?
|
|
2697
2750
|
(parseInt(size1[0], 10) + y).toString() + 'px' : (parseInt(size1[0], 10) * 2).toString() + 'px';
|
|
2698
2751
|
tooltip.style.left = (x).toString() + 'px';
|
|
@@ -2734,30 +2787,59 @@ function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
|
|
|
2734
2787
|
* @param {string} text - Specifies the text
|
|
2735
2788
|
* @param {string} top - Specifies the top
|
|
2736
2789
|
* @param {string} left - Specifies the left
|
|
2737
|
-
* @param {
|
|
2790
|
+
* @param {ZoomToolbarTooltipSettingsModel} settings - Specifies the tooltip settings.
|
|
2738
2791
|
* @returns {void}
|
|
2739
2792
|
* @private
|
|
2740
2793
|
*/
|
|
2741
|
-
function createTooltip(id, text, top, left,
|
|
2794
|
+
function createTooltip(id, text, top, left, settings) {
|
|
2742
2795
|
var tooltip = getElement(id);
|
|
2796
|
+
var borderColor = getHexColor(settings.borderColor);
|
|
2797
|
+
var fontColor = getHexColor(settings.fontColor);
|
|
2743
2798
|
var style = 'top:' + top.toString() + 'px;' +
|
|
2744
2799
|
'left:' + left.toString() + 'px;' +
|
|
2745
|
-
'color:
|
|
2746
|
-
|
|
2800
|
+
'color:' + (fontColor ? 'rgba(' + fontColor.r + ',' + fontColor.g + ',' + fontColor.b + ',' + settings.fontOpacity + ')'
|
|
2801
|
+
: settings.fontColor) + ';' +
|
|
2802
|
+
'background:' + settings.fill + ';' +
|
|
2747
2803
|
'z-index: 2;' +
|
|
2748
|
-
'position:absolute;border:
|
|
2749
|
-
|
|
2804
|
+
'position:absolute;border:' + settings.borderWidth + 'px solid ' +
|
|
2805
|
+
(borderColor ? 'rgba(' + borderColor.r + ',' + borderColor.g + ',' + borderColor.b + ',' + settings.borderOpacity + ')'
|
|
2806
|
+
: settings.borderColor) + ';font-family:' + settings.fontFamily +
|
|
2807
|
+
';font-style:' + settings.fontStyle + ';font-weight:' + settings.fontWeight +
|
|
2808
|
+
';font-size:' + settings.fontSize + ';border-radius:' + settings.borderWidth + 'px;';
|
|
2809
|
+
if (!tooltip && settings.visible) {
|
|
2750
2810
|
tooltip = createElement('div', {
|
|
2751
|
-
id: id
|
|
2811
|
+
id: id
|
|
2752
2812
|
});
|
|
2813
|
+
tooltip.innerHTML = SanitizeHtmlHelper.sanitize(' ' + text + ' ');
|
|
2753
2814
|
tooltip.style.cssText = style;
|
|
2754
2815
|
document.body.appendChild(tooltip);
|
|
2755
2816
|
}
|
|
2756
|
-
else {
|
|
2757
|
-
tooltip.innerHTML = ' ' + text + ' ';
|
|
2817
|
+
else if (settings.visible) {
|
|
2818
|
+
tooltip.innerHTML = SanitizeHtmlHelper.sanitize(' ' + text + ' ');
|
|
2758
2819
|
tooltip.style.cssText = style;
|
|
2759
2820
|
}
|
|
2760
2821
|
}
|
|
2822
|
+
/**
|
|
2823
|
+
* @private
|
|
2824
|
+
*/
|
|
2825
|
+
function getHexColor(color) {
|
|
2826
|
+
if (color.indexOf('#') !== -1 && color.toLowerCase().indexOf('rgb') === -1) {
|
|
2827
|
+
var colorArray = (/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i).exec(color);
|
|
2828
|
+
return colorArray ? { r: parseInt(colorArray[1], 16), g: parseInt(colorArray[2], 16), b: parseInt(colorArray[3], 16) } : null;
|
|
2829
|
+
}
|
|
2830
|
+
else if (color.toLowerCase().indexOf('rgb') !== -1) {
|
|
2831
|
+
var colorArray = color.match(/\d+/g).map(function (a) { return parseInt(a, 10); });
|
|
2832
|
+
return colorArray ? { r: colorArray[0], g: colorArray[1], b: colorArray[2] } : null;
|
|
2833
|
+
}
|
|
2834
|
+
else {
|
|
2835
|
+
var divElment = document.createElement('div');
|
|
2836
|
+
divElment.style.color = color;
|
|
2837
|
+
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
2838
|
+
var colorArray = window.getComputedStyle(document.body.appendChild(divElment)).color.match(/\d+/g).map(function (a) { return parseInt(a, 10); });
|
|
2839
|
+
document.body.removeChild(divElment);
|
|
2840
|
+
return colorArray ? { r: colorArray[0], g: colorArray[1], b: colorArray[2] } : null;
|
|
2841
|
+
}
|
|
2842
|
+
}
|
|
2761
2843
|
/**
|
|
2762
2844
|
* @param {Point} location - Specifies the location
|
|
2763
2845
|
* @param {string} shape - Specifies the shape
|
|
@@ -3130,6 +3212,7 @@ function zoomAnimate(element, delay, duration, point, scale, size, maps) {
|
|
|
3130
3212
|
* @param {Function} process - Specifies the process
|
|
3131
3213
|
* @param {Function} end - Specifies the end
|
|
3132
3214
|
* @returns {void}
|
|
3215
|
+
* @private
|
|
3133
3216
|
*/
|
|
3134
3217
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3135
3218
|
function animate(element, delay, duration, process, end) {
|
|
@@ -3159,7 +3242,7 @@ function animate(element, delay, duration, process, end) {
|
|
|
3159
3242
|
clearAnimation = window.requestAnimationFrame(startAnimation);
|
|
3160
3243
|
}
|
|
3161
3244
|
/**
|
|
3162
|
-
*
|
|
3245
|
+
* Defines the options to get shape data file using Ajax request.
|
|
3163
3246
|
*/
|
|
3164
3247
|
var MapAjax = /** @__PURE__ @class */ (function () {
|
|
3165
3248
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -3210,6 +3293,7 @@ function smoothTranslate(element, delay, duration, point) {
|
|
|
3210
3293
|
* @param {number} scaleFactor - Specifies the scale factor
|
|
3211
3294
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
3212
3295
|
* @returns {void}
|
|
3296
|
+
* @private
|
|
3213
3297
|
*/
|
|
3214
3298
|
function compareZoomFactor(scaleFactor, maps) {
|
|
3215
3299
|
var previous = isNullOrUndefined(maps.shouldZoomPreviousFactor) ?
|
|
@@ -3240,8 +3324,9 @@ function compareZoomFactor(scaleFactor, maps) {
|
|
|
3240
3324
|
* @param {number} mapHeight - Specifies the height of the maps
|
|
3241
3325
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
3242
3326
|
* @returns {number} - Returns the scale factor
|
|
3327
|
+
* @private
|
|
3243
3328
|
*/
|
|
3244
|
-
function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeight, maps) {
|
|
3329
|
+
function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeight, maps, isZoomToCoordinates) {
|
|
3245
3330
|
var scaleFactor;
|
|
3246
3331
|
var maxZoomFact = maps.zoomSettings.maxZoom;
|
|
3247
3332
|
var applyMethodeZoom;
|
|
@@ -3254,9 +3339,7 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
|
|
|
3254
3339
|
if (maps.zoomNotApplied && !maps.isTileMap) {
|
|
3255
3340
|
var latiRatio = Math.abs((maps.baseMapBounds.latitude.max - maps.baseMapBounds.latitude.min) / (maxLat - minLat));
|
|
3256
3341
|
var longiRatio = Math.abs((maps.baseMapBounds.longitude.max - maps.baseMapBounds.longitude.min) / (maxLong - minLong));
|
|
3257
|
-
applyMethodeZoom = Math.min(latiRatio, longiRatio);
|
|
3258
|
-
var minLocation = convertGeoToPoint(minLat, minLong, 1, maps.layersCollection[0], maps);
|
|
3259
|
-
var maxLocation = convertGeoToPoint(maxLat, maxLong, 1, maps.layersCollection[0], maps);
|
|
3342
|
+
applyMethodeZoom = isZoomToCoordinates ? (latiRatio + longiRatio) / 2 : Math.min(latiRatio, longiRatio);
|
|
3260
3343
|
}
|
|
3261
3344
|
var latRatio = (maxLatValue - minLatValue) / Math.PI;
|
|
3262
3345
|
var lngDiff = maxLong - minLong;
|
|
@@ -3265,7 +3348,8 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
|
|
|
3265
3348
|
var WORLD_PX_WIDTH = 256;
|
|
3266
3349
|
var latZoom = (Math.log(mapHeight / WORLD_PX_HEIGHT / latRatio) / Math.LN2);
|
|
3267
3350
|
var lngZoom = (Math.log(mapWidth / WORLD_PX_WIDTH / lngRatio) / Math.LN2);
|
|
3268
|
-
var result = (maps.zoomNotApplied && !maps.isTileMap) ? applyMethodeZoom :
|
|
3351
|
+
var result = (maps.zoomNotApplied && !maps.isTileMap) ? applyMethodeZoom :
|
|
3352
|
+
isZoomToCoordinates && !maps.isTileMap ? (latZoom + lngZoom) / 2 : Math.min(latZoom, lngZoom);
|
|
3269
3353
|
scaleFactor = Math.min(result, maxZoomFact);
|
|
3270
3354
|
scaleFactor = maps.isTileMap || !maps.zoomNotApplied ? Math.floor(scaleFactor) : scaleFactor;
|
|
3271
3355
|
if (!maps.isTileMap) {
|
|
@@ -3278,6 +3362,7 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
|
|
|
3278
3362
|
*
|
|
3279
3363
|
* @param {any} e - Specifies the any type value
|
|
3280
3364
|
* @returns {any} - Returns the data value
|
|
3365
|
+
* @private
|
|
3281
3366
|
*/
|
|
3282
3367
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3283
3368
|
function processResult(e) {
|
|
@@ -3603,6 +3688,7 @@ var DarkTheme;
|
|
|
3603
3688
|
*
|
|
3604
3689
|
* @param {MapsTheme} theme - Specifies the theme.
|
|
3605
3690
|
* @returns {IThemeStyle} - Returns the theme style.
|
|
3691
|
+
* @private
|
|
3606
3692
|
*/
|
|
3607
3693
|
function getThemeStyle(theme) {
|
|
3608
3694
|
var style;
|
|
@@ -3870,7 +3956,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
3870
3956
|
* Maps base document
|
|
3871
3957
|
*/
|
|
3872
3958
|
/**
|
|
3873
|
-
*
|
|
3959
|
+
* Gets or sets the options for customizing the annotation element in maps.
|
|
3874
3960
|
*/
|
|
3875
3961
|
var Annotation = /** @__PURE__ @class */ (function (_super) {
|
|
3876
3962
|
__extends$2(Annotation, _super);
|
|
@@ -3897,6 +3983,9 @@ var Annotation = /** @__PURE__ @class */ (function (_super) {
|
|
|
3897
3983
|
], Annotation.prototype, "zIndex", void 0);
|
|
3898
3984
|
return Annotation;
|
|
3899
3985
|
}(ChildProperty));
|
|
3986
|
+
/**
|
|
3987
|
+
* Gets or sets the options to customize the arrow in the navigation line.
|
|
3988
|
+
*/
|
|
3900
3989
|
var Arrow = /** @__PURE__ @class */ (function (_super) {
|
|
3901
3990
|
__extends$2(Arrow, _super);
|
|
3902
3991
|
function Arrow() {
|
|
@@ -3920,7 +4009,7 @@ var Arrow = /** @__PURE__ @class */ (function (_super) {
|
|
|
3920
4009
|
return Arrow;
|
|
3921
4010
|
}(ChildProperty));
|
|
3922
4011
|
/**
|
|
3923
|
-
*
|
|
4012
|
+
* Gets or sets the options to customize the style of the text in data label, legend and other texts in maps.
|
|
3924
4013
|
*/
|
|
3925
4014
|
var Font = /** @__PURE__ @class */ (function (_super) {
|
|
3926
4015
|
__extends$2(Font, _super);
|
|
@@ -3948,7 +4037,130 @@ var Font = /** @__PURE__ @class */ (function (_super) {
|
|
|
3948
4037
|
return Font;
|
|
3949
4038
|
}(ChildProperty));
|
|
3950
4039
|
/**
|
|
3951
|
-
*
|
|
4040
|
+
* Specifies the options to customize the buttons in the zoom toolbar.
|
|
4041
|
+
*/
|
|
4042
|
+
var ZoomToolbarButtonSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4043
|
+
__extends$2(ZoomToolbarButtonSettings, _super);
|
|
4044
|
+
function ZoomToolbarButtonSettings() {
|
|
4045
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4046
|
+
}
|
|
4047
|
+
__decorate$1([
|
|
4048
|
+
Property('transparent')
|
|
4049
|
+
], ZoomToolbarButtonSettings.prototype, "fill", void 0);
|
|
4050
|
+
__decorate$1([
|
|
4051
|
+
Property(null)
|
|
4052
|
+
], ZoomToolbarButtonSettings.prototype, "color", void 0);
|
|
4053
|
+
__decorate$1([
|
|
4054
|
+
Property(1)
|
|
4055
|
+
], ZoomToolbarButtonSettings.prototype, "borderOpacity", void 0);
|
|
4056
|
+
__decorate$1([
|
|
4057
|
+
Property(1)
|
|
4058
|
+
], ZoomToolbarButtonSettings.prototype, "borderWidth", void 0);
|
|
4059
|
+
__decorate$1([
|
|
4060
|
+
Property(null)
|
|
4061
|
+
], ZoomToolbarButtonSettings.prototype, "borderColor", void 0);
|
|
4062
|
+
__decorate$1([
|
|
4063
|
+
Property(30)
|
|
4064
|
+
], ZoomToolbarButtonSettings.prototype, "radius", void 0);
|
|
4065
|
+
__decorate$1([
|
|
4066
|
+
Property(null)
|
|
4067
|
+
], ZoomToolbarButtonSettings.prototype, "selectionColor", void 0);
|
|
4068
|
+
__decorate$1([
|
|
4069
|
+
Property(null)
|
|
4070
|
+
], ZoomToolbarButtonSettings.prototype, "highlightColor", void 0);
|
|
4071
|
+
__decorate$1([
|
|
4072
|
+
Property(5)
|
|
4073
|
+
], ZoomToolbarButtonSettings.prototype, "padding", void 0);
|
|
4074
|
+
__decorate$1([
|
|
4075
|
+
Property(1)
|
|
4076
|
+
], ZoomToolbarButtonSettings.prototype, "opacity", void 0);
|
|
4077
|
+
__decorate$1([
|
|
4078
|
+
Property(['ZoomIn', 'ZoomOut', 'Reset'])
|
|
4079
|
+
], ZoomToolbarButtonSettings.prototype, "toolbarItems", void 0);
|
|
4080
|
+
return ZoomToolbarButtonSettings;
|
|
4081
|
+
}(ChildProperty));
|
|
4082
|
+
/**
|
|
4083
|
+
* Specifies the options to customize the tooltip of the zoom toolbar.
|
|
4084
|
+
*/
|
|
4085
|
+
var ZoomToolbarTooltipSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4086
|
+
__extends$2(ZoomToolbarTooltipSettings, _super);
|
|
4087
|
+
function ZoomToolbarTooltipSettings() {
|
|
4088
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4089
|
+
}
|
|
4090
|
+
__decorate$1([
|
|
4091
|
+
Property(true)
|
|
4092
|
+
], ZoomToolbarTooltipSettings.prototype, "visible", void 0);
|
|
4093
|
+
__decorate$1([
|
|
4094
|
+
Property('white')
|
|
4095
|
+
], ZoomToolbarTooltipSettings.prototype, "fill", void 0);
|
|
4096
|
+
__decorate$1([
|
|
4097
|
+
Property(1)
|
|
4098
|
+
], ZoomToolbarTooltipSettings.prototype, "borderOpacity", void 0);
|
|
4099
|
+
__decorate$1([
|
|
4100
|
+
Property(1)
|
|
4101
|
+
], ZoomToolbarTooltipSettings.prototype, "borderWidth", void 0);
|
|
4102
|
+
__decorate$1([
|
|
4103
|
+
Property('#707070')
|
|
4104
|
+
], ZoomToolbarTooltipSettings.prototype, "borderColor", void 0);
|
|
4105
|
+
__decorate$1([
|
|
4106
|
+
Property('black')
|
|
4107
|
+
], ZoomToolbarTooltipSettings.prototype, "fontColor", void 0);
|
|
4108
|
+
__decorate$1([
|
|
4109
|
+
Property('')
|
|
4110
|
+
], ZoomToolbarTooltipSettings.prototype, "fontFamily", void 0);
|
|
4111
|
+
__decorate$1([
|
|
4112
|
+
Property('')
|
|
4113
|
+
], ZoomToolbarTooltipSettings.prototype, "fontStyle", void 0);
|
|
4114
|
+
__decorate$1([
|
|
4115
|
+
Property('')
|
|
4116
|
+
], ZoomToolbarTooltipSettings.prototype, "fontWeight", void 0);
|
|
4117
|
+
__decorate$1([
|
|
4118
|
+
Property('')
|
|
4119
|
+
], ZoomToolbarTooltipSettings.prototype, "fontSize", void 0);
|
|
4120
|
+
__decorate$1([
|
|
4121
|
+
Property(1)
|
|
4122
|
+
], ZoomToolbarTooltipSettings.prototype, "fontOpacity", void 0);
|
|
4123
|
+
return ZoomToolbarTooltipSettings;
|
|
4124
|
+
}(ChildProperty));
|
|
4125
|
+
/**
|
|
4126
|
+
* Sets and gets the options to customize the border of the zoom toolbar.
|
|
4127
|
+
*/
|
|
4128
|
+
var ZoomToolbarSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4129
|
+
__extends$2(ZoomToolbarSettings, _super);
|
|
4130
|
+
function ZoomToolbarSettings() {
|
|
4131
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
4132
|
+
}
|
|
4133
|
+
__decorate$1([
|
|
4134
|
+
Property('transparent')
|
|
4135
|
+
], ZoomToolbarSettings.prototype, "backgroundColor", void 0);
|
|
4136
|
+
__decorate$1([
|
|
4137
|
+
Property(1)
|
|
4138
|
+
], ZoomToolbarSettings.prototype, "borderOpacity", void 0);
|
|
4139
|
+
__decorate$1([
|
|
4140
|
+
Property(1)
|
|
4141
|
+
], ZoomToolbarSettings.prototype, "borderWidth", void 0);
|
|
4142
|
+
__decorate$1([
|
|
4143
|
+
Property('transparent')
|
|
4144
|
+
], ZoomToolbarSettings.prototype, "borderColor", void 0);
|
|
4145
|
+
__decorate$1([
|
|
4146
|
+
Property('Far')
|
|
4147
|
+
], ZoomToolbarSettings.prototype, "horizontalAlignment", void 0);
|
|
4148
|
+
__decorate$1([
|
|
4149
|
+
Property('Near')
|
|
4150
|
+
], ZoomToolbarSettings.prototype, "verticalAlignment", void 0);
|
|
4151
|
+
__decorate$1([
|
|
4152
|
+
Property('Horizontal')
|
|
4153
|
+
], ZoomToolbarSettings.prototype, "orientation", void 0);
|
|
4154
|
+
__decorate$1([
|
|
4155
|
+
Complex({}, ZoomToolbarButtonSettings)
|
|
4156
|
+
], ZoomToolbarSettings.prototype, "buttonSettings", void 0);
|
|
4157
|
+
__decorate$1([
|
|
4158
|
+
Complex({}, ZoomToolbarTooltipSettings)
|
|
4159
|
+
], ZoomToolbarSettings.prototype, "tooltipSettings", void 0);
|
|
4160
|
+
return ZoomToolbarSettings;
|
|
4161
|
+
}(ChildProperty));
|
|
4162
|
+
/**
|
|
4163
|
+
* Gets or sets the options to customize the border of the maps.
|
|
3952
4164
|
*/
|
|
3953
4165
|
var Border = /** @__PURE__ @class */ (function (_super) {
|
|
3954
4166
|
__extends$2(Border, _super);
|
|
@@ -3967,7 +4179,7 @@ var Border = /** @__PURE__ @class */ (function (_super) {
|
|
|
3967
4179
|
return Border;
|
|
3968
4180
|
}(ChildProperty));
|
|
3969
4181
|
/**
|
|
3970
|
-
*
|
|
4182
|
+
* Gets or sets the values to change the center position of the maps.
|
|
3971
4183
|
*/
|
|
3972
4184
|
var CenterPosition = /** @__PURE__ @class */ (function (_super) {
|
|
3973
4185
|
__extends$2(CenterPosition, _super);
|
|
@@ -3983,7 +4195,7 @@ var CenterPosition = /** @__PURE__ @class */ (function (_super) {
|
|
|
3983
4195
|
return CenterPosition;
|
|
3984
4196
|
}(ChildProperty));
|
|
3985
4197
|
/**
|
|
3986
|
-
*
|
|
4198
|
+
* Gets or sets the options to customize the tooltip of layers, markers, and bubble in maps.
|
|
3987
4199
|
*/
|
|
3988
4200
|
var TooltipSettings = /** @__PURE__ @class */ (function (_super) {
|
|
3989
4201
|
__extends$2(TooltipSettings, _super);
|
|
@@ -4014,7 +4226,7 @@ var TooltipSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4014
4226
|
return TooltipSettings;
|
|
4015
4227
|
}(ChildProperty));
|
|
4016
4228
|
/**
|
|
4017
|
-
*
|
|
4229
|
+
* Gets or sets the options to customize the margin of the maps.
|
|
4018
4230
|
*/
|
|
4019
4231
|
var Margin = /** @__PURE__ @class */ (function (_super) {
|
|
4020
4232
|
__extends$2(Margin, _super);
|
|
@@ -4035,8 +4247,8 @@ var Margin = /** @__PURE__ @class */ (function (_super) {
|
|
|
4035
4247
|
], Margin.prototype, "bottom", void 0);
|
|
4036
4248
|
return Margin;
|
|
4037
4249
|
}(ChildProperty));
|
|
4038
|
-
|
|
4039
|
-
*
|
|
4250
|
+
/**
|
|
4251
|
+
* Gets or sets the options to customize the lines that connect the markers in marker cluster of the maps.
|
|
4040
4252
|
*/
|
|
4041
4253
|
var ConnectorLineSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4042
4254
|
__extends$2(ConnectorLineSettings, _super);
|
|
@@ -4055,7 +4267,7 @@ var ConnectorLineSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4055
4267
|
return ConnectorLineSettings;
|
|
4056
4268
|
}(ChildProperty));
|
|
4057
4269
|
/**
|
|
4058
|
-
*
|
|
4270
|
+
* Gets or sets the options to customize the cluster of markers in maps.
|
|
4059
4271
|
*/
|
|
4060
4272
|
var MarkerClusterSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4061
4273
|
__extends$2(MarkerClusterSettings, _super);
|
|
@@ -4104,7 +4316,7 @@ var MarkerClusterSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4104
4316
|
return MarkerClusterSettings;
|
|
4105
4317
|
}(ChildProperty));
|
|
4106
4318
|
/**
|
|
4107
|
-
*
|
|
4319
|
+
* Gets or sets the data in the marker cluster.
|
|
4108
4320
|
*/
|
|
4109
4321
|
var MarkerClusterData = /** @__PURE__ @class */ (function (_super) {
|
|
4110
4322
|
__extends$2(MarkerClusterData, _super);
|
|
@@ -4114,7 +4326,7 @@ var MarkerClusterData = /** @__PURE__ @class */ (function (_super) {
|
|
|
4114
4326
|
return MarkerClusterData;
|
|
4115
4327
|
}(ChildProperty));
|
|
4116
4328
|
/**
|
|
4117
|
-
*
|
|
4329
|
+
* Gets or sets the options to customize the color-mapping in maps.
|
|
4118
4330
|
*/
|
|
4119
4331
|
var ColorMappingSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4120
4332
|
__extends$2(ColorMappingSettings, _super);
|
|
@@ -4148,7 +4360,8 @@ var ColorMappingSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4148
4360
|
return ColorMappingSettings;
|
|
4149
4361
|
}(ChildProperty));
|
|
4150
4362
|
/**
|
|
4151
|
-
*
|
|
4363
|
+
* Gets or sets the options to select the marker shape when the maps is loaded initially.
|
|
4364
|
+
* The initial selection of the markers will work only when the selection settings of marker is enabled.
|
|
4152
4365
|
*/
|
|
4153
4366
|
var InitialMarkerSelectionSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4154
4367
|
__extends$2(InitialMarkerSelectionSettings, _super);
|
|
@@ -4164,7 +4377,8 @@ var InitialMarkerSelectionSettings = /** @__PURE__ @class */ (function (_super)
|
|
|
4164
4377
|
return InitialMarkerSelectionSettings;
|
|
4165
4378
|
}(ChildProperty));
|
|
4166
4379
|
/**
|
|
4167
|
-
*
|
|
4380
|
+
* Gets or sets the options to select the shapes when the maps is loaded initially.
|
|
4381
|
+
* The initial selection of the shapes will work only when the selection settings of layer is enabled.
|
|
4168
4382
|
*/
|
|
4169
4383
|
var InitialShapeSelectionSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4170
4384
|
__extends$2(InitialShapeSelectionSettings, _super);
|
|
@@ -4180,7 +4394,7 @@ var InitialShapeSelectionSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4180
4394
|
return InitialShapeSelectionSettings;
|
|
4181
4395
|
}(ChildProperty));
|
|
4182
4396
|
/**
|
|
4183
|
-
*
|
|
4397
|
+
* Gets or sets the options to customize the maps on selecting the shapes.
|
|
4184
4398
|
*/
|
|
4185
4399
|
var SelectionSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4186
4400
|
__extends$2(SelectionSettings, _super);
|
|
@@ -4205,7 +4419,7 @@ var SelectionSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4205
4419
|
return SelectionSettings;
|
|
4206
4420
|
}(ChildProperty));
|
|
4207
4421
|
/**
|
|
4208
|
-
*
|
|
4422
|
+
* Gets or sets the options to customize the shapes on which the mouse has hovered in maps.
|
|
4209
4423
|
*/
|
|
4210
4424
|
var HighlightSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4211
4425
|
__extends$2(HighlightSettings, _super);
|
|
@@ -4227,7 +4441,7 @@ var HighlightSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4227
4441
|
return HighlightSettings;
|
|
4228
4442
|
}(ChildProperty));
|
|
4229
4443
|
/**
|
|
4230
|
-
*
|
|
4444
|
+
* Gets or sets the options to customize the navigation lines in maps which is used to connect different locations.
|
|
4231
4445
|
*/
|
|
4232
4446
|
var NavigationLineSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4233
4447
|
__extends$2(NavigationLineSettings, _super);
|
|
@@ -4267,7 +4481,7 @@ var NavigationLineSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4267
4481
|
return NavigationLineSettings;
|
|
4268
4482
|
}(ChildProperty));
|
|
4269
4483
|
/**
|
|
4270
|
-
*
|
|
4484
|
+
* Gets or sets the options to customize the bubble elements in the maps.
|
|
4271
4485
|
*/
|
|
4272
4486
|
var BubbleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4273
4487
|
__extends$2(BubbleSettings, _super);
|
|
@@ -4328,7 +4542,7 @@ var BubbleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4328
4542
|
return BubbleSettings;
|
|
4329
4543
|
}(ChildProperty));
|
|
4330
4544
|
/**
|
|
4331
|
-
*
|
|
4545
|
+
* Gets or sets the options to customize the title of the maps.
|
|
4332
4546
|
*/
|
|
4333
4547
|
var CommonTitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4334
4548
|
__extends$2(CommonTitleSettings, _super);
|
|
@@ -4344,7 +4558,7 @@ var CommonTitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4344
4558
|
return CommonTitleSettings;
|
|
4345
4559
|
}(ChildProperty));
|
|
4346
4560
|
/**
|
|
4347
|
-
*
|
|
4561
|
+
* Gets or sets the options to customize the subtitle of the maps.
|
|
4348
4562
|
*/
|
|
4349
4563
|
var SubTitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4350
4564
|
__extends$2(SubTitleSettings, _super);
|
|
@@ -4360,7 +4574,7 @@ var SubTitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4360
4574
|
return SubTitleSettings;
|
|
4361
4575
|
}(CommonTitleSettings));
|
|
4362
4576
|
/**
|
|
4363
|
-
*
|
|
4577
|
+
* Gets or sets the options to customize the title of the maps.
|
|
4364
4578
|
*/
|
|
4365
4579
|
var TitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4366
4580
|
__extends$2(TitleSettings, _super);
|
|
@@ -4379,7 +4593,7 @@ var TitleSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4379
4593
|
return TitleSettings;
|
|
4380
4594
|
}(CommonTitleSettings));
|
|
4381
4595
|
/**
|
|
4382
|
-
*
|
|
4596
|
+
* Gets or sets the options to configure maps zooming operations.
|
|
4383
4597
|
*/
|
|
4384
4598
|
var ZoomSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4385
4599
|
__extends$2(ZoomSettings, _super);
|
|
@@ -4443,10 +4657,13 @@ var ZoomSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4443
4657
|
__decorate$1([
|
|
4444
4658
|
Property(true)
|
|
4445
4659
|
], ZoomSettings.prototype, "resetToInitial", void 0);
|
|
4660
|
+
__decorate$1([
|
|
4661
|
+
Complex({}, ZoomToolbarSettings)
|
|
4662
|
+
], ZoomSettings.prototype, "toolbarSettings", void 0);
|
|
4446
4663
|
return ZoomSettings;
|
|
4447
4664
|
}(ChildProperty));
|
|
4448
4665
|
/**
|
|
4449
|
-
*
|
|
4666
|
+
* Gets or sets the settings to customize the color-mapping visibility based on the legend visibility.
|
|
4450
4667
|
*/
|
|
4451
4668
|
var ToggleLegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4452
4669
|
__extends$2(ToggleLegendSettings, _super);
|
|
@@ -4471,7 +4688,7 @@ var ToggleLegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4471
4688
|
return ToggleLegendSettings;
|
|
4472
4689
|
}(ChildProperty));
|
|
4473
4690
|
/**
|
|
4474
|
-
*
|
|
4691
|
+
* Gets or sets the options to customize the legend of the maps.
|
|
4475
4692
|
*/
|
|
4476
4693
|
var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4477
4694
|
__extends$2(LegendSettings, _super);
|
|
@@ -4571,7 +4788,7 @@ var LegendSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4571
4788
|
return LegendSettings;
|
|
4572
4789
|
}(ChildProperty));
|
|
4573
4790
|
/**
|
|
4574
|
-
*
|
|
4791
|
+
* Gets or sets the options to customize the data labels in maps.
|
|
4575
4792
|
*/
|
|
4576
4793
|
var DataLabelSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4577
4794
|
__extends$2(DataLabelSettings, _super);
|
|
@@ -4614,7 +4831,7 @@ var DataLabelSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4614
4831
|
return DataLabelSettings;
|
|
4615
4832
|
}(ChildProperty));
|
|
4616
4833
|
/**
|
|
4617
|
-
*
|
|
4834
|
+
* Gets or sets the options to customize the shapes in the maps.
|
|
4618
4835
|
*/
|
|
4619
4836
|
var ShapeSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4620
4837
|
__extends$2(ShapeSettings, _super);
|
|
@@ -4660,7 +4877,7 @@ var ShapeSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4660
4877
|
return ShapeSettings;
|
|
4661
4878
|
}(ChildProperty));
|
|
4662
4879
|
/**
|
|
4663
|
-
*
|
|
4880
|
+
* Gets or sets the options to customize the markers in the maps.
|
|
4664
4881
|
*/
|
|
4665
4882
|
var MarkerBase = /** @__PURE__ @class */ (function (_super) {
|
|
4666
4883
|
__extends$2(MarkerBase, _super);
|
|
@@ -4676,6 +4893,9 @@ var MarkerBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
4676
4893
|
__decorate$1([
|
|
4677
4894
|
Property(false)
|
|
4678
4895
|
], MarkerBase.prototype, "visible", void 0);
|
|
4896
|
+
__decorate$1([
|
|
4897
|
+
Property(false)
|
|
4898
|
+
], MarkerBase.prototype, "enableDrag", void 0);
|
|
4679
4899
|
__decorate$1([
|
|
4680
4900
|
Property('#FF471A')
|
|
4681
4901
|
], MarkerBase.prototype, "fill", void 0);
|
|
@@ -4744,6 +4964,9 @@ var MarkerBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
4744
4964
|
], MarkerBase.prototype, "initialMarkerSelection", void 0);
|
|
4745
4965
|
return MarkerBase;
|
|
4746
4966
|
}(ChildProperty));
|
|
4967
|
+
/**
|
|
4968
|
+
* Gets or sets the options to customize the markers in the maps.
|
|
4969
|
+
*/
|
|
4747
4970
|
var MarkerSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4748
4971
|
__extends$2(MarkerSettings, _super);
|
|
4749
4972
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -4753,7 +4976,7 @@ var MarkerSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4753
4976
|
return MarkerSettings;
|
|
4754
4977
|
}(MarkerBase));
|
|
4755
4978
|
/**
|
|
4756
|
-
*
|
|
4979
|
+
* Gets or sets the options to customize the layers of the maps.
|
|
4757
4980
|
*/
|
|
4758
4981
|
var LayerSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4759
4982
|
__extends$2(LayerSettings, _super);
|
|
@@ -4863,7 +5086,7 @@ var Tile = /** @__PURE__ @class */ (function () {
|
|
|
4863
5086
|
return Tile;
|
|
4864
5087
|
}());
|
|
4865
5088
|
/**
|
|
4866
|
-
*
|
|
5089
|
+
* Gets or sets the options to customize the area around the shapes in the map layer.
|
|
4867
5090
|
*/
|
|
4868
5091
|
var MapsAreaSettings = /** @__PURE__ @class */ (function (_super) {
|
|
4869
5092
|
__extends$2(MapsAreaSettings, _super);
|
|
@@ -5022,6 +5245,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5022
5245
|
*
|
|
5023
5246
|
* @param {LayerSettings[]} layersCollection - Specifies the layer settings instance.
|
|
5024
5247
|
* @returns {void}
|
|
5248
|
+
* @private
|
|
5025
5249
|
*/
|
|
5026
5250
|
Marker.prototype.calculateZoomCenterPositionAndFactor = function (layersCollection) {
|
|
5027
5251
|
if (!isNullOrUndefined(this.maps)) {
|
|
@@ -5091,7 +5315,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5091
5315
|
}
|
|
5092
5316
|
var markerFactor = void 0;
|
|
5093
5317
|
if (this.maps.isTileMap || this.maps.baseMapRectBounds['min']['x'] === 0) {
|
|
5094
|
-
zoomLevel = calculateZoomLevel(minLat_1, maxLat_1, minLong_1, maxLong_1, mapWidth, mapHeight, this.maps);
|
|
5318
|
+
zoomLevel = calculateZoomLevel(minLat_1, maxLat_1, minLong_1, maxLong_1, mapWidth, mapHeight, this.maps, false);
|
|
5095
5319
|
if (this.maps.isTileMap) {
|
|
5096
5320
|
markerFactor = isNullOrUndefined(this.maps.markerZoomFactor) ?
|
|
5097
5321
|
zoomLevel : isNullOrUndefined(this.maps.mapScaleValue) ?
|
|
@@ -5147,6 +5371,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5147
5371
|
* To check and trigger marker click event
|
|
5148
5372
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
5149
5373
|
* @returns {void}
|
|
5374
|
+
* @private
|
|
5150
5375
|
*/
|
|
5151
5376
|
Marker.prototype.markerClick = function (e) {
|
|
5152
5377
|
var target = e.target.id;
|
|
@@ -5157,6 +5382,9 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5157
5382
|
if (isNullOrUndefined(options)) {
|
|
5158
5383
|
return;
|
|
5159
5384
|
}
|
|
5385
|
+
if (options.marker.enableDrag) {
|
|
5386
|
+
document.getElementById(this.maps.element.id + "_svg").style.cursor = 'grabbing';
|
|
5387
|
+
}
|
|
5160
5388
|
var eventArgs = {
|
|
5161
5389
|
cancel: false, name: markerClick, data: options.data, maps: this.maps,
|
|
5162
5390
|
marker: options.marker, target: target, x: e.clientX, y: e.clientY,
|
|
@@ -5165,11 +5393,39 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5165
5393
|
value: options.data['name']
|
|
5166
5394
|
};
|
|
5167
5395
|
this.maps.trigger(markerClick, eventArgs);
|
|
5396
|
+
if (options.marker.enableDrag) {
|
|
5397
|
+
var isCluster = false;
|
|
5398
|
+
var layerIndex = parseInt(target.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
5399
|
+
var markerIndex = parseInt(target.split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
5400
|
+
var dataIndex_1 = parseInt(target.split('_dataIndex_')[1].split('_')[0], 10);
|
|
5401
|
+
var marker_1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
|
|
5402
|
+
if (this.sameMarkerData.length > 0) {
|
|
5403
|
+
isCluster = (this.sameMarkerData[0].data.filter(function (el) { return (el['index'] == dataIndex_1); })).length > 0 &&
|
|
5404
|
+
this.sameMarkerData[0].layerIndex === layerIndex && this.sameMarkerData[0].markerIndex === markerIndex;
|
|
5405
|
+
}
|
|
5406
|
+
if (!isCluster) {
|
|
5407
|
+
var dragEventArgs = {
|
|
5408
|
+
name: markerDragStart, x: e.clientX, y: e.clientY,
|
|
5409
|
+
latitude: options.data['latitude'] || options.data['Latitude'],
|
|
5410
|
+
longitude: options.data['longitude'] || options.data['Longitude'],
|
|
5411
|
+
layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex_1
|
|
5412
|
+
};
|
|
5413
|
+
this.maps.trigger(markerDragStart, dragEventArgs);
|
|
5414
|
+
this.maps.markerDragArgument = {
|
|
5415
|
+
targetId: target, x: e.clientX, y: e.clientY,
|
|
5416
|
+
latitude: options.data['latitude'] || options.data['Latitude'],
|
|
5417
|
+
longitude: options.data['longitude'] || options.data['Longitude'],
|
|
5418
|
+
shape: isNullOrUndefined(marker_1.shapeValuePath) ? marker_1.shape : marker_1.dataSource[dataIndex_1][marker_1.shapeValuePath],
|
|
5419
|
+
layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex_1
|
|
5420
|
+
};
|
|
5421
|
+
}
|
|
5422
|
+
}
|
|
5168
5423
|
};
|
|
5169
5424
|
/**
|
|
5170
5425
|
* To check and trigger Cluster click event
|
|
5171
5426
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
5172
5427
|
* @returns {void}
|
|
5428
|
+
* @private
|
|
5173
5429
|
*/
|
|
5174
5430
|
Marker.prototype.markerClusterClick = function (e) {
|
|
5175
5431
|
var target = e.target.id;
|
|
@@ -5240,7 +5496,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5240
5496
|
if ((target.indexOf('_cluster_') > -1)) {
|
|
5241
5497
|
var isClusterSame = false;
|
|
5242
5498
|
var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? layer.markerClusterSettings.shape === 'Balloon' ? target.split('_datalabel_')[0] + '_Group' : target.split('_datalabel_')[0] : layer.markerClusterSettings.shape === 'Balloon' ? target + '_Group' : target);
|
|
5243
|
-
var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].
|
|
5499
|
+
var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerText.split(',').map(Number) : clusterElement.innerText.split(',').map(Number);
|
|
5244
5500
|
collection_1 = [];
|
|
5245
5501
|
for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
|
|
5246
5502
|
var i = indexes_1[_i];
|
|
@@ -5264,6 +5520,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5264
5520
|
*
|
|
5265
5521
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
5266
5522
|
* @returns {void}
|
|
5523
|
+
* @private
|
|
5267
5524
|
*/
|
|
5268
5525
|
Marker.prototype.markerMove = function (e) {
|
|
5269
5526
|
var targetId = e.target.id;
|
|
@@ -5274,6 +5531,10 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5274
5531
|
if (isNullOrUndefined(options)) {
|
|
5275
5532
|
return;
|
|
5276
5533
|
}
|
|
5534
|
+
if (options.marker.enableDrag) {
|
|
5535
|
+
document.getElementById(this.maps.element.id + "_svg").style.cursor = isNullOrUndefined(this.maps.markerDragArgument) ?
|
|
5536
|
+
'pointer' : 'grabbing';
|
|
5537
|
+
}
|
|
5277
5538
|
var eventArgs = {
|
|
5278
5539
|
cancel: false, name: markerMouseMove, data: options.data,
|
|
5279
5540
|
maps: this.maps, target: targetId, x: e.clientX, y: e.clientY
|
|
@@ -5285,6 +5546,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5285
5546
|
*
|
|
5286
5547
|
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
5287
5548
|
* @returns {void}
|
|
5549
|
+
* @private
|
|
5288
5550
|
*/
|
|
5289
5551
|
Marker.prototype.markerClusterMouseMove = function (e) {
|
|
5290
5552
|
var targetId = e.target.id;
|
|
@@ -5435,6 +5697,18 @@ var markerClusterRendering = 'markerClusterRendering';
|
|
|
5435
5697
|
* @private
|
|
5436
5698
|
*/
|
|
5437
5699
|
var markerClick = 'markerClick';
|
|
5700
|
+
/**
|
|
5701
|
+
* Specifies the maps marker drag start event name.
|
|
5702
|
+
*
|
|
5703
|
+
* @private
|
|
5704
|
+
*/
|
|
5705
|
+
var markerDragStart = 'markerDragStart';
|
|
5706
|
+
/**
|
|
5707
|
+
* Specifies the maps marker drag end event name.
|
|
5708
|
+
*
|
|
5709
|
+
* @private
|
|
5710
|
+
*/
|
|
5711
|
+
var markerDragEnd = 'markerDragEnd';
|
|
5438
5712
|
/**
|
|
5439
5713
|
* Specifies the maps cluster click event name.
|
|
5440
5714
|
*
|
|
@@ -5601,6 +5875,7 @@ var ColorMapping = /** @__PURE__ @class */ (function () {
|
|
|
5601
5875
|
* @param {number} colorValue - Specifies the color value
|
|
5602
5876
|
* @param {string} equalValue - Specifies the equal value.
|
|
5603
5877
|
* @returns {any} - Returns the color mapping values.
|
|
5878
|
+
* @private
|
|
5604
5879
|
*/
|
|
5605
5880
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5606
5881
|
ColorMapping.prototype.getColorByValue = function (colorMapping, colorValue, equalValue) {
|
|
@@ -6454,6 +6729,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6454
6729
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6455
6730
|
var bubbleDataSource = bubble_1.dataSource;
|
|
6456
6731
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6732
|
+
this_2.mapObject.bubbleModule.bubbleCollection = [];
|
|
6457
6733
|
bubbleDataSource.map(function (bubbleData, i) {
|
|
6458
6734
|
_this.renderBubble(_this.currentLayer, bubbleData, colors[i % colors.length], range, j, i, bubbleG, layerIndex, bubble_1);
|
|
6459
6735
|
});
|
|
@@ -7312,6 +7588,8 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7312
7588
|
// eslint-disable-next-line valid-jsdoc
|
|
7313
7589
|
/**
|
|
7314
7590
|
* To create annotation elements
|
|
7591
|
+
*
|
|
7592
|
+
* @private
|
|
7315
7593
|
*/
|
|
7316
7594
|
Annotations.prototype.createAnnotationTemplate = function (parentElement, annotation, annotationIndex) {
|
|
7317
7595
|
var _this = this;
|
|
@@ -7427,7 +7705,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
7427
7705
|
* Maps Component file
|
|
7428
7706
|
*/
|
|
7429
7707
|
/**
|
|
7430
|
-
* Represents the
|
|
7708
|
+
* Represents the maps control. It is ideal for rendering maps from GeoJSON data or other map providers like OpenStreetMap, Google Maps, Bing Maps, etc that
|
|
7709
|
+
* has rich feature set that includes markers, labels, bubbles and much more.
|
|
7431
7710
|
* ```html
|
|
7432
7711
|
* <div id="maps"/>
|
|
7433
7712
|
* <script>
|
|
@@ -7523,6 +7802,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7523
7802
|
/** @private */
|
|
7524
7803
|
_this.initialTileTranslate = new Point(0, 0);
|
|
7525
7804
|
/** @private */
|
|
7805
|
+
_this.markerDragId = '';
|
|
7806
|
+
/** @private */
|
|
7526
7807
|
_this.initialCheck = true;
|
|
7527
7808
|
/** @private */
|
|
7528
7809
|
_this.applyZoomReset = false;
|
|
@@ -7531,8 +7812,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7531
7812
|
/** @private */
|
|
7532
7813
|
_this.markerClusterExpand = false;
|
|
7533
7814
|
/** @private */
|
|
7815
|
+
_this.mouseMoveId = '';
|
|
7816
|
+
/** @private */
|
|
7534
7817
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7535
7818
|
_this.shapeSelectionItem = [];
|
|
7819
|
+
/** @private */
|
|
7820
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7821
|
+
_this.markerDragArgument = null;
|
|
7536
7822
|
setValue('mergePersistData', _this.mergePersistMapsData, _this);
|
|
7537
7823
|
return _this;
|
|
7538
7824
|
}
|
|
@@ -7541,7 +7827,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7541
7827
|
*
|
|
7542
7828
|
* Specifies whether the shape is selected in the maps or not.
|
|
7543
7829
|
*
|
|
7544
|
-
* @returns {boolean} - Returns
|
|
7830
|
+
* @returns {boolean} - Returns a boolean value to specify whether the shape is selected in the maps or not.
|
|
7545
7831
|
*/
|
|
7546
7832
|
get: function () {
|
|
7547
7833
|
return this.mapSelect;
|
|
@@ -7588,6 +7874,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7588
7874
|
*
|
|
7589
7875
|
* @param {string} key - Specifies the key
|
|
7590
7876
|
* @returns {string} - Returns the string value
|
|
7877
|
+
* @private
|
|
7591
7878
|
*/
|
|
7592
7879
|
Maps.prototype.getLocalizedLabel = function (key) {
|
|
7593
7880
|
return this.localeObject.getConstant(key);
|
|
@@ -7730,6 +8017,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7730
8017
|
* @param {LayerSettings} layer - Specifies the layer for the maps.
|
|
7731
8018
|
* @param {string} dataType - Specifies the data type for maps.
|
|
7732
8019
|
* @returns {void}
|
|
8020
|
+
* @private
|
|
7733
8021
|
*/
|
|
7734
8022
|
Maps.prototype.processResponseJsonData = function (processType, data, layer, dataType) {
|
|
7735
8023
|
this.serverProcess['response']++;
|
|
@@ -7770,7 +8058,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7770
8058
|
}
|
|
7771
8059
|
if (!isNullOrUndefined(this.dataLabelModule)) {
|
|
7772
8060
|
this.dataLabelModule.dataLabelCollections = [];
|
|
7773
|
-
this.dataLabelShape = [];
|
|
7774
8061
|
}
|
|
7775
8062
|
this.mapLayerPanel.measureLayerPanel();
|
|
7776
8063
|
if (!isNullOrUndefined(this.svgObject)) {
|
|
@@ -7873,6 +8160,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7873
8160
|
}
|
|
7874
8161
|
}
|
|
7875
8162
|
this.zoomingChange();
|
|
8163
|
+
if (this.zoomModule && this.isDevice) {
|
|
8164
|
+
this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.mapScaleValue, this.element.id + '_Zooming_');
|
|
8165
|
+
}
|
|
7876
8166
|
if (!this.isZoomByPosition && !this.zoomNotApplied) {
|
|
7877
8167
|
this.trigger(loaded, { maps: this, isResized: this.isResize });
|
|
7878
8168
|
}
|
|
@@ -8268,7 +8558,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8268
8558
|
Maps.prototype.wireEVents = function () {
|
|
8269
8559
|
//let cancelEvent: string = Browser.isPointer ? 'pointerleave' : 'mouseleave';
|
|
8270
8560
|
EventHandler.add(this.element, 'click', this.mapsOnClick, this);
|
|
8271
|
-
|
|
8561
|
+
EventHandler.add(this.element, 'contextmenu', this.mapsOnRightClick, this);
|
|
8272
8562
|
EventHandler.add(this.element, 'dblclick', this.mapsOnDoubleClick, this);
|
|
8273
8563
|
EventHandler.add(this.element, Browser.touchStartEvent, this.mouseDownOnMap, this);
|
|
8274
8564
|
EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap, this);
|
|
@@ -8288,7 +8578,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8288
8578
|
Maps.prototype.unWireEVents = function () {
|
|
8289
8579
|
//let cancelEvent: string = Browser.isPointer ? 'pointerleave' : 'mouseleave';
|
|
8290
8580
|
EventHandler.remove(this.element, 'click', this.mapsOnClick);
|
|
8291
|
-
|
|
8581
|
+
EventHandler.remove(this.element, 'contextmenu', this.mapsOnRightClick);
|
|
8292
8582
|
EventHandler.remove(this.element, 'dblclick', this.mapsOnDoubleClick);
|
|
8293
8583
|
EventHandler.remove(this.element, Browser.touchStartEvent, this.mouseDownOnMap);
|
|
8294
8584
|
EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap);
|
|
@@ -8304,6 +8594,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8304
8594
|
*
|
|
8305
8595
|
* @param {PointerEvent} e - Specifies the pointer event on maps.
|
|
8306
8596
|
* @returns {void}
|
|
8597
|
+
* @private
|
|
8307
8598
|
*/
|
|
8308
8599
|
Maps.prototype.mouseLeaveOnMap = function (e) {
|
|
8309
8600
|
if (document.getElementsByClassName('highlightMapStyle').length > 0 && this.legendModule) {
|
|
@@ -8349,6 +8640,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8349
8640
|
};
|
|
8350
8641
|
Maps.prototype.keyDownHandler = function (event) {
|
|
8351
8642
|
var zoom = this.zoomModule;
|
|
8643
|
+
var id = event.target['id'];
|
|
8352
8644
|
if ((event.code === 'ArrowUp' || event.code === 'ArrowDown' || event.code === 'ArrowLeft'
|
|
8353
8645
|
|| event.code === 'ArrowRight') && zoom) {
|
|
8354
8646
|
var animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
|
|
@@ -8356,16 +8648,18 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8356
8648
|
this.currentTiles = animatedTiles.cloneNode(true);
|
|
8357
8649
|
}
|
|
8358
8650
|
}
|
|
8359
|
-
if ((event.key === '+' || event.code === 'Equal')
|
|
8651
|
+
if (this.zoomSettings.enable && zoom && (event.key === '+' || event.code === 'Equal')) {
|
|
8360
8652
|
zoom.performZoomingByToolBar('zoomin');
|
|
8361
8653
|
}
|
|
8362
|
-
else if ((event.key === '-' || event.code === 'Minus')
|
|
8654
|
+
else if (this.zoomSettings.enable && zoom && (event.key === '-' || event.code === 'Minus')) {
|
|
8363
8655
|
zoom.performZoomingByToolBar('zoomout');
|
|
8364
8656
|
}
|
|
8365
|
-
else if (event['keyCode'] === 82
|
|
8657
|
+
else if (this.zoomSettings.enable && zoom && event['keyCode'] === 82) {
|
|
8366
8658
|
zoom.performZoomingByToolBar('reset');
|
|
8659
|
+
zoom.isPanning = false;
|
|
8367
8660
|
}
|
|
8368
|
-
else if (
|
|
8661
|
+
else if (this.zoomSettings.enable && this.zoomSettings.enablePanning && zoom
|
|
8662
|
+
&& (event.code === 'ArrowUp' || event.code === 'ArrowDown')) {
|
|
8369
8663
|
event.preventDefault();
|
|
8370
8664
|
zoom.mouseDownLatLong['x'] = 0;
|
|
8371
8665
|
zoom.mouseMoveLatLong['y'] = this.mapAreaRect.height / 7;
|
|
@@ -8373,7 +8667,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8373
8667
|
zoom.mouseMoveLatLong['y'], event);
|
|
8374
8668
|
zoom.mouseDownLatLong['y'] = zoom.mouseMoveLatLong['y'];
|
|
8375
8669
|
}
|
|
8376
|
-
else if (
|
|
8670
|
+
else if (this.zoomSettings.enable && this.zoomSettings.enablePanning && zoom
|
|
8671
|
+
&& (event.code === 'ArrowLeft' || event.code === 'ArrowRight')) {
|
|
8377
8672
|
event.preventDefault();
|
|
8378
8673
|
zoom.mouseDownLatLong['y'] = 0;
|
|
8379
8674
|
zoom.mouseMoveLatLong['x'] = this.mapAreaRect.width / 7;
|
|
@@ -8381,7 +8676,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8381
8676
|
zoom.mouseDownLatLong['x'] = zoom.mouseMoveLatLong['x'];
|
|
8382
8677
|
}
|
|
8383
8678
|
else if (event.code === 'Enter') {
|
|
8384
|
-
|
|
8679
|
+
id = event.target['id'];
|
|
8385
8680
|
event.preventDefault();
|
|
8386
8681
|
if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
|
|
8387
8682
|
this.mapAreaRect = this.legendModule.initialMapAreaRect;
|
|
@@ -8411,6 +8706,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8411
8706
|
this.keyboardHighlightSelection(id, event.type);
|
|
8412
8707
|
}
|
|
8413
8708
|
}
|
|
8709
|
+
if (this.zoomModule) {
|
|
8710
|
+
this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.mapScaleValue, this.mouseMoveId);
|
|
8711
|
+
}
|
|
8414
8712
|
};
|
|
8415
8713
|
/**
|
|
8416
8714
|
* Gets the selected element to be maintained or not.
|
|
@@ -8431,6 +8729,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8431
8729
|
*
|
|
8432
8730
|
* @param {PointerEvent} e - Specifies the pointer event on maps.
|
|
8433
8731
|
* @returns {void}
|
|
8732
|
+
* @private
|
|
8434
8733
|
*/
|
|
8435
8734
|
Maps.prototype.mapsOnClick = function (e) {
|
|
8436
8735
|
var _this = this;
|
|
@@ -8462,6 +8761,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8462
8761
|
});
|
|
8463
8762
|
}
|
|
8464
8763
|
}
|
|
8764
|
+
if (this.zoomModule) {
|
|
8765
|
+
this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.mapScaleValue, targetId);
|
|
8766
|
+
if (this.isDevice) {
|
|
8767
|
+
this.zoomModule.removeToolbarClass('', '', '', '', '');
|
|
8768
|
+
}
|
|
8769
|
+
}
|
|
8465
8770
|
};
|
|
8466
8771
|
Maps.prototype.clickHandler = function (e, eventArgs, targetEle) {
|
|
8467
8772
|
if (targetEle.id.indexOf('shapeIndex') > -1) {
|
|
@@ -8493,6 +8798,27 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8493
8798
|
this.selectionModule.removedSelectionList(targetEle);
|
|
8494
8799
|
}
|
|
8495
8800
|
};
|
|
8801
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8802
|
+
Maps.prototype.getMarkerClickLocation = function (pageX, pageY, x, y, marker$$1, isDragEnd) {
|
|
8803
|
+
document.getElementById(this.element.id + "_svg").style.cursor = 'grabbing';
|
|
8804
|
+
var targetElement = getElement(marker$$1.targetId);
|
|
8805
|
+
var latLongValue = this.getClickLocation(marker$$1.targetId, pageX, pageY, targetElement, x, y);
|
|
8806
|
+
var location = (this.isTileMap) ? convertTileLatLongToPoint(new MapLocation(latLongValue.longitude, latLongValue.latitude), this.scale, this.tileTranslatePoint, true) : convertGeoToPoint(latLongValue.latitude, latLongValue.longitude, this.mapLayerPanel.currentFactor, this.layersCollection[marker$$1.layerIndex], this);
|
|
8807
|
+
var transPoint = this.translatePoint;
|
|
8808
|
+
var translateX = (this.isTileMap ? location.x : (location.x + transPoint.x) * this.scale);
|
|
8809
|
+
var translateY = (this.isTileMap ? location.y : (location.y + transPoint.y) * this.scale);
|
|
8810
|
+
if (this.markerDragArgument.shape !== 'Balloon') {
|
|
8811
|
+
targetElement.setAttribute('transform', 'translate( ' + translateX + ' ' + translateY + ' )');
|
|
8812
|
+
}
|
|
8813
|
+
else {
|
|
8814
|
+
targetElement.parentElement.setAttribute('transform', 'translate( ' + translateX + ' ' + translateY + ' )');
|
|
8815
|
+
}
|
|
8816
|
+
if (isDragEnd) {
|
|
8817
|
+
var markerSettings = this.layers[marker$$1.layerIndex].markerSettings[marker$$1.markerIndex];
|
|
8818
|
+
latLongValue = this.getClickLocation(marker$$1.targetId, (pageX - markerSettings.offset.x), (pageY - markerSettings.offset.y), targetElement, (x - markerSettings.offset.x), (y - markerSettings.offset.y));
|
|
8819
|
+
}
|
|
8820
|
+
return latLongValue;
|
|
8821
|
+
};
|
|
8496
8822
|
Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y) {
|
|
8497
8823
|
var layerIndex = 0;
|
|
8498
8824
|
var latLongValue;
|
|
@@ -8555,6 +8881,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8555
8881
|
*
|
|
8556
8882
|
* @param {PointerEvent} e - Specifies the pointer event on maps.
|
|
8557
8883
|
* @returns {boolean} - Returns the boolean value
|
|
8884
|
+
* @private
|
|
8558
8885
|
*/
|
|
8559
8886
|
Maps.prototype.mouseEndOnMap = function (e) {
|
|
8560
8887
|
var targetEle = e.target;
|
|
@@ -8565,13 +8892,16 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8565
8892
|
var pageY;
|
|
8566
8893
|
var target;
|
|
8567
8894
|
var touchArg;
|
|
8895
|
+
var layerX = 0;
|
|
8896
|
+
var layerY = 0;
|
|
8568
8897
|
var rect = this.element.getBoundingClientRect();
|
|
8569
8898
|
var element = e.target;
|
|
8570
8899
|
if (e.type.indexOf('touch') !== -1) {
|
|
8571
8900
|
this.isTouch = true;
|
|
8572
8901
|
touchArg = e;
|
|
8573
|
-
pageX = touchArg.changedTouches[0].pageX;
|
|
8902
|
+
layerX = pageX = touchArg.changedTouches[0].pageX;
|
|
8574
8903
|
pageY = touchArg.changedTouches[0].pageY;
|
|
8904
|
+
layerY = pageY - (this.isTileMap ? 10 : 0);
|
|
8575
8905
|
target = touchArg.target;
|
|
8576
8906
|
this.mouseClickEvent = { x: pageX, y: pageY };
|
|
8577
8907
|
}
|
|
@@ -8579,6 +8909,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8579
8909
|
this.isTouch = e.pointerType === 'touch';
|
|
8580
8910
|
pageX = e.pageX;
|
|
8581
8911
|
pageY = e.pageY;
|
|
8912
|
+
layerX = e['layerX'];
|
|
8913
|
+
layerY = e['layerY'] - (this.isTileMap ? 10 : 0);
|
|
8582
8914
|
target = e.target;
|
|
8583
8915
|
}
|
|
8584
8916
|
if (this.isTileMap) {
|
|
@@ -8601,6 +8933,45 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8601
8933
|
if (e.cancelable && !this.isTouch) {
|
|
8602
8934
|
e.preventDefault();
|
|
8603
8935
|
}
|
|
8936
|
+
if (!isNullOrUndefined(this.markerDragArgument)) {
|
|
8937
|
+
var marker$$1 = this.markerDragArgument;
|
|
8938
|
+
this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
|
|
8939
|
+
this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
|
|
8940
|
+
var latLongValue = this.getMarkerClickLocation(pageX, pageY, layerX, layerY, this.markerDragArgument, true);
|
|
8941
|
+
var markerObject = this.layers[marker$$1.layerIndex].markerSettings[marker$$1.markerIndex];
|
|
8942
|
+
document.getElementById(this.element.id + "_svg").style.cursor = markerObject.enableDrag ? 'pointer' : 'grabbing';
|
|
8943
|
+
var dragEventArgs = {
|
|
8944
|
+
name: 'markerDragEnd', x: pageX, y: pageY,
|
|
8945
|
+
latitude: latLongValue.latitude, longitude: latLongValue.longitude,
|
|
8946
|
+
layerIndex: marker$$1.layerIndex, markerIndex: marker$$1.markerIndex,
|
|
8947
|
+
dataIndex: marker$$1.dataIndex
|
|
8948
|
+
};
|
|
8949
|
+
if (isNullOrUndefined(markerObject.latitudeValuePath) && isNullOrUndefined(markerObject.longitudeValuePath)) {
|
|
8950
|
+
var data = markerObject.dataSource[marker$$1.dataIndex];
|
|
8951
|
+
if (!isNullOrUndefined(data['Longitude']) && !isNullOrUndefined(data['Latitude'])) {
|
|
8952
|
+
markerObject.dataSource[marker$$1.dataIndex].Latitude = dragEventArgs.latitude;
|
|
8953
|
+
markerObject.dataSource[marker$$1.dataIndex].Longitude = dragEventArgs.longitude;
|
|
8954
|
+
}
|
|
8955
|
+
else {
|
|
8956
|
+
markerObject.dataSource[marker$$1.dataIndex].latitude = dragEventArgs.latitude;
|
|
8957
|
+
markerObject.dataSource[marker$$1.dataIndex].longitude = dragEventArgs.longitude;
|
|
8958
|
+
}
|
|
8959
|
+
}
|
|
8960
|
+
else {
|
|
8961
|
+
markerObject.dataSource[marker$$1.dataIndex][markerObject.latitudeValuePath] = dragEventArgs.latitude;
|
|
8962
|
+
markerObject.dataSource[marker$$1.dataIndex][markerObject.longitudeValuePath] = dragEventArgs.longitude;
|
|
8963
|
+
}
|
|
8964
|
+
this.markerDragId = '';
|
|
8965
|
+
this.markerDragArgument = null;
|
|
8966
|
+
this.trigger('markerDragEnd', dragEventArgs);
|
|
8967
|
+
}
|
|
8968
|
+
else {
|
|
8969
|
+
document.getElementById(this.element.id + "_svg").style.cursor = 'auto';
|
|
8970
|
+
}
|
|
8971
|
+
if (this.zoomModule && this.isDevice) {
|
|
8972
|
+
this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.scale, this.element.id + '_Zooming_');
|
|
8973
|
+
this.zoomModule.removeToolbarClass('', '', '', '', '');
|
|
8974
|
+
}
|
|
8604
8975
|
return false;
|
|
8605
8976
|
};
|
|
8606
8977
|
/**
|
|
@@ -8608,14 +8979,19 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8608
8979
|
*
|
|
8609
8980
|
* @param {PointerEvent} e - Specifies the pointer event on maps
|
|
8610
8981
|
* @returns {void}
|
|
8982
|
+
* @private
|
|
8611
8983
|
*/
|
|
8612
8984
|
Maps.prototype.mouseDownOnMap = function (e) {
|
|
8613
8985
|
this.mouseDownEvent = { x: e.x, y: e.y };
|
|
8614
8986
|
if (e.type.indexOf('touch') !== -1 && e.changedTouches) {
|
|
8615
8987
|
this.mouseDownEvent = { x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY };
|
|
8616
8988
|
}
|
|
8989
|
+
if (this.isDevice) {
|
|
8990
|
+
this.mapsTooltipModule.renderTooltip(e);
|
|
8991
|
+
}
|
|
8617
8992
|
var rect = this.element.getBoundingClientRect();
|
|
8618
8993
|
var element = e.target;
|
|
8994
|
+
this.markerDragId = element.id;
|
|
8619
8995
|
var animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
|
|
8620
8996
|
if (this.isTileMap && !isNullOrUndefined(animatedTiles)) {
|
|
8621
8997
|
this.currentTiles = animatedTiles.cloneNode(true);
|
|
@@ -8648,11 +9024,37 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8648
9024
|
this.markerModule.sameMarkerData = [];
|
|
8649
9025
|
}
|
|
8650
9026
|
};
|
|
9027
|
+
/**
|
|
9028
|
+
* @param {PointerEvent} e - Specifies the pointer event.
|
|
9029
|
+
* @returns {void}
|
|
9030
|
+
* @private
|
|
9031
|
+
*/
|
|
9032
|
+
Maps.prototype.mapsOnRightClick = function (e) {
|
|
9033
|
+
var targetEle = e.target;
|
|
9034
|
+
var targetId = targetEle.id;
|
|
9035
|
+
var latitude = null;
|
|
9036
|
+
var longitude = null;
|
|
9037
|
+
this.mouseClickEvent = this.mouseDownEvent = { x: e.x, y: e.y };
|
|
9038
|
+
if (targetEle.id.indexOf('_ToolBar') === -1) {
|
|
9039
|
+
var latLongValue = this.getClickLocation(targetId, e.pageX, e.pageY, targetEle, e['layerX'], e['layerY']);
|
|
9040
|
+
if (!isNullOrUndefined(latLongValue)) {
|
|
9041
|
+
latitude = latLongValue.latitude;
|
|
9042
|
+
longitude = latLongValue.longitude;
|
|
9043
|
+
}
|
|
9044
|
+
var eventArgs = {
|
|
9045
|
+
cancel: false, name: rightClick, target: targetId, x: e.clientX, y: e.clientY,
|
|
9046
|
+
latitude: latitude, longitude: longitude,
|
|
9047
|
+
isShapeSelected: false
|
|
9048
|
+
};
|
|
9049
|
+
this.trigger('rightClick', eventArgs);
|
|
9050
|
+
}
|
|
9051
|
+
};
|
|
8651
9052
|
/**
|
|
8652
9053
|
* This method is used to perform operations when performing the double click operation on maps.
|
|
8653
9054
|
*
|
|
8654
9055
|
* @param {PointerEvent} e - Specifies the pointer event.
|
|
8655
9056
|
* @returns {void}
|
|
9057
|
+
* @private
|
|
8656
9058
|
*/
|
|
8657
9059
|
Maps.prototype.mapsOnDoubleClick = function (e) {
|
|
8658
9060
|
this.notify('dblclick', e);
|
|
@@ -8688,6 +9090,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8688
9090
|
*
|
|
8689
9091
|
* @param {PointerEvent} e - Specifies the pointer event on maps.
|
|
8690
9092
|
* @returns {void}
|
|
9093
|
+
* @private
|
|
8691
9094
|
*/
|
|
8692
9095
|
Maps.prototype.mouseMoveOnMap = function (e) {
|
|
8693
9096
|
var target;
|
|
@@ -8703,6 +9106,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8703
9106
|
if (this.bubbleModule) {
|
|
8704
9107
|
this.bubbleModule.bubbleMove(e);
|
|
8705
9108
|
}
|
|
9109
|
+
if (target.id.indexOf('MarkerIndex') == -1) {
|
|
9110
|
+
document.getElementById(this.element.id + "_svg").style.cursor = 'auto';
|
|
9111
|
+
}
|
|
8706
9112
|
this.onMouseMove(e);
|
|
8707
9113
|
this.notify(Browser.touchMoveEvent, e);
|
|
8708
9114
|
};
|
|
@@ -8711,15 +9117,40 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8711
9117
|
*
|
|
8712
9118
|
* @param {PointerEvent} e - Specifies the pointer event on maps.
|
|
8713
9119
|
* @returns {void}
|
|
9120
|
+
* @private
|
|
8714
9121
|
*/
|
|
8715
9122
|
Maps.prototype.onMouseMove = function (e) {
|
|
8716
9123
|
var element = e.target;
|
|
8717
|
-
|
|
9124
|
+
this.mouseMoveId = element['id'];
|
|
9125
|
+
var pageX;
|
|
9126
|
+
var pageY;
|
|
9127
|
+
var touches = null;
|
|
9128
|
+
var layerX = 0;
|
|
9129
|
+
var layerY = 0;
|
|
9130
|
+
if (e.type.indexOf('touch') == -1) {
|
|
9131
|
+
pageX = e.pageX;
|
|
9132
|
+
pageY = e.pageY;
|
|
9133
|
+
layerX = e['layerX'];
|
|
9134
|
+
layerY = e['layerY'] - (this.isTileMap ? 10 : 0);
|
|
8718
9135
|
this.titleTooltip(e, e.pageX, e.pageY);
|
|
8719
9136
|
if (!isNullOrUndefined(this.legendModule)) {
|
|
8720
9137
|
this.legendTooltip(e, e.pageX, e.pageY, true);
|
|
8721
9138
|
}
|
|
8722
9139
|
}
|
|
9140
|
+
else {
|
|
9141
|
+
touches = e.touches;
|
|
9142
|
+
layerX = pageX = touches[0].clientX;
|
|
9143
|
+
layerY = pageY = touches[0].clientY - (this.isTileMap ? 10 : 0);
|
|
9144
|
+
}
|
|
9145
|
+
if (!isNullOrUndefined(this.markerDragArgument)) {
|
|
9146
|
+
var marker$$1 = this.markerDragArgument;
|
|
9147
|
+
this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
|
|
9148
|
+
this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
|
|
9149
|
+
this.getMarkerClickLocation(pageX, pageY, layerX, layerY, marker$$1, false);
|
|
9150
|
+
}
|
|
9151
|
+
if (this.zoomModule) {
|
|
9152
|
+
this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.scale, e.target.id);
|
|
9153
|
+
}
|
|
8723
9154
|
return false;
|
|
8724
9155
|
};
|
|
8725
9156
|
Maps.prototype.legendTooltip = function (event, x, y, isTouch) {
|
|
@@ -8802,10 +9233,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8802
9233
|
/**
|
|
8803
9234
|
* This method is used to zoom the map by specifying the center position.
|
|
8804
9235
|
*
|
|
8805
|
-
* @param {number} centerPosition - Specifies the
|
|
8806
|
-
* @param {number}
|
|
8807
|
-
* @param {number} centerPosition.longitude - Specifies the longitude value for the center position
|
|
8808
|
-
* @param {number} zoomFactor - Specifies the zoom factor for maps.
|
|
9236
|
+
* @param {number} centerPosition - Specifies the location of the maps to be zoomed as geographical coordinates.
|
|
9237
|
+
* @param {number} zoomFactor - Specifies the zoom factor for the maps.
|
|
8809
9238
|
* @returns {void}
|
|
8810
9239
|
*/
|
|
8811
9240
|
Maps.prototype.zoomByPosition = function (centerPosition, zoomFactor) {
|
|
@@ -8842,8 +9271,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8842
9271
|
/**
|
|
8843
9272
|
* This method is used to perform panning by specifying the direction.
|
|
8844
9273
|
*
|
|
8845
|
-
* @param {PanDirection} direction - Specifies the direction in which the panning
|
|
8846
|
-
* @param {PointerEvent | TouchEvent} mouseLocation - Specifies the location of the mouse pointer in maps.
|
|
9274
|
+
* @param {PanDirection} direction - Specifies the direction in which the panning must be performed.
|
|
9275
|
+
* @param {PointerEvent | TouchEvent} mouseLocation - Specifies the location of the mouse pointer in maps in pixels.
|
|
8847
9276
|
* @returns {void}
|
|
8848
9277
|
*/
|
|
8849
9278
|
Maps.prototype.panByDirection = function (direction, mouseLocation) {
|
|
@@ -8872,7 +9301,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8872
9301
|
/**
|
|
8873
9302
|
* This method is used to add the layers dynamically to the maps.
|
|
8874
9303
|
*
|
|
8875
|
-
* @param {Object} layer - Specifies the layer
|
|
9304
|
+
* @param {Object} layer - Specifies the layer to be added in the maps.
|
|
8876
9305
|
* @returns {void}
|
|
8877
9306
|
*/
|
|
8878
9307
|
Maps.prototype.addLayer = function (layer) {
|
|
@@ -8884,7 +9313,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8884
9313
|
}
|
|
8885
9314
|
};
|
|
8886
9315
|
/**
|
|
8887
|
-
* This method is used to remove a layer from
|
|
9316
|
+
* This method is used to remove a layer from the maps.
|
|
8888
9317
|
*
|
|
8889
9318
|
* @param {number} index - Specifies the index number of the layer to be removed.
|
|
8890
9319
|
* @returns {void}
|
|
@@ -8898,7 +9327,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8898
9327
|
};
|
|
8899
9328
|
/**
|
|
8900
9329
|
* This method is used to add markers dynamically in the maps.
|
|
8901
|
-
* If we provide the index value of the layer in which the marker to be added and the
|
|
9330
|
+
* If we provide the index value of the layer in which the marker to be added and the settings
|
|
8902
9331
|
* of the marker as parameters, the marker will be added in the location.
|
|
8903
9332
|
*
|
|
8904
9333
|
* @param {number} layerIndex - Specifies the index number of the layer.
|
|
@@ -8920,12 +9349,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8920
9349
|
}
|
|
8921
9350
|
};
|
|
8922
9351
|
/**
|
|
8923
|
-
* This method is used to select the geometric shape element in the maps
|
|
9352
|
+
* This method is used to select the geometric shape element in the maps.
|
|
8924
9353
|
*
|
|
8925
9354
|
* @param {number} layerIndex - Specifies the index of the layer in maps.
|
|
8926
9355
|
* @param {string | string[]} propertyName - Specifies the property name from the data source.
|
|
8927
|
-
* @param {string} name - Specifies the name of the shape that is selected.
|
|
8928
|
-
* @param {boolean} enable - Specifies the shape selection
|
|
9356
|
+
* @param {string} name - Specifies the name of the shape, which is mapped from the data source, that is selected.
|
|
9357
|
+
* @param {boolean} enable - Specifies whether the shape should be selected or the selection should be removed.
|
|
8929
9358
|
* @returns {void}
|
|
8930
9359
|
*/
|
|
8931
9360
|
Maps.prototype.shapeSelection = function (layerIndex, propertyName, name, enable) {
|
|
@@ -9029,12 +9458,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9029
9458
|
}
|
|
9030
9459
|
};
|
|
9031
9460
|
/**
|
|
9032
|
-
* This method is used to zoom the maps
|
|
9461
|
+
* This method is used to zoom the maps based on the provided coordinates.
|
|
9033
9462
|
*
|
|
9034
|
-
* @param {number} minLatitude - Specifies the minimum latitude to be zoomed.
|
|
9035
|
-
* @param {number} minLongitude - Specifies the minimum latitude to be zoomed.
|
|
9036
|
-
* @param {number} maxLatitude - Specifies the maximum latitude to be zoomed.
|
|
9037
|
-
* @param {number} maxLongitude - Specifies the maximum longitude to be zoomed.
|
|
9463
|
+
* @param {number} minLatitude - Specifies the minimum latitude of the location to be zoomed.
|
|
9464
|
+
* @param {number} minLongitude - Specifies the minimum latitude of the location to be zoomed.
|
|
9465
|
+
* @param {number} maxLatitude - Specifies the maximum latitude of the location to be zoomed.
|
|
9466
|
+
* @param {number} maxLongitude - Specifies the maximum longitude of the location to be zoomed.
|
|
9038
9467
|
* @returns {void}
|
|
9039
9468
|
*/
|
|
9040
9469
|
Maps.prototype.zoomToCoordinates = function (minLatitude, minLongitude, maxLatitude, maxLongitude) {
|
|
@@ -9077,7 +9506,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9077
9506
|
this.maxLatOfGivenLocation = maxLatitude;
|
|
9078
9507
|
this.maxLongOfGivenLocation = maxLongitude;
|
|
9079
9508
|
this.zoomNotApplied = true;
|
|
9080
|
-
this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this);
|
|
9509
|
+
this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this, true);
|
|
9081
9510
|
var zoomArgs = {
|
|
9082
9511
|
cancel: false, name: 'zoom', type: zoomIn, maps: this,
|
|
9083
9512
|
tileTranslatePoint: {}, translatePoint: {},
|
|
@@ -9111,7 +9540,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9111
9540
|
this.legendSelectionCollection = [];
|
|
9112
9541
|
};
|
|
9113
9542
|
/**
|
|
9114
|
-
* This method is used to set culture for maps
|
|
9543
|
+
* This method is used to set culture for maps.
|
|
9115
9544
|
*
|
|
9116
9545
|
* @returns {void}
|
|
9117
9546
|
*/
|
|
@@ -9121,7 +9550,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9121
9550
|
this.localeObject = new L10n(this.getModuleName(), this.defaultLocalConstants, this.locale);
|
|
9122
9551
|
};
|
|
9123
9552
|
/**
|
|
9124
|
-
* This method to set locale constants to the maps
|
|
9553
|
+
* This method to set locale constants to the maps.
|
|
9125
9554
|
*
|
|
9126
9555
|
* @returns {void}
|
|
9127
9556
|
*/
|
|
@@ -9137,7 +9566,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9137
9566
|
};
|
|
9138
9567
|
};
|
|
9139
9568
|
/**
|
|
9140
|
-
* This method disposes the maps
|
|
9569
|
+
* This method destroys the maps. This method removes the events associated with the maps and disposes the objects created for rendering and updating the maps.
|
|
9141
9570
|
*
|
|
9142
9571
|
* @returns {void}
|
|
9143
9572
|
*/
|
|
@@ -9174,6 +9603,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9174
9603
|
* Gets component name
|
|
9175
9604
|
*
|
|
9176
9605
|
* @returns {string} - Returns the string value
|
|
9606
|
+
* @private
|
|
9177
9607
|
*/
|
|
9178
9608
|
Maps.prototype.getModuleName = function () {
|
|
9179
9609
|
return 'maps';
|
|
@@ -9488,7 +9918,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9488
9918
|
return isVisible;
|
|
9489
9919
|
};
|
|
9490
9920
|
/**
|
|
9491
|
-
* This method handles the printing functionality for the maps
|
|
9921
|
+
* This method handles the printing functionality for the maps.
|
|
9492
9922
|
*
|
|
9493
9923
|
* @param {string[] | string | Element} id - Specifies the element to be printed.
|
|
9494
9924
|
* @returns {void}
|
|
@@ -9499,13 +9929,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9499
9929
|
}
|
|
9500
9930
|
};
|
|
9501
9931
|
/**
|
|
9502
|
-
* This method handles the export functionality for the maps
|
|
9932
|
+
* This method handles the export functionality for the maps.
|
|
9503
9933
|
*
|
|
9504
9934
|
* @param {ExportType} type - Specifies the type of the exported file.
|
|
9505
9935
|
* @param {string} fileName - Specifies the name of the file with which the rendered maps need to be exported.
|
|
9506
|
-
* @param {PdfPageOrientation} orientation - Specifies the orientation of the
|
|
9507
|
-
* @param {boolean} allowDownload - Specifies whether to download as a file or get as base64 string for the file
|
|
9508
|
-
* @returns {Promise<string>} -
|
|
9936
|
+
* @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document while exporting.
|
|
9937
|
+
* @param {boolean} allowDownload - Specifies whether to download as a file or get as base64 string for the file.
|
|
9938
|
+
* @returns {Promise<string>} - Specifies the base64 string of the exported image which is returned when the `allowDownload` is set to false.
|
|
9509
9939
|
*/
|
|
9510
9940
|
Maps.prototype.export = function (type, fileName, orientation, allowDownload) {
|
|
9511
9941
|
var _this = this;
|
|
@@ -9529,8 +9959,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9529
9959
|
/**
|
|
9530
9960
|
* This method is used to get the Bing maps URL.
|
|
9531
9961
|
*
|
|
9532
|
-
* @param {string} url - Specifies the URL of the maps.
|
|
9533
|
-
* @returns {Promise<string>} - Returns the processed Bing URL as Promise
|
|
9962
|
+
* @param {string} url - Specifies the URL of the Bing maps along with the API key.
|
|
9963
|
+
* @returns {Promise<string>} - Returns the processed Bing URL as `Promise`.
|
|
9534
9964
|
*/
|
|
9535
9965
|
Maps.prototype.getBingUrlTemplate = function (url) {
|
|
9536
9966
|
var promise;
|
|
@@ -9621,20 +10051,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9621
10051
|
};
|
|
9622
10052
|
};
|
|
9623
10053
|
/**
|
|
9624
|
-
* This method is used to get the
|
|
10054
|
+
* This method is used to get the geographical coordinates for location points in pixels when shape maps are rendered in the maps.
|
|
9625
10055
|
*
|
|
9626
|
-
* @param {number} layerIndex - Specifies the index number of the layer of the
|
|
9627
|
-
* @param {number} x - Specifies the x value.
|
|
9628
|
-
* @param {number} y - Specifies the y value.
|
|
9629
|
-
* @returns {GeoPosition}- Returns the
|
|
10056
|
+
* @param {number} layerIndex - Specifies the index number of the layer of the maps.
|
|
10057
|
+
* @param {number} x - Specifies the x value in pixel.
|
|
10058
|
+
* @param {number} y - Specifies the y value in pixel.
|
|
10059
|
+
* @returns {GeoPosition}- Returns the geographical coordinates.
|
|
9630
10060
|
*/
|
|
9631
10061
|
Maps.prototype.getGeoLocation = function (layerIndex, x, y) {
|
|
9632
10062
|
var latitude = 0;
|
|
9633
10063
|
var longitude = 0;
|
|
9634
10064
|
if (!this.isDestroyed) {
|
|
9635
10065
|
var container = document.getElementById(this.element.id);
|
|
9636
|
-
var pageX = x - container.offsetLeft;
|
|
9637
|
-
var pageY = y - container.offsetTop;
|
|
10066
|
+
var pageX = x - (isNullOrUndefined(this.markerDragArgument) ? container.offsetLeft : 0);
|
|
10067
|
+
var pageY = y - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop : 0);
|
|
9638
10068
|
var currentLayer = this.layersCollection[layerIndex];
|
|
9639
10069
|
var translate = getTranslate(this, currentLayer, false);
|
|
9640
10070
|
var translatePoint = translate['location'];
|
|
@@ -9653,11 +10083,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9653
10083
|
return Math.min(Math.max(value, minVal), maxVal);
|
|
9654
10084
|
};
|
|
9655
10085
|
/**
|
|
9656
|
-
* This method is used to get the
|
|
10086
|
+
* This method is used to get the geographical coordinates for location points in pixels when an online map provider is rendered in the maps.
|
|
9657
10087
|
*
|
|
9658
|
-
* @param {number} x - Specifies the x value
|
|
9659
|
-
* @param {number} y - Specifies the y value
|
|
9660
|
-
* @returns {GeoPosition} - Returns the
|
|
10088
|
+
* @param {number} x - Specifies the x value in pixel.
|
|
10089
|
+
* @param {number} y - Specifies the y value in pixel.
|
|
10090
|
+
* @returns {GeoPosition} - Returns the geographical coordinates.
|
|
9661
10091
|
*/
|
|
9662
10092
|
Maps.prototype.getTileGeoLocation = function (x, y) {
|
|
9663
10093
|
var latitude = 0;
|
|
@@ -9665,25 +10095,25 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9665
10095
|
if (!this.isDestroyed) {
|
|
9666
10096
|
var container = document.getElementById(this.element.id);
|
|
9667
10097
|
var ele = document.getElementById(this.element.id + '_tile_parent');
|
|
9668
|
-
var latLong = this.pointToLatLong(x + this.mapAreaRect.x - (ele.offsetLeft - container.offsetLeft), y + this.mapAreaRect.y - (ele.offsetTop - container.offsetTop));
|
|
10098
|
+
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)));
|
|
9669
10099
|
latitude = latLong['latitude'];
|
|
9670
10100
|
longitude = latLong['longitude'];
|
|
9671
10101
|
}
|
|
9672
10102
|
return { latitude: latitude, longitude: longitude };
|
|
9673
10103
|
};
|
|
9674
10104
|
/**
|
|
9675
|
-
* This method is used to convert the point to latitude and longitude in maps.
|
|
10105
|
+
* This method is used to convert the point in pixels to latitude and longitude in maps.
|
|
9676
10106
|
*
|
|
9677
|
-
* @param {number} pageX - Specifies the x value
|
|
9678
|
-
* @param {number} pageY - Specifies the y value
|
|
9679
|
-
* @returns {Object} - Returns the
|
|
10107
|
+
* @param {number} pageX - Specifies the x position value in pixels.
|
|
10108
|
+
* @param {number} pageY - Specifies the y position value in pixels.
|
|
10109
|
+
* @returns {Object} - Returns the latitude and longitude values.
|
|
9680
10110
|
*/
|
|
9681
10111
|
Maps.prototype.pointToLatLong = function (pageX, pageY) {
|
|
9682
10112
|
var latitude = 0;
|
|
9683
10113
|
var longitude = 0;
|
|
9684
10114
|
if (!this.isDestroyed) {
|
|
9685
10115
|
var padding = this.layers[this.layers.length - 1].layerType === 'GoogleStaticMap' ? 0 : 10;
|
|
9686
|
-
pageY =
|
|
10116
|
+
pageY = pageY + padding;
|
|
9687
10117
|
var mapSize = 256 * Math.pow(2, this.tileZoomLevel);
|
|
9688
10118
|
var x1 = (this.clip(pageX - (this.translatePoint.x * this.scale), 0, mapSize - 1) / mapSize) - 0.5;
|
|
9689
10119
|
var y1 = 0.5 - (this.clip(pageY - (this.translatePoint.y * this.scale), 0, mapSize - 1) / mapSize);
|
|
@@ -9821,6 +10251,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9821
10251
|
__decorate([
|
|
9822
10252
|
Event()
|
|
9823
10253
|
], Maps.prototype, "markerClick", void 0);
|
|
10254
|
+
__decorate([
|
|
10255
|
+
Event()
|
|
10256
|
+
], Maps.prototype, "markerDragStart", void 0);
|
|
10257
|
+
__decorate([
|
|
10258
|
+
Event()
|
|
10259
|
+
], Maps.prototype, "markerDragEnd", void 0);
|
|
9824
10260
|
__decorate([
|
|
9825
10261
|
Event()
|
|
9826
10262
|
], Maps.prototype, "markerClusterClick", void 0);
|
|
@@ -9867,6 +10303,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9867
10303
|
function Bubble(maps) {
|
|
9868
10304
|
/**
|
|
9869
10305
|
* Bubble Id for current layer
|
|
10306
|
+
* @private
|
|
9870
10307
|
*/
|
|
9871
10308
|
this.id = '';
|
|
9872
10309
|
this.maps = maps;
|
|
@@ -10018,7 +10455,7 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
10018
10455
|
var bubbleDataSource = bubbleSettings.dataSource;
|
|
10019
10456
|
var scale = translate['scale'];
|
|
10020
10457
|
var transPoint = translate['location'];
|
|
10021
|
-
var position = new MapLocation((_this.maps.isTileMap ? (eventArgs.cx) : ((eventArgs.cx + transPoint.x) * scale)), (_this.maps.isTileMap ? (eventArgs.cy) : ((eventArgs.cy + transPoint.y) * scale)));
|
|
10458
|
+
var position = new MapLocation((_this.maps.isTileMap ? ((eventArgs.cx + _this.maps.translatePoint.x) * _this.maps.tileZoomLevel) : ((eventArgs.cx + transPoint.x) * scale)), (_this.maps.isTileMap ? ((eventArgs.cy + _this.maps.translatePoint.y) * _this.maps.tileZoomLevel) : ((eventArgs.cy + transPoint.y) * scale)));
|
|
10022
10459
|
bubbleElement.setAttribute('transform', 'translate( ' + (position.x) + ' ' + (position.y) + ' )');
|
|
10023
10460
|
var bubble = (bubbleDataSource.length - 1) === dataIndex ? 'bubble' : null;
|
|
10024
10461
|
if (bubbleSettings.bubbleType === 'Square') {
|
|
@@ -10180,6 +10617,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10180
10617
|
* @param {number} index - Specifies the index number.
|
|
10181
10618
|
* @param {any[]} intersect - Specifies the intersect.
|
|
10182
10619
|
* @returns {void}
|
|
10620
|
+
* @private
|
|
10183
10621
|
*/
|
|
10184
10622
|
DataLabel.prototype.renderLabel = function (
|
|
10185
10623
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -10288,6 +10726,9 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10288
10726
|
if (isNullOrUndefined(text) && (layer.dataLabelSettings.template !== '' && layer.dataSource['length'] === 0)) {
|
|
10289
10727
|
text = shapeData['properties'][layer.shapePropertyPath];
|
|
10290
10728
|
}
|
|
10729
|
+
if (isNullOrUndefined(text) && layer.dataSource['length'] > 0) {
|
|
10730
|
+
text = '';
|
|
10731
|
+
}
|
|
10291
10732
|
var dataLabelText = text;
|
|
10292
10733
|
var projectionType = this.maps.projectionType;
|
|
10293
10734
|
if (isPoint) {
|
|
@@ -10340,9 +10781,9 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10340
10781
|
}
|
|
10341
10782
|
var position = [];
|
|
10342
10783
|
var width = zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied
|
|
10343
|
-
&& _this.maps.zoomShapeCollection.length > index ? _this.maps.
|
|
10784
|
+
&& _this.maps.zoomShapeCollection.length > index ? (_this.maps.dataLabelShape[index]) * scale :
|
|
10344
10785
|
(location['rightMax']['x'] - location['leftMax']['x']) * scale;
|
|
10345
|
-
if (!isNullOrUndefined(_this.maps.dataLabelShape)) {
|
|
10786
|
+
if (!isNullOrUndefined(_this.maps.dataLabelShape) && !_this.maps.isReset) {
|
|
10346
10787
|
shapeWidth = firstLevelMapLocation['rightMax']['x'] - firstLevelMapLocation['leftMax']['x'];
|
|
10347
10788
|
_this.maps.dataLabelShape.push(shapeWidth);
|
|
10348
10789
|
}
|
|
@@ -10368,8 +10809,9 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10368
10809
|
locationX = location1['x'];
|
|
10369
10810
|
location['x'] = location1['x'];
|
|
10370
10811
|
width = zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied
|
|
10371
|
-
&& _this.maps.zoomShapeCollection.length > index ? _this.maps.
|
|
10372
|
-
(location1['rightMax']['x'] - location1['leftMax']['x']) * scale
|
|
10812
|
+
&& _this.maps.zoomShapeCollection.length > index ? (_this.maps.dataLabelShape[index]) * scale :
|
|
10813
|
+
((location1['rightMax']['x'] - location1['leftMax']['x']) * scale) > 0 ?
|
|
10814
|
+
((location1['rightMax']['x'] - location1['leftMax']['x']) * scale) : width;
|
|
10373
10815
|
}
|
|
10374
10816
|
var xpositionEnds = ((location['x'] + transPoint['x']) * scale) + textSize['width'] / 2;
|
|
10375
10817
|
var xpositionStart = ((location['x'] + transPoint['x']) * scale) - textSize['width'] / 2;
|
|
@@ -10563,6 +11005,7 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
|
|
|
10563
11005
|
* @param {number} factor - Specifies the current zoom factor of the Maps.
|
|
10564
11006
|
* @param {number} layerIndex -Specifies the index of current layer.
|
|
10565
11007
|
* @returns {Element} - Returns the navigation line element.
|
|
11008
|
+
* @private
|
|
10566
11009
|
*/
|
|
10567
11010
|
NavigationLine.prototype.renderNavigation = function (layer, factor, layerIndex) {
|
|
10568
11011
|
var group;
|
|
@@ -10772,6 +11215,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
10772
11215
|
* To calculate legend bounds and draw the legend shape and text.
|
|
10773
11216
|
*
|
|
10774
11217
|
* @returns {void}
|
|
11218
|
+
* @private
|
|
10775
11219
|
*/
|
|
10776
11220
|
Legend.prototype.renderLegend = function () {
|
|
10777
11221
|
this.legendRenderingCollections = [];
|
|
@@ -11113,6 +11557,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11113
11557
|
// eslint-disable-next-line valid-jsdoc
|
|
11114
11558
|
/**
|
|
11115
11559
|
* To draw the legend shape and text.
|
|
11560
|
+
* @private
|
|
11116
11561
|
*/
|
|
11117
11562
|
Legend.prototype.drawLegend = function () {
|
|
11118
11563
|
var map = this.maps;
|
|
@@ -12947,6 +13392,7 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12947
13392
|
// eslint-disable-next-line valid-jsdoc
|
|
12948
13393
|
/**
|
|
12949
13394
|
* Public method for highlight module
|
|
13395
|
+
* @private
|
|
12950
13396
|
*/
|
|
12951
13397
|
Highlight.prototype.addHighlight = function (layerIndex, name, enable) {
|
|
12952
13398
|
var targetEle = getTargetElement(layerIndex, name, enable, this.maps);
|
|
@@ -13272,6 +13718,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
13272
13718
|
// eslint-disable-next-line valid-jsdoc
|
|
13273
13719
|
/**
|
|
13274
13720
|
* Public method for selection
|
|
13721
|
+
* @private
|
|
13275
13722
|
*/
|
|
13276
13723
|
Selection.prototype.addSelection = function (layerIndex, name, enable) {
|
|
13277
13724
|
var targetElement = getTargetElement(layerIndex, name, enable, this.maps);
|
|
@@ -13478,6 +13925,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13478
13925
|
this.tooltipId = this.maps.element.id + '_mapsTooltip';
|
|
13479
13926
|
this.addEventListener();
|
|
13480
13927
|
}
|
|
13928
|
+
/**
|
|
13929
|
+
* @private
|
|
13930
|
+
*/
|
|
13481
13931
|
MapsTooltip.prototype.renderTooltip = function (e) {
|
|
13482
13932
|
var _this = this;
|
|
13483
13933
|
var pageX;
|
|
@@ -13499,6 +13949,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13499
13949
|
pageY = e.pageY;
|
|
13500
13950
|
target = e.target;
|
|
13501
13951
|
}
|
|
13952
|
+
if (this.maps.isDevice) {
|
|
13953
|
+
clearTimeout(this.clearTimeout);
|
|
13954
|
+
this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
|
|
13955
|
+
}
|
|
13502
13956
|
var option;
|
|
13503
13957
|
var currentData = '';
|
|
13504
13958
|
var targetId = target.id;
|
|
@@ -13514,7 +13968,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13514
13968
|
this.tooltipTargetID = targetId;
|
|
13515
13969
|
var istooltipRender = (targetId.indexOf('_shapeIndex_') > -1)
|
|
13516
13970
|
|| (targetId.indexOf('_MarkerIndex_') > -1) || (targetId.indexOf('_BubbleIndex_') > -1);
|
|
13517
|
-
if (istooltipRender) {
|
|
13971
|
+
if (istooltipRender && this.maps.markerDragArgument === null) {
|
|
13518
13972
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
13519
13973
|
option = layer.tooltipSettings;
|
|
13520
13974
|
var shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
@@ -13666,8 +14120,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13666
14120
|
header: '',
|
|
13667
14121
|
data: option['data'],
|
|
13668
14122
|
template: option['template'],
|
|
13669
|
-
content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
|
|
13670
|
-
[currentData.toString()],
|
|
14123
|
+
content: tooltipArgs.content.toString() !== currentData.toString() ? [SanitizeHtmlHelper.sanitize(tooltipArgs.content.toString())] :
|
|
14124
|
+
[SanitizeHtmlHelper.sanitize(currentData.toString())],
|
|
13671
14125
|
shapes: [],
|
|
13672
14126
|
location: option['location'],
|
|
13673
14127
|
palette: [markerFill],
|
|
@@ -13683,8 +14137,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13683
14137
|
header: '',
|
|
13684
14138
|
data: tooltipArgs.options['data'],
|
|
13685
14139
|
template: tooltipArgs.options['template'],
|
|
13686
|
-
content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
|
|
13687
|
-
[currentData.toString()],
|
|
14140
|
+
content: tooltipArgs.content.toString() !== currentData.toString() ? [SanitizeHtmlHelper.sanitize(tooltipArgs.content.toString())] :
|
|
14141
|
+
[SanitizeHtmlHelper.sanitize(currentData.toString())],
|
|
13688
14142
|
shapes: [],
|
|
13689
14143
|
location: tooltipArgs.options['location'],
|
|
13690
14144
|
palette: [markerFill],
|
|
@@ -13774,6 +14228,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13774
14228
|
}
|
|
13775
14229
|
return format;
|
|
13776
14230
|
};
|
|
14231
|
+
/**
|
|
14232
|
+
* @private
|
|
14233
|
+
*/
|
|
13777
14234
|
MapsTooltip.prototype.mouseUpHandler = function (e) {
|
|
13778
14235
|
this.renderTooltip(e);
|
|
13779
14236
|
if (this.maps.tooltipDisplayMode === 'MouseMove') {
|
|
@@ -13781,6 +14238,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13781
14238
|
this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
|
|
13782
14239
|
}
|
|
13783
14240
|
};
|
|
14241
|
+
/**
|
|
14242
|
+
* @private
|
|
14243
|
+
*/
|
|
13784
14244
|
MapsTooltip.prototype.removeTooltip = function () {
|
|
13785
14245
|
var isTooltipRemoved = false;
|
|
13786
14246
|
if (document.getElementsByClassName('EJ2-maps-Tooltip').length > 0) {
|
|
@@ -13799,6 +14259,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13799
14259
|
// eslint-disable-next-line valid-jsdoc
|
|
13800
14260
|
/**
|
|
13801
14261
|
* To bind events for tooltip module
|
|
14262
|
+
* @private
|
|
13802
14263
|
*/
|
|
13803
14264
|
MapsTooltip.prototype.addEventListener = function () {
|
|
13804
14265
|
if (this.maps.isDestroyed) {
|
|
@@ -13816,6 +14277,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13816
14277
|
this.maps.on(Browser.touchCancelEvent, this.removeTooltip, this);
|
|
13817
14278
|
this.maps.element.addEventListener('contextmenu', this.removeTooltip);
|
|
13818
14279
|
};
|
|
14280
|
+
/**
|
|
14281
|
+
* @private
|
|
14282
|
+
*/
|
|
13819
14283
|
MapsTooltip.prototype.removeEventListener = function () {
|
|
13820
14284
|
if (this.maps) {
|
|
13821
14285
|
if (this.maps.isDestroyed) {
|
|
@@ -13864,32 +14328,44 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13864
14328
|
*/
|
|
13865
14329
|
var Zoom = /** @__PURE__ @class */ (function () {
|
|
13866
14330
|
function Zoom(maps) {
|
|
14331
|
+
/** @private */
|
|
13867
14332
|
this.isPanning = false;
|
|
14333
|
+
/** @private */
|
|
13868
14334
|
this.mouseEnter = false;
|
|
14335
|
+
/** @private */
|
|
13869
14336
|
this.isTouch = false;
|
|
14337
|
+
/** @private */
|
|
13870
14338
|
this.rectZoomingStart = false;
|
|
14339
|
+
/** @private */
|
|
13871
14340
|
this.browserName = Browser.info.name;
|
|
13872
14341
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
14342
|
+
/** @private */
|
|
13873
14343
|
this.isPointer = Browser.isPointer;
|
|
13874
14344
|
this.handled = false;
|
|
14345
|
+
this.isPan = false;
|
|
14346
|
+
this.isZoomFinal = false;
|
|
14347
|
+
this.isZoomSelection = false;
|
|
13875
14348
|
this.pinchFactor = 1;
|
|
13876
14349
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13877
14350
|
this.startTouches = [];
|
|
13878
14351
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14352
|
+
/** @private */
|
|
13879
14353
|
this.intersect = [];
|
|
13880
14354
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14355
|
+
/** @private */
|
|
13881
14356
|
this.mouseDownLatLong = { x: 0, y: 0 };
|
|
13882
14357
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14358
|
+
/** @private */
|
|
13883
14359
|
this.mouseMoveLatLong = { x: 0, y: 0 };
|
|
13884
|
-
/**
|
|
13885
|
-
* @private
|
|
13886
|
-
*/
|
|
14360
|
+
/** @private */
|
|
13887
14361
|
this.isSingleClick = false;
|
|
13888
14362
|
this.maps = maps;
|
|
13889
14363
|
this.wheelEvent = this.browserName === 'mozilla' ? (this.isPointer ? 'mousewheel' : 'DOMMouseScroll') : 'mousewheel';
|
|
13890
14364
|
this.cancelEvent = this.isPointer ? 'pointerleave' : 'mouseleave';
|
|
13891
|
-
this.selectionColor = this.maps.zoomSettings.selectionColor
|
|
13892
|
-
|
|
14365
|
+
this.selectionColor = this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor == null ?
|
|
14366
|
+
this.maps.zoomSettings.selectionColor : this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor;
|
|
14367
|
+
this.fillColor = this.maps.zoomSettings.toolbarSettings.buttonSettings.color == null ? this.maps.zoomSettings.color :
|
|
14368
|
+
this.maps.zoomSettings.toolbarSettings.buttonSettings.color;
|
|
13893
14369
|
this.addEventListener();
|
|
13894
14370
|
}
|
|
13895
14371
|
/**
|
|
@@ -13899,6 +14375,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13899
14375
|
* @param {number} newZoomFactor - Specifies the zoom factor.
|
|
13900
14376
|
* @param {string} type - Specifies the type.
|
|
13901
14377
|
* @returns {void}
|
|
14378
|
+
* @private
|
|
13902
14379
|
*/
|
|
13903
14380
|
Zoom.prototype.performZooming = function (position, newZoomFactor, type) {
|
|
13904
14381
|
var _this = this;
|
|
@@ -13913,6 +14390,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13913
14390
|
var maxZoom = map.zoomSettings.maxZoom;
|
|
13914
14391
|
var minZoom = map.zoomSettings.minZoom;
|
|
13915
14392
|
newZoomFactor = (minZoom > newZoomFactor && type === 'ZoomIn') ? minZoom + 1 : newZoomFactor;
|
|
14393
|
+
newZoomFactor = maxZoom >= newZoomFactor ? newZoomFactor : maxZoom;
|
|
13916
14394
|
var prevTilePoint = map.tileTranslatePoint;
|
|
13917
14395
|
if ((!map.isTileMap) && ((type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)
|
|
13918
14396
|
|| map.isReset)) {
|
|
@@ -14001,6 +14479,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14001
14479
|
}
|
|
14002
14480
|
}
|
|
14003
14481
|
this.maps.zoomNotApplied = false;
|
|
14482
|
+
if (this.maps.isDevice) {
|
|
14483
|
+
this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
|
|
14484
|
+
}
|
|
14004
14485
|
};
|
|
14005
14486
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14006
14487
|
Zoom.prototype.calculateInitalZoomTranslatePoint = function (newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map) {
|
|
@@ -14045,6 +14526,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14045
14526
|
map.tileTranslatePoint.y = (currentLevel === 1) ? ((bounds.height / 2) - ((tileDefaultSize * 2) / 2) + (padding * 2)) :
|
|
14046
14527
|
position.y - ((y * totalSize) / 100);
|
|
14047
14528
|
};
|
|
14529
|
+
/**
|
|
14530
|
+
* @private
|
|
14531
|
+
*/
|
|
14048
14532
|
Zoom.prototype.performRectZooming = function () {
|
|
14049
14533
|
this.isDragZoom = true;
|
|
14050
14534
|
var map = this.maps;
|
|
@@ -14063,11 +14547,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14063
14547
|
if (!map.isTileMap) {
|
|
14064
14548
|
var scale = map.previousScale = map.scale;
|
|
14065
14549
|
zoomCalculationFactor = scale + Math.round((((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2));
|
|
14550
|
+
zoomCalculationFactor = zoomCalculationFactor < this.maps.zoomSettings.maxZoom ? zoomCalculationFactor : this.maps.zoomSettings.maxZoom;
|
|
14066
14551
|
var translatePoint = map.previousPoint = map.translatePoint;
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
14070
|
-
|
|
14552
|
+
if (zoomCalculationFactor <= maxZoom) {
|
|
14553
|
+
var translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomCalculationFactor)) / (size.width / x));
|
|
14554
|
+
var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
|
|
14555
|
+
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
14556
|
+
}
|
|
14557
|
+
map.scale = zoomCalculationFactor < this.maps.zoomSettings.maxZoom ? zoomCalculationFactor : this.maps.zoomSettings.maxZoom;
|
|
14071
14558
|
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
14072
14559
|
if (isZoomCancelled) {
|
|
14073
14560
|
map.translatePoint = map.previousPoint;
|
|
@@ -14101,6 +14588,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14101
14588
|
this.zoomingRect = null;
|
|
14102
14589
|
}
|
|
14103
14590
|
}
|
|
14591
|
+
this.isZoomFinal = this.isZoomSelection && Math.round(map.scale) === this.maps.zoomSettings.maxZoom;
|
|
14592
|
+
this.removeToolbarOpacity(map.scale, this.maps.element.id + '_Zooming_');
|
|
14104
14593
|
};
|
|
14105
14594
|
Zoom.prototype.setInteraction = function (newInteraction) {
|
|
14106
14595
|
this.lastScale = 1;
|
|
@@ -14114,6 +14603,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14114
14603
|
this.setInteraction(null);
|
|
14115
14604
|
}
|
|
14116
14605
|
};
|
|
14606
|
+
/**
|
|
14607
|
+
* @private
|
|
14608
|
+
*/
|
|
14117
14609
|
Zoom.prototype.performPinchZooming = function (e) {
|
|
14118
14610
|
var map = this.maps;
|
|
14119
14611
|
var prevLevel = map.tileZoomLevel;
|
|
@@ -14186,7 +14678,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14186
14678
|
if (!isZoomCancelled) {
|
|
14187
14679
|
this.applyTransform(map);
|
|
14188
14680
|
}
|
|
14681
|
+
if (Browser.isDevice) {
|
|
14682
|
+
this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
|
|
14683
|
+
}
|
|
14189
14684
|
};
|
|
14685
|
+
/**
|
|
14686
|
+
* @private
|
|
14687
|
+
*/
|
|
14190
14688
|
Zoom.prototype.drawZoomRectangle = function () {
|
|
14191
14689
|
var map = this.maps;
|
|
14192
14690
|
var down = this.mouseDownPoints;
|
|
@@ -14204,7 +14702,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14204
14702
|
var rectSVGObject = map.renderer.createSvg({
|
|
14205
14703
|
id: map.element.id + '_Selection_Rect_Zooming',
|
|
14206
14704
|
width: map.availableSize.width,
|
|
14207
|
-
height: map.availableSize.height
|
|
14705
|
+
height: map.availableSize.height,
|
|
14706
|
+
style: 'position: absolute;'
|
|
14208
14707
|
});
|
|
14209
14708
|
var rectOption = new RectOption(map.element.id + '_ZoomRect', '#d3d3d3', border, 0.5, this.zoomingRect, 0, 0, '', '3');
|
|
14210
14709
|
rectSVGObject.appendChild(map.renderer.drawRectangle(rectOption));
|
|
@@ -14231,6 +14730,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14231
14730
|
zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
|
|
14232
14731
|
}
|
|
14233
14732
|
};
|
|
14733
|
+
/**
|
|
14734
|
+
* @private
|
|
14735
|
+
*/
|
|
14234
14736
|
Zoom.prototype.applyTransform = function (maps, animate$$1) {
|
|
14235
14737
|
var layerIndex;
|
|
14236
14738
|
this.templateCount = 0;
|
|
@@ -14384,7 +14886,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14384
14886
|
if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1 && !isNullOrUndefined(maps.zoomLabelPositions[labelIndex])) {
|
|
14385
14887
|
var labelX = ((maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
|
|
14386
14888
|
var labelY = ((maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
|
|
14387
|
-
var zoomtext = currentEle.childNodes[k]['
|
|
14889
|
+
var zoomtext = currentEle.childNodes[k]['textContent'];
|
|
14388
14890
|
var style = maps.layers[this.index].dataLabelSettings.textStyle;
|
|
14389
14891
|
var zoomtextSize = measureText(zoomtext, style);
|
|
14390
14892
|
var padding = 5;
|
|
@@ -14527,7 +15029,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14527
15029
|
var datalabelTemplateElemement = getElementByID(maps.element.id + '_LayerIndex_'
|
|
14528
15030
|
+ i + '_Label_Template_Group');
|
|
14529
15031
|
if ((!isNullOrUndefined(markerTemplateElement)) && markerTemplateElement.childElementCount > 0) {
|
|
14530
|
-
markerTemplateElement.style.visibility =
|
|
15032
|
+
markerTemplateElement.style.visibility = 'visible';
|
|
14531
15033
|
for (var k = 0; k < markerTemplateElement.childElementCount; k++) {
|
|
14532
15034
|
this.markerTranslate(markerTemplateElement.childNodes[k], factor, x, y, scale, 'Template');
|
|
14533
15035
|
}
|
|
@@ -14601,23 +15103,23 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14601
15103
|
if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Hide') {
|
|
14602
15104
|
if (scale > 1) {
|
|
14603
15105
|
text = ((this.maps.dataLabelShape[l] * scale) >= zoomtextSize['width']) ? zoomtext : '';
|
|
14604
|
-
element.
|
|
15106
|
+
element.textContent = text;
|
|
14605
15107
|
}
|
|
14606
15108
|
else {
|
|
14607
15109
|
text = (this.maps.dataLabelShape[l] >= zoomtextSize['width']) ? zoomtext : '';
|
|
14608
|
-
element.
|
|
15110
|
+
element.textContent = text;
|
|
14609
15111
|
}
|
|
14610
15112
|
}
|
|
14611
15113
|
if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Trim') {
|
|
14612
15114
|
if (scale > 1) {
|
|
14613
15115
|
zoomtrimLabel = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
|
|
14614
15116
|
text = zoomtrimLabel;
|
|
14615
|
-
element.
|
|
15117
|
+
element.textContent = text;
|
|
14616
15118
|
}
|
|
14617
15119
|
else {
|
|
14618
15120
|
zoomtrimLabel = textTrim(this.maps.dataLabelShape[l], zoomtext, style);
|
|
14619
15121
|
text = zoomtrimLabel;
|
|
14620
|
-
element.
|
|
15122
|
+
element.textContent = text;
|
|
14621
15123
|
}
|
|
14622
15124
|
}
|
|
14623
15125
|
if (this.maps.layers[this.index].dataLabelSettings.intersectionAction === 'Hide') {
|
|
@@ -14628,11 +15130,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14628
15130
|
|| textLocations['heightTop'] > this.intersect[m]['heightBottom']
|
|
14629
15131
|
|| textLocations['heightBottom'] < this.intersect[m]['heightTop']) {
|
|
14630
15132
|
text = !isNullOrUndefined(text) ? text : zoomtext;
|
|
14631
|
-
element.
|
|
15133
|
+
element.textContent = text;
|
|
14632
15134
|
}
|
|
14633
15135
|
else {
|
|
14634
15136
|
text = '';
|
|
14635
|
-
element.
|
|
15137
|
+
element.textContent = text;
|
|
14636
15138
|
break;
|
|
14637
15139
|
}
|
|
14638
15140
|
}
|
|
@@ -14650,7 +15152,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14650
15152
|
if (scale > 1) {
|
|
14651
15153
|
trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), trimmedLable, style);
|
|
14652
15154
|
}
|
|
14653
|
-
element.
|
|
15155
|
+
element.textContent = trimmedLable;
|
|
14654
15156
|
}
|
|
14655
15157
|
else {
|
|
14656
15158
|
if (textLocations['leftWidth'] > this.intersect[j]['leftWidth']) {
|
|
@@ -14658,7 +15160,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14658
15160
|
var difference = width - (textLocations['rightWidth'] - textLocations['leftWidth']);
|
|
14659
15161
|
text = !isNullOrUndefined(text) ? text : zoomtext;
|
|
14660
15162
|
trimmedLable = textTrim(difference, text, style);
|
|
14661
|
-
element.
|
|
15163
|
+
element.textContent = trimmedLable;
|
|
14662
15164
|
break;
|
|
14663
15165
|
}
|
|
14664
15166
|
if (textLocations['leftWidth'] < this.intersect[j]['leftWidth']) {
|
|
@@ -14666,7 +15168,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14666
15168
|
var difference = Math.abs(width - (textLocations['rightWidth'] - textLocations['leftWidth']));
|
|
14667
15169
|
text = !isNullOrUndefined(text) ? text : zoomtext;
|
|
14668
15170
|
trimmedLable = textTrim(difference, text, style);
|
|
14669
|
-
element.
|
|
15171
|
+
element.textContent = trimmedLable;
|
|
14670
15172
|
break;
|
|
14671
15173
|
}
|
|
14672
15174
|
}
|
|
@@ -14675,7 +15177,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14675
15177
|
this.intersect.push(textLocations);
|
|
14676
15178
|
if (isNullOrUndefined(trimmedLable)) {
|
|
14677
15179
|
trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
|
|
14678
|
-
element.
|
|
15180
|
+
element.textContent = trimmedLable;
|
|
14679
15181
|
}
|
|
14680
15182
|
}
|
|
14681
15183
|
if (animate$$1 || duration > 0) {
|
|
@@ -14868,6 +15370,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14868
15370
|
(this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
|
|
14869
15371
|
this.applyTransform(this.maps, false);
|
|
14870
15372
|
};
|
|
15373
|
+
/**
|
|
15374
|
+
* @private
|
|
15375
|
+
*/
|
|
14871
15376
|
Zoom.prototype.toolBarZooming = function (zoomFactor, type) {
|
|
14872
15377
|
var _this = this;
|
|
14873
15378
|
var map = this.maps;
|
|
@@ -14886,9 +15391,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14886
15391
|
var prevTilePoint = map.tileTranslatePoint;
|
|
14887
15392
|
map.previousProjection = map.projectionType;
|
|
14888
15393
|
zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
|
|
14889
|
-
zoomFactor = (type === 'Reset') ?
|
|
15394
|
+
zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
|
|
14890
15395
|
zoomFactor = (minZoom > zoomFactor && type === 'ZoomIn') ? minZoom + 1 : zoomFactor;
|
|
14891
|
-
if ((!map.isTileMap) && (type === 'ZoomIn' ? zoomFactor >= minZoom && zoomFactor <= maxZoom : zoomFactor >= minZoom
|
|
15396
|
+
if ((!map.isTileMap) && (type === 'ZoomIn' ? zoomFactor >= minZoom && Math.round(zoomFactor) <= maxZoom : zoomFactor >= minZoom
|
|
14892
15397
|
|| map.isReset)) {
|
|
14893
15398
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14894
15399
|
var min = map.baseMapRectBounds['min'];
|
|
@@ -14973,6 +15478,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14973
15478
|
this.maps.zoomNotApplied = false;
|
|
14974
15479
|
}
|
|
14975
15480
|
};
|
|
15481
|
+
/**
|
|
15482
|
+
* @private
|
|
15483
|
+
*/
|
|
14976
15484
|
Zoom.prototype.createZoomingToolbars = function () {
|
|
14977
15485
|
var map = this.maps;
|
|
14978
15486
|
var zoomInElements;
|
|
@@ -14981,36 +15489,59 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14981
15489
|
id: map.element.id + '_Zooming_KitCollection',
|
|
14982
15490
|
opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
|
|
14983
15491
|
});
|
|
14984
|
-
var kitHeight = 16;
|
|
14985
|
-
var kitWidth = 16;
|
|
14986
15492
|
var xSpacing = 15;
|
|
14987
15493
|
var ySpacing = 15;
|
|
14988
|
-
var
|
|
14989
|
-
var
|
|
14990
|
-
|
|
15494
|
+
var toolbar = map.zoomSettings.toolbarSettings;
|
|
15495
|
+
var button = map.zoomSettings.toolbarSettings.buttonSettings;
|
|
15496
|
+
this.maps.toolbarProperties = {
|
|
15497
|
+
toolBarOrientation: toolbar.orientation === 'Horizontal' ? map.zoomSettings.toolBarOrientation : toolbar.orientation,
|
|
15498
|
+
highlightColor: button.highlightColor == null ? map.zoomSettings.highlightColor : button.highlightColor,
|
|
15499
|
+
selectionColor: button.selectionColor == null ? map.zoomSettings.selectionColor : button.selectionColor,
|
|
15500
|
+
horizontalAlignment: toolbar.horizontalAlignment === 'Far' ? map.zoomSettings.horizontalAlignment : toolbar.horizontalAlignment,
|
|
15501
|
+
verticalAlignment: toolbar.verticalAlignment === 'Near' ? map.zoomSettings.verticalAlignment : toolbar.verticalAlignment,
|
|
15502
|
+
color: button.color == null ? map.zoomSettings.color : button.color,
|
|
15503
|
+
shapeOpacity: button.opacity !== 1 ? button.opacity : 1,
|
|
15504
|
+
borderOpacity: button.borderOpacity !== 1 ? button.borderOpacity : 1
|
|
15505
|
+
};
|
|
15506
|
+
var cx = button.radius / 4;
|
|
15507
|
+
var cy = button.radius / 4;
|
|
15508
|
+
var radius = button.radius / 2;
|
|
15509
|
+
var padding = button.padding;
|
|
15510
|
+
var orientation = this.maps.toolbarProperties.toolBarOrientation;
|
|
15511
|
+
var toolbarCollection = map.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map(function (value) { return value; });
|
|
15512
|
+
var toolbarsCollection = toolbarCollection.length === 3 ? map.zoomSettings.toolbars : toolbarCollection;
|
|
15513
|
+
xSpacing = (button.radius / 4) + (button.borderWidth / 2) + padding;
|
|
15514
|
+
ySpacing = (button.radius / 4) + (button.borderWidth / 2) + padding;
|
|
14991
15515
|
var shadowElement = '<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';
|
|
14992
15516
|
shadowElement += '<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>';
|
|
14993
15517
|
shadowElement += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';
|
|
14994
|
-
var toolBarLength =
|
|
14995
|
-
var toolWidth = (
|
|
14996
|
-
var toolHeight = (
|
|
15518
|
+
var toolBarLength = toolbarCollection.length;
|
|
15519
|
+
var toolWidth = (orientation === 'Horizontal') ? ((toolBarLength * button.radius) + (toolBarLength * padding) + padding + (toolBarLength * button.borderWidth)) : (button.radius + button.borderWidth + (2 * padding));
|
|
15520
|
+
var toolHeight = (orientation === 'Horizontal') ? (button.radius + button.borderWidth + (2 * padding)) : ((toolBarLength * button.radius) + (toolBarLength * padding) + padding + (toolBarLength * button.borderWidth));
|
|
14997
15521
|
var defElement = map.renderer.createDefs();
|
|
14998
15522
|
defElement.innerHTML = shadowElement;
|
|
14999
15523
|
this.toolBarGroup.appendChild(defElement);
|
|
15000
|
-
var outerElement = map.renderer.drawRectangle(new RectOption(map.element.id + '_Zooming_Rect',
|
|
15001
|
-
outerElement.setAttribute('filter', 'url(#chart_shadow)');
|
|
15524
|
+
var outerElement = map.renderer.drawRectangle(new RectOption(map.element.id + '_Zooming_Rect', toolbar.backgroundColor, { color: toolbar.borderColor, width: toolbar.borderWidth, opacity: toolbar.borderOpacity }, toolbar.borderOpacity, new Rect((toolbar.borderWidth / 2), (toolbar.borderWidth / 2), (toolWidth - toolbar.borderWidth), (toolHeight - toolbar.borderWidth)), 0, 0));
|
|
15002
15525
|
this.toolBarGroup.appendChild(outerElement);
|
|
15003
|
-
|
|
15526
|
+
var scaleX = (button.radius - (button.borderWidth / 2)) / 30;
|
|
15004
15527
|
for (var i = 0; i < toolbarsCollection.length; i++) {
|
|
15528
|
+
if (i !== 0) {
|
|
15529
|
+
xSpacing = (map.toolbarProperties.toolBarOrientation === 'Horizontal') ? (xSpacing + (button.radius + padding) + button.borderWidth) : xSpacing;
|
|
15530
|
+
ySpacing = (map.toolbarProperties.toolBarOrientation === 'Horizontal') ? ySpacing : (ySpacing + (button.radius + padding) + button.borderWidth);
|
|
15531
|
+
}
|
|
15005
15532
|
var toolbar_1 = toolbarsCollection[i];
|
|
15533
|
+
var pathStroke = !isNullOrUndefined(this.maps.toolbarProperties.color) ? this.maps.toolbarProperties.color : this.maps.themeStyle.zoomFillColor;
|
|
15534
|
+
var borderColor = button.borderColor || this.maps.themeStyle.zoomFillColor;
|
|
15006
15535
|
this.currentToolbarEle = map.renderer.createGroup({
|
|
15007
15536
|
id: map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Group',
|
|
15008
15537
|
transform: 'translate( ' + xSpacing + ' ' + ySpacing + ' ) '
|
|
15009
15538
|
});
|
|
15010
15539
|
this.currentToolbarEle.setAttribute('class', 'e-maps-toolbar');
|
|
15011
|
-
|
|
15540
|
+
this.currentToolbarEle.appendChild(map.renderer.drawCircle(new CircleOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Rect', button.fill, { color: borderColor, width: button.borderWidth, opacity: button.borderOpacity }, button.opacity, cx, cy, radius, '')));
|
|
15541
|
+
var opacity = 1;
|
|
15012
15542
|
var direction = '';
|
|
15013
|
-
|
|
15543
|
+
var fill = button.fill;
|
|
15544
|
+
this.selectionColor = this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor;
|
|
15014
15545
|
switch (toolbar_1.toLowerCase()) {
|
|
15015
15546
|
case 'zoom': {
|
|
15016
15547
|
var fillColor_1 = void 0;
|
|
@@ -15018,36 +15549,51 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15018
15549
|
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,';
|
|
15019
15550
|
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';
|
|
15020
15551
|
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,';
|
|
15552
|
+
this.currentToolbarEle.setAttribute('class', (this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : ''));
|
|
15021
15553
|
if (this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
|
|
15022
15554
|
fillColor_1 = fill;
|
|
15023
|
-
strokeColor =
|
|
15555
|
+
strokeColor = pathStroke;
|
|
15024
15556
|
}
|
|
15025
15557
|
else if (this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
|
|
15026
15558
|
fillColor_1 = fill;
|
|
15027
|
-
strokeColor =
|
|
15559
|
+
strokeColor = pathStroke;
|
|
15560
|
+
}
|
|
15561
|
+
else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
|
|
15562
|
+
fillColor_1 = fill;
|
|
15563
|
+
strokeColor = pathStroke;
|
|
15564
|
+
}
|
|
15565
|
+
else if (!this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
|
|
15566
|
+
fillColor_1 = this.maps.themeStyle.zoomFillColor;
|
|
15567
|
+
strokeColor = pathStroke;
|
|
15028
15568
|
}
|
|
15029
15569
|
else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
|
|
15030
15570
|
fillColor_1 = fill;
|
|
15031
|
-
strokeColor =
|
|
15571
|
+
strokeColor = pathStroke;
|
|
15032
15572
|
}
|
|
15033
15573
|
else {
|
|
15034
15574
|
fillColor_1 = this.selectionColor;
|
|
15035
15575
|
strokeColor = this.selectionColor;
|
|
15036
15576
|
}
|
|
15037
|
-
|
|
15577
|
+
var zoomPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fillColor_1, 1, strokeColor, opacity, opacity, null, direction + '4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z'));
|
|
15578
|
+
zoomPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
15579
|
+
this.currentToolbarEle.appendChild(zoomPath);
|
|
15038
15580
|
this.zoomElements = this.currentToolbarEle;
|
|
15039
15581
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
15040
15582
|
break;
|
|
15041
15583
|
}
|
|
15042
15584
|
case 'zoomin':
|
|
15043
15585
|
direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
|
|
15044
|
-
|
|
15586
|
+
var zoomInPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Path', fill, 3, pathStroke, 1, 1, null, direction));
|
|
15587
|
+
zoomInPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
15588
|
+
this.currentToolbarEle.appendChild(zoomInPath);
|
|
15045
15589
|
zoomInElements = this.currentToolbarEle;
|
|
15046
15590
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
15047
15591
|
break;
|
|
15048
15592
|
case 'zoomout':
|
|
15049
15593
|
direction = 'M 0, 8 L 16, 8';
|
|
15050
|
-
|
|
15594
|
+
var zoomOutPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, fill, 3, pathStroke, 1, 1, null, direction));
|
|
15595
|
+
zoomOutPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
15596
|
+
this.currentToolbarEle.appendChild(zoomOutPath);
|
|
15051
15597
|
zoomOutElements = this.currentToolbarEle;
|
|
15052
15598
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
15053
15599
|
break;
|
|
@@ -15055,17 +15601,20 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15055
15601
|
var color = void 0;
|
|
15056
15602
|
direction = 'M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,';
|
|
15057
15603
|
direction += '11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z';
|
|
15604
|
+
this.currentToolbarEle.setAttribute('class', (this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : ''));
|
|
15058
15605
|
if (this.maps.zoomSettings.enablePanning && this.maps.zoomModule.isDragZoom) {
|
|
15059
|
-
color =
|
|
15606
|
+
color = this.selectionColor || this.maps.themeStyle.zoomFillColor;
|
|
15060
15607
|
}
|
|
15061
15608
|
else if (!this.maps.zoomSettings.enablePanning) {
|
|
15062
|
-
color =
|
|
15609
|
+
color = this.selectionColor || this.maps.themeStyle.zoomFillColor;
|
|
15063
15610
|
this.currentToolbarEle.setAttribute('class', '');
|
|
15064
15611
|
}
|
|
15065
15612
|
else {
|
|
15066
|
-
color = this.
|
|
15613
|
+
color = fill || this.maps.themeStyle.zoomFillColor;
|
|
15067
15614
|
}
|
|
15068
|
-
|
|
15615
|
+
var panPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1, color, 1, pathStroke, opacity, opacity, null, direction));
|
|
15616
|
+
panPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
15617
|
+
this.currentToolbarEle.appendChild(panPath);
|
|
15069
15618
|
this.panColor = color;
|
|
15070
15619
|
this.panElements = this.currentToolbarEle;
|
|
15071
15620
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
@@ -15075,16 +15624,18 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15075
15624
|
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,';
|
|
15076
15625
|
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,';
|
|
15077
15626
|
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,';
|
|
15078
|
-
|
|
15627
|
+
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'));
|
|
15628
|
+
resetPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
|
|
15629
|
+
this.currentToolbarEle.appendChild(resetPath);
|
|
15079
15630
|
this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
|
|
15080
15631
|
break;
|
|
15081
15632
|
}
|
|
15082
|
-
this.currentToolbarEle.appendChild(map.renderer.drawCircle(new CircleOption(map.element.id + '_Zooming_ToolBar_' + toolbar_1 + '_Rect', fill, { color: this.maps.themeStyle.zoomFillColor, width: 1 }, 1, 8, 8, 16, '')));
|
|
15083
|
-
xSpacing = (orientation === 'Horizontal') ? (xSpacing + (kitWidth + padding)) : xSpacing;
|
|
15084
|
-
ySpacing = (orientation === 'Horizontal') ? ySpacing : (ySpacing + (kitHeight + padding));
|
|
15085
15633
|
this.toolBarGroup.appendChild(this.currentToolbarEle);
|
|
15086
15634
|
}
|
|
15087
15635
|
};
|
|
15636
|
+
/**
|
|
15637
|
+
* @private
|
|
15638
|
+
*/
|
|
15088
15639
|
Zoom.prototype.performToolBarAction = function (e) {
|
|
15089
15640
|
var target = e.target;
|
|
15090
15641
|
e.stopImmediatePropagation();
|
|
@@ -15110,29 +15661,30 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15110
15661
|
Zoom.prototype.performZoomingByToolBar = function (type) {
|
|
15111
15662
|
var map = this.maps;
|
|
15112
15663
|
map.isReset = false;
|
|
15664
|
+
var scale = 0;
|
|
15665
|
+
var stateColor = this.fillColor || this.maps.themeStyle.zoomFillColor;
|
|
15113
15666
|
switch (type.toLowerCase()) {
|
|
15114
15667
|
case 'zoom':
|
|
15115
|
-
this.panColor =
|
|
15116
|
-
this.zoomColor = this.selectionColor;
|
|
15117
|
-
this.applySelection(this.zoomElements, this.
|
|
15118
|
-
this.applySelection(this.panElements, this.
|
|
15668
|
+
this.panColor = stateColor;
|
|
15669
|
+
this.zoomColor = this.maps.zoomSettings.enableSelectionZooming ? this.selectionColor : stateColor;
|
|
15670
|
+
this.applySelection(this.zoomElements, this.zoomColor);
|
|
15671
|
+
this.applySelection(this.panElements, this.panColor);
|
|
15672
|
+
this.isPan = false;
|
|
15673
|
+
this.isZoomSelection = this.maps.zoomSettings.enableSelectionZooming;
|
|
15119
15674
|
break;
|
|
15120
15675
|
case 'pan':
|
|
15121
|
-
|
|
15122
|
-
|
|
15123
|
-
}
|
|
15124
|
-
else {
|
|
15125
|
-
this.panColor = this.selectionColor;
|
|
15126
|
-
}
|
|
15127
|
-
this.zoomColor = this.fillColor;
|
|
15676
|
+
this.panColor = this.maps.zoomSettings.enablePanning ? this.selectionColor : stateColor;
|
|
15677
|
+
this.zoomColor = stateColor;
|
|
15128
15678
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
15129
15679
|
this.applySelection(this.zoomElements, this.selectionColor);
|
|
15130
15680
|
this.applySelection(this.panElements, this.panColor);
|
|
15131
15681
|
}
|
|
15132
15682
|
else {
|
|
15133
|
-
this.applySelection(this.zoomElements, this.fillColor);
|
|
15683
|
+
this.applySelection(this.zoomElements, (this.fillColor || stateColor));
|
|
15134
15684
|
this.applySelection(this.panElements, this.panColor);
|
|
15135
15685
|
}
|
|
15686
|
+
this.isPan = this.maps.zoomSettings.enablePanning;
|
|
15687
|
+
this.isZoomSelection = false;
|
|
15136
15688
|
break;
|
|
15137
15689
|
case 'zoomin':
|
|
15138
15690
|
map.staticMapZoom = map.tileZoomLevel;
|
|
@@ -15140,32 +15692,66 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15140
15692
|
map.staticMapZoom += 1;
|
|
15141
15693
|
}
|
|
15142
15694
|
this.toolBarZooming((map.isTileMap ? map.tileZoomLevel : map.scale) + 1, 'ZoomIn');
|
|
15695
|
+
scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
15696
|
+
if (!this.isZoomSelection) {
|
|
15697
|
+
if (scale === map.zoomSettings.maxZoom || scale > 1 || (scale === 1 && this.maps.isTileMap)) {
|
|
15698
|
+
this.applySelection(this.zoomElements, stateColor);
|
|
15699
|
+
this.applySelection(this.panElements, map.zoomSettings.enablePanning ? this.selectionColor : stateColor);
|
|
15700
|
+
}
|
|
15701
|
+
else if (scale === 1 && !this.maps.isTileMap) {
|
|
15702
|
+
this.applySelection(this.zoomElements, stateColor);
|
|
15703
|
+
this.applySelection(this.panElements, stateColor);
|
|
15704
|
+
}
|
|
15705
|
+
}
|
|
15143
15706
|
break;
|
|
15144
15707
|
case 'zoomout':
|
|
15145
15708
|
map.staticMapZoom = map.tileZoomLevel;
|
|
15146
15709
|
map.markerCenterLatitude = null;
|
|
15147
15710
|
map.markerCenterLongitude = null;
|
|
15148
15711
|
this.toolBarZooming((map.isTileMap ? map.tileZoomLevel : map.scale) - 1, 'ZoomOut');
|
|
15712
|
+
scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
15713
|
+
if (!this.isPan && this.isZoomSelection) {
|
|
15714
|
+
this.panColor = stateColor;
|
|
15715
|
+
this.zoomColor = this.selectionColor;
|
|
15716
|
+
this.applySelection(this.zoomElements, this.selectionColor);
|
|
15717
|
+
this.applySelection(this.panElements, this.panColor);
|
|
15718
|
+
}
|
|
15719
|
+
else {
|
|
15720
|
+
if (scale <= 1 && !map.isTileMap) {
|
|
15721
|
+
this.applySelection(this.panElements, stateColor);
|
|
15722
|
+
}
|
|
15723
|
+
else {
|
|
15724
|
+
this.applySelection(this.panElements, map.zoomSettings.enablePanning ? this.selectionColor : stateColor);
|
|
15725
|
+
}
|
|
15726
|
+
}
|
|
15149
15727
|
break;
|
|
15150
15728
|
case 'reset':
|
|
15151
15729
|
map.staticMapZoom = map.zoomSettings.enable ? map.zoomSettings.zoomFactor : 0;
|
|
15152
15730
|
map.markerCenterLatitude = null;
|
|
15153
15731
|
map.markerCenterLongitude = null;
|
|
15154
|
-
this.
|
|
15155
|
-
|
|
15156
|
-
|
|
15157
|
-
|
|
15732
|
+
this.isZoomSelection = false;
|
|
15733
|
+
this.isPan = this.isPanning = map.zoomSettings.enablePanning;
|
|
15734
|
+
this.toolBarZooming(map.zoomSettings.minZoom, 'Reset');
|
|
15735
|
+
if ((this.isPan && !this.isZoomSelection) || (!this.isPan && this.isZoomSelection)) {
|
|
15736
|
+
if (!this.maps.zoomSettings.enablePanning) {
|
|
15737
|
+
this.applySelection(this.zoomElements, this.selectionColor);
|
|
15738
|
+
this.applySelection(this.panElements, stateColor);
|
|
15739
|
+
}
|
|
15740
|
+
else {
|
|
15741
|
+
this.applySelection(this.zoomElements, stateColor);
|
|
15742
|
+
this.applySelection(this.panElements, this.selectionColor);
|
|
15743
|
+
}
|
|
15158
15744
|
}
|
|
15159
|
-
else {
|
|
15160
|
-
this.applySelection(this.zoomElements,
|
|
15161
|
-
this.applySelection(this.panElements,
|
|
15745
|
+
else if (!this.isPan && !this.isZoomSelection) {
|
|
15746
|
+
this.applySelection(this.zoomElements, stateColor);
|
|
15747
|
+
this.applySelection(this.panElements, stateColor);
|
|
15162
15748
|
}
|
|
15163
15749
|
}
|
|
15164
15750
|
this.panningStyle(type.toLowerCase());
|
|
15165
15751
|
};
|
|
15166
15752
|
Zoom.prototype.panningStyle = function (toolbar) {
|
|
15167
15753
|
var svg = getElementByID(this.maps.element.id + '_svg');
|
|
15168
|
-
if (toolbar === 'pan' || this.isPanning) {
|
|
15754
|
+
if (toolbar === 'pan' || (this.isPanning && toolbar !== 'reset')) {
|
|
15169
15755
|
svg.setAttribute('class', 'e-maps-panning');
|
|
15170
15756
|
}
|
|
15171
15757
|
else {
|
|
@@ -15180,22 +15766,50 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15180
15766
|
for (var i = 0; i < elements.childElementCount; i++) {
|
|
15181
15767
|
childElement = elements.childNodes[i];
|
|
15182
15768
|
if (childElement.tagName !== 'circle') {
|
|
15183
|
-
childElement.setAttribute('fill', color);
|
|
15769
|
+
childElement.setAttribute('fill', (elements.id.indexOf('Pan') > -1 ? color : 'transparent'));
|
|
15184
15770
|
childElement.setAttribute('stroke', color);
|
|
15185
15771
|
}
|
|
15186
15772
|
}
|
|
15187
15773
|
};
|
|
15774
|
+
/**
|
|
15775
|
+
* @private
|
|
15776
|
+
*/
|
|
15188
15777
|
Zoom.prototype.showTooltip = function (e) {
|
|
15189
15778
|
var text = e.target.id.split('_Zooming_ToolBar_')[1].split('_')[0];
|
|
15779
|
+
var tooltip = this.maps.zoomSettings.toolbarSettings.tooltipSettings;
|
|
15780
|
+
var tooltipSettings = {
|
|
15781
|
+
visible: tooltip.visible,
|
|
15782
|
+
fill: tooltip.fill,
|
|
15783
|
+
borderOpacity: tooltip.borderOpacity,
|
|
15784
|
+
borderWidth: tooltip.borderWidth,
|
|
15785
|
+
borderColor: tooltip.borderColor,
|
|
15786
|
+
fontColor: tooltip.fontColor,
|
|
15787
|
+
fontFamily: tooltip.fontFamily,
|
|
15788
|
+
fontStyle: tooltip.fontStyle,
|
|
15789
|
+
fontWeight: tooltip.fontWeight,
|
|
15790
|
+
fontSize: tooltip.fontSize || '10px',
|
|
15791
|
+
fontOpacity: tooltip.fontOpacity
|
|
15792
|
+
};
|
|
15793
|
+
tooltipSettings.fontFamily = this.maps.themeStyle.fontFamily;
|
|
15190
15794
|
if (!this.isTouch) {
|
|
15191
|
-
createTooltip('EJ2_Map_Toolbar_Tip', this.maps.getLocalizedLabel(text), (e.pageY + 10), (e.pageX + 10),
|
|
15795
|
+
createTooltip('EJ2_Map_Toolbar_Tip', this.maps.getLocalizedLabel(text), (e.pageY + 10), (e.pageX + 10), tooltipSettings);
|
|
15796
|
+
if (this.maps.isDevice) {
|
|
15797
|
+
clearTimeout(this.clearTimeout);
|
|
15798
|
+
this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
|
|
15799
|
+
}
|
|
15192
15800
|
}
|
|
15193
15801
|
};
|
|
15802
|
+
/**
|
|
15803
|
+
* @private
|
|
15804
|
+
*/
|
|
15194
15805
|
Zoom.prototype.removeTooltip = function () {
|
|
15195
15806
|
if (getElementByID('EJ2_Map_Toolbar_Tip')) {
|
|
15196
15807
|
remove(getElementByID('EJ2_Map_Toolbar_Tip'));
|
|
15197
15808
|
}
|
|
15198
15809
|
};
|
|
15810
|
+
/**
|
|
15811
|
+
* @private
|
|
15812
|
+
*/
|
|
15199
15813
|
Zoom.prototype.alignToolBar = function () {
|
|
15200
15814
|
var map = this.maps;
|
|
15201
15815
|
var padding = 10;
|
|
@@ -15210,12 +15824,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15210
15824
|
getElementByID(map.element.id + '_Secondary_Element').appendChild(element);
|
|
15211
15825
|
}
|
|
15212
15826
|
var toolBarSize = this.toolBarGroup.getBoundingClientRect();
|
|
15213
|
-
rectSVGObject.setAttribute('height', (toolBarSize.height +
|
|
15214
|
-
rectSVGObject.setAttribute('width', (toolBarSize.width +
|
|
15827
|
+
rectSVGObject.setAttribute('height', (toolBarSize.height + map.zoomSettings.toolbarSettings.borderWidth).toString());
|
|
15828
|
+
rectSVGObject.setAttribute('width', (toolBarSize.width + map.zoomSettings.toolbarSettings.borderWidth).toString());
|
|
15215
15829
|
var size = !isNullOrUndefined(map.totalRect) ? map.totalRect : map.mapAreaRect;
|
|
15216
15830
|
var x = 0;
|
|
15217
15831
|
var y = 0;
|
|
15218
|
-
switch (map.
|
|
15832
|
+
switch (map.toolbarProperties.verticalAlignment) {
|
|
15219
15833
|
case 'Near':
|
|
15220
15834
|
y = size.y;
|
|
15221
15835
|
break;
|
|
@@ -15226,7 +15840,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15226
15840
|
y = (size.height - toolBarSize.height) - padding;
|
|
15227
15841
|
break;
|
|
15228
15842
|
}
|
|
15229
|
-
switch (map.
|
|
15843
|
+
switch (map.toolbarProperties.horizontalAlignment) {
|
|
15230
15844
|
case 'Near':
|
|
15231
15845
|
x = size.x;
|
|
15232
15846
|
break;
|
|
@@ -15245,7 +15859,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15245
15859
|
var extraPosition = map.getExtraPosition();
|
|
15246
15860
|
element.style.left = x + extraPosition.x + 'px';
|
|
15247
15861
|
element.style.top = y + extraPosition.y + 'px';
|
|
15248
|
-
var color = this.maps.
|
|
15862
|
+
var color = this.maps.toolbarProperties.highlightColor || this.maps.themeStyle.zoomSelectionColor;
|
|
15249
15863
|
var css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
|
|
15250
15864
|
'.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
|
|
15251
15865
|
'.e-maps-popup-close { display: block; opacity: 0; }';
|
|
@@ -15253,6 +15867,141 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15253
15867
|
style.appendChild(document.createTextNode(css));
|
|
15254
15868
|
element.appendChild(style);
|
|
15255
15869
|
};
|
|
15870
|
+
/**
|
|
15871
|
+
* @private
|
|
15872
|
+
*/
|
|
15873
|
+
Zoom.prototype.removeToolbarOpacity = function (factor, id) {
|
|
15874
|
+
if (this.maps.zoomModule && this.maps.zoomSettings.enable) {
|
|
15875
|
+
if (getElementByID(this.maps.element.id + '_Zooming_KitCollection') && id.indexOf(this.maps.element.id + '_Zooming_') > -1) {
|
|
15876
|
+
if (this.maps.isDevice) {
|
|
15877
|
+
getElementByID(this.maps.element.id + '_Zooming_KitCollection').setAttribute('opacity', '1');
|
|
15878
|
+
this.removeToolbarClass('', '', '', '', '');
|
|
15879
|
+
}
|
|
15880
|
+
else {
|
|
15881
|
+
this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : '', 'e-maps-toolbar', 'e-maps-toolbar', this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : '', 'e-maps-toolbar');
|
|
15882
|
+
}
|
|
15883
|
+
var toolbarShapeOpacity = this.maps.toolbarProperties.shapeOpacity;
|
|
15884
|
+
var toolbarButtonOpacity = this.maps.toolbarProperties.borderOpacity;
|
|
15885
|
+
if (this.maps.isTileMap && (factor <= 1.1 || this.maps.zoomSettings.minZoom === factor)) {
|
|
15886
|
+
if (!this.maps.isDevice) {
|
|
15887
|
+
this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : '', 'e-maps-toolbar', '', this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : '', '');
|
|
15888
|
+
}
|
|
15889
|
+
if (this.maps.zoomSettings.enablePanning) {
|
|
15890
|
+
this.removePanColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
|
|
15891
|
+
}
|
|
15892
|
+
if (this.isZoomSelection && this.maps.zoomSettings.enableSelectionZooming && !this.maps.isReset) {
|
|
15893
|
+
this.removeZoomColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
|
|
15894
|
+
this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
|
|
15895
|
+
}
|
|
15896
|
+
this.removeZoomOpacity((this.maps.zoomSettings.enableSelectionZooming ? toolbarShapeOpacity : 0.3), (this.maps.zoomSettings.enableSelectionZooming ? toolbarButtonOpacity : 0.3), toolbarShapeOpacity, toolbarButtonOpacity, 0.3, 0.3, (this.maps.zoomSettings.enablePanning ? toolbarShapeOpacity : 0.3), (this.maps.zoomSettings.enablePanning ? toolbarButtonOpacity : 0.3), 0.3, 0.3);
|
|
15897
|
+
}
|
|
15898
|
+
else if ((factor <= 1.1 || this.maps.zoomSettings.minZoom === factor)) {
|
|
15899
|
+
if (!this.maps.isDevice) {
|
|
15900
|
+
this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : '', 'e-maps-toolbar', '', '', '');
|
|
15901
|
+
}
|
|
15902
|
+
if (!this.isZoomSelection && this.maps.zoomSettings.enablePanning) {
|
|
15903
|
+
this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
|
|
15904
|
+
}
|
|
15905
|
+
if (this.isZoomSelection && this.maps.zoomSettings.enableSelectionZooming && !this.maps.isReset) {
|
|
15906
|
+
this.removeZoomColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
|
|
15907
|
+
this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
|
|
15908
|
+
}
|
|
15909
|
+
this.removeZoomOpacity((this.maps.zoomSettings.enableSelectionZooming ? toolbarShapeOpacity : 0.3), (this.maps.zoomSettings.enableSelectionZooming ? toolbarButtonOpacity : 0.3), toolbarShapeOpacity, toolbarButtonOpacity, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3);
|
|
15910
|
+
}
|
|
15911
|
+
else if (factor < this.maps.zoomSettings.maxZoom) {
|
|
15912
|
+
if (!this.maps.isDevice) {
|
|
15913
|
+
this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : '', 'e-maps-toolbar', 'e-maps-toolbar', this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : '', 'e-maps-toolbar');
|
|
15914
|
+
}
|
|
15915
|
+
if (!this.maps.zoomModule.isZoomFinal) {
|
|
15916
|
+
this.removeZoomOpacity((this.maps.zoomSettings.enableSelectionZooming ? toolbarShapeOpacity : 0.3), (this.maps.zoomSettings.enableSelectionZooming ? toolbarButtonOpacity : 0.3), toolbarShapeOpacity, toolbarButtonOpacity, toolbarShapeOpacity, toolbarButtonOpacity, (this.maps.zoomSettings.enablePanning ? toolbarShapeOpacity : 0.3), (this.maps.zoomSettings.enablePanning ? toolbarButtonOpacity : 0.3), toolbarShapeOpacity, toolbarButtonOpacity);
|
|
15917
|
+
}
|
|
15918
|
+
else {
|
|
15919
|
+
this.maps.zoomModule.isZoomFinal = false;
|
|
15920
|
+
}
|
|
15921
|
+
if (this.isZoomSelection && this.maps.zoomSettings.enableSelectionZooming) {
|
|
15922
|
+
this.removeZoomColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
|
|
15923
|
+
if (this.maps.zoomModule.isPan && this.maps.zoomSettings.enablePanning) {
|
|
15924
|
+
this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
|
|
15925
|
+
}
|
|
15926
|
+
}
|
|
15927
|
+
else if (!this.isZoomSelection && this.maps.zoomSettings.enablePanning) {
|
|
15928
|
+
this.removePanColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
|
|
15929
|
+
if (this.maps.zoomSettings.enableSelectionZooming) {
|
|
15930
|
+
this.removeZoomColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
|
|
15931
|
+
}
|
|
15932
|
+
}
|
|
15933
|
+
}
|
|
15934
|
+
else {
|
|
15935
|
+
if (!this.maps.isDevice) {
|
|
15936
|
+
this.removeToolbarClass('', '', 'e-maps-toolbar', this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : '', 'e-maps-toolbar');
|
|
15937
|
+
}
|
|
15938
|
+
this.removeZoomOpacity(0.3, 0.3, 0.3, 0.3, toolbarShapeOpacity, toolbarButtonOpacity, (this.maps.zoomSettings.enablePanning ? toolbarShapeOpacity : 0.3), (this.maps.zoomSettings.enablePanning ? toolbarButtonOpacity : 0.3), toolbarShapeOpacity, toolbarButtonOpacity);
|
|
15939
|
+
if (this.maps.zoomSettings.enableSelectionZooming) {
|
|
15940
|
+
this.removeZoomColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
|
|
15941
|
+
}
|
|
15942
|
+
if (!this.isZoomSelection && this.maps.zoomSettings.enablePanning) {
|
|
15943
|
+
this.removePanColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
|
|
15944
|
+
}
|
|
15945
|
+
}
|
|
15946
|
+
}
|
|
15947
|
+
else {
|
|
15948
|
+
if (!this.maps.isDevice) {
|
|
15949
|
+
this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
|
|
15950
|
+
this.removeZoomColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
|
|
15951
|
+
this.removeZoomOpacity(1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
|
|
15952
|
+
}
|
|
15953
|
+
}
|
|
15954
|
+
}
|
|
15955
|
+
};
|
|
15956
|
+
Zoom.prototype.setOpacity = function (circleId, pathId, circleOpacity, pathOpacity) {
|
|
15957
|
+
if (getElementByID(this.maps.element.id + circleId)) {
|
|
15958
|
+
getElementByID(this.maps.element.id + circleId).setAttribute('stroke-opacity', circleOpacity.toString());
|
|
15959
|
+
getElementByID(this.maps.element.id + circleId).setAttribute('fill-opacity', circleOpacity.toString());
|
|
15960
|
+
getElementByID(this.maps.element.id + pathId).setAttribute('stroke-opacity', pathOpacity.toString());
|
|
15961
|
+
getElementByID(this.maps.element.id + pathId).setAttribute('fill-opacity', pathOpacity.toString());
|
|
15962
|
+
}
|
|
15963
|
+
};
|
|
15964
|
+
Zoom.prototype.removeZoomOpacity = function (zoomOpacity, zoomStrokeOpacity, zoomInOpacity, zoomInStrokeOpacity, zoomOutOpacity, zoomOutStrokeOpacity, panOpacity, panStrokeOpacity, resetOpacity, resetStrokeOpacity) {
|
|
15965
|
+
this.setOpacity('_Zooming_ToolBar_Zoom_Rect', '_Zooming_ToolBar_Zoom', zoomStrokeOpacity, zoomOpacity);
|
|
15966
|
+
this.setOpacity('_Zooming_ToolBar_ZoomIn_Rect', '_Zooming_ToolBar_ZoomIn_Path', zoomInStrokeOpacity, zoomInOpacity);
|
|
15967
|
+
this.setOpacity('_Zooming_ToolBar_ZoomOut_Rect', '_Zooming_ToolBar_ZoomOut', zoomOutStrokeOpacity, zoomOutOpacity);
|
|
15968
|
+
this.setOpacity('_Zooming_ToolBar_Pan_Rect', '_Zooming_ToolBar_Pan', panStrokeOpacity, panOpacity);
|
|
15969
|
+
this.setOpacity('_Zooming_ToolBar_Reset_Rect', '_Zooming_ToolBar_Reset', resetStrokeOpacity, resetOpacity);
|
|
15970
|
+
};
|
|
15971
|
+
/**
|
|
15972
|
+
* @private
|
|
15973
|
+
*/
|
|
15974
|
+
Zoom.prototype.removeToolbarClass = function (zoomClassStyle, zoomInClassStyle, zoomOutClassStyle, panClassStyle, resetClassStyle) {
|
|
15975
|
+
if (getElementByID(this.maps.element.id + '_Zooming_KitCollection')) {
|
|
15976
|
+
if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_ZoomIn_Group')) {
|
|
15977
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_ZoomIn_Group').setAttribute('class', zoomInClassStyle);
|
|
15978
|
+
}
|
|
15979
|
+
if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_ZoomOut_Group')) {
|
|
15980
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_ZoomOut_Group').setAttribute('class', zoomOutClassStyle);
|
|
15981
|
+
}
|
|
15982
|
+
if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_Reset_Group')) {
|
|
15983
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_Reset_Group').setAttribute('class', resetClassStyle);
|
|
15984
|
+
}
|
|
15985
|
+
if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_Zoom_Group') && this.maps.zoomSettings.enableSelectionZooming) {
|
|
15986
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_Zoom_Group').setAttribute('class', zoomClassStyle);
|
|
15987
|
+
}
|
|
15988
|
+
if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_Pan_Group') && this.maps.zoomSettings.enablePanning) {
|
|
15989
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_Pan_Group').setAttribute('class', panClassStyle);
|
|
15990
|
+
}
|
|
15991
|
+
}
|
|
15992
|
+
};
|
|
15993
|
+
Zoom.prototype.removePanColor = function (selectionColor) {
|
|
15994
|
+
if (getElementByID(this.maps.element.id + '_Zooming_ToolBar_Pan_Rect') && this.maps.zoomSettings.enablePanning) {
|
|
15995
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_Pan').setAttribute('fill', selectionColor);
|
|
15996
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_Pan').setAttribute('stroke', selectionColor);
|
|
15997
|
+
}
|
|
15998
|
+
};
|
|
15999
|
+
Zoom.prototype.removeZoomColor = function (selectionColor) {
|
|
16000
|
+
if (getElementByID(this.maps.element.id + '_Zooming_ToolBar_Zoom_Rect') && this.maps.zoomSettings.enableSelectionZooming) {
|
|
16001
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_Zoom').setAttribute('fill', 'transparent');
|
|
16002
|
+
getElementByID(this.maps.element.id + '_Zooming_ToolBar_Zoom').setAttribute('stroke', selectionColor);
|
|
16003
|
+
}
|
|
16004
|
+
};
|
|
15256
16005
|
/**
|
|
15257
16006
|
* To bind events.
|
|
15258
16007
|
*
|
|
@@ -15267,6 +16016,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15267
16016
|
EventHandler.add(element, 'mouseover', this.showTooltip, this);
|
|
15268
16017
|
EventHandler.add(element, 'mouseout', this.removeTooltip, this);
|
|
15269
16018
|
};
|
|
16019
|
+
/**
|
|
16020
|
+
* @private
|
|
16021
|
+
*/
|
|
15270
16022
|
Zoom.prototype.mapMouseWheel = function (e) {
|
|
15271
16023
|
if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
|
|
15272
16024
|
var map = this.maps;
|
|
@@ -15307,8 +16059,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15307
16059
|
this.performZooming(position, (value - delta), direction);
|
|
15308
16060
|
}
|
|
15309
16061
|
}
|
|
16062
|
+
this.removeToolbarOpacity(map.mapScaleValue, (!this.maps.isDevice ? (!isNullOrUndefined(e.target) ? e.target['id'] :
|
|
16063
|
+
this.maps.element.id) : this.maps.element.id + '_Zooming_'));
|
|
15310
16064
|
}
|
|
15311
16065
|
};
|
|
16066
|
+
/**
|
|
16067
|
+
* @private
|
|
16068
|
+
*/
|
|
15312
16069
|
Zoom.prototype.doubleClick = function (e) {
|
|
15313
16070
|
var pageX = e.pageX;
|
|
15314
16071
|
var pageY = e.pageY;
|
|
@@ -15328,6 +16085,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15328
16085
|
}
|
|
15329
16086
|
}
|
|
15330
16087
|
};
|
|
16088
|
+
/**
|
|
16089
|
+
* @private
|
|
16090
|
+
*/
|
|
15331
16091
|
Zoom.prototype.mouseDownHandler = function (e) {
|
|
15332
16092
|
var pageX;
|
|
15333
16093
|
var pageY;
|
|
@@ -15347,15 +16107,15 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15347
16107
|
target = e.target;
|
|
15348
16108
|
}
|
|
15349
16109
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
15350
|
-
this.isPanning = this.panColor !== this.selectionColor ? this.maps.zoomSettings.enablePanning
|
|
16110
|
+
this.isPan = this.isPanning = this.panColor !== this.selectionColor ? this.maps.zoomSettings.enablePanning
|
|
15351
16111
|
: this.zoomColor === this.selectionColor;
|
|
15352
16112
|
}
|
|
15353
16113
|
else {
|
|
15354
|
-
this.
|
|
15355
|
-
: this.zoomColor !== this.selectionColor;
|
|
16114
|
+
this.isPan = this.isPanning = !this.isZoomSelection;
|
|
15356
16115
|
}
|
|
15357
16116
|
this.mouseDownLatLong = { x: pageX, y: pageY };
|
|
15358
|
-
this.
|
|
16117
|
+
var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
16118
|
+
this.rectZoomingStart = ((this.isZoomSelection && scale < this.maps.zoomSettings.maxZoom) && this.maps.zoomSettings.enable);
|
|
15359
16119
|
this.mouseDownPoints = this.getMousePosition(pageX, pageY);
|
|
15360
16120
|
if (this.isTouch) {
|
|
15361
16121
|
this.firstMove = true;
|
|
@@ -15364,6 +16124,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15364
16124
|
}
|
|
15365
16125
|
this.isSingleClick = true;
|
|
15366
16126
|
};
|
|
16127
|
+
/**
|
|
16128
|
+
* @private
|
|
16129
|
+
*/
|
|
15367
16130
|
Zoom.prototype.mouseMoveHandler = function (e) {
|
|
15368
16131
|
var pageX;
|
|
15369
16132
|
var pageY;
|
|
@@ -15386,21 +16149,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15386
16149
|
if (getElementByID(map.element.id + '_Zooming_KitCollection')) {
|
|
15387
16150
|
if (target.id.indexOf('_Zooming_') > -1) {
|
|
15388
16151
|
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '1');
|
|
15389
|
-
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
15390
|
-
if (!this.maps.zoomSettings.enablePanning) {
|
|
15391
|
-
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
15392
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
15393
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
15394
|
-
}
|
|
15395
|
-
}
|
|
15396
|
-
}
|
|
15397
16152
|
}
|
|
15398
|
-
else {
|
|
16153
|
+
else if (!map.isDevice) {
|
|
15399
16154
|
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
15400
|
-
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
15401
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
15402
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|
|
15403
|
-
}
|
|
15404
16155
|
}
|
|
15405
16156
|
}
|
|
15406
16157
|
if (this.isTouch) {
|
|
@@ -15422,7 +16173,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15422
16173
|
this.mouseMovePoints = this.getMousePosition(pageX, pageY);
|
|
15423
16174
|
var targetId = e.target['id'];
|
|
15424
16175
|
var targetEle = e.target;
|
|
15425
|
-
if (zoom.enable && this.isPanning && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
|
|
16176
|
+
if (zoom.enable && this.isPanning && this.maps.markerDragId.indexOf('_MarkerIndex_') == -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
|
|
15426
16177
|
e.preventDefault();
|
|
15427
16178
|
this.maps.element.style.cursor = 'pointer';
|
|
15428
16179
|
this.mouseMoveLatLong = { x: pageX, y: pageY };
|
|
@@ -15436,11 +16187,19 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15436
16187
|
}
|
|
15437
16188
|
if (this.isTouch ? (touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
|
|
15438
16189
|
e.preventDefault();
|
|
15439
|
-
|
|
16190
|
+
var scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
|
|
16191
|
+
if (this.maps.zoomSettings.enableSelectionZooming && scale < this.maps.zoomSettings.maxZoom) {
|
|
15440
16192
|
this.drawZoomRectangle();
|
|
15441
16193
|
}
|
|
16194
|
+
else {
|
|
16195
|
+
this.rectZoomingStart = false;
|
|
16196
|
+
this.isPan = true;
|
|
16197
|
+
}
|
|
15442
16198
|
}
|
|
15443
16199
|
};
|
|
16200
|
+
/**
|
|
16201
|
+
* @private
|
|
16202
|
+
*/
|
|
15444
16203
|
Zoom.prototype.mouseUpHandler = function (e) {
|
|
15445
16204
|
var map = this.maps;
|
|
15446
16205
|
this.rectZoomingStart = false;
|
|
@@ -15463,6 +16222,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15463
16222
|
this.mouseMoveLatLong = { x: 0, y: 0 };
|
|
15464
16223
|
this.mouseDownLatLong = { x: 0, y: 0 };
|
|
15465
16224
|
};
|
|
16225
|
+
/**
|
|
16226
|
+
* @private
|
|
16227
|
+
*/
|
|
15466
16228
|
Zoom.prototype.mouseCancelHandler = function (e) {
|
|
15467
16229
|
this.isPanning = false;
|
|
15468
16230
|
this.isTouch = false;
|
|
@@ -15478,6 +16240,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15478
16240
|
*
|
|
15479
16241
|
* @param {PointerEvent} e - Specifies the pointer event.
|
|
15480
16242
|
* @returns {void}
|
|
16243
|
+
* @private
|
|
15481
16244
|
*/
|
|
15482
16245
|
Zoom.prototype.click = function (e) {
|
|
15483
16246
|
var map = this.maps;
|
|
@@ -15500,6 +16263,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15500
16263
|
}
|
|
15501
16264
|
}
|
|
15502
16265
|
};
|
|
16266
|
+
/**
|
|
16267
|
+
* @private
|
|
16268
|
+
*/
|
|
15503
16269
|
Zoom.prototype.getMousePosition = function (pageX, pageY) {
|
|
15504
16270
|
var map = this.maps;
|
|
15505
16271
|
var elementRect = map.element.getBoundingClientRect();
|
|
@@ -15511,6 +16277,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15511
16277
|
var positionY = elementRect.top + pageYOffset - clientTop;
|
|
15512
16278
|
return new Point(Math.abs(pageX - positionX), Math.abs(pageY - positionY));
|
|
15513
16279
|
};
|
|
16280
|
+
/**
|
|
16281
|
+
* @private
|
|
16282
|
+
*/
|
|
15514
16283
|
Zoom.prototype.addEventListener = function () {
|
|
15515
16284
|
if (this.maps.isDestroyed) {
|
|
15516
16285
|
return;
|
|
@@ -15523,6 +16292,9 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15523
16292
|
this.maps.on(Browser.touchEndEvent, this.mouseUpHandler, this);
|
|
15524
16293
|
EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this);
|
|
15525
16294
|
};
|
|
16295
|
+
/**
|
|
16296
|
+
* @private
|
|
16297
|
+
*/
|
|
15526
16298
|
Zoom.prototype.removeEventListener = function () {
|
|
15527
16299
|
if (this.maps.isDestroyed) {
|
|
15528
16300
|
return;
|
|
@@ -15678,7 +16450,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
15678
16450
|
}());
|
|
15679
16451
|
|
|
15680
16452
|
/**
|
|
15681
|
-
* This module enables the export to Image functionality in
|
|
16453
|
+
* This module enables the export to Image functionality in maps.
|
|
15682
16454
|
*
|
|
15683
16455
|
* @hidden
|
|
15684
16456
|
*/
|
|
@@ -15851,7 +16623,7 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
15851
16623
|
}());
|
|
15852
16624
|
|
|
15853
16625
|
/**
|
|
15854
|
-
* This module enables the export to PDF functionality in
|
|
16626
|
+
* This module enables the export to PDF functionality in maps.
|
|
15855
16627
|
*
|
|
15856
16628
|
* @hidden
|
|
15857
16629
|
*/
|
|
@@ -15870,7 +16642,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15870
16642
|
* @param {ExportType} type - Specifies the type of the document.
|
|
15871
16643
|
* @param {string} fileName - Specifies the name of the PDF document.
|
|
15872
16644
|
* @param {boolean} allowDownload - Specifies whether to download the document or not.
|
|
15873
|
-
* @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the
|
|
16645
|
+
* @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the maps.
|
|
15874
16646
|
* @returns {Promise<string>} - Returns "null" value when the allowDownload is set to false.
|
|
15875
16647
|
* @private
|
|
15876
16648
|
*/
|
|
@@ -16020,5 +16792,5 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
16020
16792
|
* exporting all modules from maps index
|
|
16021
16793
|
*/
|
|
16022
16794
|
|
|
16023
|
-
export { Maps, load, loaded, click, onclick, rightClick, doubleClick, resize, tooltipRender, shapeSelected, shapeHighlight, mousemove, mouseup, mousedown, layerRendering, shapeRendering, markerRendering, markerClusterRendering, markerClick, markerClusterClick, markerMouseMove, markerClusterMouseMove, dataLabelRendering, bubbleRendering, bubbleClick, bubbleMouseMove, animationComplete, legendRendering, annotationRendering, itemSelection, itemHighlight, beforePrint, zoomIn, zoomOut, pan, Annotation, Arrow, Font, Border, CenterPosition, TooltipSettings, Margin, ConnectorLineSettings, MarkerClusterSettings, MarkerClusterData, ColorMappingSettings, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, SelectionSettings, HighlightSettings, NavigationLineSettings, BubbleSettings, CommonTitleSettings, SubTitleSettings, TitleSettings, ZoomSettings, ToggleLegendSettings, LegendSettings, DataLabelSettings, ShapeSettings, MarkerBase, MarkerSettings, LayerSettings, Tile, MapsAreaSettings, Size, stringToNumber, calculateSize, createSvg, getMousePosition, degreesToRadians, radiansToDegrees, convertGeoToPoint, convertTileLatLongToPoint, xToCoordinate, yToCoordinate, aitoff, roundTo, sinci, acos, calculateBound, triggerDownload, Point, MinMax, GeoLocation, measureText, TextOption, PathOption, ColorValue, RectOption, CircleOption, PolygonOption, PolylineOption, LineOption, Line, MapLocation, Rect, PatternOptions, renderTextElement, convertElement, formatValue, convertStringToValue, convertElementFromLabel, drawSymbols, getValueFromObject, markerColorChoose, markerShapeChoose, clusterTemplate, mergeSeparateCluster, clusterSeparate, marker, markerTemplate, maintainSelection, maintainStyleClass, appendShape, drawCircle, drawRectangle, drawPath, drawPolygon, drawPolyline, drawLine, calculateShapes, drawDiamond, drawTriangle, drawCross, drawHorizontalLine, drawVerticalLine, drawStar, drawBalloon, drawPattern, getFieldData, checkShapeDataFields, checkPropertyPath, filter, getRatioOfBubble, findMidPointOfPolygon, isCustomPath, textTrim, findPosition, removeElement, calculateCenterFromPixel, getTranslate, getZoomTranslate, fixInitialScaleForTile, getElementByID, getClientElement, Internalize, getTemplateFunction, getElement, getShapeData, triggerShapeEvent, getElementsByClassName, querySelector, getTargetElement, createStyle, customizeStyle, triggerItemSelectionEvent, removeClass, elementAnimate, timeout, showTooltip, wordWrap, createTooltip, drawSymbol, renderLegendShape, getElementOffset, changeBorderWidth, changeNavaigationLineWidth, targetTouches, calculateScale, getDistance, getTouches, getTouchCenter, sum, zoomAnimate, animate, MapAjax, smoothTranslate, compareZoomFactor, calculateZoomLevel, processResult, LayerPanel, Bubble, BingMap, Marker, ColorMapping, DataLabel, NavigationLine, Legend, Highlight, Selection, MapsTooltip, Zoom, Annotations, Print, ImageExport, PdfExport };
|
|
16795
|
+
export { Maps, load, loaded, click, onclick, rightClick, doubleClick, resize, tooltipRender, shapeSelected, shapeHighlight, mousemove, mouseup, mousedown, layerRendering, shapeRendering, markerRendering, markerClusterRendering, markerClick, markerDragStart, markerDragEnd, markerClusterClick, markerMouseMove, markerClusterMouseMove, dataLabelRendering, bubbleRendering, bubbleClick, bubbleMouseMove, animationComplete, legendRendering, annotationRendering, itemSelection, itemHighlight, beforePrint, zoomIn, zoomOut, pan, Annotation, Arrow, Font, ZoomToolbarButtonSettings, ZoomToolbarTooltipSettings, ZoomToolbarSettings, Border, CenterPosition, TooltipSettings, Margin, ConnectorLineSettings, MarkerClusterSettings, MarkerClusterData, ColorMappingSettings, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, SelectionSettings, HighlightSettings, NavigationLineSettings, BubbleSettings, CommonTitleSettings, SubTitleSettings, TitleSettings, ZoomSettings, ToggleLegendSettings, LegendSettings, DataLabelSettings, ShapeSettings, MarkerBase, MarkerSettings, LayerSettings, Tile, MapsAreaSettings, Size, stringToNumber, calculateSize, createSvg, getMousePosition, degreesToRadians, radiansToDegrees, convertGeoToPoint, convertTileLatLongToPoint, xToCoordinate, yToCoordinate, aitoff, roundTo, sinci, acos, calculateBound, triggerDownload, Point, MinMax, GeoLocation, measureText, TextOption, PathOption, ColorValue, RectOption, CircleOption, PolygonOption, PolylineOption, LineOption, Line, MapLocation, Rect, PatternOptions, renderTextElement, convertElement, formatValue, convertStringToValue, convertElementFromLabel, drawSymbols, getValueFromObject, markerColorChoose, markerShapeChoose, clusterTemplate, mergeSeparateCluster, clusterSeparate, marker, markerTemplate, maintainSelection, maintainStyleClass, appendShape, drawCircle, drawRectangle, drawPath, drawPolygon, drawPolyline, drawLine, calculateShapes, drawDiamond, drawTriangle, drawCross, drawHorizontalLine, drawVerticalLine, drawStar, drawBalloon, drawPattern, getFieldData, checkShapeDataFields, checkPropertyPath, filter, getRatioOfBubble, findMidPointOfPolygon, isCustomPath, textTrim, findPosition, removeElement, calculateCenterFromPixel, getTranslate, getZoomTranslate, fixInitialScaleForTile, getElementByID, getClientElement, Internalize, getTemplateFunction, getElement, getShapeData, triggerShapeEvent, getElementsByClassName, querySelector, getTargetElement, createStyle, customizeStyle, triggerItemSelectionEvent, removeClass, elementAnimate, timeout, showTooltip, wordWrap, createTooltip, getHexColor, drawSymbol, renderLegendShape, getElementOffset, changeBorderWidth, changeNavaigationLineWidth, targetTouches, calculateScale, getDistance, getTouches, getTouchCenter, sum, zoomAnimate, animate, MapAjax, smoothTranslate, compareZoomFactor, calculateZoomLevel, processResult, LayerPanel, Bubble, BingMap, Marker, ColorMapping, DataLabel, NavigationLine, Legend, Highlight, Selection, MapsTooltip, Zoom, Annotations, Print, ImageExport, PdfExport };
|
|
16024
16796
|
//# sourceMappingURL=ej2-maps.es5.js.map
|