@syncfusion/ej2-maps 20.4.54 → 21.1.37

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +5 -27
  2. package/dist/ej2-maps.min.js +2 -2
  3. package/dist/ej2-maps.umd.min.js +2 -2
  4. package/dist/ej2-maps.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-maps.es2015.js +952 -222
  6. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  7. package/dist/es6/ej2-maps.es5.js +967 -222
  8. package/dist/es6/ej2-maps.es5.js.map +1 -1
  9. package/dist/global/ej2-maps.min.js +2 -2
  10. package/dist/global/ej2-maps.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +13 -13
  13. package/src/maps/layers/bubble.d.ts +2 -0
  14. package/src/maps/layers/bubble.js +2 -1
  15. package/src/maps/layers/color-mapping.d.ts +1 -0
  16. package/src/maps/layers/color-mapping.js +1 -0
  17. package/src/maps/layers/data-label.d.ts +1 -0
  18. package/src/maps/layers/data-label.js +1 -0
  19. package/src/maps/layers/layer-panel.js +1 -0
  20. package/src/maps/layers/legend.d.ts +2 -0
  21. package/src/maps/layers/legend.js +2 -0
  22. package/src/maps/layers/marker.d.ts +5 -0
  23. package/src/maps/layers/marker.js +41 -2
  24. package/src/maps/layers/navigation-selected-line.d.ts +1 -0
  25. package/src/maps/layers/navigation-selected-line.js +1 -0
  26. package/src/maps/maps-model.d.ts +47 -33
  27. package/src/maps/maps.d.ts +138 -88
  28. package/src/maps/maps.js +188 -56
  29. package/src/maps/model/base-model.d.ts +535 -230
  30. package/src/maps/model/base.d.ts +540 -263
  31. package/src/maps/model/base.js +168 -28
  32. package/src/maps/model/constants.d.ts +12 -0
  33. package/src/maps/model/constants.js +12 -0
  34. package/src/maps/model/export-image.d.ts +1 -1
  35. package/src/maps/model/export-image.js +1 -1
  36. package/src/maps/model/export-pdf.d.ts +2 -2
  37. package/src/maps/model/export-pdf.js +2 -2
  38. package/src/maps/model/interface.d.ts +137 -108
  39. package/src/maps/model/theme.d.ts +1 -0
  40. package/src/maps/model/theme.js +1 -0
  41. package/src/maps/user-interaction/annotation.d.ts +2 -0
  42. package/src/maps/user-interaction/annotation.js +2 -0
  43. package/src/maps/user-interaction/highlight.d.ts +1 -0
  44. package/src/maps/user-interaction/highlight.js +1 -0
  45. package/src/maps/user-interaction/selection.d.ts +1 -0
  46. package/src/maps/user-interaction/selection.js +1 -0
  47. package/src/maps/user-interaction/tooltip.d.ts +16 -0
  48. package/src/maps/user-interaction/tooltip.js +23 -6
  49. package/src/maps/user-interaction/zoom.d.ts +99 -3
  50. package/src/maps/user-interaction/zoom.js +405 -100
  51. package/src/maps/utils/enum.d.ts +105 -91
  52. package/src/maps/utils/helper.d.ts +75 -15
  53. package/src/maps/utils/helper.js +118 -32
@@ -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';
@@ -8,7 +8,7 @@ import { PdfBitmap, PdfDocument, PdfPageOrientation } from '@syncfusion/ej2-pdf-
8
8
  * Helper functions for maps control
9
9
  */
10
10
  /**
11
- * Maps internal use of `Size` type
11
+ * Specifies the size information of an element.
12
12
  */
13
13
  class Size {
14
14
  constructor(width, height) {
@@ -35,6 +35,7 @@ function stringToNumber(value, containerSize) {
35
35
  *
36
36
  * @param {Maps} maps Specifies the maps instance
37
37
  * @returns {void}
38
+ * @private
38
39
  */
39
40
  function calculateSize(maps) {
40
41
  maps.element.style.height = !isNullOrUndefined(maps.height) ? maps.height : 'auto';
@@ -58,6 +59,7 @@ function calculateSize(maps) {
58
59
  *
59
60
  * @param {Maps} maps Specifies the map instance
60
61
  * @returns {void}
62
+ * @private
61
63
  */
62
64
  function createSvg(maps) {
63
65
  maps.renderer = new SvgRenderer(maps.element.id);
@@ -79,6 +81,7 @@ function createSvg(maps) {
79
81
  * @param {number} pageY - Specifies the pageY.
80
82
  * @param {Element} element - Specifies the element.
81
83
  * @returns {MapLocation} - Returns the location.
84
+ * @private
82
85
  */
83
86
  function getMousePosition(pageX, pageY, element) {
84
87
  const elementRect = element.getBoundingClientRect();
@@ -95,6 +98,7 @@ function getMousePosition(pageX, pageY, element) {
95
98
  *
96
99
  * @param {number} deg Specifies the degree value
97
100
  * @returns {number} Returns the number
101
+ * @private
98
102
  */
99
103
  function degreesToRadians(deg) {
100
104
  return deg * (Math.PI / 180);
@@ -104,6 +108,7 @@ function degreesToRadians(deg) {
104
108
  *
105
109
  * @param {number} radian Specifies the radian value
106
110
  * @returns {number} Returns the number
111
+ * @private
107
112
  */
108
113
  function radiansToDegrees(radian) {
109
114
  return radian * (180 / Math.PI);
@@ -117,6 +122,7 @@ function radiansToDegrees(radian) {
117
122
  * @param {LayerSettings} layer - Specifies the layer settings.
118
123
  * @param {Maps} mapModel - Specifies the maps.
119
124
  * @returns {Point} - Returns the point values.
125
+ * @private
120
126
  */
121
127
  function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
122
128
  const mapSize = new Size(mapModel.mapAreaRect.width, mapModel.mapAreaRect.height);
@@ -200,6 +206,7 @@ function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
200
206
  * @param {MapLocation} tileTranslatePoint Specifies the tile translate point
201
207
  * @param {boolean} isMapCoordinates Specifies the boolean value
202
208
  * @returns {MapLocation} Returns the location value
209
+ * @private
203
210
  */
204
211
  function convertTileLatLongToPoint(center, zoomLevel, tileTranslatePoint, isMapCoordinates) {
205
212
  const size = Math.pow(2, zoomLevel) * 256;
@@ -220,6 +227,7 @@ function convertTileLatLongToPoint(center, zoomLevel, tileTranslatePoint, isMapC
220
227
  * @param {Maps} mapObject - Specifies the maps.
221
228
  * @param {number} val - Specifies the value.
222
229
  * @returns {number} - Returns the number.
230
+ * @private
223
231
  */
224
232
  function xToCoordinate(mapObject, val) {
225
233
  const longitudeMinMax = mapObject.baseMapBounds.longitude;
@@ -233,6 +241,7 @@ function xToCoordinate(mapObject, val) {
233
241
  * @param {Maps} mapObject - Specifies the maps.
234
242
  * @param {number} val - Specifies the value.
235
243
  * @returns {number} - Returns the number.
244
+ * @private
236
245
  */
237
246
  function yToCoordinate(mapObject, val) {
238
247
  const latitudeMinMax = mapObject.baseMapBounds.latitude;
@@ -244,6 +253,7 @@ function yToCoordinate(mapObject, val) {
244
253
  * @param {number} x - Specifies the x value.
245
254
  * @param {number} y - Specifies the y value.
246
255
  * @returns {Point} - Returns the point value.
256
+ * @private
247
257
  */
248
258
  function aitoff(x, y) {
249
259
  const cosy = Math.cos(y);
@@ -256,6 +266,7 @@ function aitoff(x, y) {
256
266
  * @param {number} a - Specifies the a value
257
267
  * @param {number} b - Specifies the b value
258
268
  * @returns {number} - Returns the number
269
+ * @private
259
270
  */
260
271
  function roundTo(a, b) {
261
272
  const c = Math.pow(10, b);
@@ -265,6 +276,7 @@ function roundTo(a, b) {
265
276
  *
266
277
  * @param {number} x - Specifies the x value
267
278
  * @returns {number} - Returns the number
279
+ * @private
268
280
  */
269
281
  function sinci(x) {
270
282
  return x / Math.sin(x);
@@ -273,6 +285,7 @@ function sinci(x) {
273
285
  *
274
286
  * @param {number} a - Specifies the a value
275
287
  * @returns {number} - Returns the number
288
+ * @private
276
289
  */
277
290
  function acos(a) {
278
291
  return Math.acos(a);
@@ -284,6 +297,7 @@ function acos(a) {
284
297
  * @param {number} min Specifies the minimum value
285
298
  * @param {number} max Specifies the maximum value
286
299
  * @returns {number} Returns the value
300
+ * @private
287
301
  */
288
302
  function calculateBound(value, min, max) {
289
303
  if (!isNullOrUndefined(min)) {
@@ -302,6 +316,7 @@ function calculateBound(value, min, max) {
302
316
  * @param {string} url Specifies the url
303
317
  * @param {boolean} isDownload Specifies whether download a file.
304
318
  * @returns {void}
319
+ * @private
305
320
  */
306
321
  function triggerDownload(fileName, type, url, isDownload) {
307
322
  createElement('a', {
@@ -316,7 +331,7 @@ function triggerDownload(fileName, type, url, isDownload) {
316
331
  }));
317
332
  }
318
333
  /**
319
- * Map internal class for point
334
+ * Specifies the information of the position of the point in maps.
320
335
  */
321
336
  class Point {
322
337
  constructor(x, y) {
@@ -357,7 +372,7 @@ function measureText(text, font) {
357
372
  measureObject = createElement('text', { id: 'mapsmeasuretext' });
358
373
  document.body.appendChild(measureObject);
359
374
  }
360
- measureObject.innerHTML = text;
375
+ measureObject.innerText = text;
361
376
  measureObject.style.position = 'absolute';
362
377
  if (typeof (font.size) === 'number') {
363
378
  measureObject.style.fontSize = (font.size) + 'px';
@@ -494,6 +509,7 @@ class LineOption extends PathOption {
494
509
  * Internal use of line
495
510
  *
496
511
  * @property {number} Line - Specifies the line class
512
+ * @private
497
513
  */
498
514
  class Line {
499
515
  constructor(x1, y1, x2, y2) {
@@ -506,6 +522,7 @@ class Line {
506
522
  /**
507
523
  * Internal use of map location type
508
524
  *
525
+ * @private
509
526
  */
510
527
  class MapLocation {
511
528
  constructor(x, y) {
@@ -530,6 +547,7 @@ class Rect {
530
547
  * Internal use for pattern creation.
531
548
  *
532
549
  * @property {PatternOptions} PatternOptions - Specifies the pattern option class.
550
+ * @private
533
551
  */
534
552
  class PatternOptions {
535
553
  constructor(id, x, y, width, height, patternUnits = 'userSpaceOnUse', patternContentUnits = 'userSpaceOnUse', patternTransform = '', href = '') {
@@ -640,6 +658,7 @@ function convertElement(element, markerId, data, index, mapObj) {
640
658
  * @param {string} value - Specifies the value
641
659
  * @param {Maps} maps - Specifies the instance of the maps
642
660
  * @returns {string} - Returns the string value
661
+ * @private
643
662
  */
644
663
  function formatValue(value, maps) {
645
664
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -661,6 +680,7 @@ function formatValue(value, maps) {
661
680
  * @param {any} data - Specifies the data
662
681
  * @param {Maps} maps - Specifies the instance of the maps
663
682
  * @returns {string} - Returns the string value
683
+ * @private
664
684
  */
665
685
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
666
686
  function convertStringToValue(stringTemplate, format, data, maps) {
@@ -691,6 +711,7 @@ function convertStringToValue(stringTemplate, format, data, maps) {
691
711
  * @param {number} index - Specifies the index
692
712
  * @param {Maps} mapObj - Specifies the map object
693
713
  * @returns {HTMLElement} - Returns the html element
714
+ * @private
694
715
  */
695
716
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
696
717
  function convertElementFromLabel(element, labelId, data, index, mapObj) {
@@ -720,6 +741,7 @@ function convertElementFromLabel(element, labelId, data, index, mapObj) {
720
741
  * @param {Element} markerCollection - Specifies the marker collection
721
742
  * @param {Maps} maps - Specifies the instance of the maps
722
743
  * @returns {Element} - Returns the element
744
+ * @private
723
745
  */
724
746
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
725
747
  function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCollection, maps) {
@@ -752,7 +774,7 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
752
774
  }
753
775
  else if (shape === 'Image') {
754
776
  x = location.x - (size.width / 2);
755
- y = location.y - size.height;
777
+ y = location.y - (size.height / 2);
756
778
  merge(pathOptions, { 'href': imageUrl, 'height': size.height, 'width': size.width, x: x, y: y });
757
779
  markerEle = maps.renderer.drawImage(pathOptions);
758
780
  }
@@ -766,6 +788,7 @@ function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCol
766
788
  * @param {any} data - Specifies the data
767
789
  * @param {string} value - Specifies the value
768
790
  * @returns {any} - Returns the data
791
+ * @private
769
792
  */
770
793
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
771
794
  function getValueFromObject(data, value) {
@@ -787,6 +810,7 @@ function getValueFromObject(data, value) {
787
810
  * @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
788
811
  * @param {any} data - Specifies the data
789
812
  * @returns {IMarkerRenderingEventArgs} - Returns the arguments
813
+ * @private
790
814
  */
791
815
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
792
816
  function markerColorChoose(eventArgs, data) {
@@ -803,6 +827,7 @@ function markerColorChoose(eventArgs, data) {
803
827
  * @param {IMarkerRenderingEventArgs} eventArgs - Specifies the event arguments
804
828
  * @param {any} data - Specifies the data
805
829
  * @returns {IMarkerRenderingEventArgs} - Returns the arguments
830
+ * @private
806
831
  */
807
832
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
808
833
  function markerShapeChoose(eventArgs, data) {
@@ -838,6 +863,7 @@ function markerShapeChoose(eventArgs, data) {
838
863
  * @param {boolean} check - Specifies the boolean value
839
864
  * @param {boolean} zoomCheck - Specifies the boolean value
840
865
  * @returns {void}
866
+ * @private
841
867
  */
842
868
  function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerCollection, layerElement, check, zoomCheck) {
843
869
  let bounds1;
@@ -963,14 +989,13 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
963
989
  const clusterID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_cluster_' + (m);
964
990
  const labelID = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_dataIndex_' + dataIndex + '_cluster_' + (m) + '_datalabel_' + m;
965
991
  m++;
966
- const imageShapeY = shapeCustom['shape'] === 'Image' ? shapeCustom['size']['height'] / 2 : 0;
967
- const ele = drawSymbols(shapeCustom['shape'], shapeCustom['imageUrl'], { x: 0, y: imageShapeY }, clusterID, shapeCustom, markerCollection, maps);
992
+ const ele = drawSymbols(shapeCustom['shape'], shapeCustom['imageUrl'], { x: 0, y: 0 }, clusterID, shapeCustom, markerCollection, maps);
968
993
  ele.setAttribute('transform', 'translate( ' + tempX + ' ' + tempY + ' )');
969
994
  if (eventArg.shape === 'Balloon') {
970
- ele.children[0].innerHTML = indexCollection.toString();
995
+ ele.children[0].innerText = indexCollection.toString();
971
996
  }
972
997
  else {
973
- ele.innerHTML = indexCollection.toString();
998
+ ele.innerText = indexCollection.toString();
974
999
  }
975
1000
  options = new TextOption(labelID, (0), postionY, 'middle', (colloideBounds.length + 1).toString(), '', '');
976
1001
  textElement = renderTextElement(options, style, style.color, markerCollection);
@@ -1052,6 +1077,7 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
1052
1077
  * @param {Maps} maps - Specifies the instance of the maps
1053
1078
  * @param {Element | HTMLElement} markerElement - Specifies the marker element
1054
1079
  * @returns {void}
1080
+ * @private
1055
1081
  */
1056
1082
  function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
1057
1083
  const layerIndex = sameMarkerData[0].layerIndex;
@@ -1080,6 +1106,7 @@ function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
1080
1106
  * @param {Element | HTMLElement} markerElement - Specifies the marker element
1081
1107
  * @param {boolean} isDom - Specifies the boolean value
1082
1108
  * @returns {void}
1109
+ * @private
1083
1110
  */
1084
1111
  function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1085
1112
  const layerIndex = sameMarkerData[0].layerIndex;
@@ -1174,6 +1201,7 @@ function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
1174
1201
  * @param {Maps} maps - Specifies the instance of the maps
1175
1202
  * @param {Element} markerCollection - Specifies the marker collection
1176
1203
  * @returns {Element} - Returns the element
1204
+ * @private
1177
1205
  */
1178
1206
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1179
1207
  function marker(eventArgs, markerSettings, markerData, dataIndex, location, transPoint, markerID, offset, scale, maps, markerCollection) {
@@ -1213,6 +1241,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
1213
1241
  * @param {Point} offset - Specifies the offset value
1214
1242
  * @param {Maps} maps - Specifies the instance of the maps
1215
1243
  * @returns {HTMLElement} - Returns the html element
1244
+ * @private
1216
1245
  */
1217
1246
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1218
1247
  function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
@@ -1281,11 +1310,12 @@ function maintainSelection(elementId, elementClass, element, className) {
1281
1310
  function maintainStyleClass(id, idClass, fill, opacity, borderColor, borderWidth, maps) {
1282
1311
  if (!getElement(id)) {
1283
1312
  const styleClass = createElement('style', {
1284
- id: id, innerHTML: '.' + idClass + '{fill:'
1285
- + fill + ';' + 'opacity:' + opacity + ';' +
1286
- 'stroke-width:' + borderWidth + ';' +
1287
- 'stroke:' + borderColor + ';' + '}'
1313
+ id: id
1288
1314
  });
1315
+ styleClass.innerText = '.' + idClass + '{fill:'
1316
+ + fill + ';' + 'opacity:' + opacity + ';' +
1317
+ 'stroke-width:' + borderWidth + ';' +
1318
+ 'stroke:' + borderColor + ';' + '}';
1289
1319
  maps.shapeSelectionClass = styleClass;
1290
1320
  document.body.appendChild(styleClass);
1291
1321
  }
@@ -1556,7 +1586,7 @@ function drawBalloon(maps, options, size, location, type, element) {
1556
1586
  const height = size.height;
1557
1587
  let pathElement;
1558
1588
  location.x -= width / 2;
1559
- location.y -= height;
1589
+ location.y -= height / 2;
1560
1590
  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' +
1561
1591
  'c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z';
1562
1592
  const balloon = maps.renderer.drawPath(options);
@@ -1626,6 +1656,7 @@ function getFieldData(dataSource, fields) {
1626
1656
  * @param {string | string[]} propertyPath - Specifies the property path
1627
1657
  * @param {LayerSettingsModel} layer - Specifies the layer settings
1628
1658
  * @returns {number} - Returns the number
1659
+ * @private
1629
1660
  */
1630
1661
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1631
1662
  function checkShapeDataFields(dataSource, properties, dataPath, propertyPath, layer) {
@@ -1678,6 +1709,7 @@ function checkPropertyPath(shapeData, shapePropertyPath, shape) {
1678
1709
  * @param {number} start - Specifies the start value
1679
1710
  * @param {number} end - Specifies the end value
1680
1711
  * @returns {MapLocation[]} - Returns the location
1712
+ * @private
1681
1713
  */
1682
1714
  function filter(points, start, end) {
1683
1715
  const pointObject = [];
@@ -1697,6 +1729,7 @@ function filter(points, start, end) {
1697
1729
  * @param {number} minValue - Specifies the minValue
1698
1730
  * @param {number} maxValue -Specifies the maxValue
1699
1731
  * @returns {number} - Returns the number
1732
+ * @private
1700
1733
  */
1701
1734
  function getRatioOfBubble(min, max, value, minValue, maxValue) {
1702
1735
  const percent = (100 / (maxValue - minValue)) * (value - minValue);
@@ -1713,6 +1746,7 @@ function getRatioOfBubble(min, max, value, minValue, maxValue) {
1713
1746
  * @param {string} type - Specifies the type
1714
1747
  * @param {string} geometryType - Specified the type of the geometry
1715
1748
  * @returns {any} - Specifies the object
1749
+ * @private
1716
1750
  */
1717
1751
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1718
1752
  function findMidPointOfPolygon(points, type, geometryType) {
@@ -1853,6 +1887,7 @@ function textTrim(maxWidth, text, font) {
1853
1887
  * @param {Size} textSize - Specifies the text size
1854
1888
  * @param {string} type - Specifies the type
1855
1889
  * @returns {Point} - Returns the point values
1890
+ * @private
1856
1891
  */
1857
1892
  function findPosition(location, alignment, textSize, type) {
1858
1893
  let x;
@@ -1877,6 +1912,7 @@ function findPosition(location, alignment, textSize, type) {
1877
1912
  *
1878
1913
  * @param {string} id - Specifies the id
1879
1914
  * @returns {void}
1915
+ * @private
1880
1916
  */
1881
1917
  function removeElement(id) {
1882
1918
  const element = document.getElementById(id);
@@ -1888,6 +1924,7 @@ function removeElement(id) {
1888
1924
  * @param {Maps} mapObject - Specifies the map object
1889
1925
  * @param {LayerSettings} layer - Specifies the layer settings
1890
1926
  * @returns {Point} - Returns the x and y points
1927
+ * @private
1891
1928
  */
1892
1929
  function calculateCenterFromPixel(mapObject, layer) {
1893
1930
  const point1 = convertGeoToPoint(mapObject.minLatOfGivenLocation, mapObject.minLongOfGivenLocation, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
@@ -2216,6 +2253,7 @@ function getZoomTranslate(mapObject, layer, animate) {
2216
2253
  *
2217
2254
  * @param {Maps} map - Specifies the instance of the maps
2218
2255
  * @returns {void}
2256
+ * @private
2219
2257
  */
2220
2258
  function fixInitialScaleForTile(map) {
2221
2259
  map.tileZoomScale = map.tileZoomLevel = Math.floor(map.availableSize.height / 512) + 1;
@@ -2232,6 +2270,7 @@ function fixInitialScaleForTile(map) {
2232
2270
  *
2233
2271
  * @param {string} id - Specifies the id
2234
2272
  * @returns {Element} - Returns the element
2273
+ * @private
2235
2274
  */
2236
2275
  function getElementByID(id) {
2237
2276
  return document.getElementById(id);
@@ -2258,6 +2297,7 @@ function getClientElement(id) {
2258
2297
  * @param {Maps} maps - Specifies the instance of the maps
2259
2298
  * @param {number} value - Specifies the value
2260
2299
  * @returns {string} - Returns the string
2300
+ * @private
2261
2301
  */
2262
2302
  function Internalize(maps, value) {
2263
2303
  maps.formatFunction =
@@ -2306,6 +2346,7 @@ function getElement(id) {
2306
2346
  * @param {string} targetId - Specifies the target id
2307
2347
  * @param {Maps} map - Specifies the instance of the maps
2308
2348
  * @returns {any} - Returns the object
2349
+ * @private
2309
2350
  */
2310
2351
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2311
2352
  function getShapeData(targetId, map) {
@@ -2371,6 +2412,7 @@ function triggerShapeEvent(targetId, selection, maps, eventName) {
2371
2412
  *
2372
2413
  * @param {string} className - Specifies the class name
2373
2414
  * @returns {HTMLCollectionOf<Element>} - Returns the collection
2415
+ * @private
2374
2416
  */
2375
2417
  function getElementsByClassName(className) {
2376
2418
  return document.getElementsByClassName(className);
@@ -2387,6 +2429,7 @@ function getElementsByClassName(className) {
2387
2429
  * @param {string} args - Specifies the args
2388
2430
  * @param {string} elementSelector - Specifies the element selector
2389
2431
  * @returns {Element} - Returns the element
2432
+ * @private
2390
2433
  */
2391
2434
  function querySelector(args, elementSelector) {
2392
2435
  let targetEle = null;
@@ -2403,6 +2446,7 @@ function querySelector(args, elementSelector) {
2403
2446
  * @param {boolean} enable - Specifies the boolean value
2404
2447
  * @param {Maps} map - Specifies the instance of the maps
2405
2448
  * @returns {Element} - Returns the element
2449
+ * @private
2406
2450
  */
2407
2451
  function getTargetElement(layerIndex, name, enable, map) {
2408
2452
  let targetId;
@@ -2424,16 +2468,19 @@ function getTargetElement(layerIndex, name, enable, map) {
2424
2468
  * @param {string} className - Specifies the class name
2425
2469
  * @param {IShapeSelectedEventArgs | any} eventArgs - Specifies the event args
2426
2470
  * @returns {Element} - Returns the element
2471
+ * @private
2427
2472
  */
2428
2473
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2429
2474
  function createStyle(id, className, eventArgs) {
2430
- return createElement('style', {
2431
- id: id, innerHTML: '.' + className + '{fill:'
2432
- + eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
2433
- 'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
2434
- 'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
2435
- 'stroke:' + eventArgs['border']['color'] + ';' + '}'
2475
+ let styleEle = createElement('style', {
2476
+ id: id
2436
2477
  });
2478
+ styleEle.innerText = '.' + className + '{fill:'
2479
+ + eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
2480
+ 'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
2481
+ 'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
2482
+ 'stroke:' + eventArgs['border']['color'] + ';' + '}';
2483
+ return styleEle;
2437
2484
  }
2438
2485
  /**
2439
2486
  * Function to customize the style for highlight and selection
@@ -2442,12 +2489,13 @@ function createStyle(id, className, eventArgs) {
2442
2489
  * @param {string} className - Specifies the class name
2443
2490
  * @param {IShapeSelectedEventArgs | any} eventArgs - Specifies the event args
2444
2491
  * @returns {void}
2492
+ * @private
2445
2493
  */
2446
2494
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2447
2495
  function customizeStyle(id, className, eventArgs) {
2448
2496
  const styleEle = getElement(id);
2449
2497
  if (!isNullOrUndefined(styleEle)) {
2450
- styleEle.innerHTML = '.' + className + '{fill:'
2498
+ styleEle.innerText = '.' + className + '{fill:'
2451
2499
  + eventArgs['fill'] + ';' + 'fill-opacity:' + (eventArgs['opacity']).toString() + ';' +
2452
2500
  'stroke-width:' + (eventArgs['border']['width']).toString() + ';' +
2453
2501
  'stroke-opacity:' + (eventArgs['border']['opacity']).toString() + ';' +
@@ -2463,6 +2511,7 @@ function customizeStyle(id, className, eventArgs) {
2463
2511
  * @param {any} shapeData - Specifies the shape data
2464
2512
  * @param {any} data - Specifies the data
2465
2513
  * @returns {void}
2514
+ * @private
2466
2515
  */
2467
2516
  function triggerItemSelectionEvent(selectionSettings, map, targetElement,
2468
2517
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2500,6 +2549,7 @@ shapeData, data) {
2500
2549
  *
2501
2550
  * @param {Element} element - Specifies the element
2502
2551
  * @returns {void}
2552
+ * @private
2503
2553
  */
2504
2554
  function removeClass(element) {
2505
2555
  element.removeAttribute('class');
@@ -2553,6 +2603,7 @@ function elementAnimate(element, delay, duration, point, maps, ele, radius = 0)
2553
2603
  /**
2554
2604
  * @param {string} id - Specifies the id
2555
2605
  * @returns {void}
2606
+ * @private
2556
2607
  */
2557
2608
  function timeout(id) {
2558
2609
  removeElement(id);
@@ -2568,6 +2619,7 @@ function timeout(id) {
2568
2619
  * @param {Element} element - Specifies the element
2569
2620
  * @param {boolean} isTouch - Specifies the boolean value
2570
2621
  * @returns {void}
2622
+ * @private
2571
2623
  */
2572
2624
  function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element, isTouch) {
2573
2625
  const location = getMousePosition(x, y, element);
@@ -2633,9 +2685,10 @@ function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element, isTou
2633
2685
  * @param {number} areaWidth - Specifies the area width
2634
2686
  * @param {Element} element - Specifies the element
2635
2687
  * @returns {void}
2688
+ * @private
2636
2689
  */
2637
2690
  function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
2638
- tooltip.innerHTML = text;
2691
+ tooltip.innerText = text;
2639
2692
  tooltip.style.top = tooltip.id.indexOf('_Legend') !== -1 ?
2640
2693
  (parseInt(size1[0], 10) + y).toString() + 'px' : (parseInt(size1[0], 10) * 2).toString() + 'px';
2641
2694
  tooltip.style.left = (x).toString() + 'px';
@@ -2677,30 +2730,59 @@ function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
2677
2730
  * @param {string} text - Specifies the text
2678
2731
  * @param {string} top - Specifies the top
2679
2732
  * @param {string} left - Specifies the left
2680
- * @param {string} fontSize - Specifies the fontSize
2733
+ * @param {ZoomToolbarTooltipSettingsModel} settings - Specifies the tooltip settings.
2681
2734
  * @returns {void}
2682
2735
  * @private
2683
2736
  */
2684
- function createTooltip(id, text, top, left, fontSize) {
2737
+ function createTooltip(id, text, top, left, settings) {
2685
2738
  let tooltip = getElement(id);
2739
+ const borderColor = getHexColor(settings.borderColor);
2740
+ const fontColor = getHexColor(settings.fontColor);
2686
2741
  const style = 'top:' + top.toString() + 'px;' +
2687
2742
  'left:' + left.toString() + 'px;' +
2688
- 'color: #000000; ' +
2689
- 'background:' + '#FFFFFF' + ';' +
2743
+ 'color:' + (fontColor ? 'rgba(' + fontColor.r + ',' + fontColor.g + ',' + fontColor.b + ',' + settings.fontOpacity + ')'
2744
+ : settings.fontColor) + ';' +
2745
+ 'background:' + settings.fill + ';' +
2690
2746
  'z-index: 2;' +
2691
- 'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
2692
- if (!tooltip) {
2747
+ 'position:absolute;border:' + settings.borderWidth + 'px solid ' +
2748
+ (borderColor ? 'rgba(' + borderColor.r + ',' + borderColor.g + ',' + borderColor.b + ',' + settings.borderOpacity + ')'
2749
+ : settings.borderColor) + ';font-family:' + settings.fontFamily +
2750
+ ';font-style:' + settings.fontStyle + ';font-weight:' + settings.fontWeight +
2751
+ ';font-size:' + settings.fontSize + ';border-radius:' + settings.borderWidth + 'px;';
2752
+ if (!tooltip && settings.visible) {
2693
2753
  tooltip = createElement('div', {
2694
- id: id, innerHTML: '&nbsp;' + text + '&nbsp;'
2754
+ id: id
2695
2755
  });
2756
+ tooltip.innerHTML = SanitizeHtmlHelper.sanitize('&nbsp;' + text + '&nbsp;');
2696
2757
  tooltip.style.cssText = style;
2697
2758
  document.body.appendChild(tooltip);
2698
2759
  }
2699
- else {
2700
- tooltip.innerHTML = '&nbsp;' + text + '&nbsp;';
2760
+ else if (settings.visible) {
2761
+ tooltip.innerHTML = SanitizeHtmlHelper.sanitize('&nbsp;' + text + '&nbsp;');
2701
2762
  tooltip.style.cssText = style;
2702
2763
  }
2703
2764
  }
2765
+ /**
2766
+ * @private
2767
+ */
2768
+ function getHexColor(color) {
2769
+ if (color.indexOf('#') !== -1 && color.toLowerCase().indexOf('rgb') === -1) {
2770
+ let colorArray = (/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i).exec(color);
2771
+ return colorArray ? { r: parseInt(colorArray[1], 16), g: parseInt(colorArray[2], 16), b: parseInt(colorArray[3], 16) } : null;
2772
+ }
2773
+ else if (color.toLowerCase().indexOf('rgb') !== -1) {
2774
+ const colorArray = color.match(/\d+/g).map((a) => { return parseInt(a, 10); });
2775
+ return colorArray ? { r: colorArray[0], g: colorArray[1], b: colorArray[2] } : null;
2776
+ }
2777
+ else {
2778
+ const divElment = document.createElement('div');
2779
+ divElment.style.color = color;
2780
+ // eslint-disable-next-line @typescript-eslint/tslint/config
2781
+ const colorArray = window.getComputedStyle(document.body.appendChild(divElment)).color.match(/\d+/g).map((a) => { return parseInt(a, 10); });
2782
+ document.body.removeChild(divElment);
2783
+ return colorArray ? { r: colorArray[0], g: colorArray[1], b: colorArray[2] } : null;
2784
+ }
2785
+ }
2704
2786
  /**
2705
2787
  * @param {Point} location - Specifies the location
2706
2788
  * @param {string} shape - Specifies the shape
@@ -3073,6 +3155,7 @@ function zoomAnimate(element, delay, duration, point, scale, size, maps) {
3073
3155
  * @param {Function} process - Specifies the process
3074
3156
  * @param {Function} end - Specifies the end
3075
3157
  * @returns {void}
3158
+ * @private
3076
3159
  */
3077
3160
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3078
3161
  function animate(element, delay, duration, process, end) {
@@ -3101,7 +3184,7 @@ function animate(element, delay, duration, process, end) {
3101
3184
  clearAnimation = window.requestAnimationFrame(startAnimation);
3102
3185
  }
3103
3186
  /**
3104
- * To get shape data file using Ajax.
3187
+ * Defines the options to get shape data file using Ajax request.
3105
3188
  */
3106
3189
  class MapAjax {
3107
3190
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -3151,6 +3234,7 @@ function smoothTranslate(element, delay, duration, point) {
3151
3234
  * @param {number} scaleFactor - Specifies the scale factor
3152
3235
  * @param {Maps} maps - Specifies the instance of the maps
3153
3236
  * @returns {void}
3237
+ * @private
3154
3238
  */
3155
3239
  function compareZoomFactor(scaleFactor, maps) {
3156
3240
  const previous = isNullOrUndefined(maps.shouldZoomPreviousFactor) ?
@@ -3181,6 +3265,7 @@ function compareZoomFactor(scaleFactor, maps) {
3181
3265
  * @param {number} mapHeight - Specifies the height of the maps
3182
3266
  * @param {Maps} maps - Specifies the instance of the maps
3183
3267
  * @returns {number} - Returns the scale factor
3268
+ * @private
3184
3269
  */
3185
3270
  function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeight, maps, isZoomToCoordinates) {
3186
3271
  let scaleFactor;
@@ -3218,6 +3303,7 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
3218
3303
  *
3219
3304
  * @param {any} e - Specifies the any type value
3220
3305
  * @returns {any} - Returns the data value
3306
+ * @private
3221
3307
  */
3222
3308
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3223
3309
  function processResult(e) {
@@ -3543,6 +3629,7 @@ var DarkTheme;
3543
3629
  *
3544
3630
  * @param {MapsTheme} theme - Specifies the theme.
3545
3631
  * @returns {IThemeStyle} - Returns the theme style.
3632
+ * @private
3546
3633
  */
3547
3634
  function getThemeStyle(theme) {
3548
3635
  let style;
@@ -3797,7 +3884,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
3797
3884
  * Maps base document
3798
3885
  */
3799
3886
  /**
3800
- * Sets and gets the options for customizing the annotation element in maps.
3887
+ * Gets or sets the options for customizing the annotation element in maps.
3801
3888
  */
3802
3889
  class Annotation extends ChildProperty {
3803
3890
  }
@@ -3819,6 +3906,9 @@ __decorate$1([
3819
3906
  __decorate$1([
3820
3907
  Property('-1')
3821
3908
  ], Annotation.prototype, "zIndex", void 0);
3909
+ /**
3910
+ * Gets or sets the options to customize the arrow in the navigation line.
3911
+ */
3822
3912
  class Arrow extends ChildProperty {
3823
3913
  }
3824
3914
  __decorate$1([
@@ -3837,7 +3927,7 @@ __decorate$1([
3837
3927
  Property(0)
3838
3928
  ], Arrow.prototype, "offSet", void 0);
3839
3929
  /**
3840
- * Sets and gets the options to customize the style of the text in data label, legend and other texts.
3930
+ * Gets or sets the options to customize the style of the text in data label, legend and other texts in maps.
3841
3931
  */
3842
3932
  class Font extends ChildProperty {
3843
3933
  }
@@ -3860,7 +3950,115 @@ __decorate$1([
3860
3950
  Property(1)
3861
3951
  ], Font.prototype, "opacity", void 0);
3862
3952
  /**
3863
- * Sets and gets the options to customize the border for the maps.
3953
+ * Specifies the options to customize the buttons in the zoom toolbar.
3954
+ */
3955
+ class ZoomToolbarButtonSettings extends ChildProperty {
3956
+ }
3957
+ __decorate$1([
3958
+ Property('transparent')
3959
+ ], ZoomToolbarButtonSettings.prototype, "fill", void 0);
3960
+ __decorate$1([
3961
+ Property(null)
3962
+ ], ZoomToolbarButtonSettings.prototype, "color", void 0);
3963
+ __decorate$1([
3964
+ Property(1)
3965
+ ], ZoomToolbarButtonSettings.prototype, "borderOpacity", void 0);
3966
+ __decorate$1([
3967
+ Property(1)
3968
+ ], ZoomToolbarButtonSettings.prototype, "borderWidth", void 0);
3969
+ __decorate$1([
3970
+ Property(null)
3971
+ ], ZoomToolbarButtonSettings.prototype, "borderColor", void 0);
3972
+ __decorate$1([
3973
+ Property(30)
3974
+ ], ZoomToolbarButtonSettings.prototype, "radius", void 0);
3975
+ __decorate$1([
3976
+ Property(null)
3977
+ ], ZoomToolbarButtonSettings.prototype, "selectionColor", void 0);
3978
+ __decorate$1([
3979
+ Property(null)
3980
+ ], ZoomToolbarButtonSettings.prototype, "highlightColor", void 0);
3981
+ __decorate$1([
3982
+ Property(5)
3983
+ ], ZoomToolbarButtonSettings.prototype, "padding", void 0);
3984
+ __decorate$1([
3985
+ Property(1)
3986
+ ], ZoomToolbarButtonSettings.prototype, "opacity", void 0);
3987
+ __decorate$1([
3988
+ Property(['ZoomIn', 'ZoomOut', 'Reset'])
3989
+ ], ZoomToolbarButtonSettings.prototype, "toolbarItems", void 0);
3990
+ /**
3991
+ * Specifies the options to customize the tooltip of the zoom toolbar.
3992
+ */
3993
+ class ZoomToolbarTooltipSettings extends ChildProperty {
3994
+ }
3995
+ __decorate$1([
3996
+ Property(true)
3997
+ ], ZoomToolbarTooltipSettings.prototype, "visible", void 0);
3998
+ __decorate$1([
3999
+ Property('white')
4000
+ ], ZoomToolbarTooltipSettings.prototype, "fill", void 0);
4001
+ __decorate$1([
4002
+ Property(1)
4003
+ ], ZoomToolbarTooltipSettings.prototype, "borderOpacity", void 0);
4004
+ __decorate$1([
4005
+ Property(1)
4006
+ ], ZoomToolbarTooltipSettings.prototype, "borderWidth", void 0);
4007
+ __decorate$1([
4008
+ Property('#707070')
4009
+ ], ZoomToolbarTooltipSettings.prototype, "borderColor", void 0);
4010
+ __decorate$1([
4011
+ Property('black')
4012
+ ], ZoomToolbarTooltipSettings.prototype, "fontColor", void 0);
4013
+ __decorate$1([
4014
+ Property('')
4015
+ ], ZoomToolbarTooltipSettings.prototype, "fontFamily", void 0);
4016
+ __decorate$1([
4017
+ Property('')
4018
+ ], ZoomToolbarTooltipSettings.prototype, "fontStyle", void 0);
4019
+ __decorate$1([
4020
+ Property('')
4021
+ ], ZoomToolbarTooltipSettings.prototype, "fontWeight", void 0);
4022
+ __decorate$1([
4023
+ Property('')
4024
+ ], ZoomToolbarTooltipSettings.prototype, "fontSize", void 0);
4025
+ __decorate$1([
4026
+ Property(1)
4027
+ ], ZoomToolbarTooltipSettings.prototype, "fontOpacity", void 0);
4028
+ /**
4029
+ * Sets and gets the options to customize the border of the zoom toolbar.
4030
+ */
4031
+ class ZoomToolbarSettings extends ChildProperty {
4032
+ }
4033
+ __decorate$1([
4034
+ Property('transparent')
4035
+ ], ZoomToolbarSettings.prototype, "backgroundColor", void 0);
4036
+ __decorate$1([
4037
+ Property(1)
4038
+ ], ZoomToolbarSettings.prototype, "borderOpacity", void 0);
4039
+ __decorate$1([
4040
+ Property(1)
4041
+ ], ZoomToolbarSettings.prototype, "borderWidth", void 0);
4042
+ __decorate$1([
4043
+ Property('transparent')
4044
+ ], ZoomToolbarSettings.prototype, "borderColor", void 0);
4045
+ __decorate$1([
4046
+ Property('Far')
4047
+ ], ZoomToolbarSettings.prototype, "horizontalAlignment", void 0);
4048
+ __decorate$1([
4049
+ Property('Near')
4050
+ ], ZoomToolbarSettings.prototype, "verticalAlignment", void 0);
4051
+ __decorate$1([
4052
+ Property('Horizontal')
4053
+ ], ZoomToolbarSettings.prototype, "orientation", void 0);
4054
+ __decorate$1([
4055
+ Complex({}, ZoomToolbarButtonSettings)
4056
+ ], ZoomToolbarSettings.prototype, "buttonSettings", void 0);
4057
+ __decorate$1([
4058
+ Complex({}, ZoomToolbarTooltipSettings)
4059
+ ], ZoomToolbarSettings.prototype, "tooltipSettings", void 0);
4060
+ /**
4061
+ * Gets or sets the options to customize the border of the maps.
3864
4062
  */
3865
4063
  class Border extends ChildProperty {
3866
4064
  }
@@ -3874,7 +4072,7 @@ __decorate$1([
3874
4072
  Property(null)
3875
4073
  ], Border.prototype, "opacity", void 0);
3876
4074
  /**
3877
- * Sets and gets the center position in maps.
4075
+ * Gets or sets the values to change the center position of the maps.
3878
4076
  */
3879
4077
  class CenterPosition extends ChildProperty {
3880
4078
  }
@@ -3885,7 +4083,7 @@ __decorate$1([
3885
4083
  Property(null)
3886
4084
  ], CenterPosition.prototype, "longitude", void 0);
3887
4085
  /**
3888
- * Sets and gets the options to customize the tooltip for layers, markers, and bubble in maps.
4086
+ * Gets or sets the options to customize the tooltip of layers, markers, and bubble in maps.
3889
4087
  */
3890
4088
  class TooltipSettings extends ChildProperty {
3891
4089
  }
@@ -3911,7 +4109,7 @@ __decorate$1([
3911
4109
  Property(null)
3912
4110
  ], TooltipSettings.prototype, "valuePath", void 0);
3913
4111
  /**
3914
- * Sets and gets the margin for the maps component.
4112
+ * Gets or sets the options to customize the margin of the maps.
3915
4113
  */
3916
4114
  class Margin extends ChildProperty {
3917
4115
  }
@@ -3927,8 +4125,8 @@ __decorate$1([
3927
4125
  __decorate$1([
3928
4126
  Property(10)
3929
4127
  ], Margin.prototype, "bottom", void 0);
3930
- /*
3931
- * Sets and gets the options to customize the line that connects the markers in marker cluster in maps.
4128
+ /**
4129
+ * Gets or sets the options to customize the lines that connect the markers in marker cluster of the maps.
3932
4130
  */
3933
4131
  class ConnectorLineSettings extends ChildProperty {
3934
4132
  }
@@ -3942,7 +4140,7 @@ __decorate$1([
3942
4140
  Property(1)
3943
4141
  ], ConnectorLineSettings.prototype, "opacity", void 0);
3944
4142
  /**
3945
- * Sets and gets the options to customize the cluster of markers in Maps.
4143
+ * Gets or sets the options to customize the cluster of markers in maps.
3946
4144
  */
3947
4145
  class MarkerClusterSettings extends ChildProperty {
3948
4146
  }
@@ -3986,12 +4184,12 @@ __decorate$1([
3986
4184
  Complex({}, ConnectorLineSettings)
3987
4185
  ], MarkerClusterSettings.prototype, "connectorLineSettings", void 0);
3988
4186
  /**
3989
- * Sets and gets the data in the marker cluster.
4187
+ * Gets or sets the data in the marker cluster.
3990
4188
  */
3991
4189
  class MarkerClusterData extends ChildProperty {
3992
4190
  }
3993
4191
  /**
3994
- * Sets and gets the options to customize the color-mapping in maps.
4192
+ * Gets or sets the options to customize the color-mapping in maps.
3995
4193
  */
3996
4194
  class ColorMappingSettings extends ChildProperty {
3997
4195
  }
@@ -4020,7 +4218,8 @@ __decorate$1([
4020
4218
  Property(true)
4021
4219
  ], ColorMappingSettings.prototype, "showLegend", void 0);
4022
4220
  /**
4023
- * To configure the initial marker shape selection settings
4221
+ * Gets or sets the options to select the marker shape when the maps is loaded initially.
4222
+ * The initial selection of the markers will work only when the selection settings of marker is enabled.
4024
4223
  */
4025
4224
  class InitialMarkerSelectionSettings extends ChildProperty {
4026
4225
  }
@@ -4031,7 +4230,8 @@ __decorate$1([
4031
4230
  Property(null)
4032
4231
  ], InitialMarkerSelectionSettings.prototype, "longitude", void 0);
4033
4232
  /**
4034
- * Sets and gets the shapes that is selected initially on rendering the maps.
4233
+ * Gets or sets the options to select the shapes when the maps is loaded initially.
4234
+ * The initial selection of the shapes will work only when the selection settings of layer is enabled.
4035
4235
  */
4036
4236
  class InitialShapeSelectionSettings extends ChildProperty {
4037
4237
  }
@@ -4042,7 +4242,7 @@ __decorate$1([
4042
4242
  Property(null)
4043
4243
  ], InitialShapeSelectionSettings.prototype, "shapeValue", void 0);
4044
4244
  /**
4045
- * Sets and gets the options to customize the maps on selecting the shapes.
4245
+ * Gets or sets the options to customize the maps on selecting the shapes.
4046
4246
  */
4047
4247
  class SelectionSettings extends ChildProperty {
4048
4248
  }
@@ -4062,7 +4262,7 @@ __decorate$1([
4062
4262
  Complex({ color: 'transparent', width: 0 }, Border)
4063
4263
  ], SelectionSettings.prototype, "border", void 0);
4064
4264
  /**
4065
- * Sets and gets the options to customize the shapes on which the mouse has hovered in maps.
4265
+ * Gets or sets the options to customize the shapes on which the mouse has hovered in maps.
4066
4266
  */
4067
4267
  class HighlightSettings extends ChildProperty {
4068
4268
  }
@@ -4079,7 +4279,7 @@ __decorate$1([
4079
4279
  Complex({ color: 'transparent', width: 0 }, Border)
4080
4280
  ], HighlightSettings.prototype, "border", void 0);
4081
4281
  /**
4082
- * Sets and gets the options to customize the navigation line in maps.
4282
+ * Gets or sets the options to customize the navigation lines in maps which is used to connect different locations.
4083
4283
  */
4084
4284
  class NavigationLineSettings extends ChildProperty {
4085
4285
  }
@@ -4114,7 +4314,7 @@ __decorate$1([
4114
4314
  Complex({}, HighlightSettings)
4115
4315
  ], NavigationLineSettings.prototype, "highlightSettings", void 0);
4116
4316
  /**
4117
- * Sets and gets the options to customize the bubble elements in maps.
4317
+ * Gets or sets the options to customize the bubble elements in the maps.
4118
4318
  */
4119
4319
  class BubbleSettings extends ChildProperty {
4120
4320
  }
@@ -4170,7 +4370,7 @@ __decorate$1([
4170
4370
  Complex({}, HighlightSettings)
4171
4371
  ], BubbleSettings.prototype, "highlightSettings", void 0);
4172
4372
  /**
4173
- * Sets and gets the title for the maps.
4373
+ * Gets or sets the options to customize the title of the maps.
4174
4374
  */
4175
4375
  class CommonTitleSettings extends ChildProperty {
4176
4376
  }
@@ -4181,7 +4381,7 @@ __decorate$1([
4181
4381
  Property('')
4182
4382
  ], CommonTitleSettings.prototype, "description", void 0);
4183
4383
  /**
4184
- * Sets and gets the subtitle for maps.
4384
+ * Gets or sets the options to customize the subtitle of the maps.
4185
4385
  */
4186
4386
  class SubTitleSettings extends CommonTitleSettings {
4187
4387
  }
@@ -4192,7 +4392,7 @@ __decorate$1([
4192
4392
  Property('Center')
4193
4393
  ], SubTitleSettings.prototype, "alignment", void 0);
4194
4394
  /**
4195
- * Sets and gets the title for the maps.
4395
+ * Gets or sets the options to customize the title of the maps.
4196
4396
  */
4197
4397
  class TitleSettings extends CommonTitleSettings {
4198
4398
  }
@@ -4206,7 +4406,7 @@ __decorate$1([
4206
4406
  Complex({}, SubTitleSettings)
4207
4407
  ], TitleSettings.prototype, "subtitleSettings", void 0);
4208
4408
  /**
4209
- * Sets and gets the options to configure maps zooming operations.
4409
+ * Gets or sets the options to configure maps zooming operations.
4210
4410
  */
4211
4411
  class ZoomSettings extends ChildProperty {
4212
4412
  }
@@ -4267,8 +4467,11 @@ __decorate$1([
4267
4467
  __decorate$1([
4268
4468
  Property(true)
4269
4469
  ], ZoomSettings.prototype, "resetToInitial", void 0);
4470
+ __decorate$1([
4471
+ Complex({}, ZoomToolbarSettings)
4472
+ ], ZoomSettings.prototype, "toolbarSettings", void 0);
4270
4473
  /**
4271
- * Sets and gets the settings to customize the color-mapping visibility based on the legend visibility.
4474
+ * Gets or sets the settings to customize the color-mapping visibility based on the legend visibility.
4272
4475
  */
4273
4476
  class ToggleLegendSettings extends ChildProperty {
4274
4477
  }
@@ -4288,7 +4491,7 @@ __decorate$1([
4288
4491
  Complex({ color: '', width: 0 }, Border)
4289
4492
  ], ToggleLegendSettings.prototype, "border", void 0);
4290
4493
  /**
4291
- * Sets and gets the options to customize the legend of the maps.
4494
+ * Gets or sets the options to customize the legend of the maps.
4292
4495
  */
4293
4496
  class LegendSettings extends ChildProperty {
4294
4497
  }
@@ -4383,7 +4586,7 @@ __decorate$1([
4383
4586
  Complex({}, ToggleLegendSettings)
4384
4587
  ], LegendSettings.prototype, "toggleLegendSettings", void 0);
4385
4588
  /**
4386
- * Sets and gets the options to customize the data-labels in maps.
4589
+ * Gets or sets the options to customize the data labels in maps.
4387
4590
  */
4388
4591
  class DataLabelSettings extends ChildProperty {
4389
4592
  }
@@ -4421,7 +4624,7 @@ __decorate$1([
4421
4624
  Property('')
4422
4625
  ], DataLabelSettings.prototype, "template", void 0);
4423
4626
  /**
4424
- * Sets and gets the options to customize the shapes in the maps.
4627
+ * Gets or sets the options to customize the shapes in the maps.
4425
4628
  */
4426
4629
  class ShapeSettings extends ChildProperty {
4427
4630
  }
@@ -4462,7 +4665,7 @@ __decorate$1([
4462
4665
  Property(false)
4463
4666
  ], ShapeSettings.prototype, "autofill", void 0);
4464
4667
  /**
4465
- * Sets and gets the options to customize the marker in the maps.
4668
+ * Gets or sets the options to customize the markers in the maps.
4466
4669
  */
4467
4670
  class MarkerBase extends ChildProperty {
4468
4671
  }
@@ -4475,6 +4678,9 @@ __decorate$1([
4475
4678
  __decorate$1([
4476
4679
  Property(false)
4477
4680
  ], MarkerBase.prototype, "visible", void 0);
4681
+ __decorate$1([
4682
+ Property(false)
4683
+ ], MarkerBase.prototype, "enableDrag", void 0);
4478
4684
  __decorate$1([
4479
4685
  Property('#FF471A')
4480
4686
  ], MarkerBase.prototype, "fill", void 0);
@@ -4541,6 +4747,9 @@ __decorate$1([
4541
4747
  __decorate$1([
4542
4748
  Collection([], InitialMarkerSelectionSettings)
4543
4749
  ], MarkerBase.prototype, "initialMarkerSelection", void 0);
4750
+ /**
4751
+ * Gets or sets the options to customize the markers in the maps.
4752
+ */
4544
4753
  class MarkerSettings extends MarkerBase {
4545
4754
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4546
4755
  constructor(parent, propName, defaultValue, isArray) {
@@ -4548,7 +4757,7 @@ class MarkerSettings extends MarkerBase {
4548
4757
  }
4549
4758
  }
4550
4759
  /**
4551
- * Sets and gets the options to customize the layers of the maps.
4760
+ * Gets or sets the options to customize the layers of the maps.
4552
4761
  */
4553
4762
  class LayerSettings extends ChildProperty {
4554
4763
  constructor() {
@@ -4649,7 +4858,7 @@ class Tile {
4649
4858
  }
4650
4859
  }
4651
4860
  /**
4652
- * Sets and gets the maps area settings
4861
+ * Gets or sets the options to customize the area around the shapes in the map layer.
4653
4862
  */
4654
4863
  class MapsAreaSettings extends ChildProperty {
4655
4864
  }
@@ -4802,6 +5011,7 @@ class Marker {
4802
5011
  *
4803
5012
  * @param {LayerSettings[]} layersCollection - Specifies the layer settings instance.
4804
5013
  * @returns {void}
5014
+ * @private
4805
5015
  */
4806
5016
  calculateZoomCenterPositionAndFactor(layersCollection) {
4807
5017
  if (!isNullOrUndefined(this.maps)) {
@@ -4927,6 +5137,7 @@ class Marker {
4927
5137
  * To check and trigger marker click event
4928
5138
  * @param {PointerEvent} e - Specifies the pointer event argument.
4929
5139
  * @returns {void}
5140
+ * @private
4930
5141
  */
4931
5142
  markerClick(e) {
4932
5143
  const target = e.target.id;
@@ -4937,6 +5148,9 @@ class Marker {
4937
5148
  if (isNullOrUndefined(options)) {
4938
5149
  return;
4939
5150
  }
5151
+ if (options.marker.enableDrag) {
5152
+ document.getElementById(this.maps.element.id + "_svg").style.cursor = 'grabbing';
5153
+ }
4940
5154
  const eventArgs = {
4941
5155
  cancel: false, name: markerClick, data: options.data, maps: this.maps,
4942
5156
  marker: options.marker, target: target, x: e.clientX, y: e.clientY,
@@ -4945,11 +5159,39 @@ class Marker {
4945
5159
  value: options.data['name']
4946
5160
  };
4947
5161
  this.maps.trigger(markerClick, eventArgs);
5162
+ if (options.marker.enableDrag) {
5163
+ let isCluster = false;
5164
+ const layerIndex = parseInt(target.split('_LayerIndex_')[1].split('_')[0], 10);
5165
+ const markerIndex = parseInt(target.split('_MarkerIndex_')[1].split('_')[0], 10);
5166
+ const dataIndex = parseInt(target.split('_dataIndex_')[1].split('_')[0], 10);
5167
+ const marker$$1 = this.maps.layers[layerIndex].markerSettings[markerIndex];
5168
+ if (this.sameMarkerData.length > 0) {
5169
+ isCluster = (this.sameMarkerData[0].data.filter((el) => { return (el['index'] == dataIndex); })).length > 0 &&
5170
+ this.sameMarkerData[0].layerIndex === layerIndex && this.sameMarkerData[0].markerIndex === markerIndex;
5171
+ }
5172
+ if (!isCluster) {
5173
+ const dragEventArgs = {
5174
+ name: markerDragStart, x: e.clientX, y: e.clientY,
5175
+ latitude: options.data['latitude'] || options.data['Latitude'],
5176
+ longitude: options.data['longitude'] || options.data['Longitude'],
5177
+ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex
5178
+ };
5179
+ this.maps.trigger(markerDragStart, dragEventArgs);
5180
+ this.maps.markerDragArgument = {
5181
+ targetId: target, x: e.clientX, y: e.clientY,
5182
+ latitude: options.data['latitude'] || options.data['Latitude'],
5183
+ longitude: options.data['longitude'] || options.data['Longitude'],
5184
+ shape: isNullOrUndefined(marker$$1.shapeValuePath) ? marker$$1.shape : marker$$1.dataSource[dataIndex][marker$$1.shapeValuePath],
5185
+ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex
5186
+ };
5187
+ }
5188
+ }
4948
5189
  }
4949
5190
  /**
4950
5191
  * To check and trigger Cluster click event
4951
5192
  * @param {PointerEvent} e - Specifies the pointer event argument.
4952
5193
  * @returns {void}
5194
+ * @private
4953
5195
  */
4954
5196
  markerClusterClick(e) {
4955
5197
  const target = e.target.id;
@@ -5020,7 +5262,7 @@ class Marker {
5020
5262
  if ((target.indexOf('_cluster_') > -1)) {
5021
5263
  let isClusterSame = false;
5022
5264
  const 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);
5023
- const indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerHTML.split(',').map(Number) : clusterElement.innerHTML.split(',').map(Number);
5265
+ const indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerText.split(',').map(Number) : clusterElement.innerText.split(',').map(Number);
5024
5266
  collection = [];
5025
5267
  for (const i of indexes) {
5026
5268
  collection.push({ data: marker$$1.dataSource[i], index: i });
@@ -5043,6 +5285,7 @@ class Marker {
5043
5285
  *
5044
5286
  * @param {PointerEvent} e - Specifies the pointer event argument.
5045
5287
  * @returns {void}
5288
+ * @private
5046
5289
  */
5047
5290
  markerMove(e) {
5048
5291
  const targetId = e.target.id;
@@ -5053,6 +5296,10 @@ class Marker {
5053
5296
  if (isNullOrUndefined(options)) {
5054
5297
  return;
5055
5298
  }
5299
+ if (options.marker.enableDrag) {
5300
+ document.getElementById(this.maps.element.id + "_svg").style.cursor = isNullOrUndefined(this.maps.markerDragArgument) ?
5301
+ 'pointer' : 'grabbing';
5302
+ }
5056
5303
  const eventArgs = {
5057
5304
  cancel: false, name: markerMouseMove, data: options.data,
5058
5305
  maps: this.maps, target: targetId, x: e.clientX, y: e.clientY
@@ -5064,6 +5311,7 @@ class Marker {
5064
5311
  *
5065
5312
  * @param {PointerEvent} e - Specifies the pointer event argument.
5066
5313
  * @returns {void}
5314
+ * @private
5067
5315
  */
5068
5316
  markerClusterMouseMove(e) {
5069
5317
  const targetId = e.target.id;
@@ -5213,6 +5461,18 @@ const markerClusterRendering = 'markerClusterRendering';
5213
5461
  * @private
5214
5462
  */
5215
5463
  const markerClick = 'markerClick';
5464
+ /**
5465
+ * Specifies the maps marker drag start event name.
5466
+ *
5467
+ * @private
5468
+ */
5469
+ const markerDragStart = 'markerDragStart';
5470
+ /**
5471
+ * Specifies the maps marker drag end event name.
5472
+ *
5473
+ * @private
5474
+ */
5475
+ const markerDragEnd = 'markerDragEnd';
5216
5476
  /**
5217
5477
  * Specifies the maps cluster click event name.
5218
5478
  *
@@ -5378,6 +5638,7 @@ class ColorMapping {
5378
5638
  * @param {number} colorValue - Specifies the color value
5379
5639
  * @param {string} equalValue - Specifies the equal value.
5380
5640
  * @returns {any} - Returns the color mapping values.
5641
+ * @private
5381
5642
  */
5382
5643
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5383
5644
  getColorByValue(colorMapping, colorValue, equalValue) {
@@ -6221,6 +6482,7 @@ class LayerPanel {
6221
6482
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6222
6483
  const bubbleDataSource = bubble.dataSource;
6223
6484
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6485
+ this.mapObject.bubbleModule.bubbleCollection = [];
6224
6486
  bubbleDataSource.map((bubbleData, i) => {
6225
6487
  this.renderBubble(this.currentLayer, bubbleData, colors[i % colors.length], range, j, i, bubbleG, layerIndex, bubble);
6226
6488
  });
@@ -7066,6 +7328,8 @@ class Annotations {
7066
7328
  // eslint-disable-next-line valid-jsdoc
7067
7329
  /**
7068
7330
  * To create annotation elements
7331
+ *
7332
+ * @private
7069
7333
  */
7070
7334
  createAnnotationTemplate(parentElement, annotation, annotationIndex) {
7071
7335
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -7166,7 +7430,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
7166
7430
  * Maps Component file
7167
7431
  */
7168
7432
  /**
7169
- * Represents the Maps control.
7433
+ * 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
7434
+ * has rich feature set that includes markers, labels, bubbles and much more.
7170
7435
  * ```html
7171
7436
  * <div id="maps"/>
7172
7437
  * <script>
@@ -7261,6 +7526,8 @@ let Maps = class Maps extends Component {
7261
7526
  /** @private */
7262
7527
  this.initialTileTranslate = new Point(0, 0);
7263
7528
  /** @private */
7529
+ this.markerDragId = '';
7530
+ /** @private */
7264
7531
  this.initialCheck = true;
7265
7532
  /** @private */
7266
7533
  this.applyZoomReset = false;
@@ -7269,15 +7536,20 @@ let Maps = class Maps extends Component {
7269
7536
  /** @private */
7270
7537
  this.markerClusterExpand = false;
7271
7538
  /** @private */
7539
+ this.mouseMoveId = '';
7540
+ /** @private */
7272
7541
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7273
7542
  this.shapeSelectionItem = [];
7543
+ /** @private */
7544
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7545
+ this.markerDragArgument = null;
7274
7546
  setValue('mergePersistData', this.mergePersistMapsData, this);
7275
7547
  }
7276
7548
  /**
7277
7549
  *
7278
7550
  * Specifies whether the shape is selected in the maps or not.
7279
7551
  *
7280
- * @returns {boolean} - Returns the boolean value.
7552
+ * @returns {boolean} - Returns a boolean value to specify whether the shape is selected in the maps or not.
7281
7553
  */
7282
7554
  get isShapeSelected() {
7283
7555
  return this.mapSelect;
@@ -7320,6 +7592,7 @@ let Maps = class Maps extends Component {
7320
7592
  *
7321
7593
  * @param {string} key - Specifies the key
7322
7594
  * @returns {string} - Returns the string value
7595
+ * @private
7323
7596
  */
7324
7597
  getLocalizedLabel(key) {
7325
7598
  return this.localeObject.getConstant(key);
@@ -7454,6 +7727,7 @@ let Maps = class Maps extends Component {
7454
7727
  * @param {LayerSettings} layer - Specifies the layer for the maps.
7455
7728
  * @param {string} dataType - Specifies the data type for maps.
7456
7729
  * @returns {void}
7730
+ * @private
7457
7731
  */
7458
7732
  processResponseJsonData(processType, data, layer, dataType) {
7459
7733
  this.serverProcess['response']++;
@@ -7596,6 +7870,9 @@ let Maps = class Maps extends Component {
7596
7870
  }
7597
7871
  }
7598
7872
  this.zoomingChange();
7873
+ if (this.zoomModule && this.isDevice) {
7874
+ this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.mapScaleValue, this.element.id + '_Zooming_');
7875
+ }
7599
7876
  if (!this.isZoomByPosition && !this.zoomNotApplied) {
7600
7877
  this.trigger(loaded, { maps: this, isResized: this.isResize });
7601
7878
  }
@@ -8026,6 +8303,7 @@ let Maps = class Maps extends Component {
8026
8303
  *
8027
8304
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8028
8305
  * @returns {void}
8306
+ * @private
8029
8307
  */
8030
8308
  mouseLeaveOnMap(e) {
8031
8309
  if (document.getElementsByClassName('highlightMapStyle').length > 0 && this.legendModule) {
@@ -8071,6 +8349,7 @@ let Maps = class Maps extends Component {
8071
8349
  }
8072
8350
  keyDownHandler(event) {
8073
8351
  const zoom = this.zoomModule;
8352
+ let id = event.target['id'];
8074
8353
  if ((event.code === 'ArrowUp' || event.code === 'ArrowDown' || event.code === 'ArrowLeft'
8075
8354
  || event.code === 'ArrowRight') && zoom) {
8076
8355
  const animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
@@ -8078,16 +8357,18 @@ let Maps = class Maps extends Component {
8078
8357
  this.currentTiles = animatedTiles.cloneNode(true);
8079
8358
  }
8080
8359
  }
8081
- if ((event.key === '+' || event.code === 'Equal') && zoom) {
8360
+ if (this.zoomSettings.enable && zoom && (event.key === '+' || event.code === 'Equal')) {
8082
8361
  zoom.performZoomingByToolBar('zoomin');
8083
8362
  }
8084
- else if ((event.key === '-' || event.code === 'Minus') && zoom) {
8363
+ else if (this.zoomSettings.enable && zoom && (event.key === '-' || event.code === 'Minus')) {
8085
8364
  zoom.performZoomingByToolBar('zoomout');
8086
8365
  }
8087
- else if (event['keyCode'] === 82 && zoom) {
8366
+ else if (this.zoomSettings.enable && zoom && event['keyCode'] === 82) {
8088
8367
  zoom.performZoomingByToolBar('reset');
8368
+ zoom.isPanning = false;
8089
8369
  }
8090
- else if ((event.code === 'ArrowUp' || event.code === 'ArrowDown') && zoom) {
8370
+ else if (this.zoomSettings.enable && this.zoomSettings.enablePanning && zoom
8371
+ && (event.code === 'ArrowUp' || event.code === 'ArrowDown')) {
8091
8372
  event.preventDefault();
8092
8373
  zoom.mouseDownLatLong['x'] = 0;
8093
8374
  zoom.mouseMoveLatLong['y'] = this.mapAreaRect.height / 7;
@@ -8095,7 +8376,8 @@ let Maps = class Maps extends Component {
8095
8376
  zoom.mouseMoveLatLong['y'], event);
8096
8377
  zoom.mouseDownLatLong['y'] = zoom.mouseMoveLatLong['y'];
8097
8378
  }
8098
- else if ((event.code === 'ArrowLeft' || event.code === 'ArrowRight') && zoom) {
8379
+ else if (this.zoomSettings.enable && this.zoomSettings.enablePanning && zoom
8380
+ && (event.code === 'ArrowLeft' || event.code === 'ArrowRight')) {
8099
8381
  event.preventDefault();
8100
8382
  zoom.mouseDownLatLong['y'] = 0;
8101
8383
  zoom.mouseMoveLatLong['x'] = this.mapAreaRect.width / 7;
@@ -8103,7 +8385,7 @@ let Maps = class Maps extends Component {
8103
8385
  zoom.mouseDownLatLong['x'] = zoom.mouseMoveLatLong['x'];
8104
8386
  }
8105
8387
  else if (event.code === 'Enter') {
8106
- const id = event.target['id'];
8388
+ id = event.target['id'];
8107
8389
  event.preventDefault();
8108
8390
  if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
8109
8391
  this.mapAreaRect = this.legendModule.initialMapAreaRect;
@@ -8133,6 +8415,9 @@ let Maps = class Maps extends Component {
8133
8415
  this.keyboardHighlightSelection(id, event.type);
8134
8416
  }
8135
8417
  }
8418
+ if (this.zoomModule) {
8419
+ this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.mapScaleValue, this.mouseMoveId);
8420
+ }
8136
8421
  }
8137
8422
  /**
8138
8423
  * Gets the selected element to be maintained or not.
@@ -8153,6 +8438,7 @@ let Maps = class Maps extends Component {
8153
8438
  *
8154
8439
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8155
8440
  * @returns {void}
8441
+ * @private
8156
8442
  */
8157
8443
  mapsOnClick(e) {
8158
8444
  const targetEle = e.target;
@@ -8183,6 +8469,12 @@ let Maps = class Maps extends Component {
8183
8469
  });
8184
8470
  }
8185
8471
  }
8472
+ if (this.zoomModule) {
8473
+ this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.mapScaleValue, targetId);
8474
+ if (this.isDevice) {
8475
+ this.zoomModule.removeToolbarClass('', '', '', '', '');
8476
+ }
8477
+ }
8186
8478
  }
8187
8479
  clickHandler(e, eventArgs, targetEle) {
8188
8480
  if (targetEle.id.indexOf('shapeIndex') > -1) {
@@ -8214,6 +8506,27 @@ let Maps = class Maps extends Component {
8214
8506
  this.selectionModule.removedSelectionList(targetEle);
8215
8507
  }
8216
8508
  }
8509
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8510
+ getMarkerClickLocation(pageX, pageY, x, y, marker$$1, isDragEnd) {
8511
+ document.getElementById(this.element.id + "_svg").style.cursor = 'grabbing';
8512
+ const targetElement = getElement(marker$$1.targetId);
8513
+ let latLongValue = this.getClickLocation(marker$$1.targetId, pageX, pageY, targetElement, x, y);
8514
+ const 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);
8515
+ const transPoint = this.translatePoint;
8516
+ const translateX = (this.isTileMap ? location.x : (location.x + transPoint.x) * this.scale);
8517
+ const translateY = (this.isTileMap ? location.y : (location.y + transPoint.y) * this.scale);
8518
+ if (this.markerDragArgument.shape !== 'Balloon') {
8519
+ targetElement.setAttribute('transform', 'translate( ' + translateX + ' ' + translateY + ' )');
8520
+ }
8521
+ else {
8522
+ targetElement.parentElement.setAttribute('transform', 'translate( ' + translateX + ' ' + translateY + ' )');
8523
+ }
8524
+ if (isDragEnd) {
8525
+ const markerSettings = this.layers[marker$$1.layerIndex].markerSettings[marker$$1.markerIndex];
8526
+ latLongValue = this.getClickLocation(marker$$1.targetId, (pageX - markerSettings.offset.x), (pageY - markerSettings.offset.y), targetElement, (x - markerSettings.offset.x), (y - markerSettings.offset.y));
8527
+ }
8528
+ return latLongValue;
8529
+ }
8217
8530
  getClickLocation(targetId, pageX, pageY, targetElement, x, y) {
8218
8531
  let layerIndex = 0;
8219
8532
  let latLongValue;
@@ -8276,6 +8589,7 @@ let Maps = class Maps extends Component {
8276
8589
  *
8277
8590
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8278
8591
  * @returns {boolean} - Returns the boolean value
8592
+ * @private
8279
8593
  */
8280
8594
  mouseEndOnMap(e) {
8281
8595
  const targetEle = e.target;
@@ -8286,13 +8600,16 @@ let Maps = class Maps extends Component {
8286
8600
  let pageY;
8287
8601
  let target;
8288
8602
  let touchArg;
8603
+ let layerX = 0;
8604
+ let layerY = 0;
8289
8605
  const rect = this.element.getBoundingClientRect();
8290
8606
  const element = e.target;
8291
8607
  if (e.type.indexOf('touch') !== -1) {
8292
8608
  this.isTouch = true;
8293
8609
  touchArg = e;
8294
- pageX = touchArg.changedTouches[0].pageX;
8610
+ layerX = pageX = touchArg.changedTouches[0].pageX;
8295
8611
  pageY = touchArg.changedTouches[0].pageY;
8612
+ layerY = pageY - (this.isTileMap ? 10 : 0);
8296
8613
  target = touchArg.target;
8297
8614
  this.mouseClickEvent = { x: pageX, y: pageY };
8298
8615
  }
@@ -8300,6 +8617,8 @@ let Maps = class Maps extends Component {
8300
8617
  this.isTouch = e.pointerType === 'touch';
8301
8618
  pageX = e.pageX;
8302
8619
  pageY = e.pageY;
8620
+ layerX = e['layerX'];
8621
+ layerY = e['layerY'] - (this.isTileMap ? 10 : 0);
8303
8622
  target = e.target;
8304
8623
  }
8305
8624
  if (this.isTileMap) {
@@ -8322,6 +8641,45 @@ let Maps = class Maps extends Component {
8322
8641
  if (e.cancelable && !this.isTouch) {
8323
8642
  e.preventDefault();
8324
8643
  }
8644
+ if (!isNullOrUndefined(this.markerDragArgument)) {
8645
+ const marker$$1 = this.markerDragArgument;
8646
+ this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
8647
+ this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
8648
+ const latLongValue = this.getMarkerClickLocation(pageX, pageY, layerX, layerY, this.markerDragArgument, true);
8649
+ const markerObject = this.layers[marker$$1.layerIndex].markerSettings[marker$$1.markerIndex];
8650
+ document.getElementById(this.element.id + "_svg").style.cursor = markerObject.enableDrag ? 'pointer' : 'grabbing';
8651
+ const dragEventArgs = {
8652
+ name: 'markerDragEnd', x: pageX, y: pageY,
8653
+ latitude: latLongValue.latitude, longitude: latLongValue.longitude,
8654
+ layerIndex: marker$$1.layerIndex, markerIndex: marker$$1.markerIndex,
8655
+ dataIndex: marker$$1.dataIndex
8656
+ };
8657
+ if (isNullOrUndefined(markerObject.latitudeValuePath) && isNullOrUndefined(markerObject.longitudeValuePath)) {
8658
+ const data = markerObject.dataSource[marker$$1.dataIndex];
8659
+ if (!isNullOrUndefined(data['Longitude']) && !isNullOrUndefined(data['Latitude'])) {
8660
+ markerObject.dataSource[marker$$1.dataIndex].Latitude = dragEventArgs.latitude;
8661
+ markerObject.dataSource[marker$$1.dataIndex].Longitude = dragEventArgs.longitude;
8662
+ }
8663
+ else {
8664
+ markerObject.dataSource[marker$$1.dataIndex].latitude = dragEventArgs.latitude;
8665
+ markerObject.dataSource[marker$$1.dataIndex].longitude = dragEventArgs.longitude;
8666
+ }
8667
+ }
8668
+ else {
8669
+ markerObject.dataSource[marker$$1.dataIndex][markerObject.latitudeValuePath] = dragEventArgs.latitude;
8670
+ markerObject.dataSource[marker$$1.dataIndex][markerObject.longitudeValuePath] = dragEventArgs.longitude;
8671
+ }
8672
+ this.markerDragId = '';
8673
+ this.markerDragArgument = null;
8674
+ this.trigger('markerDragEnd', dragEventArgs);
8675
+ }
8676
+ else {
8677
+ document.getElementById(this.element.id + "_svg").style.cursor = 'auto';
8678
+ }
8679
+ if (this.zoomModule && this.isDevice) {
8680
+ this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.scale, this.element.id + '_Zooming_');
8681
+ this.zoomModule.removeToolbarClass('', '', '', '', '');
8682
+ }
8325
8683
  return false;
8326
8684
  }
8327
8685
  /**
@@ -8329,14 +8687,19 @@ let Maps = class Maps extends Component {
8329
8687
  *
8330
8688
  * @param {PointerEvent} e - Specifies the pointer event on maps
8331
8689
  * @returns {void}
8690
+ * @private
8332
8691
  */
8333
8692
  mouseDownOnMap(e) {
8334
8693
  this.mouseDownEvent = { x: e.x, y: e.y };
8335
8694
  if (e.type.indexOf('touch') !== -1 && e.changedTouches) {
8336
8695
  this.mouseDownEvent = { x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY };
8337
8696
  }
8697
+ if (this.isDevice) {
8698
+ this.mapsTooltipModule.renderTooltip(e);
8699
+ }
8338
8700
  const rect = this.element.getBoundingClientRect();
8339
8701
  const element = e.target;
8702
+ this.markerDragId = element.id;
8340
8703
  const animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
8341
8704
  if (this.isTileMap && !isNullOrUndefined(animatedTiles)) {
8342
8705
  this.currentTiles = animatedTiles.cloneNode(true);
@@ -8399,6 +8762,7 @@ let Maps = class Maps extends Component {
8399
8762
  *
8400
8763
  * @param {PointerEvent} e - Specifies the pointer event.
8401
8764
  * @returns {void}
8765
+ * @private
8402
8766
  */
8403
8767
  mapsOnDoubleClick(e) {
8404
8768
  this.notify('dblclick', e);
@@ -8434,6 +8798,7 @@ let Maps = class Maps extends Component {
8434
8798
  *
8435
8799
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8436
8800
  * @returns {void}
8801
+ * @private
8437
8802
  */
8438
8803
  mouseMoveOnMap(e) {
8439
8804
  let target;
@@ -8449,6 +8814,9 @@ let Maps = class Maps extends Component {
8449
8814
  if (this.bubbleModule) {
8450
8815
  this.bubbleModule.bubbleMove(e);
8451
8816
  }
8817
+ if (target.id.indexOf('MarkerIndex') == -1) {
8818
+ document.getElementById(this.element.id + "_svg").style.cursor = 'auto';
8819
+ }
8452
8820
  this.onMouseMove(e);
8453
8821
  this.notify(Browser.touchMoveEvent, e);
8454
8822
  }
@@ -8457,15 +8825,40 @@ let Maps = class Maps extends Component {
8457
8825
  *
8458
8826
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8459
8827
  * @returns {void}
8828
+ * @private
8460
8829
  */
8461
8830
  onMouseMove(e) {
8462
8831
  const element = e.target;
8463
- if (!this.isTouch) {
8832
+ this.mouseMoveId = element['id'];
8833
+ let pageX;
8834
+ let pageY;
8835
+ let touches = null;
8836
+ let layerX = 0;
8837
+ let layerY = 0;
8838
+ if (e.type.indexOf('touch') == -1) {
8839
+ pageX = e.pageX;
8840
+ pageY = e.pageY;
8841
+ layerX = e['layerX'];
8842
+ layerY = e['layerY'] - (this.isTileMap ? 10 : 0);
8464
8843
  this.titleTooltip(e, e.pageX, e.pageY);
8465
8844
  if (!isNullOrUndefined(this.legendModule)) {
8466
8845
  this.legendTooltip(e, e.pageX, e.pageY, true);
8467
8846
  }
8468
8847
  }
8848
+ else {
8849
+ touches = e.touches;
8850
+ layerX = pageX = touches[0].clientX;
8851
+ layerY = pageY = touches[0].clientY - (this.isTileMap ? 10 : 0);
8852
+ }
8853
+ if (!isNullOrUndefined(this.markerDragArgument)) {
8854
+ const marker$$1 = this.markerDragArgument;
8855
+ this.mouseClickEvent['x'] = this.mouseDownEvent['x'];
8856
+ this.mouseClickEvent['y'] = this.mouseDownEvent['y'];
8857
+ this.getMarkerClickLocation(pageX, pageY, layerX, layerY, marker$$1, false);
8858
+ }
8859
+ if (this.zoomModule) {
8860
+ this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.scale, e.target.id);
8861
+ }
8469
8862
  return false;
8470
8863
  }
8471
8864
  legendTooltip(event, x, y, isTouch) {
@@ -8547,10 +8940,8 @@ let Maps = class Maps extends Component {
8547
8940
  /**
8548
8941
  * This method is used to zoom the map by specifying the center position.
8549
8942
  *
8550
- * @param {number} centerPosition - Specifies the center position
8551
- * @param {number} centerPosition.latitude - Specifies the latitude value for the center position
8552
- * @param {number} centerPosition.longitude - Specifies the longitude value for the center position
8553
- * @param {number} zoomFactor - Specifies the zoom factor for maps.
8943
+ * @param {number} centerPosition - Specifies the location of the maps to be zoomed as geographical coordinates.
8944
+ * @param {number} zoomFactor - Specifies the zoom factor for the maps.
8554
8945
  * @returns {void}
8555
8946
  */
8556
8947
  zoomByPosition(centerPosition, zoomFactor) {
@@ -8587,8 +8978,8 @@ let Maps = class Maps extends Component {
8587
8978
  /**
8588
8979
  * This method is used to perform panning by specifying the direction.
8589
8980
  *
8590
- * @param {PanDirection} direction - Specifies the direction in which the panning is performed.
8591
- * @param {PointerEvent | TouchEvent} mouseLocation - Specifies the location of the mouse pointer in maps.
8981
+ * @param {PanDirection} direction - Specifies the direction in which the panning must be performed.
8982
+ * @param {PointerEvent | TouchEvent} mouseLocation - Specifies the location of the mouse pointer in maps in pixels.
8592
8983
  * @returns {void}
8593
8984
  */
8594
8985
  panByDirection(direction, mouseLocation) {
@@ -8617,7 +9008,7 @@ let Maps = class Maps extends Component {
8617
9008
  /**
8618
9009
  * This method is used to add the layers dynamically to the maps.
8619
9010
  *
8620
- * @param {Object} layer - Specifies the layer for the maps.
9011
+ * @param {Object} layer - Specifies the layer to be added in the maps.
8621
9012
  * @returns {void}
8622
9013
  */
8623
9014
  addLayer(layer) {
@@ -8629,7 +9020,7 @@ let Maps = class Maps extends Component {
8629
9020
  }
8630
9021
  }
8631
9022
  /**
8632
- * This method is used to remove a layer from map.
9023
+ * This method is used to remove a layer from the maps.
8633
9024
  *
8634
9025
  * @param {number} index - Specifies the index number of the layer to be removed.
8635
9026
  * @returns {void}
@@ -8643,7 +9034,7 @@ let Maps = class Maps extends Component {
8643
9034
  }
8644
9035
  /**
8645
9036
  * This method is used to add markers dynamically in the maps.
8646
- * If we provide the index value of the layer in which the marker to be added and the coordinates
9037
+ * If we provide the index value of the layer in which the marker to be added and the settings
8647
9038
  * of the marker as parameters, the marker will be added in the location.
8648
9039
  *
8649
9040
  * @param {number} layerIndex - Specifies the index number of the layer.
@@ -8664,12 +9055,12 @@ let Maps = class Maps extends Component {
8664
9055
  }
8665
9056
  }
8666
9057
  /**
8667
- * This method is used to select the geometric shape element in the maps component.
9058
+ * This method is used to select the geometric shape element in the maps.
8668
9059
  *
8669
9060
  * @param {number} layerIndex - Specifies the index of the layer in maps.
8670
9061
  * @param {string | string[]} propertyName - Specifies the property name from the data source.
8671
- * @param {string} name - Specifies the name of the shape that is selected.
8672
- * @param {boolean} enable - Specifies the shape selection to be enabled.
9062
+ * @param {string} name - Specifies the name of the shape, which is mapped from the data source, that is selected.
9063
+ * @param {boolean} enable - Specifies whether the shape should be selected or the selection should be removed.
8673
9064
  * @returns {void}
8674
9065
  */
8675
9066
  shapeSelection(layerIndex, propertyName, name, enable) {
@@ -8773,12 +9164,12 @@ let Maps = class Maps extends Component {
8773
9164
  }
8774
9165
  }
8775
9166
  /**
8776
- * This method is used to zoom the maps component based on the provided coordinates.
9167
+ * This method is used to zoom the maps based on the provided coordinates.
8777
9168
  *
8778
- * @param {number} minLatitude - Specifies the minimum latitude to be zoomed.
8779
- * @param {number} minLongitude - Specifies the minimum latitude to be zoomed.
8780
- * @param {number} maxLatitude - Specifies the maximum latitude to be zoomed.
8781
- * @param {number} maxLongitude - Specifies the maximum longitude to be zoomed.
9169
+ * @param {number} minLatitude - Specifies the minimum latitude of the location to be zoomed.
9170
+ * @param {number} minLongitude - Specifies the minimum latitude of the location to be zoomed.
9171
+ * @param {number} maxLatitude - Specifies the maximum latitude of the location to be zoomed.
9172
+ * @param {number} maxLongitude - Specifies the maximum longitude of the location to be zoomed.
8782
9173
  * @returns {void}
8783
9174
  */
8784
9175
  zoomToCoordinates(minLatitude, minLongitude, maxLatitude, maxLongitude) {
@@ -8854,7 +9245,7 @@ let Maps = class Maps extends Component {
8854
9245
  this.legendSelectionCollection = [];
8855
9246
  }
8856
9247
  /**
8857
- * This method is used to set culture for maps component.
9248
+ * This method is used to set culture for maps.
8858
9249
  *
8859
9250
  * @returns {void}
8860
9251
  */
@@ -8864,7 +9255,7 @@ let Maps = class Maps extends Component {
8864
9255
  this.localeObject = new L10n(this.getModuleName(), this.defaultLocalConstants, this.locale);
8865
9256
  }
8866
9257
  /**
8867
- * This method to set locale constants to the maps component.
9258
+ * This method to set locale constants to the maps.
8868
9259
  *
8869
9260
  * @returns {void}
8870
9261
  */
@@ -8880,7 +9271,7 @@ let Maps = class Maps extends Component {
8880
9271
  };
8881
9272
  }
8882
9273
  /**
8883
- * This method disposes the maps component.
9274
+ * 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.
8884
9275
  *
8885
9276
  * @returns {void}
8886
9277
  */
@@ -8917,6 +9308,7 @@ let Maps = class Maps extends Component {
8917
9308
  * Gets component name
8918
9309
  *
8919
9310
  * @returns {string} - Returns the string value
9311
+ * @private
8920
9312
  */
8921
9313
  getModuleName() {
8922
9314
  return 'maps';
@@ -9227,7 +9619,7 @@ let Maps = class Maps extends Component {
9227
9619
  return isVisible;
9228
9620
  }
9229
9621
  /**
9230
- * This method handles the printing functionality for the maps component.
9622
+ * This method handles the printing functionality for the maps.
9231
9623
  *
9232
9624
  * @param {string[] | string | Element} id - Specifies the element to be printed.
9233
9625
  * @returns {void}
@@ -9238,13 +9630,13 @@ let Maps = class Maps extends Component {
9238
9630
  }
9239
9631
  }
9240
9632
  /**
9241
- * This method handles the export functionality for the maps component.
9633
+ * This method handles the export functionality for the maps.
9242
9634
  *
9243
9635
  * @param {ExportType} type - Specifies the type of the exported file.
9244
9636
  * @param {string} fileName - Specifies the name of the file with which the rendered maps need to be exported.
9245
- * @param {PdfPageOrientation} orientation - Specifies the orientation of the pdf document in exporting.
9246
- * @param {boolean} allowDownload - Specifies whether to download as a file or get as base64 string for the file
9247
- * @returns {Promise<string>} - Returns the string value.
9637
+ * @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document while exporting.
9638
+ * @param {boolean} allowDownload - Specifies whether to download as a file or get as base64 string for the file.
9639
+ * @returns {Promise<string>} - Specifies the base64 string of the exported image which is returned when the `allowDownload` is set to false.
9248
9640
  */
9249
9641
  export(type, fileName, orientation, allowDownload) {
9250
9642
  if (!this.isDestroyed) {
@@ -9267,8 +9659,8 @@ let Maps = class Maps extends Component {
9267
9659
  /**
9268
9660
  * This method is used to get the Bing maps URL.
9269
9661
  *
9270
- * @param {string} url - Specifies the URL of the maps.
9271
- * @returns {Promise<string>} - Returns the processed Bing URL as Promise.
9662
+ * @param {string} url - Specifies the URL of the Bing maps along with the API key.
9663
+ * @returns {Promise<string>} - Returns the processed Bing URL as `Promise`.
9272
9664
  */
9273
9665
  getBingUrlTemplate(url) {
9274
9666
  let promise;
@@ -9350,20 +9742,20 @@ let Maps = class Maps extends Component {
9350
9742
  };
9351
9743
  }
9352
9744
  /**
9353
- * This method is used to get the geo location points.
9745
+ * This method is used to get the geographical coordinates for location points in pixels when shape maps are rendered in the maps.
9354
9746
  *
9355
- * @param {number} layerIndex - Specifies the index number of the layer of the map.
9356
- * @param {number} x - Specifies the x value.
9357
- * @param {number} y - Specifies the y value.
9358
- * @returns {GeoPosition}- Returns the geo position
9747
+ * @param {number} layerIndex - Specifies the index number of the layer of the maps.
9748
+ * @param {number} x - Specifies the x value in pixel.
9749
+ * @param {number} y - Specifies the y value in pixel.
9750
+ * @returns {GeoPosition}- Returns the geographical coordinates.
9359
9751
  */
9360
9752
  getGeoLocation(layerIndex, x, y) {
9361
9753
  let latitude = 0;
9362
9754
  let longitude = 0;
9363
9755
  if (!this.isDestroyed) {
9364
9756
  const container = document.getElementById(this.element.id);
9365
- const pageX = x - container.offsetLeft;
9366
- const pageY = y - container.offsetTop;
9757
+ const pageX = x - (isNullOrUndefined(this.markerDragArgument) ? container.offsetLeft : 0);
9758
+ const pageY = y - (isNullOrUndefined(this.markerDragArgument) ? container.offsetTop : 0);
9367
9759
  const currentLayer = this.layersCollection[layerIndex];
9368
9760
  const translate = getTranslate(this, currentLayer, false);
9369
9761
  const translatePoint = translate['location'];
@@ -9382,11 +9774,11 @@ let Maps = class Maps extends Component {
9382
9774
  return Math.min(Math.max(value, minVal), maxVal);
9383
9775
  }
9384
9776
  /**
9385
- * This method is used to get the geo location points when tile maps is rendered in the maps component.
9777
+ * This method is used to get the geographical coordinates for location points in pixels when an online map provider is rendered in the maps.
9386
9778
  *
9387
- * @param {number} x - Specifies the x value
9388
- * @param {number} y - Specifies the y value
9389
- * @returns {GeoPosition} - Returns the position
9779
+ * @param {number} x - Specifies the x value in pixel.
9780
+ * @param {number} y - Specifies the y value in pixel.
9781
+ * @returns {GeoPosition} - Returns the geographical coordinates.
9390
9782
  */
9391
9783
  getTileGeoLocation(x, y) {
9392
9784
  let latitude = 0;
@@ -9394,25 +9786,25 @@ let Maps = class Maps extends Component {
9394
9786
  if (!this.isDestroyed) {
9395
9787
  const container = document.getElementById(this.element.id);
9396
9788
  const ele = document.getElementById(this.element.id + '_tile_parent');
9397
- const latLong = this.pointToLatLong(x + this.mapAreaRect.x - (ele.offsetLeft - container.offsetLeft), y + this.mapAreaRect.y - (ele.offsetTop - container.offsetTop));
9789
+ const 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)));
9398
9790
  latitude = latLong['latitude'];
9399
9791
  longitude = latLong['longitude'];
9400
9792
  }
9401
9793
  return { latitude: latitude, longitude: longitude };
9402
9794
  }
9403
9795
  /**
9404
- * This method is used to convert the point to latitude and longitude in maps.
9796
+ * This method is used to convert the point in pixels to latitude and longitude in maps.
9405
9797
  *
9406
- * @param {number} pageX - Specifies the x value for the page.
9407
- * @param {number} pageY - Specifies the y value for the page.
9408
- * @returns {Object} - Returns the object.
9798
+ * @param {number} pageX - Specifies the x position value in pixels.
9799
+ * @param {number} pageY - Specifies the y position value in pixels.
9800
+ * @returns {Object} - Returns the latitude and longitude values.
9409
9801
  */
9410
9802
  pointToLatLong(pageX, pageY) {
9411
9803
  let latitude = 0;
9412
9804
  let longitude = 0;
9413
9805
  if (!this.isDestroyed) {
9414
9806
  const padding = this.layers[this.layers.length - 1].layerType === 'GoogleStaticMap' ? 0 : 10;
9415
- pageY = (this.zoomSettings.enable) ? pageY + padding : pageY;
9807
+ pageY = pageY + padding;
9416
9808
  const mapSize = 256 * Math.pow(2, this.tileZoomLevel);
9417
9809
  const x1 = (this.clip(pageX - (this.translatePoint.x * this.scale), 0, mapSize - 1) / mapSize) - 0.5;
9418
9810
  const y1 = 0.5 - (this.clip(pageY - (this.translatePoint.y * this.scale), 0, mapSize - 1) / mapSize);
@@ -9551,6 +9943,12 @@ __decorate([
9551
9943
  __decorate([
9552
9944
  Event()
9553
9945
  ], Maps.prototype, "markerClick", void 0);
9946
+ __decorate([
9947
+ Event()
9948
+ ], Maps.prototype, "markerDragStart", void 0);
9949
+ __decorate([
9950
+ Event()
9951
+ ], Maps.prototype, "markerDragEnd", void 0);
9554
9952
  __decorate([
9555
9953
  Event()
9556
9954
  ], Maps.prototype, "markerClusterClick", void 0);
@@ -9595,6 +9993,7 @@ class Bubble {
9595
9993
  constructor(maps) {
9596
9994
  /**
9597
9995
  * Bubble Id for current layer
9996
+ * @private
9598
9997
  */
9599
9998
  this.id = '';
9600
9999
  this.maps = maps;
@@ -9745,7 +10144,7 @@ class Bubble {
9745
10144
  const bubbleDataSource = bubbleSettings.dataSource;
9746
10145
  const scale = translate['scale'];
9747
10146
  const transPoint = translate['location'];
9748
- const position = new MapLocation((this.maps.isTileMap ? (eventArgs.cx) : ((eventArgs.cx + transPoint.x) * scale)), (this.maps.isTileMap ? (eventArgs.cy) : ((eventArgs.cy + transPoint.y) * scale)));
10147
+ const 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)));
9749
10148
  bubbleElement.setAttribute('transform', 'translate( ' + (position.x) + ' ' + (position.y) + ' )');
9750
10149
  const bubble = (bubbleDataSource.length - 1) === dataIndex ? 'bubble' : null;
9751
10150
  if (bubbleSettings.bubbleType === 'Square') {
@@ -9906,6 +10305,7 @@ class DataLabel {
9906
10305
  * @param {number} index - Specifies the index number.
9907
10306
  * @param {any[]} intersect - Specifies the intersect.
9908
10307
  * @returns {void}
10308
+ * @private
9909
10309
  */
9910
10310
  renderLabel(
9911
10311
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -10291,6 +10691,7 @@ class NavigationLine {
10291
10691
  * @param {number} factor - Specifies the current zoom factor of the Maps.
10292
10692
  * @param {number} layerIndex -Specifies the index of current layer.
10293
10693
  * @returns {Element} - Returns the navigation line element.
10694
+ * @private
10294
10695
  */
10295
10696
  renderNavigation(layer, factor, layerIndex) {
10296
10697
  let group;
@@ -10499,6 +10900,7 @@ class Legend {
10499
10900
  * To calculate legend bounds and draw the legend shape and text.
10500
10901
  *
10501
10902
  * @returns {void}
10903
+ * @private
10502
10904
  */
10503
10905
  renderLegend() {
10504
10906
  this.legendRenderingCollections = [];
@@ -10838,6 +11240,7 @@ class Legend {
10838
11240
  // eslint-disable-next-line valid-jsdoc
10839
11241
  /**
10840
11242
  * To draw the legend shape and text.
11243
+ * @private
10841
11244
  */
10842
11245
  drawLegend() {
10843
11246
  const map = this.maps;
@@ -12656,6 +13059,7 @@ class Highlight {
12656
13059
  // eslint-disable-next-line valid-jsdoc
12657
13060
  /**
12658
13061
  * Public method for highlight module
13062
+ * @private
12659
13063
  */
12660
13064
  addHighlight(layerIndex, name, enable) {
12661
13065
  const targetEle = getTargetElement(layerIndex, name, enable, this.maps);
@@ -12979,6 +13383,7 @@ class Selection {
12979
13383
  // eslint-disable-next-line valid-jsdoc
12980
13384
  /**
12981
13385
  * Public method for selection
13386
+ * @private
12982
13387
  */
12983
13388
  addSelection(layerIndex, name, enable) {
12984
13389
  const targetElement = getTargetElement(layerIndex, name, enable, this.maps);
@@ -13183,6 +13588,9 @@ class MapsTooltip {
13183
13588
  this.tooltipId = this.maps.element.id + '_mapsTooltip';
13184
13589
  this.addEventListener();
13185
13590
  }
13591
+ /**
13592
+ * @private
13593
+ */
13186
13594
  renderTooltip(e) {
13187
13595
  let pageX;
13188
13596
  let pageY;
@@ -13203,6 +13611,10 @@ class MapsTooltip {
13203
13611
  pageY = e.pageY;
13204
13612
  target = e.target;
13205
13613
  }
13614
+ if (this.maps.isDevice) {
13615
+ clearTimeout(this.clearTimeout);
13616
+ this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
13617
+ }
13206
13618
  let option;
13207
13619
  let currentData = '';
13208
13620
  const targetId = target.id;
@@ -13218,7 +13630,7 @@ class MapsTooltip {
13218
13630
  this.tooltipTargetID = targetId;
13219
13631
  const istooltipRender = (targetId.indexOf('_shapeIndex_') > -1)
13220
13632
  || (targetId.indexOf('_MarkerIndex_') > -1) || (targetId.indexOf('_BubbleIndex_') > -1);
13221
- if (istooltipRender) {
13633
+ if (istooltipRender && this.maps.markerDragArgument === null) {
13222
13634
  if (targetId.indexOf('_shapeIndex_') > -1) {
13223
13635
  option = layer.tooltipSettings;
13224
13636
  const shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
@@ -13370,8 +13782,8 @@ class MapsTooltip {
13370
13782
  header: '',
13371
13783
  data: option['data'],
13372
13784
  template: option['template'],
13373
- content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
13374
- [currentData.toString()],
13785
+ content: tooltipArgs.content.toString() !== currentData.toString() ? [SanitizeHtmlHelper.sanitize(tooltipArgs.content.toString())] :
13786
+ [SanitizeHtmlHelper.sanitize(currentData.toString())],
13375
13787
  shapes: [],
13376
13788
  location: option['location'],
13377
13789
  palette: [markerFill],
@@ -13387,8 +13799,8 @@ class MapsTooltip {
13387
13799
  header: '',
13388
13800
  data: tooltipArgs.options['data'],
13389
13801
  template: tooltipArgs.options['template'],
13390
- content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
13391
- [currentData.toString()],
13802
+ content: tooltipArgs.content.toString() !== currentData.toString() ? [SanitizeHtmlHelper.sanitize(tooltipArgs.content.toString())] :
13803
+ [SanitizeHtmlHelper.sanitize(currentData.toString())],
13392
13804
  shapes: [],
13393
13805
  location: tooltipArgs.options['location'],
13394
13806
  palette: [markerFill],
@@ -13476,6 +13888,9 @@ class MapsTooltip {
13476
13888
  }
13477
13889
  return format;
13478
13890
  }
13891
+ /**
13892
+ * @private
13893
+ */
13479
13894
  mouseUpHandler(e) {
13480
13895
  this.renderTooltip(e);
13481
13896
  if (this.maps.tooltipDisplayMode === 'MouseMove') {
@@ -13483,6 +13898,9 @@ class MapsTooltip {
13483
13898
  this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
13484
13899
  }
13485
13900
  }
13901
+ /**
13902
+ * @private
13903
+ */
13486
13904
  removeTooltip() {
13487
13905
  let isTooltipRemoved = false;
13488
13906
  if (document.getElementsByClassName('EJ2-maps-Tooltip').length > 0) {
@@ -13501,6 +13919,7 @@ class MapsTooltip {
13501
13919
  // eslint-disable-next-line valid-jsdoc
13502
13920
  /**
13503
13921
  * To bind events for tooltip module
13922
+ * @private
13504
13923
  */
13505
13924
  addEventListener() {
13506
13925
  if (this.maps.isDestroyed) {
@@ -13518,6 +13937,9 @@ class MapsTooltip {
13518
13937
  this.maps.on(Browser.touchCancelEvent, this.removeTooltip, this);
13519
13938
  this.maps.element.addEventListener('contextmenu', this.removeTooltip);
13520
13939
  }
13940
+ /**
13941
+ * @private
13942
+ */
13521
13943
  removeEventListener() {
13522
13944
  if (this.maps) {
13523
13945
  if (this.maps.isDestroyed) {
@@ -13565,32 +13987,44 @@ class MapsTooltip {
13565
13987
  */
13566
13988
  class Zoom {
13567
13989
  constructor(maps) {
13990
+ /** @private */
13568
13991
  this.isPanning = false;
13992
+ /** @private */
13569
13993
  this.mouseEnter = false;
13994
+ /** @private */
13570
13995
  this.isTouch = false;
13996
+ /** @private */
13571
13997
  this.rectZoomingStart = false;
13998
+ /** @private */
13572
13999
  this.browserName = Browser.info.name;
13573
14000
  // eslint-disable-next-line @typescript-eslint/ban-types
14001
+ /** @private */
13574
14002
  this.isPointer = Browser.isPointer;
13575
14003
  this.handled = false;
14004
+ this.isPan = false;
14005
+ this.isZoomFinal = false;
14006
+ this.isZoomSelection = false;
13576
14007
  this.pinchFactor = 1;
13577
14008
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13578
14009
  this.startTouches = [];
13579
14010
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14011
+ /** @private */
13580
14012
  this.intersect = [];
13581
14013
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14014
+ /** @private */
13582
14015
  this.mouseDownLatLong = { x: 0, y: 0 };
13583
14016
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14017
+ /** @private */
13584
14018
  this.mouseMoveLatLong = { x: 0, y: 0 };
13585
- /**
13586
- * @private
13587
- */
14019
+ /** @private */
13588
14020
  this.isSingleClick = false;
13589
14021
  this.maps = maps;
13590
14022
  this.wheelEvent = this.browserName === 'mozilla' ? (this.isPointer ? 'mousewheel' : 'DOMMouseScroll') : 'mousewheel';
13591
14023
  this.cancelEvent = this.isPointer ? 'pointerleave' : 'mouseleave';
13592
- this.selectionColor = this.maps.zoomSettings.selectionColor;
13593
- this.fillColor = this.maps.zoomSettings.color;
14024
+ this.selectionColor = this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor == null ?
14025
+ this.maps.zoomSettings.selectionColor : this.maps.zoomSettings.toolbarSettings.buttonSettings.selectionColor;
14026
+ this.fillColor = this.maps.zoomSettings.toolbarSettings.buttonSettings.color == null ? this.maps.zoomSettings.color :
14027
+ this.maps.zoomSettings.toolbarSettings.buttonSettings.color;
13594
14028
  this.addEventListener();
13595
14029
  }
13596
14030
  /**
@@ -13600,6 +14034,7 @@ class Zoom {
13600
14034
  * @param {number} newZoomFactor - Specifies the zoom factor.
13601
14035
  * @param {string} type - Specifies the type.
13602
14036
  * @returns {void}
14037
+ * @private
13603
14038
  */
13604
14039
  performZooming(position, newZoomFactor, type) {
13605
14040
  const map = this.maps;
@@ -13613,6 +14048,7 @@ class Zoom {
13613
14048
  const maxZoom = map.zoomSettings.maxZoom;
13614
14049
  const minZoom = map.zoomSettings.minZoom;
13615
14050
  newZoomFactor = (minZoom > newZoomFactor && type === 'ZoomIn') ? minZoom + 1 : newZoomFactor;
14051
+ newZoomFactor = maxZoom >= newZoomFactor ? newZoomFactor : maxZoom;
13616
14052
  const prevTilePoint = map.tileTranslatePoint;
13617
14053
  if ((!map.isTileMap) && ((type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)
13618
14054
  || map.isReset)) {
@@ -13701,6 +14137,9 @@ class Zoom {
13701
14137
  }
13702
14138
  }
13703
14139
  this.maps.zoomNotApplied = false;
14140
+ if (this.maps.isDevice) {
14141
+ this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
14142
+ }
13704
14143
  }
13705
14144
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13706
14145
  calculateInitalZoomTranslatePoint(newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map) {
@@ -13745,6 +14184,9 @@ class Zoom {
13745
14184
  map.tileTranslatePoint.y = (currentLevel === 1) ? ((bounds.height / 2) - ((tileDefaultSize * 2) / 2) + (padding * 2)) :
13746
14185
  position.y - ((y * totalSize) / 100);
13747
14186
  }
14187
+ /**
14188
+ * @private
14189
+ */
13748
14190
  performRectZooming() {
13749
14191
  this.isDragZoom = true;
13750
14192
  const map = this.maps;
@@ -13763,11 +14205,14 @@ class Zoom {
13763
14205
  if (!map.isTileMap) {
13764
14206
  const scale = map.previousScale = map.scale;
13765
14207
  zoomCalculationFactor = scale + Math.round((((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2));
14208
+ zoomCalculationFactor = zoomCalculationFactor < this.maps.zoomSettings.maxZoom ? zoomCalculationFactor : this.maps.zoomSettings.maxZoom;
13766
14209
  const translatePoint = map.previousPoint = map.translatePoint;
13767
- const translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomCalculationFactor)) / (size.width / x));
13768
- const translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
13769
- map.translatePoint = new Point(translatePointX, translatePointY);
13770
- map.scale = zoomCalculationFactor;
14210
+ if (zoomCalculationFactor <= maxZoom) {
14211
+ const translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomCalculationFactor)) / (size.width / x));
14212
+ const translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
14213
+ map.translatePoint = new Point(translatePointX, translatePointY);
14214
+ }
14215
+ map.scale = zoomCalculationFactor < this.maps.zoomSettings.maxZoom ? zoomCalculationFactor : this.maps.zoomSettings.maxZoom;
13771
14216
  isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13772
14217
  if (isZoomCancelled) {
13773
14218
  map.translatePoint = map.previousPoint;
@@ -13801,6 +14246,8 @@ class Zoom {
13801
14246
  this.zoomingRect = null;
13802
14247
  }
13803
14248
  }
14249
+ this.isZoomFinal = this.isZoomSelection && Math.round(map.scale) === this.maps.zoomSettings.maxZoom;
14250
+ this.removeToolbarOpacity(map.scale, this.maps.element.id + '_Zooming_');
13804
14251
  }
13805
14252
  setInteraction(newInteraction) {
13806
14253
  this.lastScale = 1;
@@ -13814,6 +14261,9 @@ class Zoom {
13814
14261
  this.setInteraction(null);
13815
14262
  }
13816
14263
  }
14264
+ /**
14265
+ * @private
14266
+ */
13817
14267
  performPinchZooming(e) {
13818
14268
  const map = this.maps;
13819
14269
  const prevLevel = map.tileZoomLevel;
@@ -13886,7 +14336,13 @@ class Zoom {
13886
14336
  if (!isZoomCancelled) {
13887
14337
  this.applyTransform(map);
13888
14338
  }
14339
+ if (Browser.isDevice) {
14340
+ this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
14341
+ }
13889
14342
  }
14343
+ /**
14344
+ * @private
14345
+ */
13890
14346
  drawZoomRectangle() {
13891
14347
  const map = this.maps;
13892
14348
  const down = this.mouseDownPoints;
@@ -13904,7 +14360,8 @@ class Zoom {
13904
14360
  const rectSVGObject = map.renderer.createSvg({
13905
14361
  id: map.element.id + '_Selection_Rect_Zooming',
13906
14362
  width: map.availableSize.width,
13907
- height: map.availableSize.height
14363
+ height: map.availableSize.height,
14364
+ style: 'position: absolute;'
13908
14365
  });
13909
14366
  const rectOption = new RectOption(map.element.id + '_ZoomRect', '#d3d3d3', border, 0.5, this.zoomingRect, 0, 0, '', '3');
13910
14367
  rectSVGObject.appendChild(map.renderer.drawRectangle(rectOption));
@@ -13931,6 +14388,9 @@ class Zoom {
13931
14388
  zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13932
14389
  }
13933
14390
  }
14391
+ /**
14392
+ * @private
14393
+ */
13934
14394
  applyTransform(maps, animate$$1) {
13935
14395
  let layerIndex;
13936
14396
  this.templateCount = 0;
@@ -14084,7 +14544,7 @@ class Zoom {
14084
14544
  if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1 && !isNullOrUndefined(maps.zoomLabelPositions[labelIndex])) {
14085
14545
  const labelX = ((maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
14086
14546
  const labelY = ((maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
14087
- const zoomtext = currentEle.childNodes[k]['innerHTML'];
14547
+ const zoomtext = currentEle.childNodes[k]['textContent'];
14088
14548
  const style = maps.layers[this.index].dataLabelSettings.textStyle;
14089
14549
  const zoomtextSize = measureText(zoomtext, style);
14090
14550
  const padding = 5;
@@ -14225,7 +14685,7 @@ class Zoom {
14225
14685
  const datalabelTemplateElemement = getElementByID(maps.element.id + '_LayerIndex_'
14226
14686
  + i + '_Label_Template_Group');
14227
14687
  if ((!isNullOrUndefined(markerTemplateElement)) && markerTemplateElement.childElementCount > 0) {
14228
- markerTemplateElement.style.visibility = "visible";
14688
+ markerTemplateElement.style.visibility = 'visible';
14229
14689
  for (let k = 0; k < markerTemplateElement.childElementCount; k++) {
14230
14690
  this.markerTranslate(markerTemplateElement.childNodes[k], factor, x, y, scale, 'Template');
14231
14691
  }
@@ -14298,23 +14758,23 @@ class Zoom {
14298
14758
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Hide') {
14299
14759
  if (scale > 1) {
14300
14760
  text = ((this.maps.dataLabelShape[l] * scale) >= zoomtextSize['width']) ? zoomtext : '';
14301
- element.innerHTML = text;
14761
+ element.textContent = text;
14302
14762
  }
14303
14763
  else {
14304
14764
  text = (this.maps.dataLabelShape[l] >= zoomtextSize['width']) ? zoomtext : '';
14305
- element.innerHTML = text;
14765
+ element.textContent = text;
14306
14766
  }
14307
14767
  }
14308
14768
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Trim') {
14309
14769
  if (scale > 1) {
14310
14770
  zoomtrimLabel = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
14311
14771
  text = zoomtrimLabel;
14312
- element.innerHTML = text;
14772
+ element.textContent = text;
14313
14773
  }
14314
14774
  else {
14315
14775
  zoomtrimLabel = textTrim(this.maps.dataLabelShape[l], zoomtext, style);
14316
14776
  text = zoomtrimLabel;
14317
- element.innerHTML = text;
14777
+ element.textContent = text;
14318
14778
  }
14319
14779
  }
14320
14780
  if (this.maps.layers[this.index].dataLabelSettings.intersectionAction === 'Hide') {
@@ -14325,11 +14785,11 @@ class Zoom {
14325
14785
  || textLocations['heightTop'] > this.intersect[m]['heightBottom']
14326
14786
  || textLocations['heightBottom'] < this.intersect[m]['heightTop']) {
14327
14787
  text = !isNullOrUndefined(text) ? text : zoomtext;
14328
- element.innerHTML = text;
14788
+ element.textContent = text;
14329
14789
  }
14330
14790
  else {
14331
14791
  text = '';
14332
- element.innerHTML = text;
14792
+ element.textContent = text;
14333
14793
  break;
14334
14794
  }
14335
14795
  }
@@ -14347,7 +14807,7 @@ class Zoom {
14347
14807
  if (scale > 1) {
14348
14808
  trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), trimmedLable, style);
14349
14809
  }
14350
- element.innerHTML = trimmedLable;
14810
+ element.textContent = trimmedLable;
14351
14811
  }
14352
14812
  else {
14353
14813
  if (textLocations['leftWidth'] > this.intersect[j]['leftWidth']) {
@@ -14355,7 +14815,7 @@ class Zoom {
14355
14815
  const difference = width - (textLocations['rightWidth'] - textLocations['leftWidth']);
14356
14816
  text = !isNullOrUndefined(text) ? text : zoomtext;
14357
14817
  trimmedLable = textTrim(difference, text, style);
14358
- element.innerHTML = trimmedLable;
14818
+ element.textContent = trimmedLable;
14359
14819
  break;
14360
14820
  }
14361
14821
  if (textLocations['leftWidth'] < this.intersect[j]['leftWidth']) {
@@ -14363,7 +14823,7 @@ class Zoom {
14363
14823
  const difference = Math.abs(width - (textLocations['rightWidth'] - textLocations['leftWidth']));
14364
14824
  text = !isNullOrUndefined(text) ? text : zoomtext;
14365
14825
  trimmedLable = textTrim(difference, text, style);
14366
- element.innerHTML = trimmedLable;
14826
+ element.textContent = trimmedLable;
14367
14827
  break;
14368
14828
  }
14369
14829
  }
@@ -14372,7 +14832,7 @@ class Zoom {
14372
14832
  this.intersect.push(textLocations);
14373
14833
  if (isNullOrUndefined(trimmedLable)) {
14374
14834
  trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
14375
- element.innerHTML = trimmedLable;
14835
+ element.textContent = trimmedLable;
14376
14836
  }
14377
14837
  }
14378
14838
  if (animate$$1 || duration > 0) {
@@ -14564,6 +15024,9 @@ class Zoom {
14564
15024
  (this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
14565
15025
  this.applyTransform(this.maps, false);
14566
15026
  }
15027
+ /**
15028
+ * @private
15029
+ */
14567
15030
  toolBarZooming(zoomFactor, type) {
14568
15031
  const map = this.maps;
14569
15032
  map.initialCheck = false;
@@ -14581,9 +15044,9 @@ class Zoom {
14581
15044
  const prevTilePoint = map.tileTranslatePoint;
14582
15045
  map.previousProjection = map.projectionType;
14583
15046
  zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
14584
- zoomFactor = (type === 'Reset') ? 1 : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
15047
+ zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
14585
15048
  zoomFactor = (minZoom > zoomFactor && type === 'ZoomIn') ? minZoom + 1 : zoomFactor;
14586
- if ((!map.isTileMap) && (type === 'ZoomIn' ? zoomFactor >= minZoom && zoomFactor <= maxZoom : zoomFactor >= minZoom
15049
+ if ((!map.isTileMap) && (type === 'ZoomIn' ? zoomFactor >= minZoom && Math.round(zoomFactor) <= maxZoom : zoomFactor >= minZoom
14587
15050
  || map.isReset)) {
14588
15051
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14589
15052
  const min = map.baseMapRectBounds['min'];
@@ -14668,6 +15131,9 @@ class Zoom {
14668
15131
  this.maps.zoomNotApplied = false;
14669
15132
  }
14670
15133
  }
15134
+ /**
15135
+ * @private
15136
+ */
14671
15137
  createZoomingToolbars() {
14672
15138
  const map = this.maps;
14673
15139
  let zoomInElements;
@@ -14676,36 +15142,59 @@ class Zoom {
14676
15142
  id: map.element.id + '_Zooming_KitCollection',
14677
15143
  opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
14678
15144
  });
14679
- const kitHeight = 16;
14680
- const kitWidth = 16;
14681
15145
  let xSpacing = 15;
14682
15146
  let ySpacing = 15;
14683
- const padding = 20;
14684
- const orientation = map.zoomSettings.toolBarOrientation;
14685
- const toolbarsCollection = map.zoomSettings.toolbars;
15147
+ const toolbar = map.zoomSettings.toolbarSettings;
15148
+ const button = map.zoomSettings.toolbarSettings.buttonSettings;
15149
+ this.maps.toolbarProperties = {
15150
+ toolBarOrientation: toolbar.orientation === 'Horizontal' ? map.zoomSettings.toolBarOrientation : toolbar.orientation,
15151
+ highlightColor: button.highlightColor == null ? map.zoomSettings.highlightColor : button.highlightColor,
15152
+ selectionColor: button.selectionColor == null ? map.zoomSettings.selectionColor : button.selectionColor,
15153
+ horizontalAlignment: toolbar.horizontalAlignment === 'Far' ? map.zoomSettings.horizontalAlignment : toolbar.horizontalAlignment,
15154
+ verticalAlignment: toolbar.verticalAlignment === 'Near' ? map.zoomSettings.verticalAlignment : toolbar.verticalAlignment,
15155
+ color: button.color == null ? map.zoomSettings.color : button.color,
15156
+ shapeOpacity: button.opacity !== 1 ? button.opacity : 1,
15157
+ borderOpacity: button.borderOpacity !== 1 ? button.borderOpacity : 1
15158
+ };
15159
+ const cx = button.radius / 4;
15160
+ const cy = button.radius / 4;
15161
+ const radius = button.radius / 2;
15162
+ const padding = button.padding;
15163
+ const orientation = this.maps.toolbarProperties.toolBarOrientation;
15164
+ const toolbarCollection = map.zoomSettings.toolbarSettings.buttonSettings.toolbarItems.map((value) => { return value; });
15165
+ const toolbarsCollection = toolbarCollection.length === 3 ? map.zoomSettings.toolbars : toolbarCollection;
15166
+ xSpacing = (button.radius / 4) + (button.borderWidth / 2) + padding;
15167
+ ySpacing = (button.radius / 4) + (button.borderWidth / 2) + padding;
14686
15168
  let shadowElement = '<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';
14687
15169
  shadowElement += '<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>';
14688
15170
  shadowElement += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';
14689
- const toolBarLength = map.zoomSettings.toolbars.length;
14690
- const toolWidth = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (toolBarLength * kitWidth) + (toolBarLength * padding) : (kitWidth * 2);
14691
- const toolHeight = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (kitHeight * 2) : (toolBarLength * kitHeight) + (toolBarLength * padding);
15171
+ const toolBarLength = toolbarCollection.length;
15172
+ const toolWidth = (orientation === 'Horizontal') ? ((toolBarLength * button.radius) + (toolBarLength * padding) + padding + (toolBarLength * button.borderWidth)) : (button.radius + button.borderWidth + (2 * padding));
15173
+ const toolHeight = (orientation === 'Horizontal') ? (button.radius + button.borderWidth + (2 * padding)) : ((toolBarLength * button.radius) + (toolBarLength * padding) + padding + (toolBarLength * button.borderWidth));
14692
15174
  const defElement = map.renderer.createDefs();
14693
15175
  defElement.innerHTML = shadowElement;
14694
15176
  this.toolBarGroup.appendChild(defElement);
14695
- const outerElement = map.renderer.drawRectangle(new RectOption(map.element.id + '_Zooming_Rect', 'transparent', { color: 'transparent', width: 1 }, 0.1, new Rect(0, 0, toolWidth, toolHeight), 0, 0));
14696
- outerElement.setAttribute('filter', 'url(#chart_shadow)');
15177
+ const 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));
14697
15178
  this.toolBarGroup.appendChild(outerElement);
14698
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15179
+ const scaleX = (button.radius - (button.borderWidth / 2)) / 30;
14699
15180
  for (let i = 0; i < toolbarsCollection.length; i++) {
15181
+ if (i !== 0) {
15182
+ xSpacing = (map.toolbarProperties.toolBarOrientation === 'Horizontal') ? (xSpacing + (button.radius + padding) + button.borderWidth) : xSpacing;
15183
+ ySpacing = (map.toolbarProperties.toolBarOrientation === 'Horizontal') ? ySpacing : (ySpacing + (button.radius + padding) + button.borderWidth);
15184
+ }
14700
15185
  const toolbar = toolbarsCollection[i];
15186
+ const pathStroke = !isNullOrUndefined(this.maps.toolbarProperties.color) ? this.maps.toolbarProperties.color : this.maps.themeStyle.zoomFillColor;
15187
+ const borderColor = button.borderColor || this.maps.themeStyle.zoomFillColor;
14701
15188
  this.currentToolbarEle = map.renderer.createGroup({
14702
15189
  id: map.element.id + '_Zooming_ToolBar_' + toolbar + '_Group',
14703
15190
  transform: 'translate( ' + xSpacing + ' ' + ySpacing + ' ) '
14704
15191
  });
14705
15192
  this.currentToolbarEle.setAttribute('class', 'e-maps-toolbar');
14706
- const fill = 'transparent';
15193
+ this.currentToolbarEle.appendChild(map.renderer.drawCircle(new CircleOption(map.element.id + '_Zooming_ToolBar_' + toolbar + '_Rect', button.fill, { color: borderColor, width: button.borderWidth, opacity: button.borderOpacity }, button.opacity, cx, cy, radius, '')));
15194
+ let opacity = 1;
14707
15195
  let direction = '';
14708
- this.selectionColor = this.maps.zoomSettings.selectionColor || this.maps.themeStyle.zoomSelectionColor;
15196
+ const fill = button.fill;
15197
+ this.selectionColor = this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor;
14709
15198
  switch (toolbar.toLowerCase()) {
14710
15199
  case 'zoom': {
14711
15200
  let fillColor;
@@ -14713,36 +15202,51 @@ class Zoom {
14713
15202
  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,';
14714
15203
  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';
14715
15204
  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,';
15205
+ this.currentToolbarEle.setAttribute('class', (this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : ''));
14716
15206
  if (this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
14717
15207
  fillColor = fill;
14718
- strokeColor = this.maps.themeStyle.zoomFillColor;
15208
+ strokeColor = pathStroke;
14719
15209
  }
14720
15210
  else if (this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
14721
15211
  fillColor = fill;
14722
- strokeColor = this.maps.themeStyle.zoomFillColor;
15212
+ strokeColor = pathStroke;
14723
15213
  }
14724
15214
  else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
14725
15215
  fillColor = fill;
14726
- strokeColor = this.maps.themeStyle.zoomFillColor;
15216
+ strokeColor = pathStroke;
15217
+ }
15218
+ else if (!this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
15219
+ fillColor = this.maps.themeStyle.zoomFillColor;
15220
+ strokeColor = pathStroke;
15221
+ }
15222
+ else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
15223
+ fillColor = fill;
15224
+ strokeColor = pathStroke;
14727
15225
  }
14728
15226
  else {
14729
15227
  fillColor = this.selectionColor;
14730
15228
  strokeColor = this.selectionColor;
14731
15229
  }
14732
- this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, fillColor, 1, strokeColor, 1, 1, null, direction + '4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z')));
15230
+ const zoomPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, fillColor, 1, strokeColor, opacity, opacity, null, direction + '4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z'));
15231
+ zoomPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
15232
+ this.currentToolbarEle.appendChild(zoomPath);
14733
15233
  this.zoomElements = this.currentToolbarEle;
14734
15234
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14735
15235
  break;
14736
15236
  }
14737
15237
  case 'zoomin':
14738
15238
  direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
14739
- this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar + '_Path', fill, 3, this.maps.themeStyle.zoomFillColor, 1, 1, null, direction)));
15239
+ const zoomInPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar + '_Path', fill, 3, pathStroke, 1, 1, null, direction));
15240
+ zoomInPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
15241
+ this.currentToolbarEle.appendChild(zoomInPath);
14740
15242
  zoomInElements = this.currentToolbarEle;
14741
15243
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14742
15244
  break;
14743
15245
  case 'zoomout':
14744
15246
  direction = 'M 0, 8 L 16, 8';
14745
- this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, fill, 3, this.maps.themeStyle.zoomFillColor, 1, 1, null, direction)));
15247
+ const zoomOutPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, fill, 3, pathStroke, 1, 1, null, direction));
15248
+ zoomOutPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
15249
+ this.currentToolbarEle.appendChild(zoomOutPath);
14746
15250
  zoomOutElements = this.currentToolbarEle;
14747
15251
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14748
15252
  break;
@@ -14750,17 +15254,20 @@ class Zoom {
14750
15254
  let color;
14751
15255
  direction = 'M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,';
14752
15256
  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';
15257
+ this.currentToolbarEle.setAttribute('class', (this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : ''));
14753
15258
  if (this.maps.zoomSettings.enablePanning && this.maps.zoomModule.isDragZoom) {
14754
- color = '#737373';
15259
+ color = this.selectionColor || this.maps.themeStyle.zoomFillColor;
14755
15260
  }
14756
15261
  else if (!this.maps.zoomSettings.enablePanning) {
14757
- color = '#737373';
15262
+ color = this.selectionColor || this.maps.themeStyle.zoomFillColor;
14758
15263
  this.currentToolbarEle.setAttribute('class', '');
14759
15264
  }
14760
15265
  else {
14761
- color = this.selectionColor;
15266
+ color = fill || this.maps.themeStyle.zoomFillColor;
14762
15267
  }
14763
- this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, color, 1, color, 1, 1, null, direction)));
15268
+ const panPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, color, 1, pathStroke, opacity, opacity, null, direction));
15269
+ panPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
15270
+ this.currentToolbarEle.appendChild(panPath);
14764
15271
  this.panColor = color;
14765
15272
  this.panElements = this.currentToolbarEle;
14766
15273
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
@@ -14770,16 +15277,18 @@ class Zoom {
14770
15277
  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,';
14771
15278
  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,';
14772
15279
  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,';
14773
- this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, this.fillColor, null, this.maps.themeStyle.zoomFillColor, 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')));
15280
+ const resetPath = map.renderer.drawPath(new PathOption(map.element.id + '_Zooming_ToolBar_' + toolbar, 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'));
15281
+ resetPath.setAttribute('transform', 'scale( ' + scaleX + ',' + scaleX + ' )');
15282
+ this.currentToolbarEle.appendChild(resetPath);
14774
15283
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14775
15284
  break;
14776
15285
  }
14777
- this.currentToolbarEle.appendChild(map.renderer.drawCircle(new CircleOption(map.element.id + '_Zooming_ToolBar_' + toolbar + '_Rect', fill, { color: this.maps.themeStyle.zoomFillColor, width: 1 }, 1, 8, 8, 16, '')));
14778
- xSpacing = (orientation === 'Horizontal') ? (xSpacing + (kitWidth + padding)) : xSpacing;
14779
- ySpacing = (orientation === 'Horizontal') ? ySpacing : (ySpacing + (kitHeight + padding));
14780
15286
  this.toolBarGroup.appendChild(this.currentToolbarEle);
14781
15287
  }
14782
15288
  }
15289
+ /**
15290
+ * @private
15291
+ */
14783
15292
  performToolBarAction(e) {
14784
15293
  const target = e.target;
14785
15294
  e.stopImmediatePropagation();
@@ -14805,29 +15314,30 @@ class Zoom {
14805
15314
  performZoomingByToolBar(type) {
14806
15315
  const map = this.maps;
14807
15316
  map.isReset = false;
15317
+ let scale = 0;
15318
+ const stateColor = this.fillColor || this.maps.themeStyle.zoomFillColor;
14808
15319
  switch (type.toLowerCase()) {
14809
15320
  case 'zoom':
14810
- this.panColor = this.fillColor;
14811
- this.zoomColor = this.selectionColor;
14812
- this.applySelection(this.zoomElements, this.selectionColor);
14813
- this.applySelection(this.panElements, this.fillColor);
15321
+ this.panColor = stateColor;
15322
+ this.zoomColor = this.maps.zoomSettings.enableSelectionZooming ? this.selectionColor : stateColor;
15323
+ this.applySelection(this.zoomElements, this.zoomColor);
15324
+ this.applySelection(this.panElements, this.panColor);
15325
+ this.isPan = false;
15326
+ this.isZoomSelection = this.maps.zoomSettings.enableSelectionZooming;
14814
15327
  break;
14815
15328
  case 'pan':
14816
- if (!this.maps.zoomSettings.enablePanning) {
14817
- this.panColor = '#737373';
14818
- }
14819
- else {
14820
- this.panColor = this.selectionColor;
14821
- }
14822
- this.zoomColor = this.fillColor;
15329
+ this.panColor = this.maps.zoomSettings.enablePanning ? this.selectionColor : stateColor;
15330
+ this.zoomColor = stateColor;
14823
15331
  if (!this.maps.zoomSettings.enablePanning) {
14824
15332
  this.applySelection(this.zoomElements, this.selectionColor);
14825
15333
  this.applySelection(this.panElements, this.panColor);
14826
15334
  }
14827
15335
  else {
14828
- this.applySelection(this.zoomElements, this.fillColor);
15336
+ this.applySelection(this.zoomElements, (this.fillColor || stateColor));
14829
15337
  this.applySelection(this.panElements, this.panColor);
14830
15338
  }
15339
+ this.isPan = this.maps.zoomSettings.enablePanning;
15340
+ this.isZoomSelection = false;
14831
15341
  break;
14832
15342
  case 'zoomin':
14833
15343
  map.staticMapZoom = map.tileZoomLevel;
@@ -14835,32 +15345,66 @@ class Zoom {
14835
15345
  map.staticMapZoom += 1;
14836
15346
  }
14837
15347
  this.toolBarZooming((map.isTileMap ? map.tileZoomLevel : map.scale) + 1, 'ZoomIn');
15348
+ scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
15349
+ if (!this.isZoomSelection) {
15350
+ if (scale === map.zoomSettings.maxZoom || scale > 1 || (scale === 1 && this.maps.isTileMap)) {
15351
+ this.applySelection(this.zoomElements, stateColor);
15352
+ this.applySelection(this.panElements, map.zoomSettings.enablePanning ? this.selectionColor : stateColor);
15353
+ }
15354
+ else if (scale === 1 && !this.maps.isTileMap) {
15355
+ this.applySelection(this.zoomElements, stateColor);
15356
+ this.applySelection(this.panElements, stateColor);
15357
+ }
15358
+ }
14838
15359
  break;
14839
15360
  case 'zoomout':
14840
15361
  map.staticMapZoom = map.tileZoomLevel;
14841
15362
  map.markerCenterLatitude = null;
14842
15363
  map.markerCenterLongitude = null;
14843
15364
  this.toolBarZooming((map.isTileMap ? map.tileZoomLevel : map.scale) - 1, 'ZoomOut');
15365
+ scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
15366
+ if (!this.isPan && this.isZoomSelection) {
15367
+ this.panColor = stateColor;
15368
+ this.zoomColor = this.selectionColor;
15369
+ this.applySelection(this.zoomElements, this.selectionColor);
15370
+ this.applySelection(this.panElements, this.panColor);
15371
+ }
15372
+ else {
15373
+ if (scale <= 1 && !map.isTileMap) {
15374
+ this.applySelection(this.panElements, stateColor);
15375
+ }
15376
+ else {
15377
+ this.applySelection(this.panElements, map.zoomSettings.enablePanning ? this.selectionColor : stateColor);
15378
+ }
15379
+ }
14844
15380
  break;
14845
15381
  case 'reset':
14846
15382
  map.staticMapZoom = map.zoomSettings.enable ? map.zoomSettings.zoomFactor : 0;
14847
15383
  map.markerCenterLatitude = null;
14848
15384
  map.markerCenterLongitude = null;
14849
- this.toolBarZooming(1, 'Reset');
14850
- if (!this.maps.zoomSettings.enablePanning) {
14851
- this.applySelection(this.zoomElements, this.selectionColor);
14852
- this.applySelection(this.panElements, '#737373');
15385
+ this.isZoomSelection = false;
15386
+ this.isPan = this.isPanning = map.zoomSettings.enablePanning;
15387
+ this.toolBarZooming(map.zoomSettings.minZoom, 'Reset');
15388
+ if ((this.isPan && !this.isZoomSelection) || (!this.isPan && this.isZoomSelection)) {
15389
+ if (!this.maps.zoomSettings.enablePanning) {
15390
+ this.applySelection(this.zoomElements, this.selectionColor);
15391
+ this.applySelection(this.panElements, stateColor);
15392
+ }
15393
+ else {
15394
+ this.applySelection(this.zoomElements, stateColor);
15395
+ this.applySelection(this.panElements, this.selectionColor);
15396
+ }
14853
15397
  }
14854
- else {
14855
- this.applySelection(this.zoomElements, this.fillColor);
14856
- this.applySelection(this.panElements, this.selectionColor);
15398
+ else if (!this.isPan && !this.isZoomSelection) {
15399
+ this.applySelection(this.zoomElements, stateColor);
15400
+ this.applySelection(this.panElements, stateColor);
14857
15401
  }
14858
15402
  }
14859
15403
  this.panningStyle(type.toLowerCase());
14860
15404
  }
14861
15405
  panningStyle(toolbar) {
14862
15406
  const svg = getElementByID(this.maps.element.id + '_svg');
14863
- if (toolbar === 'pan' || this.isPanning) {
15407
+ if (toolbar === 'pan' || (this.isPanning && toolbar !== 'reset')) {
14864
15408
  svg.setAttribute('class', 'e-maps-panning');
14865
15409
  }
14866
15410
  else {
@@ -14875,22 +15419,50 @@ class Zoom {
14875
15419
  for (let i = 0; i < elements.childElementCount; i++) {
14876
15420
  childElement = elements.childNodes[i];
14877
15421
  if (childElement.tagName !== 'circle') {
14878
- childElement.setAttribute('fill', color);
15422
+ childElement.setAttribute('fill', (elements.id.indexOf('Pan') > -1 ? color : 'transparent'));
14879
15423
  childElement.setAttribute('stroke', color);
14880
15424
  }
14881
15425
  }
14882
15426
  }
15427
+ /**
15428
+ * @private
15429
+ */
14883
15430
  showTooltip(e) {
14884
15431
  const text = e.target.id.split('_Zooming_ToolBar_')[1].split('_')[0];
15432
+ const tooltip = this.maps.zoomSettings.toolbarSettings.tooltipSettings;
15433
+ const tooltipSettings = {
15434
+ visible: tooltip.visible,
15435
+ fill: tooltip.fill,
15436
+ borderOpacity: tooltip.borderOpacity,
15437
+ borderWidth: tooltip.borderWidth,
15438
+ borderColor: tooltip.borderColor,
15439
+ fontColor: tooltip.fontColor,
15440
+ fontFamily: tooltip.fontFamily,
15441
+ fontStyle: tooltip.fontStyle,
15442
+ fontWeight: tooltip.fontWeight,
15443
+ fontSize: tooltip.fontSize || '10px',
15444
+ fontOpacity: tooltip.fontOpacity
15445
+ };
15446
+ tooltipSettings.fontFamily = this.maps.themeStyle.fontFamily;
14885
15447
  if (!this.isTouch) {
14886
- createTooltip('EJ2_Map_Toolbar_Tip', this.maps.getLocalizedLabel(text), (e.pageY + 10), (e.pageX + 10), '10px');
15448
+ createTooltip('EJ2_Map_Toolbar_Tip', this.maps.getLocalizedLabel(text), (e.pageY + 10), (e.pageX + 10), tooltipSettings);
15449
+ if (this.maps.isDevice) {
15450
+ clearTimeout(this.clearTimeout);
15451
+ this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
15452
+ }
14887
15453
  }
14888
15454
  }
15455
+ /**
15456
+ * @private
15457
+ */
14889
15458
  removeTooltip() {
14890
15459
  if (getElementByID('EJ2_Map_Toolbar_Tip')) {
14891
15460
  remove(getElementByID('EJ2_Map_Toolbar_Tip'));
14892
15461
  }
14893
15462
  }
15463
+ /**
15464
+ * @private
15465
+ */
14894
15466
  alignToolBar() {
14895
15467
  const map = this.maps;
14896
15468
  const padding = 10;
@@ -14905,12 +15477,12 @@ class Zoom {
14905
15477
  getElementByID(map.element.id + '_Secondary_Element').appendChild(element);
14906
15478
  }
14907
15479
  const toolBarSize = this.toolBarGroup.getBoundingClientRect();
14908
- rectSVGObject.setAttribute('height', (toolBarSize.height + padding / 2).toString());
14909
- rectSVGObject.setAttribute('width', (toolBarSize.width + padding / 2).toString());
15480
+ rectSVGObject.setAttribute('height', (toolBarSize.height + map.zoomSettings.toolbarSettings.borderWidth).toString());
15481
+ rectSVGObject.setAttribute('width', (toolBarSize.width + map.zoomSettings.toolbarSettings.borderWidth).toString());
14910
15482
  const size = !isNullOrUndefined(map.totalRect) ? map.totalRect : map.mapAreaRect;
14911
15483
  let x = 0;
14912
15484
  let y = 0;
14913
- switch (map.zoomSettings.verticalAlignment) {
15485
+ switch (map.toolbarProperties.verticalAlignment) {
14914
15486
  case 'Near':
14915
15487
  y = size.y;
14916
15488
  break;
@@ -14921,7 +15493,7 @@ class Zoom {
14921
15493
  y = (size.height - toolBarSize.height) - padding;
14922
15494
  break;
14923
15495
  }
14924
- switch (map.zoomSettings.horizontalAlignment) {
15496
+ switch (map.toolbarProperties.horizontalAlignment) {
14925
15497
  case 'Near':
14926
15498
  x = size.x;
14927
15499
  break;
@@ -14940,7 +15512,7 @@ class Zoom {
14940
15512
  const extraPosition = map.getExtraPosition();
14941
15513
  element.style.left = x + extraPosition.x + 'px';
14942
15514
  element.style.top = y + extraPosition.y + 'px';
14943
- const color = this.maps.zoomSettings.highlightColor || this.maps.themeStyle.zoomSelectionColor;
15515
+ const color = this.maps.toolbarProperties.highlightColor || this.maps.themeStyle.zoomSelectionColor;
14944
15516
  const css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
14945
15517
  '.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
14946
15518
  '.e-maps-popup-close { display: block; opacity: 0; }';
@@ -14948,6 +15520,141 @@ class Zoom {
14948
15520
  style.appendChild(document.createTextNode(css));
14949
15521
  element.appendChild(style);
14950
15522
  }
15523
+ /**
15524
+ * @private
15525
+ */
15526
+ removeToolbarOpacity(factor, id) {
15527
+ if (this.maps.zoomModule && this.maps.zoomSettings.enable) {
15528
+ if (getElementByID(this.maps.element.id + '_Zooming_KitCollection') && id.indexOf(this.maps.element.id + '_Zooming_') > -1) {
15529
+ if (this.maps.isDevice) {
15530
+ getElementByID(this.maps.element.id + '_Zooming_KitCollection').setAttribute('opacity', '1');
15531
+ this.removeToolbarClass('', '', '', '', '');
15532
+ }
15533
+ else {
15534
+ 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');
15535
+ }
15536
+ let toolbarShapeOpacity = this.maps.toolbarProperties.shapeOpacity;
15537
+ let toolbarButtonOpacity = this.maps.toolbarProperties.borderOpacity;
15538
+ if (this.maps.isTileMap && (factor <= 1.1 || this.maps.zoomSettings.minZoom === factor)) {
15539
+ if (!this.maps.isDevice) {
15540
+ this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : '', 'e-maps-toolbar', '', this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : '', '');
15541
+ }
15542
+ if (this.maps.zoomSettings.enablePanning) {
15543
+ this.removePanColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
15544
+ }
15545
+ if (this.isZoomSelection && this.maps.zoomSettings.enableSelectionZooming && !this.maps.isReset) {
15546
+ this.removeZoomColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
15547
+ this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
15548
+ }
15549
+ 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);
15550
+ }
15551
+ else if ((factor <= 1.1 || this.maps.zoomSettings.minZoom === factor)) {
15552
+ if (!this.maps.isDevice) {
15553
+ this.removeToolbarClass(this.maps.zoomSettings.enableSelectionZooming ? 'e-maps-toolbar' : '', 'e-maps-toolbar', '', '', '');
15554
+ }
15555
+ if (!this.isZoomSelection && this.maps.zoomSettings.enablePanning) {
15556
+ this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
15557
+ }
15558
+ if (this.isZoomSelection && this.maps.zoomSettings.enableSelectionZooming && !this.maps.isReset) {
15559
+ this.removeZoomColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
15560
+ this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
15561
+ }
15562
+ 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);
15563
+ }
15564
+ else if (factor < this.maps.zoomSettings.maxZoom) {
15565
+ if (!this.maps.isDevice) {
15566
+ 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');
15567
+ }
15568
+ if (!this.maps.zoomModule.isZoomFinal) {
15569
+ 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);
15570
+ }
15571
+ else {
15572
+ this.maps.zoomModule.isZoomFinal = false;
15573
+ }
15574
+ if (this.isZoomSelection && this.maps.zoomSettings.enableSelectionZooming) {
15575
+ this.removeZoomColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
15576
+ if (this.maps.zoomModule.isPan && this.maps.zoomSettings.enablePanning) {
15577
+ this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
15578
+ }
15579
+ }
15580
+ else if (!this.isZoomSelection && this.maps.zoomSettings.enablePanning) {
15581
+ this.removePanColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
15582
+ if (this.maps.zoomSettings.enableSelectionZooming) {
15583
+ this.removeZoomColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
15584
+ }
15585
+ }
15586
+ }
15587
+ else {
15588
+ if (!this.maps.isDevice) {
15589
+ this.removeToolbarClass('', '', 'e-maps-toolbar', this.maps.zoomSettings.enablePanning ? 'e-maps-toolbar' : '', 'e-maps-toolbar');
15590
+ }
15591
+ 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);
15592
+ if (this.maps.zoomSettings.enableSelectionZooming) {
15593
+ this.removeZoomColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
15594
+ }
15595
+ if (!this.isZoomSelection && this.maps.zoomSettings.enablePanning) {
15596
+ this.removePanColor(this.maps.toolbarProperties.selectionColor || this.maps.themeStyle.zoomSelectionColor);
15597
+ }
15598
+ }
15599
+ }
15600
+ else {
15601
+ if (!this.maps.isDevice) {
15602
+ this.removePanColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
15603
+ this.removeZoomColor(this.maps.toolbarProperties.color || this.maps.themeStyle.zoomFillColor);
15604
+ this.removeZoomOpacity(1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
15605
+ }
15606
+ }
15607
+ }
15608
+ }
15609
+ setOpacity(circleId, pathId, circleOpacity, pathOpacity) {
15610
+ if (getElementByID(this.maps.element.id + circleId)) {
15611
+ getElementByID(this.maps.element.id + circleId).setAttribute('stroke-opacity', circleOpacity.toString());
15612
+ getElementByID(this.maps.element.id + circleId).setAttribute('fill-opacity', circleOpacity.toString());
15613
+ getElementByID(this.maps.element.id + pathId).setAttribute('stroke-opacity', pathOpacity.toString());
15614
+ getElementByID(this.maps.element.id + pathId).setAttribute('fill-opacity', pathOpacity.toString());
15615
+ }
15616
+ }
15617
+ removeZoomOpacity(zoomOpacity, zoomStrokeOpacity, zoomInOpacity, zoomInStrokeOpacity, zoomOutOpacity, zoomOutStrokeOpacity, panOpacity, panStrokeOpacity, resetOpacity, resetStrokeOpacity) {
15618
+ this.setOpacity('_Zooming_ToolBar_Zoom_Rect', '_Zooming_ToolBar_Zoom', zoomStrokeOpacity, zoomOpacity);
15619
+ this.setOpacity('_Zooming_ToolBar_ZoomIn_Rect', '_Zooming_ToolBar_ZoomIn_Path', zoomInStrokeOpacity, zoomInOpacity);
15620
+ this.setOpacity('_Zooming_ToolBar_ZoomOut_Rect', '_Zooming_ToolBar_ZoomOut', zoomOutStrokeOpacity, zoomOutOpacity);
15621
+ this.setOpacity('_Zooming_ToolBar_Pan_Rect', '_Zooming_ToolBar_Pan', panStrokeOpacity, panOpacity);
15622
+ this.setOpacity('_Zooming_ToolBar_Reset_Rect', '_Zooming_ToolBar_Reset', resetStrokeOpacity, resetOpacity);
15623
+ }
15624
+ /**
15625
+ * @private
15626
+ */
15627
+ removeToolbarClass(zoomClassStyle, zoomInClassStyle, zoomOutClassStyle, panClassStyle, resetClassStyle) {
15628
+ if (getElementByID(this.maps.element.id + '_Zooming_KitCollection')) {
15629
+ if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_ZoomIn_Group')) {
15630
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_ZoomIn_Group').setAttribute('class', zoomInClassStyle);
15631
+ }
15632
+ if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_ZoomOut_Group')) {
15633
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_ZoomOut_Group').setAttribute('class', zoomOutClassStyle);
15634
+ }
15635
+ if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_Reset_Group')) {
15636
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_Reset_Group').setAttribute('class', resetClassStyle);
15637
+ }
15638
+ if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_Zoom_Group') && this.maps.zoomSettings.enableSelectionZooming) {
15639
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_Zoom_Group').setAttribute('class', zoomClassStyle);
15640
+ }
15641
+ if (document.getElementById(this.maps.element.id + '_Zooming_ToolBar_Pan_Group') && this.maps.zoomSettings.enablePanning) {
15642
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_Pan_Group').setAttribute('class', panClassStyle);
15643
+ }
15644
+ }
15645
+ }
15646
+ removePanColor(selectionColor) {
15647
+ if (getElementByID(this.maps.element.id + '_Zooming_ToolBar_Pan_Rect') && this.maps.zoomSettings.enablePanning) {
15648
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_Pan').setAttribute('fill', selectionColor);
15649
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_Pan').setAttribute('stroke', selectionColor);
15650
+ }
15651
+ }
15652
+ removeZoomColor(selectionColor) {
15653
+ if (getElementByID(this.maps.element.id + '_Zooming_ToolBar_Zoom_Rect') && this.maps.zoomSettings.enableSelectionZooming) {
15654
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_Zoom').setAttribute('fill', 'transparent');
15655
+ getElementByID(this.maps.element.id + '_Zooming_ToolBar_Zoom').setAttribute('stroke', selectionColor);
15656
+ }
15657
+ }
14951
15658
  /**
14952
15659
  * To bind events.
14953
15660
  *
@@ -14962,6 +15669,9 @@ class Zoom {
14962
15669
  EventHandler.add(element, 'mouseover', this.showTooltip, this);
14963
15670
  EventHandler.add(element, 'mouseout', this.removeTooltip, this);
14964
15671
  }
15672
+ /**
15673
+ * @private
15674
+ */
14965
15675
  mapMouseWheel(e) {
14966
15676
  if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
14967
15677
  const map = this.maps;
@@ -15002,8 +15712,13 @@ class Zoom {
15002
15712
  this.performZooming(position, (value - delta), direction);
15003
15713
  }
15004
15714
  }
15715
+ this.removeToolbarOpacity(map.mapScaleValue, (!this.maps.isDevice ? (!isNullOrUndefined(e.target) ? e.target['id'] :
15716
+ this.maps.element.id) : this.maps.element.id + '_Zooming_'));
15005
15717
  }
15006
15718
  }
15719
+ /**
15720
+ * @private
15721
+ */
15007
15722
  doubleClick(e) {
15008
15723
  const pageX = e.pageX;
15009
15724
  const pageY = e.pageY;
@@ -15023,6 +15738,9 @@ class Zoom {
15023
15738
  }
15024
15739
  }
15025
15740
  }
15741
+ /**
15742
+ * @private
15743
+ */
15026
15744
  mouseDownHandler(e) {
15027
15745
  let pageX;
15028
15746
  let pageY;
@@ -15042,15 +15760,15 @@ class Zoom {
15042
15760
  target = e.target;
15043
15761
  }
15044
15762
  if (!this.maps.zoomSettings.enablePanning) {
15045
- this.isPanning = this.panColor !== this.selectionColor ? this.maps.zoomSettings.enablePanning
15763
+ this.isPan = this.isPanning = this.panColor !== this.selectionColor ? this.maps.zoomSettings.enablePanning
15046
15764
  : this.zoomColor === this.selectionColor;
15047
15765
  }
15048
15766
  else {
15049
- this.isPanning = this.panColor === this.selectionColor ? this.maps.zoomSettings.enablePanning
15050
- : this.zoomColor !== this.selectionColor;
15767
+ this.isPan = this.isPanning = !this.isZoomSelection;
15051
15768
  }
15052
15769
  this.mouseDownLatLong = { x: pageX, y: pageY };
15053
- this.rectZoomingStart = ((!this.isPanning) && this.maps.zoomSettings.enable);
15770
+ let scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
15771
+ this.rectZoomingStart = ((this.isZoomSelection && scale < this.maps.zoomSettings.maxZoom) && this.maps.zoomSettings.enable);
15054
15772
  this.mouseDownPoints = this.getMousePosition(pageX, pageY);
15055
15773
  if (this.isTouch) {
15056
15774
  this.firstMove = true;
@@ -15059,6 +15777,9 @@ class Zoom {
15059
15777
  }
15060
15778
  this.isSingleClick = true;
15061
15779
  }
15780
+ /**
15781
+ * @private
15782
+ */
15062
15783
  mouseMoveHandler(e) {
15063
15784
  let pageX;
15064
15785
  let pageY;
@@ -15081,21 +15802,9 @@ class Zoom {
15081
15802
  if (getElementByID(map.element.id + '_Zooming_KitCollection')) {
15082
15803
  if (target.id.indexOf('_Zooming_') > -1) {
15083
15804
  getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '1');
15084
- if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
15085
- if (!this.maps.zoomSettings.enablePanning) {
15086
- if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
15087
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
15088
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
15089
- }
15090
- }
15091
- }
15092
15805
  }
15093
- else {
15806
+ else if (!map.isDevice) {
15094
15807
  getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
15095
- if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
15096
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
15097
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
15098
- }
15099
15808
  }
15100
15809
  }
15101
15810
  if (this.isTouch) {
@@ -15117,7 +15826,7 @@ class Zoom {
15117
15826
  this.mouseMovePoints = this.getMousePosition(pageX, pageY);
15118
15827
  const targetId = e.target['id'];
15119
15828
  const targetEle = e.target;
15120
- if (zoom.enable && this.isPanning && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
15829
+ if (zoom.enable && this.isPanning && this.maps.markerDragId.indexOf('_MarkerIndex_') == -1 && ((Browser.isDevice && touches.length >= 1) || !Browser.isDevice)) {
15121
15830
  e.preventDefault();
15122
15831
  this.maps.element.style.cursor = 'pointer';
15123
15832
  this.mouseMoveLatLong = { x: pageX, y: pageY };
@@ -15131,11 +15840,19 @@ class Zoom {
15131
15840
  }
15132
15841
  if (this.isTouch ? (touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
15133
15842
  e.preventDefault();
15134
- if (this.maps.zoomSettings.enableSelectionZooming) {
15843
+ let scale = this.maps.isTileMap ? Math.round(this.maps.tileZoomLevel) : Math.round(this.maps.mapScaleValue);
15844
+ if (this.maps.zoomSettings.enableSelectionZooming && scale < this.maps.zoomSettings.maxZoom) {
15135
15845
  this.drawZoomRectangle();
15136
15846
  }
15847
+ else {
15848
+ this.rectZoomingStart = false;
15849
+ this.isPan = true;
15850
+ }
15137
15851
  }
15138
15852
  }
15853
+ /**
15854
+ * @private
15855
+ */
15139
15856
  mouseUpHandler(e) {
15140
15857
  const map = this.maps;
15141
15858
  this.rectZoomingStart = false;
@@ -15158,6 +15875,9 @@ class Zoom {
15158
15875
  this.mouseMoveLatLong = { x: 0, y: 0 };
15159
15876
  this.mouseDownLatLong = { x: 0, y: 0 };
15160
15877
  }
15878
+ /**
15879
+ * @private
15880
+ */
15161
15881
  mouseCancelHandler(e) {
15162
15882
  this.isPanning = false;
15163
15883
  this.isTouch = false;
@@ -15173,6 +15893,7 @@ class Zoom {
15173
15893
  *
15174
15894
  * @param {PointerEvent} e - Specifies the pointer event.
15175
15895
  * @returns {void}
15896
+ * @private
15176
15897
  */
15177
15898
  click(e) {
15178
15899
  const map = this.maps;
@@ -15195,6 +15916,9 @@ class Zoom {
15195
15916
  }
15196
15917
  }
15197
15918
  }
15919
+ /**
15920
+ * @private
15921
+ */
15198
15922
  getMousePosition(pageX, pageY) {
15199
15923
  const map = this.maps;
15200
15924
  const elementRect = map.element.getBoundingClientRect();
@@ -15206,6 +15930,9 @@ class Zoom {
15206
15930
  const positionY = elementRect.top + pageYOffset - clientTop;
15207
15931
  return new Point(Math.abs(pageX - positionX), Math.abs(pageY - positionY));
15208
15932
  }
15933
+ /**
15934
+ * @private
15935
+ */
15209
15936
  addEventListener() {
15210
15937
  if (this.maps.isDestroyed) {
15211
15938
  return;
@@ -15218,6 +15945,9 @@ class Zoom {
15218
15945
  this.maps.on(Browser.touchEndEvent, this.mouseUpHandler, this);
15219
15946
  EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this);
15220
15947
  }
15948
+ /**
15949
+ * @private
15950
+ */
15221
15951
  removeEventListener() {
15222
15952
  if (this.maps.isDestroyed) {
15223
15953
  return;
@@ -15370,7 +16100,7 @@ class Print {
15370
16100
  }
15371
16101
 
15372
16102
  /**
15373
- * This module enables the export to Image functionality in Maps control.
16103
+ * This module enables the export to Image functionality in maps.
15374
16104
  *
15375
16105
  * @hidden
15376
16106
  */
@@ -15539,7 +16269,7 @@ class ImageExport {
15539
16269
  }
15540
16270
 
15541
16271
  /**
15542
- * This module enables the export to PDF functionality in Maps control.
16272
+ * This module enables the export to PDF functionality in maps.
15543
16273
  *
15544
16274
  * @hidden
15545
16275
  */
@@ -15557,7 +16287,7 @@ class PdfExport {
15557
16287
  * @param {ExportType} type - Specifies the type of the document.
15558
16288
  * @param {string} fileName - Specifies the name of the PDF document.
15559
16289
  * @param {boolean} allowDownload - Specifies whether to download the document or not.
15560
- * @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the component.
16290
+ * @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the maps.
15561
16291
  * @returns {Promise<string>} - Returns "null" value when the allowDownload is set to false.
15562
16292
  * @private
15563
16293
  */
@@ -15703,5 +16433,5 @@ class PdfExport {
15703
16433
  * exporting all modules from maps index
15704
16434
  */
15705
16435
 
15706
- 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 };
16436
+ 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 };
15707
16437
  //# sourceMappingURL=ej2-maps.es2015.js.map