@syncfusion/ej2-maps 20.4.49 → 21.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +4 -20
  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 +993 -236
  6. package/dist/es6/ej2-maps.es2015.js.map +1 -1
  7. package/dist/es6/ej2-maps.es5.js +1008 -236
  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 +9 -4
  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 +42 -3
  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 +144 -88
  28. package/src/maps/maps.js +217 -61
  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 +76 -16
  53. package/src/maps/utils/helper.js +122 -37
  54. package/.eslintrc.json +0 -259
  55. package/tslint.json +0 -111
@@ -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,8 +3265,9 @@ 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
- function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeight, maps) {
3270
+ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeight, maps, isZoomToCoordinates) {
3186
3271
  let scaleFactor;
3187
3272
  const maxZoomFact = maps.zoomSettings.maxZoom;
3188
3273
  let applyMethodeZoom;
@@ -3195,9 +3280,7 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
3195
3280
  if (maps.zoomNotApplied && !maps.isTileMap) {
3196
3281
  const latiRatio = Math.abs((maps.baseMapBounds.latitude.max - maps.baseMapBounds.latitude.min) / (maxLat - minLat));
3197
3282
  const longiRatio = Math.abs((maps.baseMapBounds.longitude.max - maps.baseMapBounds.longitude.min) / (maxLong - minLong));
3198
- applyMethodeZoom = Math.min(latiRatio, longiRatio);
3199
- const minLocation = convertGeoToPoint(minLat, minLong, 1, maps.layersCollection[0], maps);
3200
- const maxLocation = convertGeoToPoint(maxLat, maxLong, 1, maps.layersCollection[0], maps);
3283
+ applyMethodeZoom = isZoomToCoordinates ? (latiRatio + longiRatio) / 2 : Math.min(latiRatio, longiRatio);
3201
3284
  }
3202
3285
  const latRatio = (maxLatValue - minLatValue) / Math.PI;
3203
3286
  const lngDiff = maxLong - minLong;
@@ -3206,7 +3289,8 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
3206
3289
  const WORLD_PX_WIDTH = 256;
3207
3290
  const latZoom = (Math.log(mapHeight / WORLD_PX_HEIGHT / latRatio) / Math.LN2);
3208
3291
  const lngZoom = (Math.log(mapWidth / WORLD_PX_WIDTH / lngRatio) / Math.LN2);
3209
- const result = (maps.zoomNotApplied && !maps.isTileMap) ? applyMethodeZoom : Math.min(latZoom, lngZoom);
3292
+ const result = (maps.zoomNotApplied && !maps.isTileMap) ? applyMethodeZoom :
3293
+ isZoomToCoordinates && !maps.isTileMap ? (latZoom + lngZoom) / 2 : Math.min(latZoom, lngZoom);
3210
3294
  scaleFactor = Math.min(result, maxZoomFact);
3211
3295
  scaleFactor = maps.isTileMap || !maps.zoomNotApplied ? Math.floor(scaleFactor) : scaleFactor;
3212
3296
  if (!maps.isTileMap) {
@@ -3219,6 +3303,7 @@ function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeigh
3219
3303
  *
3220
3304
  * @param {any} e - Specifies the any type value
3221
3305
  * @returns {any} - Returns the data value
3306
+ * @private
3222
3307
  */
3223
3308
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3224
3309
  function processResult(e) {
@@ -3544,6 +3629,7 @@ var DarkTheme;
3544
3629
  *
3545
3630
  * @param {MapsTheme} theme - Specifies the theme.
3546
3631
  * @returns {IThemeStyle} - Returns the theme style.
3632
+ * @private
3547
3633
  */
3548
3634
  function getThemeStyle(theme) {
3549
3635
  let style;
@@ -3798,7 +3884,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
3798
3884
  * Maps base document
3799
3885
  */
3800
3886
  /**
3801
- * 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.
3802
3888
  */
3803
3889
  class Annotation extends ChildProperty {
3804
3890
  }
@@ -3820,6 +3906,9 @@ __decorate$1([
3820
3906
  __decorate$1([
3821
3907
  Property('-1')
3822
3908
  ], Annotation.prototype, "zIndex", void 0);
3909
+ /**
3910
+ * Gets or sets the options to customize the arrow in the navigation line.
3911
+ */
3823
3912
  class Arrow extends ChildProperty {
3824
3913
  }
3825
3914
  __decorate$1([
@@ -3838,7 +3927,7 @@ __decorate$1([
3838
3927
  Property(0)
3839
3928
  ], Arrow.prototype, "offSet", void 0);
3840
3929
  /**
3841
- * 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.
3842
3931
  */
3843
3932
  class Font extends ChildProperty {
3844
3933
  }
@@ -3861,7 +3950,115 @@ __decorate$1([
3861
3950
  Property(1)
3862
3951
  ], Font.prototype, "opacity", void 0);
3863
3952
  /**
3864
- * 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.
3865
4062
  */
3866
4063
  class Border extends ChildProperty {
3867
4064
  }
@@ -3875,7 +4072,7 @@ __decorate$1([
3875
4072
  Property(null)
3876
4073
  ], Border.prototype, "opacity", void 0);
3877
4074
  /**
3878
- * Sets and gets the center position in maps.
4075
+ * Gets or sets the values to change the center position of the maps.
3879
4076
  */
3880
4077
  class CenterPosition extends ChildProperty {
3881
4078
  }
@@ -3886,7 +4083,7 @@ __decorate$1([
3886
4083
  Property(null)
3887
4084
  ], CenterPosition.prototype, "longitude", void 0);
3888
4085
  /**
3889
- * 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.
3890
4087
  */
3891
4088
  class TooltipSettings extends ChildProperty {
3892
4089
  }
@@ -3912,7 +4109,7 @@ __decorate$1([
3912
4109
  Property(null)
3913
4110
  ], TooltipSettings.prototype, "valuePath", void 0);
3914
4111
  /**
3915
- * Sets and gets the margin for the maps component.
4112
+ * Gets or sets the options to customize the margin of the maps.
3916
4113
  */
3917
4114
  class Margin extends ChildProperty {
3918
4115
  }
@@ -3928,8 +4125,8 @@ __decorate$1([
3928
4125
  __decorate$1([
3929
4126
  Property(10)
3930
4127
  ], Margin.prototype, "bottom", void 0);
3931
- /*
3932
- * 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.
3933
4130
  */
3934
4131
  class ConnectorLineSettings extends ChildProperty {
3935
4132
  }
@@ -3943,7 +4140,7 @@ __decorate$1([
3943
4140
  Property(1)
3944
4141
  ], ConnectorLineSettings.prototype, "opacity", void 0);
3945
4142
  /**
3946
- * 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.
3947
4144
  */
3948
4145
  class MarkerClusterSettings extends ChildProperty {
3949
4146
  }
@@ -3987,12 +4184,12 @@ __decorate$1([
3987
4184
  Complex({}, ConnectorLineSettings)
3988
4185
  ], MarkerClusterSettings.prototype, "connectorLineSettings", void 0);
3989
4186
  /**
3990
- * Sets and gets the data in the marker cluster.
4187
+ * Gets or sets the data in the marker cluster.
3991
4188
  */
3992
4189
  class MarkerClusterData extends ChildProperty {
3993
4190
  }
3994
4191
  /**
3995
- * 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.
3996
4193
  */
3997
4194
  class ColorMappingSettings extends ChildProperty {
3998
4195
  }
@@ -4021,7 +4218,8 @@ __decorate$1([
4021
4218
  Property(true)
4022
4219
  ], ColorMappingSettings.prototype, "showLegend", void 0);
4023
4220
  /**
4024
- * 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.
4025
4223
  */
4026
4224
  class InitialMarkerSelectionSettings extends ChildProperty {
4027
4225
  }
@@ -4032,7 +4230,8 @@ __decorate$1([
4032
4230
  Property(null)
4033
4231
  ], InitialMarkerSelectionSettings.prototype, "longitude", void 0);
4034
4232
  /**
4035
- * 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.
4036
4235
  */
4037
4236
  class InitialShapeSelectionSettings extends ChildProperty {
4038
4237
  }
@@ -4043,7 +4242,7 @@ __decorate$1([
4043
4242
  Property(null)
4044
4243
  ], InitialShapeSelectionSettings.prototype, "shapeValue", void 0);
4045
4244
  /**
4046
- * 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.
4047
4246
  */
4048
4247
  class SelectionSettings extends ChildProperty {
4049
4248
  }
@@ -4063,7 +4262,7 @@ __decorate$1([
4063
4262
  Complex({ color: 'transparent', width: 0 }, Border)
4064
4263
  ], SelectionSettings.prototype, "border", void 0);
4065
4264
  /**
4066
- * 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.
4067
4266
  */
4068
4267
  class HighlightSettings extends ChildProperty {
4069
4268
  }
@@ -4080,7 +4279,7 @@ __decorate$1([
4080
4279
  Complex({ color: 'transparent', width: 0 }, Border)
4081
4280
  ], HighlightSettings.prototype, "border", void 0);
4082
4281
  /**
4083
- * 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.
4084
4283
  */
4085
4284
  class NavigationLineSettings extends ChildProperty {
4086
4285
  }
@@ -4115,7 +4314,7 @@ __decorate$1([
4115
4314
  Complex({}, HighlightSettings)
4116
4315
  ], NavigationLineSettings.prototype, "highlightSettings", void 0);
4117
4316
  /**
4118
- * 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.
4119
4318
  */
4120
4319
  class BubbleSettings extends ChildProperty {
4121
4320
  }
@@ -4171,7 +4370,7 @@ __decorate$1([
4171
4370
  Complex({}, HighlightSettings)
4172
4371
  ], BubbleSettings.prototype, "highlightSettings", void 0);
4173
4372
  /**
4174
- * Sets and gets the title for the maps.
4373
+ * Gets or sets the options to customize the title of the maps.
4175
4374
  */
4176
4375
  class CommonTitleSettings extends ChildProperty {
4177
4376
  }
@@ -4182,7 +4381,7 @@ __decorate$1([
4182
4381
  Property('')
4183
4382
  ], CommonTitleSettings.prototype, "description", void 0);
4184
4383
  /**
4185
- * Sets and gets the subtitle for maps.
4384
+ * Gets or sets the options to customize the subtitle of the maps.
4186
4385
  */
4187
4386
  class SubTitleSettings extends CommonTitleSettings {
4188
4387
  }
@@ -4193,7 +4392,7 @@ __decorate$1([
4193
4392
  Property('Center')
4194
4393
  ], SubTitleSettings.prototype, "alignment", void 0);
4195
4394
  /**
4196
- * Sets and gets the title for the maps.
4395
+ * Gets or sets the options to customize the title of the maps.
4197
4396
  */
4198
4397
  class TitleSettings extends CommonTitleSettings {
4199
4398
  }
@@ -4207,7 +4406,7 @@ __decorate$1([
4207
4406
  Complex({}, SubTitleSettings)
4208
4407
  ], TitleSettings.prototype, "subtitleSettings", void 0);
4209
4408
  /**
4210
- * Sets and gets the options to configure maps zooming operations.
4409
+ * Gets or sets the options to configure maps zooming operations.
4211
4410
  */
4212
4411
  class ZoomSettings extends ChildProperty {
4213
4412
  }
@@ -4268,8 +4467,11 @@ __decorate$1([
4268
4467
  __decorate$1([
4269
4468
  Property(true)
4270
4469
  ], ZoomSettings.prototype, "resetToInitial", void 0);
4470
+ __decorate$1([
4471
+ Complex({}, ZoomToolbarSettings)
4472
+ ], ZoomSettings.prototype, "toolbarSettings", void 0);
4271
4473
  /**
4272
- * 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.
4273
4475
  */
4274
4476
  class ToggleLegendSettings extends ChildProperty {
4275
4477
  }
@@ -4289,7 +4491,7 @@ __decorate$1([
4289
4491
  Complex({ color: '', width: 0 }, Border)
4290
4492
  ], ToggleLegendSettings.prototype, "border", void 0);
4291
4493
  /**
4292
- * 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.
4293
4495
  */
4294
4496
  class LegendSettings extends ChildProperty {
4295
4497
  }
@@ -4384,7 +4586,7 @@ __decorate$1([
4384
4586
  Complex({}, ToggleLegendSettings)
4385
4587
  ], LegendSettings.prototype, "toggleLegendSettings", void 0);
4386
4588
  /**
4387
- * 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.
4388
4590
  */
4389
4591
  class DataLabelSettings extends ChildProperty {
4390
4592
  }
@@ -4422,7 +4624,7 @@ __decorate$1([
4422
4624
  Property('')
4423
4625
  ], DataLabelSettings.prototype, "template", void 0);
4424
4626
  /**
4425
- * 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.
4426
4628
  */
4427
4629
  class ShapeSettings extends ChildProperty {
4428
4630
  }
@@ -4463,7 +4665,7 @@ __decorate$1([
4463
4665
  Property(false)
4464
4666
  ], ShapeSettings.prototype, "autofill", void 0);
4465
4667
  /**
4466
- * 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.
4467
4669
  */
4468
4670
  class MarkerBase extends ChildProperty {
4469
4671
  }
@@ -4476,6 +4678,9 @@ __decorate$1([
4476
4678
  __decorate$1([
4477
4679
  Property(false)
4478
4680
  ], MarkerBase.prototype, "visible", void 0);
4681
+ __decorate$1([
4682
+ Property(false)
4683
+ ], MarkerBase.prototype, "enableDrag", void 0);
4479
4684
  __decorate$1([
4480
4685
  Property('#FF471A')
4481
4686
  ], MarkerBase.prototype, "fill", void 0);
@@ -4542,6 +4747,9 @@ __decorate$1([
4542
4747
  __decorate$1([
4543
4748
  Collection([], InitialMarkerSelectionSettings)
4544
4749
  ], MarkerBase.prototype, "initialMarkerSelection", void 0);
4750
+ /**
4751
+ * Gets or sets the options to customize the markers in the maps.
4752
+ */
4545
4753
  class MarkerSettings extends MarkerBase {
4546
4754
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4547
4755
  constructor(parent, propName, defaultValue, isArray) {
@@ -4549,7 +4757,7 @@ class MarkerSettings extends MarkerBase {
4549
4757
  }
4550
4758
  }
4551
4759
  /**
4552
- * 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.
4553
4761
  */
4554
4762
  class LayerSettings extends ChildProperty {
4555
4763
  constructor() {
@@ -4650,7 +4858,7 @@ class Tile {
4650
4858
  }
4651
4859
  }
4652
4860
  /**
4653
- * Sets and gets the maps area settings
4861
+ * Gets or sets the options to customize the area around the shapes in the map layer.
4654
4862
  */
4655
4863
  class MapsAreaSettings extends ChildProperty {
4656
4864
  }
@@ -4803,6 +5011,7 @@ class Marker {
4803
5011
  *
4804
5012
  * @param {LayerSettings[]} layersCollection - Specifies the layer settings instance.
4805
5013
  * @returns {void}
5014
+ * @private
4806
5015
  */
4807
5016
  calculateZoomCenterPositionAndFactor(layersCollection) {
4808
5017
  if (!isNullOrUndefined(this.maps)) {
@@ -4872,7 +5081,7 @@ class Marker {
4872
5081
  }
4873
5082
  let markerFactor;
4874
5083
  if (this.maps.isTileMap || this.maps.baseMapRectBounds['min']['x'] === 0) {
4875
- zoomLevel = calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeight, this.maps);
5084
+ zoomLevel = calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, mapHeight, this.maps, false);
4876
5085
  if (this.maps.isTileMap) {
4877
5086
  markerFactor = isNullOrUndefined(this.maps.markerZoomFactor) ?
4878
5087
  zoomLevel : isNullOrUndefined(this.maps.mapScaleValue) ?
@@ -4928,6 +5137,7 @@ class Marker {
4928
5137
  * To check and trigger marker click event
4929
5138
  * @param {PointerEvent} e - Specifies the pointer event argument.
4930
5139
  * @returns {void}
5140
+ * @private
4931
5141
  */
4932
5142
  markerClick(e) {
4933
5143
  const target = e.target.id;
@@ -4938,6 +5148,9 @@ class Marker {
4938
5148
  if (isNullOrUndefined(options)) {
4939
5149
  return;
4940
5150
  }
5151
+ if (options.marker.enableDrag) {
5152
+ document.getElementById(this.maps.element.id + "_svg").style.cursor = 'grabbing';
5153
+ }
4941
5154
  const eventArgs = {
4942
5155
  cancel: false, name: markerClick, data: options.data, maps: this.maps,
4943
5156
  marker: options.marker, target: target, x: e.clientX, y: e.clientY,
@@ -4946,11 +5159,39 @@ class Marker {
4946
5159
  value: options.data['name']
4947
5160
  };
4948
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
+ }
4949
5189
  }
4950
5190
  /**
4951
5191
  * To check and trigger Cluster click event
4952
5192
  * @param {PointerEvent} e - Specifies the pointer event argument.
4953
5193
  * @returns {void}
5194
+ * @private
4954
5195
  */
4955
5196
  markerClusterClick(e) {
4956
5197
  const target = e.target.id;
@@ -5021,7 +5262,7 @@ class Marker {
5021
5262
  if ((target.indexOf('_cluster_') > -1)) {
5022
5263
  let isClusterSame = false;
5023
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);
5024
- 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);
5025
5266
  collection = [];
5026
5267
  for (const i of indexes) {
5027
5268
  collection.push({ data: marker$$1.dataSource[i], index: i });
@@ -5044,6 +5285,7 @@ class Marker {
5044
5285
  *
5045
5286
  * @param {PointerEvent} e - Specifies the pointer event argument.
5046
5287
  * @returns {void}
5288
+ * @private
5047
5289
  */
5048
5290
  markerMove(e) {
5049
5291
  const targetId = e.target.id;
@@ -5054,6 +5296,10 @@ class Marker {
5054
5296
  if (isNullOrUndefined(options)) {
5055
5297
  return;
5056
5298
  }
5299
+ if (options.marker.enableDrag) {
5300
+ document.getElementById(this.maps.element.id + "_svg").style.cursor = isNullOrUndefined(this.maps.markerDragArgument) ?
5301
+ 'pointer' : 'grabbing';
5302
+ }
5057
5303
  const eventArgs = {
5058
5304
  cancel: false, name: markerMouseMove, data: options.data,
5059
5305
  maps: this.maps, target: targetId, x: e.clientX, y: e.clientY
@@ -5065,6 +5311,7 @@ class Marker {
5065
5311
  *
5066
5312
  * @param {PointerEvent} e - Specifies the pointer event argument.
5067
5313
  * @returns {void}
5314
+ * @private
5068
5315
  */
5069
5316
  markerClusterMouseMove(e) {
5070
5317
  const targetId = e.target.id;
@@ -5214,6 +5461,18 @@ const markerClusterRendering = 'markerClusterRendering';
5214
5461
  * @private
5215
5462
  */
5216
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';
5217
5476
  /**
5218
5477
  * Specifies the maps cluster click event name.
5219
5478
  *
@@ -5379,6 +5638,7 @@ class ColorMapping {
5379
5638
  * @param {number} colorValue - Specifies the color value
5380
5639
  * @param {string} equalValue - Specifies the equal value.
5381
5640
  * @returns {any} - Returns the color mapping values.
5641
+ * @private
5382
5642
  */
5383
5643
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
5384
5644
  getColorByValue(colorMapping, colorValue, equalValue) {
@@ -6222,6 +6482,7 @@ class LayerPanel {
6222
6482
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6223
6483
  const bubbleDataSource = bubble.dataSource;
6224
6484
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6485
+ this.mapObject.bubbleModule.bubbleCollection = [];
6225
6486
  bubbleDataSource.map((bubbleData, i) => {
6226
6487
  this.renderBubble(this.currentLayer, bubbleData, colors[i % colors.length], range, j, i, bubbleG, layerIndex, bubble);
6227
6488
  });
@@ -7067,6 +7328,8 @@ class Annotations {
7067
7328
  // eslint-disable-next-line valid-jsdoc
7068
7329
  /**
7069
7330
  * To create annotation elements
7331
+ *
7332
+ * @private
7070
7333
  */
7071
7334
  createAnnotationTemplate(parentElement, annotation, annotationIndex) {
7072
7335
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -7167,7 +7430,8 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
7167
7430
  * Maps Component file
7168
7431
  */
7169
7432
  /**
7170
- * 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.
7171
7435
  * ```html
7172
7436
  * <div id="maps"/>
7173
7437
  * <script>
@@ -7262,6 +7526,8 @@ let Maps = class Maps extends Component {
7262
7526
  /** @private */
7263
7527
  this.initialTileTranslate = new Point(0, 0);
7264
7528
  /** @private */
7529
+ this.markerDragId = '';
7530
+ /** @private */
7265
7531
  this.initialCheck = true;
7266
7532
  /** @private */
7267
7533
  this.applyZoomReset = false;
@@ -7270,15 +7536,20 @@ let Maps = class Maps extends Component {
7270
7536
  /** @private */
7271
7537
  this.markerClusterExpand = false;
7272
7538
  /** @private */
7539
+ this.mouseMoveId = '';
7540
+ /** @private */
7273
7541
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7274
7542
  this.shapeSelectionItem = [];
7543
+ /** @private */
7544
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7545
+ this.markerDragArgument = null;
7275
7546
  setValue('mergePersistData', this.mergePersistMapsData, this);
7276
7547
  }
7277
7548
  /**
7278
7549
  *
7279
7550
  * Specifies whether the shape is selected in the maps or not.
7280
7551
  *
7281
- * @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.
7282
7553
  */
7283
7554
  get isShapeSelected() {
7284
7555
  return this.mapSelect;
@@ -7321,6 +7592,7 @@ let Maps = class Maps extends Component {
7321
7592
  *
7322
7593
  * @param {string} key - Specifies the key
7323
7594
  * @returns {string} - Returns the string value
7595
+ * @private
7324
7596
  */
7325
7597
  getLocalizedLabel(key) {
7326
7598
  return this.localeObject.getConstant(key);
@@ -7455,6 +7727,7 @@ let Maps = class Maps extends Component {
7455
7727
  * @param {LayerSettings} layer - Specifies the layer for the maps.
7456
7728
  * @param {string} dataType - Specifies the data type for maps.
7457
7729
  * @returns {void}
7730
+ * @private
7458
7731
  */
7459
7732
  processResponseJsonData(processType, data, layer, dataType) {
7460
7733
  this.serverProcess['response']++;
@@ -7495,7 +7768,6 @@ let Maps = class Maps extends Component {
7495
7768
  }
7496
7769
  if (!isNullOrUndefined(this.dataLabelModule)) {
7497
7770
  this.dataLabelModule.dataLabelCollections = [];
7498
- this.dataLabelShape = [];
7499
7771
  }
7500
7772
  this.mapLayerPanel.measureLayerPanel();
7501
7773
  if (!isNullOrUndefined(this.svgObject)) {
@@ -7598,6 +7870,9 @@ let Maps = class Maps extends Component {
7598
7870
  }
7599
7871
  }
7600
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
+ }
7601
7876
  if (!this.isZoomByPosition && !this.zoomNotApplied) {
7602
7877
  this.trigger(loaded, { maps: this, isResized: this.isResize });
7603
7878
  }
@@ -7992,7 +8267,7 @@ let Maps = class Maps extends Component {
7992
8267
  wireEVents() {
7993
8268
  //let cancelEvent: string = Browser.isPointer ? 'pointerleave' : 'mouseleave';
7994
8269
  EventHandler.add(this.element, 'click', this.mapsOnClick, this);
7995
- // EventHandler.add(this.element, 'contextmenu', this.mapsOnRightClick, this);
8270
+ EventHandler.add(this.element, 'contextmenu', this.mapsOnRightClick, this);
7996
8271
  EventHandler.add(this.element, 'dblclick', this.mapsOnDoubleClick, this);
7997
8272
  EventHandler.add(this.element, Browser.touchStartEvent, this.mouseDownOnMap, this);
7998
8273
  EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap, this);
@@ -8012,7 +8287,7 @@ let Maps = class Maps extends Component {
8012
8287
  unWireEVents() {
8013
8288
  //let cancelEvent: string = Browser.isPointer ? 'pointerleave' : 'mouseleave';
8014
8289
  EventHandler.remove(this.element, 'click', this.mapsOnClick);
8015
- // EventHandler.remove(this.element, 'contextmenu', this.mapsOnRightClick);
8290
+ EventHandler.remove(this.element, 'contextmenu', this.mapsOnRightClick);
8016
8291
  EventHandler.remove(this.element, 'dblclick', this.mapsOnDoubleClick);
8017
8292
  EventHandler.remove(this.element, Browser.touchStartEvent, this.mouseDownOnMap);
8018
8293
  EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap);
@@ -8028,6 +8303,7 @@ let Maps = class Maps extends Component {
8028
8303
  *
8029
8304
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8030
8305
  * @returns {void}
8306
+ * @private
8031
8307
  */
8032
8308
  mouseLeaveOnMap(e) {
8033
8309
  if (document.getElementsByClassName('highlightMapStyle').length > 0 && this.legendModule) {
@@ -8073,6 +8349,7 @@ let Maps = class Maps extends Component {
8073
8349
  }
8074
8350
  keyDownHandler(event) {
8075
8351
  const zoom = this.zoomModule;
8352
+ let id = event.target['id'];
8076
8353
  if ((event.code === 'ArrowUp' || event.code === 'ArrowDown' || event.code === 'ArrowLeft'
8077
8354
  || event.code === 'ArrowRight') && zoom) {
8078
8355
  const animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
@@ -8080,16 +8357,18 @@ let Maps = class Maps extends Component {
8080
8357
  this.currentTiles = animatedTiles.cloneNode(true);
8081
8358
  }
8082
8359
  }
8083
- if ((event.key === '+' || event.code === 'Equal') && zoom) {
8360
+ if (this.zoomSettings.enable && zoom && (event.key === '+' || event.code === 'Equal')) {
8084
8361
  zoom.performZoomingByToolBar('zoomin');
8085
8362
  }
8086
- else if ((event.key === '-' || event.code === 'Minus') && zoom) {
8363
+ else if (this.zoomSettings.enable && zoom && (event.key === '-' || event.code === 'Minus')) {
8087
8364
  zoom.performZoomingByToolBar('zoomout');
8088
8365
  }
8089
- else if (event['keyCode'] === 82 && zoom) {
8366
+ else if (this.zoomSettings.enable && zoom && event['keyCode'] === 82) {
8090
8367
  zoom.performZoomingByToolBar('reset');
8368
+ zoom.isPanning = false;
8091
8369
  }
8092
- 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')) {
8093
8372
  event.preventDefault();
8094
8373
  zoom.mouseDownLatLong['x'] = 0;
8095
8374
  zoom.mouseMoveLatLong['y'] = this.mapAreaRect.height / 7;
@@ -8097,7 +8376,8 @@ let Maps = class Maps extends Component {
8097
8376
  zoom.mouseMoveLatLong['y'], event);
8098
8377
  zoom.mouseDownLatLong['y'] = zoom.mouseMoveLatLong['y'];
8099
8378
  }
8100
- 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')) {
8101
8381
  event.preventDefault();
8102
8382
  zoom.mouseDownLatLong['y'] = 0;
8103
8383
  zoom.mouseMoveLatLong['x'] = this.mapAreaRect.width / 7;
@@ -8105,7 +8385,7 @@ let Maps = class Maps extends Component {
8105
8385
  zoom.mouseDownLatLong['x'] = zoom.mouseMoveLatLong['x'];
8106
8386
  }
8107
8387
  else if (event.code === 'Enter') {
8108
- const id = event.target['id'];
8388
+ id = event.target['id'];
8109
8389
  event.preventDefault();
8110
8390
  if (this.legendModule && (id.indexOf('_Left_Page_Rect') > -1 || id.indexOf('_Right_Page_Rect') > -1)) {
8111
8391
  this.mapAreaRect = this.legendModule.initialMapAreaRect;
@@ -8135,6 +8415,9 @@ let Maps = class Maps extends Component {
8135
8415
  this.keyboardHighlightSelection(id, event.type);
8136
8416
  }
8137
8417
  }
8418
+ if (this.zoomModule) {
8419
+ this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.mapScaleValue, this.mouseMoveId);
8420
+ }
8138
8421
  }
8139
8422
  /**
8140
8423
  * Gets the selected element to be maintained or not.
@@ -8155,6 +8438,7 @@ let Maps = class Maps extends Component {
8155
8438
  *
8156
8439
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8157
8440
  * @returns {void}
8441
+ * @private
8158
8442
  */
8159
8443
  mapsOnClick(e) {
8160
8444
  const targetEle = e.target;
@@ -8185,6 +8469,12 @@ let Maps = class Maps extends Component {
8185
8469
  });
8186
8470
  }
8187
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
+ }
8188
8478
  }
8189
8479
  clickHandler(e, eventArgs, targetEle) {
8190
8480
  if (targetEle.id.indexOf('shapeIndex') > -1) {
@@ -8216,6 +8506,27 @@ let Maps = class Maps extends Component {
8216
8506
  this.selectionModule.removedSelectionList(targetEle);
8217
8507
  }
8218
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
+ }
8219
8530
  getClickLocation(targetId, pageX, pageY, targetElement, x, y) {
8220
8531
  let layerIndex = 0;
8221
8532
  let latLongValue;
@@ -8278,6 +8589,7 @@ let Maps = class Maps extends Component {
8278
8589
  *
8279
8590
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8280
8591
  * @returns {boolean} - Returns the boolean value
8592
+ * @private
8281
8593
  */
8282
8594
  mouseEndOnMap(e) {
8283
8595
  const targetEle = e.target;
@@ -8288,13 +8600,16 @@ let Maps = class Maps extends Component {
8288
8600
  let pageY;
8289
8601
  let target;
8290
8602
  let touchArg;
8603
+ let layerX = 0;
8604
+ let layerY = 0;
8291
8605
  const rect = this.element.getBoundingClientRect();
8292
8606
  const element = e.target;
8293
8607
  if (e.type.indexOf('touch') !== -1) {
8294
8608
  this.isTouch = true;
8295
8609
  touchArg = e;
8296
- pageX = touchArg.changedTouches[0].pageX;
8610
+ layerX = pageX = touchArg.changedTouches[0].pageX;
8297
8611
  pageY = touchArg.changedTouches[0].pageY;
8612
+ layerY = pageY - (this.isTileMap ? 10 : 0);
8298
8613
  target = touchArg.target;
8299
8614
  this.mouseClickEvent = { x: pageX, y: pageY };
8300
8615
  }
@@ -8302,6 +8617,8 @@ let Maps = class Maps extends Component {
8302
8617
  this.isTouch = e.pointerType === 'touch';
8303
8618
  pageX = e.pageX;
8304
8619
  pageY = e.pageY;
8620
+ layerX = e['layerX'];
8621
+ layerY = e['layerY'] - (this.isTileMap ? 10 : 0);
8305
8622
  target = e.target;
8306
8623
  }
8307
8624
  if (this.isTileMap) {
@@ -8324,6 +8641,45 @@ let Maps = class Maps extends Component {
8324
8641
  if (e.cancelable && !this.isTouch) {
8325
8642
  e.preventDefault();
8326
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
+ }
8327
8683
  return false;
8328
8684
  }
8329
8685
  /**
@@ -8331,14 +8687,19 @@ let Maps = class Maps extends Component {
8331
8687
  *
8332
8688
  * @param {PointerEvent} e - Specifies the pointer event on maps
8333
8689
  * @returns {void}
8690
+ * @private
8334
8691
  */
8335
8692
  mouseDownOnMap(e) {
8336
8693
  this.mouseDownEvent = { x: e.x, y: e.y };
8337
8694
  if (e.type.indexOf('touch') !== -1 && e.changedTouches) {
8338
8695
  this.mouseDownEvent = { x: e.changedTouches[0].pageX, y: e.changedTouches[0].pageY };
8339
8696
  }
8697
+ if (this.isDevice) {
8698
+ this.mapsTooltipModule.renderTooltip(e);
8699
+ }
8340
8700
  const rect = this.element.getBoundingClientRect();
8341
8701
  const element = e.target;
8702
+ this.markerDragId = element.id;
8342
8703
  const animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
8343
8704
  if (this.isTileMap && !isNullOrUndefined(animatedTiles)) {
8344
8705
  this.currentTiles = animatedTiles.cloneNode(true);
@@ -8371,11 +8732,37 @@ let Maps = class Maps extends Component {
8371
8732
  this.markerModule.sameMarkerData = [];
8372
8733
  }
8373
8734
  }
8735
+ /**
8736
+ * @param {PointerEvent} e - Specifies the pointer event.
8737
+ * @returns {void}
8738
+ * @private
8739
+ */
8740
+ mapsOnRightClick(e) {
8741
+ const targetEle = e.target;
8742
+ const targetId = targetEle.id;
8743
+ let latitude = null;
8744
+ let longitude = null;
8745
+ this.mouseClickEvent = this.mouseDownEvent = { x: e.x, y: e.y };
8746
+ if (targetEle.id.indexOf('_ToolBar') === -1) {
8747
+ const latLongValue = this.getClickLocation(targetId, e.pageX, e.pageY, targetEle, e['layerX'], e['layerY']);
8748
+ if (!isNullOrUndefined(latLongValue)) {
8749
+ latitude = latLongValue.latitude;
8750
+ longitude = latLongValue.longitude;
8751
+ }
8752
+ const eventArgs = {
8753
+ cancel: false, name: rightClick, target: targetId, x: e.clientX, y: e.clientY,
8754
+ latitude: latitude, longitude: longitude,
8755
+ isShapeSelected: false
8756
+ };
8757
+ this.trigger('rightClick', eventArgs);
8758
+ }
8759
+ }
8374
8760
  /**
8375
8761
  * This method is used to perform operations when performing the double click operation on maps.
8376
8762
  *
8377
8763
  * @param {PointerEvent} e - Specifies the pointer event.
8378
8764
  * @returns {void}
8765
+ * @private
8379
8766
  */
8380
8767
  mapsOnDoubleClick(e) {
8381
8768
  this.notify('dblclick', e);
@@ -8411,6 +8798,7 @@ let Maps = class Maps extends Component {
8411
8798
  *
8412
8799
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8413
8800
  * @returns {void}
8801
+ * @private
8414
8802
  */
8415
8803
  mouseMoveOnMap(e) {
8416
8804
  let target;
@@ -8426,6 +8814,9 @@ let Maps = class Maps extends Component {
8426
8814
  if (this.bubbleModule) {
8427
8815
  this.bubbleModule.bubbleMove(e);
8428
8816
  }
8817
+ if (target.id.indexOf('MarkerIndex') == -1) {
8818
+ document.getElementById(this.element.id + "_svg").style.cursor = 'auto';
8819
+ }
8429
8820
  this.onMouseMove(e);
8430
8821
  this.notify(Browser.touchMoveEvent, e);
8431
8822
  }
@@ -8434,15 +8825,40 @@ let Maps = class Maps extends Component {
8434
8825
  *
8435
8826
  * @param {PointerEvent} e - Specifies the pointer event on maps.
8436
8827
  * @returns {void}
8828
+ * @private
8437
8829
  */
8438
8830
  onMouseMove(e) {
8439
8831
  const element = e.target;
8440
- 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);
8441
8843
  this.titleTooltip(e, e.pageX, e.pageY);
8442
8844
  if (!isNullOrUndefined(this.legendModule)) {
8443
8845
  this.legendTooltip(e, e.pageX, e.pageY, true);
8444
8846
  }
8445
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
+ }
8446
8862
  return false;
8447
8863
  }
8448
8864
  legendTooltip(event, x, y, isTouch) {
@@ -8524,10 +8940,8 @@ let Maps = class Maps extends Component {
8524
8940
  /**
8525
8941
  * This method is used to zoom the map by specifying the center position.
8526
8942
  *
8527
- * @param {number} centerPosition - Specifies the center position
8528
- * @param {number} centerPosition.latitude - Specifies the latitude value for the center position
8529
- * @param {number} centerPosition.longitude - Specifies the longitude value for the center position
8530
- * @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.
8531
8945
  * @returns {void}
8532
8946
  */
8533
8947
  zoomByPosition(centerPosition, zoomFactor) {
@@ -8564,8 +8978,8 @@ let Maps = class Maps extends Component {
8564
8978
  /**
8565
8979
  * This method is used to perform panning by specifying the direction.
8566
8980
  *
8567
- * @param {PanDirection} direction - Specifies the direction in which the panning is performed.
8568
- * @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.
8569
8983
  * @returns {void}
8570
8984
  */
8571
8985
  panByDirection(direction, mouseLocation) {
@@ -8594,7 +9008,7 @@ let Maps = class Maps extends Component {
8594
9008
  /**
8595
9009
  * This method is used to add the layers dynamically to the maps.
8596
9010
  *
8597
- * @param {Object} layer - Specifies the layer for the maps.
9011
+ * @param {Object} layer - Specifies the layer to be added in the maps.
8598
9012
  * @returns {void}
8599
9013
  */
8600
9014
  addLayer(layer) {
@@ -8606,7 +9020,7 @@ let Maps = class Maps extends Component {
8606
9020
  }
8607
9021
  }
8608
9022
  /**
8609
- * This method is used to remove a layer from map.
9023
+ * This method is used to remove a layer from the maps.
8610
9024
  *
8611
9025
  * @param {number} index - Specifies the index number of the layer to be removed.
8612
9026
  * @returns {void}
@@ -8620,7 +9034,7 @@ let Maps = class Maps extends Component {
8620
9034
  }
8621
9035
  /**
8622
9036
  * This method is used to add markers dynamically in the maps.
8623
- * 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
8624
9038
  * of the marker as parameters, the marker will be added in the location.
8625
9039
  *
8626
9040
  * @param {number} layerIndex - Specifies the index number of the layer.
@@ -8641,12 +9055,12 @@ let Maps = class Maps extends Component {
8641
9055
  }
8642
9056
  }
8643
9057
  /**
8644
- * 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.
8645
9059
  *
8646
9060
  * @param {number} layerIndex - Specifies the index of the layer in maps.
8647
9061
  * @param {string | string[]} propertyName - Specifies the property name from the data source.
8648
- * @param {string} name - Specifies the name of the shape that is selected.
8649
- * @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.
8650
9064
  * @returns {void}
8651
9065
  */
8652
9066
  shapeSelection(layerIndex, propertyName, name, enable) {
@@ -8750,12 +9164,12 @@ let Maps = class Maps extends Component {
8750
9164
  }
8751
9165
  }
8752
9166
  /**
8753
- * 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.
8754
9168
  *
8755
- * @param {number} minLatitude - Specifies the minimum latitude to be zoomed.
8756
- * @param {number} minLongitude - Specifies the minimum latitude to be zoomed.
8757
- * @param {number} maxLatitude - Specifies the maximum latitude to be zoomed.
8758
- * @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.
8759
9173
  * @returns {void}
8760
9174
  */
8761
9175
  zoomToCoordinates(minLatitude, minLongitude, maxLatitude, maxLongitude) {
@@ -8797,7 +9211,7 @@ let Maps = class Maps extends Component {
8797
9211
  this.maxLatOfGivenLocation = maxLatitude;
8798
9212
  this.maxLongOfGivenLocation = maxLongitude;
8799
9213
  this.zoomNotApplied = true;
8800
- this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this);
9214
+ this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this, true);
8801
9215
  const zoomArgs = {
8802
9216
  cancel: false, name: 'zoom', type: zoomIn, maps: this,
8803
9217
  tileTranslatePoint: {}, translatePoint: {},
@@ -8831,7 +9245,7 @@ let Maps = class Maps extends Component {
8831
9245
  this.legendSelectionCollection = [];
8832
9246
  }
8833
9247
  /**
8834
- * This method is used to set culture for maps component.
9248
+ * This method is used to set culture for maps.
8835
9249
  *
8836
9250
  * @returns {void}
8837
9251
  */
@@ -8841,7 +9255,7 @@ let Maps = class Maps extends Component {
8841
9255
  this.localeObject = new L10n(this.getModuleName(), this.defaultLocalConstants, this.locale);
8842
9256
  }
8843
9257
  /**
8844
- * This method to set locale constants to the maps component.
9258
+ * This method to set locale constants to the maps.
8845
9259
  *
8846
9260
  * @returns {void}
8847
9261
  */
@@ -8857,7 +9271,7 @@ let Maps = class Maps extends Component {
8857
9271
  };
8858
9272
  }
8859
9273
  /**
8860
- * 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.
8861
9275
  *
8862
9276
  * @returns {void}
8863
9277
  */
@@ -8894,6 +9308,7 @@ let Maps = class Maps extends Component {
8894
9308
  * Gets component name
8895
9309
  *
8896
9310
  * @returns {string} - Returns the string value
9311
+ * @private
8897
9312
  */
8898
9313
  getModuleName() {
8899
9314
  return 'maps';
@@ -9204,7 +9619,7 @@ let Maps = class Maps extends Component {
9204
9619
  return isVisible;
9205
9620
  }
9206
9621
  /**
9207
- * This method handles the printing functionality for the maps component.
9622
+ * This method handles the printing functionality for the maps.
9208
9623
  *
9209
9624
  * @param {string[] | string | Element} id - Specifies the element to be printed.
9210
9625
  * @returns {void}
@@ -9215,13 +9630,13 @@ let Maps = class Maps extends Component {
9215
9630
  }
9216
9631
  }
9217
9632
  /**
9218
- * This method handles the export functionality for the maps component.
9633
+ * This method handles the export functionality for the maps.
9219
9634
  *
9220
9635
  * @param {ExportType} type - Specifies the type of the exported file.
9221
9636
  * @param {string} fileName - Specifies the name of the file with which the rendered maps need to be exported.
9222
- * @param {PdfPageOrientation} orientation - Specifies the orientation of the pdf document in exporting.
9223
- * @param {boolean} allowDownload - Specifies whether to download as a file or get as base64 string for the file
9224
- * @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.
9225
9640
  */
9226
9641
  export(type, fileName, orientation, allowDownload) {
9227
9642
  if (!this.isDestroyed) {
@@ -9244,8 +9659,8 @@ let Maps = class Maps extends Component {
9244
9659
  /**
9245
9660
  * This method is used to get the Bing maps URL.
9246
9661
  *
9247
- * @param {string} url - Specifies the URL of the maps.
9248
- * @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`.
9249
9664
  */
9250
9665
  getBingUrlTemplate(url) {
9251
9666
  let promise;
@@ -9327,20 +9742,20 @@ let Maps = class Maps extends Component {
9327
9742
  };
9328
9743
  }
9329
9744
  /**
9330
- * 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.
9331
9746
  *
9332
- * @param {number} layerIndex - Specifies the index number of the layer of the map.
9333
- * @param {number} x - Specifies the x value.
9334
- * @param {number} y - Specifies the y value.
9335
- * @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.
9336
9751
  */
9337
9752
  getGeoLocation(layerIndex, x, y) {
9338
9753
  let latitude = 0;
9339
9754
  let longitude = 0;
9340
9755
  if (!this.isDestroyed) {
9341
9756
  const container = document.getElementById(this.element.id);
9342
- const pageX = x - container.offsetLeft;
9343
- 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);
9344
9759
  const currentLayer = this.layersCollection[layerIndex];
9345
9760
  const translate = getTranslate(this, currentLayer, false);
9346
9761
  const translatePoint = translate['location'];
@@ -9359,11 +9774,11 @@ let Maps = class Maps extends Component {
9359
9774
  return Math.min(Math.max(value, minVal), maxVal);
9360
9775
  }
9361
9776
  /**
9362
- * 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.
9363
9778
  *
9364
- * @param {number} x - Specifies the x value
9365
- * @param {number} y - Specifies the y value
9366
- * @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.
9367
9782
  */
9368
9783
  getTileGeoLocation(x, y) {
9369
9784
  let latitude = 0;
@@ -9371,25 +9786,25 @@ let Maps = class Maps extends Component {
9371
9786
  if (!this.isDestroyed) {
9372
9787
  const container = document.getElementById(this.element.id);
9373
9788
  const ele = document.getElementById(this.element.id + '_tile_parent');
9374
- 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)));
9375
9790
  latitude = latLong['latitude'];
9376
9791
  longitude = latLong['longitude'];
9377
9792
  }
9378
9793
  return { latitude: latitude, longitude: longitude };
9379
9794
  }
9380
9795
  /**
9381
- * 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.
9382
9797
  *
9383
- * @param {number} pageX - Specifies the x value for the page.
9384
- * @param {number} pageY - Specifies the y value for the page.
9385
- * @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.
9386
9801
  */
9387
9802
  pointToLatLong(pageX, pageY) {
9388
9803
  let latitude = 0;
9389
9804
  let longitude = 0;
9390
9805
  if (!this.isDestroyed) {
9391
9806
  const padding = this.layers[this.layers.length - 1].layerType === 'GoogleStaticMap' ? 0 : 10;
9392
- pageY = (this.zoomSettings.enable) ? pageY + padding : pageY;
9807
+ pageY = pageY + padding;
9393
9808
  const mapSize = 256 * Math.pow(2, this.tileZoomLevel);
9394
9809
  const x1 = (this.clip(pageX - (this.translatePoint.x * this.scale), 0, mapSize - 1) / mapSize) - 0.5;
9395
9810
  const y1 = 0.5 - (this.clip(pageY - (this.translatePoint.y * this.scale), 0, mapSize - 1) / mapSize);
@@ -9528,6 +9943,12 @@ __decorate([
9528
9943
  __decorate([
9529
9944
  Event()
9530
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);
9531
9952
  __decorate([
9532
9953
  Event()
9533
9954
  ], Maps.prototype, "markerClusterClick", void 0);
@@ -9572,6 +9993,7 @@ class Bubble {
9572
9993
  constructor(maps) {
9573
9994
  /**
9574
9995
  * Bubble Id for current layer
9996
+ * @private
9575
9997
  */
9576
9998
  this.id = '';
9577
9999
  this.maps = maps;
@@ -9722,7 +10144,7 @@ class Bubble {
9722
10144
  const bubbleDataSource = bubbleSettings.dataSource;
9723
10145
  const scale = translate['scale'];
9724
10146
  const transPoint = translate['location'];
9725
- 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)));
9726
10148
  bubbleElement.setAttribute('transform', 'translate( ' + (position.x) + ' ' + (position.y) + ' )');
9727
10149
  const bubble = (bubbleDataSource.length - 1) === dataIndex ? 'bubble' : null;
9728
10150
  if (bubbleSettings.bubbleType === 'Square') {
@@ -9883,6 +10305,7 @@ class DataLabel {
9883
10305
  * @param {number} index - Specifies the index number.
9884
10306
  * @param {any[]} intersect - Specifies the intersect.
9885
10307
  * @returns {void}
10308
+ * @private
9886
10309
  */
9887
10310
  renderLabel(
9888
10311
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -9990,6 +10413,9 @@ class DataLabel {
9990
10413
  if (isNullOrUndefined(text) && (layer.dataLabelSettings.template !== '' && layer.dataSource['length'] === 0)) {
9991
10414
  text = shapeData['properties'][layer.shapePropertyPath];
9992
10415
  }
10416
+ if (isNullOrUndefined(text) && layer.dataSource['length'] > 0) {
10417
+ text = '';
10418
+ }
9993
10419
  const dataLabelText = text;
9994
10420
  const projectionType = this.maps.projectionType;
9995
10421
  if (isPoint) {
@@ -10042,9 +10468,9 @@ class DataLabel {
10042
10468
  }
10043
10469
  let position = [];
10044
10470
  let width = zoomLabelsPosition && scaleZoomValue > 1 && !this.maps.zoomNotApplied
10045
- && this.maps.zoomShapeCollection.length > index ? this.maps.zoomShapeCollection[index]['width'] :
10471
+ && this.maps.zoomShapeCollection.length > index ? (this.maps.dataLabelShape[index]) * scale :
10046
10472
  (location['rightMax']['x'] - location['leftMax']['x']) * scale;
10047
- if (!isNullOrUndefined(this.maps.dataLabelShape)) {
10473
+ if (!isNullOrUndefined(this.maps.dataLabelShape) && !this.maps.isReset) {
10048
10474
  shapeWidth = firstLevelMapLocation['rightMax']['x'] - firstLevelMapLocation['leftMax']['x'];
10049
10475
  this.maps.dataLabelShape.push(shapeWidth);
10050
10476
  }
@@ -10070,8 +10496,9 @@ class DataLabel {
10070
10496
  locationX = location1['x'];
10071
10497
  location['x'] = location1['x'];
10072
10498
  width = zoomLabelsPosition && scaleZoomValue > 1 && !this.maps.zoomNotApplied
10073
- && this.maps.zoomShapeCollection.length > index ? this.maps.zoomShapeCollection[index]['width'] :
10074
- (location1['rightMax']['x'] - location1['leftMax']['x']) * scale;
10499
+ && this.maps.zoomShapeCollection.length > index ? (this.maps.dataLabelShape[index]) * scale :
10500
+ ((location1['rightMax']['x'] - location1['leftMax']['x']) * scale) > 0 ?
10501
+ ((location1['rightMax']['x'] - location1['leftMax']['x']) * scale) : width;
10075
10502
  }
10076
10503
  const xpositionEnds = ((location['x'] + transPoint['x']) * scale) + textSize['width'] / 2;
10077
10504
  const xpositionStart = ((location['x'] + transPoint['x']) * scale) - textSize['width'] / 2;
@@ -10264,6 +10691,7 @@ class NavigationLine {
10264
10691
  * @param {number} factor - Specifies the current zoom factor of the Maps.
10265
10692
  * @param {number} layerIndex -Specifies the index of current layer.
10266
10693
  * @returns {Element} - Returns the navigation line element.
10694
+ * @private
10267
10695
  */
10268
10696
  renderNavigation(layer, factor, layerIndex) {
10269
10697
  let group;
@@ -10472,6 +10900,7 @@ class Legend {
10472
10900
  * To calculate legend bounds and draw the legend shape and text.
10473
10901
  *
10474
10902
  * @returns {void}
10903
+ * @private
10475
10904
  */
10476
10905
  renderLegend() {
10477
10906
  this.legendRenderingCollections = [];
@@ -10811,6 +11240,7 @@ class Legend {
10811
11240
  // eslint-disable-next-line valid-jsdoc
10812
11241
  /**
10813
11242
  * To draw the legend shape and text.
11243
+ * @private
10814
11244
  */
10815
11245
  drawLegend() {
10816
11246
  const map = this.maps;
@@ -12629,6 +13059,7 @@ class Highlight {
12629
13059
  // eslint-disable-next-line valid-jsdoc
12630
13060
  /**
12631
13061
  * Public method for highlight module
13062
+ * @private
12632
13063
  */
12633
13064
  addHighlight(layerIndex, name, enable) {
12634
13065
  const targetEle = getTargetElement(layerIndex, name, enable, this.maps);
@@ -12952,6 +13383,7 @@ class Selection {
12952
13383
  // eslint-disable-next-line valid-jsdoc
12953
13384
  /**
12954
13385
  * Public method for selection
13386
+ * @private
12955
13387
  */
12956
13388
  addSelection(layerIndex, name, enable) {
12957
13389
  const targetElement = getTargetElement(layerIndex, name, enable, this.maps);
@@ -13156,6 +13588,9 @@ class MapsTooltip {
13156
13588
  this.tooltipId = this.maps.element.id + '_mapsTooltip';
13157
13589
  this.addEventListener();
13158
13590
  }
13591
+ /**
13592
+ * @private
13593
+ */
13159
13594
  renderTooltip(e) {
13160
13595
  let pageX;
13161
13596
  let pageY;
@@ -13176,6 +13611,10 @@ class MapsTooltip {
13176
13611
  pageY = e.pageY;
13177
13612
  target = e.target;
13178
13613
  }
13614
+ if (this.maps.isDevice) {
13615
+ clearTimeout(this.clearTimeout);
13616
+ this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
13617
+ }
13179
13618
  let option;
13180
13619
  let currentData = '';
13181
13620
  const targetId = target.id;
@@ -13191,7 +13630,7 @@ class MapsTooltip {
13191
13630
  this.tooltipTargetID = targetId;
13192
13631
  const istooltipRender = (targetId.indexOf('_shapeIndex_') > -1)
13193
13632
  || (targetId.indexOf('_MarkerIndex_') > -1) || (targetId.indexOf('_BubbleIndex_') > -1);
13194
- if (istooltipRender) {
13633
+ if (istooltipRender && this.maps.markerDragArgument === null) {
13195
13634
  if (targetId.indexOf('_shapeIndex_') > -1) {
13196
13635
  option = layer.tooltipSettings;
13197
13636
  const shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
@@ -13343,8 +13782,8 @@ class MapsTooltip {
13343
13782
  header: '',
13344
13783
  data: option['data'],
13345
13784
  template: option['template'],
13346
- content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
13347
- [currentData.toString()],
13785
+ content: tooltipArgs.content.toString() !== currentData.toString() ? [SanitizeHtmlHelper.sanitize(tooltipArgs.content.toString())] :
13786
+ [SanitizeHtmlHelper.sanitize(currentData.toString())],
13348
13787
  shapes: [],
13349
13788
  location: option['location'],
13350
13789
  palette: [markerFill],
@@ -13360,8 +13799,8 @@ class MapsTooltip {
13360
13799
  header: '',
13361
13800
  data: tooltipArgs.options['data'],
13362
13801
  template: tooltipArgs.options['template'],
13363
- content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
13364
- [currentData.toString()],
13802
+ content: tooltipArgs.content.toString() !== currentData.toString() ? [SanitizeHtmlHelper.sanitize(tooltipArgs.content.toString())] :
13803
+ [SanitizeHtmlHelper.sanitize(currentData.toString())],
13365
13804
  shapes: [],
13366
13805
  location: tooltipArgs.options['location'],
13367
13806
  palette: [markerFill],
@@ -13449,6 +13888,9 @@ class MapsTooltip {
13449
13888
  }
13450
13889
  return format;
13451
13890
  }
13891
+ /**
13892
+ * @private
13893
+ */
13452
13894
  mouseUpHandler(e) {
13453
13895
  this.renderTooltip(e);
13454
13896
  if (this.maps.tooltipDisplayMode === 'MouseMove') {
@@ -13456,6 +13898,9 @@ class MapsTooltip {
13456
13898
  this.clearTimeout = setTimeout(this.removeTooltip.bind(this), 2000);
13457
13899
  }
13458
13900
  }
13901
+ /**
13902
+ * @private
13903
+ */
13459
13904
  removeTooltip() {
13460
13905
  let isTooltipRemoved = false;
13461
13906
  if (document.getElementsByClassName('EJ2-maps-Tooltip').length > 0) {
@@ -13474,6 +13919,7 @@ class MapsTooltip {
13474
13919
  // eslint-disable-next-line valid-jsdoc
13475
13920
  /**
13476
13921
  * To bind events for tooltip module
13922
+ * @private
13477
13923
  */
13478
13924
  addEventListener() {
13479
13925
  if (this.maps.isDestroyed) {
@@ -13491,6 +13937,9 @@ class MapsTooltip {
13491
13937
  this.maps.on(Browser.touchCancelEvent, this.removeTooltip, this);
13492
13938
  this.maps.element.addEventListener('contextmenu', this.removeTooltip);
13493
13939
  }
13940
+ /**
13941
+ * @private
13942
+ */
13494
13943
  removeEventListener() {
13495
13944
  if (this.maps) {
13496
13945
  if (this.maps.isDestroyed) {
@@ -13538,32 +13987,44 @@ class MapsTooltip {
13538
13987
  */
13539
13988
  class Zoom {
13540
13989
  constructor(maps) {
13990
+ /** @private */
13541
13991
  this.isPanning = false;
13992
+ /** @private */
13542
13993
  this.mouseEnter = false;
13994
+ /** @private */
13543
13995
  this.isTouch = false;
13996
+ /** @private */
13544
13997
  this.rectZoomingStart = false;
13998
+ /** @private */
13545
13999
  this.browserName = Browser.info.name;
13546
14000
  // eslint-disable-next-line @typescript-eslint/ban-types
14001
+ /** @private */
13547
14002
  this.isPointer = Browser.isPointer;
13548
14003
  this.handled = false;
14004
+ this.isPan = false;
14005
+ this.isZoomFinal = false;
14006
+ this.isZoomSelection = false;
13549
14007
  this.pinchFactor = 1;
13550
14008
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13551
14009
  this.startTouches = [];
13552
14010
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14011
+ /** @private */
13553
14012
  this.intersect = [];
13554
14013
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14014
+ /** @private */
13555
14015
  this.mouseDownLatLong = { x: 0, y: 0 };
13556
14016
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14017
+ /** @private */
13557
14018
  this.mouseMoveLatLong = { x: 0, y: 0 };
13558
- /**
13559
- * @private
13560
- */
14019
+ /** @private */
13561
14020
  this.isSingleClick = false;
13562
14021
  this.maps = maps;
13563
14022
  this.wheelEvent = this.browserName === 'mozilla' ? (this.isPointer ? 'mousewheel' : 'DOMMouseScroll') : 'mousewheel';
13564
14023
  this.cancelEvent = this.isPointer ? 'pointerleave' : 'mouseleave';
13565
- this.selectionColor = this.maps.zoomSettings.selectionColor;
13566
- 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;
13567
14028
  this.addEventListener();
13568
14029
  }
13569
14030
  /**
@@ -13573,6 +14034,7 @@ class Zoom {
13573
14034
  * @param {number} newZoomFactor - Specifies the zoom factor.
13574
14035
  * @param {string} type - Specifies the type.
13575
14036
  * @returns {void}
14037
+ * @private
13576
14038
  */
13577
14039
  performZooming(position, newZoomFactor, type) {
13578
14040
  const map = this.maps;
@@ -13586,6 +14048,7 @@ class Zoom {
13586
14048
  const maxZoom = map.zoomSettings.maxZoom;
13587
14049
  const minZoom = map.zoomSettings.minZoom;
13588
14050
  newZoomFactor = (minZoom > newZoomFactor && type === 'ZoomIn') ? minZoom + 1 : newZoomFactor;
14051
+ newZoomFactor = maxZoom >= newZoomFactor ? newZoomFactor : maxZoom;
13589
14052
  const prevTilePoint = map.tileTranslatePoint;
13590
14053
  if ((!map.isTileMap) && ((type === 'ZoomIn' ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)
13591
14054
  || map.isReset)) {
@@ -13674,6 +14137,9 @@ class Zoom {
13674
14137
  }
13675
14138
  }
13676
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
+ }
13677
14143
  }
13678
14144
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
13679
14145
  calculateInitalZoomTranslatePoint(newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map) {
@@ -13718,6 +14184,9 @@ class Zoom {
13718
14184
  map.tileTranslatePoint.y = (currentLevel === 1) ? ((bounds.height / 2) - ((tileDefaultSize * 2) / 2) + (padding * 2)) :
13719
14185
  position.y - ((y * totalSize) / 100);
13720
14186
  }
14187
+ /**
14188
+ * @private
14189
+ */
13721
14190
  performRectZooming() {
13722
14191
  this.isDragZoom = true;
13723
14192
  const map = this.maps;
@@ -13736,11 +14205,14 @@ class Zoom {
13736
14205
  if (!map.isTileMap) {
13737
14206
  const scale = map.previousScale = map.scale;
13738
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;
13739
14209
  const translatePoint = map.previousPoint = map.translatePoint;
13740
- const translatePointX = translatePoint.x - (((size.width / scale) - (size.width / zoomCalculationFactor)) / (size.width / x));
13741
- const translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
13742
- map.translatePoint = new Point(translatePointX, translatePointY);
13743
- 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;
13744
14216
  isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
13745
14217
  if (isZoomCancelled) {
13746
14218
  map.translatePoint = map.previousPoint;
@@ -13774,6 +14246,8 @@ class Zoom {
13774
14246
  this.zoomingRect = null;
13775
14247
  }
13776
14248
  }
14249
+ this.isZoomFinal = this.isZoomSelection && Math.round(map.scale) === this.maps.zoomSettings.maxZoom;
14250
+ this.removeToolbarOpacity(map.scale, this.maps.element.id + '_Zooming_');
13777
14251
  }
13778
14252
  setInteraction(newInteraction) {
13779
14253
  this.lastScale = 1;
@@ -13787,6 +14261,9 @@ class Zoom {
13787
14261
  this.setInteraction(null);
13788
14262
  }
13789
14263
  }
14264
+ /**
14265
+ * @private
14266
+ */
13790
14267
  performPinchZooming(e) {
13791
14268
  const map = this.maps;
13792
14269
  const prevLevel = map.tileZoomLevel;
@@ -13859,7 +14336,13 @@ class Zoom {
13859
14336
  if (!isZoomCancelled) {
13860
14337
  this.applyTransform(map);
13861
14338
  }
14339
+ if (Browser.isDevice) {
14340
+ this.removeToolbarOpacity(map.isTileMap ? Math.round(map.tileZoomLevel) : map.scale, map.element.id + '_Zooming_');
14341
+ }
13862
14342
  }
14343
+ /**
14344
+ * @private
14345
+ */
13863
14346
  drawZoomRectangle() {
13864
14347
  const map = this.maps;
13865
14348
  const down = this.mouseDownPoints;
@@ -13877,7 +14360,8 @@ class Zoom {
13877
14360
  const rectSVGObject = map.renderer.createSvg({
13878
14361
  id: map.element.id + '_Selection_Rect_Zooming',
13879
14362
  width: map.availableSize.width,
13880
- height: map.availableSize.height
14363
+ height: map.availableSize.height,
14364
+ style: 'position: absolute;'
13881
14365
  });
13882
14366
  const rectOption = new RectOption(map.element.id + '_ZoomRect', '#d3d3d3', border, 0.5, this.zoomingRect, 0, 0, '', '3');
13883
14367
  rectSVGObject.appendChild(map.renderer.drawRectangle(rectOption));
@@ -13904,6 +14388,9 @@ class Zoom {
13904
14388
  zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
13905
14389
  }
13906
14390
  }
14391
+ /**
14392
+ * @private
14393
+ */
13907
14394
  applyTransform(maps, animate$$1) {
13908
14395
  let layerIndex;
13909
14396
  this.templateCount = 0;
@@ -14057,7 +14544,7 @@ class Zoom {
14057
14544
  if (currentEle.childNodes[k - 1]['id'].indexOf('_rectIndex_') > -1 && !isNullOrUndefined(maps.zoomLabelPositions[labelIndex])) {
14058
14545
  const labelX = ((maps.zoomLabelPositions[labelIndex]['location']['x'] + x) * scale);
14059
14546
  const labelY = ((maps.zoomLabelPositions[labelIndex]['location']['y'] + y) * scale);
14060
- const zoomtext = currentEle.childNodes[k]['innerHTML'];
14547
+ const zoomtext = currentEle.childNodes[k]['textContent'];
14061
14548
  const style = maps.layers[this.index].dataLabelSettings.textStyle;
14062
14549
  const zoomtextSize = measureText(zoomtext, style);
14063
14550
  const padding = 5;
@@ -14198,7 +14685,7 @@ class Zoom {
14198
14685
  const datalabelTemplateElemement = getElementByID(maps.element.id + '_LayerIndex_'
14199
14686
  + i + '_Label_Template_Group');
14200
14687
  if ((!isNullOrUndefined(markerTemplateElement)) && markerTemplateElement.childElementCount > 0) {
14201
- markerTemplateElement.style.visibility = "visible";
14688
+ markerTemplateElement.style.visibility = 'visible';
14202
14689
  for (let k = 0; k < markerTemplateElement.childElementCount; k++) {
14203
14690
  this.markerTranslate(markerTemplateElement.childNodes[k], factor, x, y, scale, 'Template');
14204
14691
  }
@@ -14271,23 +14758,23 @@ class Zoom {
14271
14758
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Hide') {
14272
14759
  if (scale > 1) {
14273
14760
  text = ((this.maps.dataLabelShape[l] * scale) >= zoomtextSize['width']) ? zoomtext : '';
14274
- element.innerHTML = text;
14761
+ element.textContent = text;
14275
14762
  }
14276
14763
  else {
14277
14764
  text = (this.maps.dataLabelShape[l] >= zoomtextSize['width']) ? zoomtext : '';
14278
- element.innerHTML = text;
14765
+ element.textContent = text;
14279
14766
  }
14280
14767
  }
14281
14768
  if (this.maps.layers[this.index].dataLabelSettings.smartLabelMode === 'Trim') {
14282
14769
  if (scale > 1) {
14283
14770
  zoomtrimLabel = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
14284
14771
  text = zoomtrimLabel;
14285
- element.innerHTML = text;
14772
+ element.textContent = text;
14286
14773
  }
14287
14774
  else {
14288
14775
  zoomtrimLabel = textTrim(this.maps.dataLabelShape[l], zoomtext, style);
14289
14776
  text = zoomtrimLabel;
14290
- element.innerHTML = text;
14777
+ element.textContent = text;
14291
14778
  }
14292
14779
  }
14293
14780
  if (this.maps.layers[this.index].dataLabelSettings.intersectionAction === 'Hide') {
@@ -14298,11 +14785,11 @@ class Zoom {
14298
14785
  || textLocations['heightTop'] > this.intersect[m]['heightBottom']
14299
14786
  || textLocations['heightBottom'] < this.intersect[m]['heightTop']) {
14300
14787
  text = !isNullOrUndefined(text) ? text : zoomtext;
14301
- element.innerHTML = text;
14788
+ element.textContent = text;
14302
14789
  }
14303
14790
  else {
14304
14791
  text = '';
14305
- element.innerHTML = text;
14792
+ element.textContent = text;
14306
14793
  break;
14307
14794
  }
14308
14795
  }
@@ -14320,7 +14807,7 @@ class Zoom {
14320
14807
  if (scale > 1) {
14321
14808
  trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), trimmedLable, style);
14322
14809
  }
14323
- element.innerHTML = trimmedLable;
14810
+ element.textContent = trimmedLable;
14324
14811
  }
14325
14812
  else {
14326
14813
  if (textLocations['leftWidth'] > this.intersect[j]['leftWidth']) {
@@ -14328,7 +14815,7 @@ class Zoom {
14328
14815
  const difference = width - (textLocations['rightWidth'] - textLocations['leftWidth']);
14329
14816
  text = !isNullOrUndefined(text) ? text : zoomtext;
14330
14817
  trimmedLable = textTrim(difference, text, style);
14331
- element.innerHTML = trimmedLable;
14818
+ element.textContent = trimmedLable;
14332
14819
  break;
14333
14820
  }
14334
14821
  if (textLocations['leftWidth'] < this.intersect[j]['leftWidth']) {
@@ -14336,7 +14823,7 @@ class Zoom {
14336
14823
  const difference = Math.abs(width - (textLocations['rightWidth'] - textLocations['leftWidth']));
14337
14824
  text = !isNullOrUndefined(text) ? text : zoomtext;
14338
14825
  trimmedLable = textTrim(difference, text, style);
14339
- element.innerHTML = trimmedLable;
14826
+ element.textContent = trimmedLable;
14340
14827
  break;
14341
14828
  }
14342
14829
  }
@@ -14345,7 +14832,7 @@ class Zoom {
14345
14832
  this.intersect.push(textLocations);
14346
14833
  if (isNullOrUndefined(trimmedLable)) {
14347
14834
  trimmedLable = textTrim((this.maps.dataLabelShape[l] * scale), zoomtext, style);
14348
- element.innerHTML = trimmedLable;
14835
+ element.textContent = trimmedLable;
14349
14836
  }
14350
14837
  }
14351
14838
  if (animate$$1 || duration > 0) {
@@ -14537,6 +15024,9 @@ class Zoom {
14537
15024
  (this.distanceY / this.maps.scale) : this.maps.translatePoint.y;
14538
15025
  this.applyTransform(this.maps, false);
14539
15026
  }
15027
+ /**
15028
+ * @private
15029
+ */
14540
15030
  toolBarZooming(zoomFactor, type) {
14541
15031
  const map = this.maps;
14542
15032
  map.initialCheck = false;
@@ -14554,9 +15044,9 @@ class Zoom {
14554
15044
  const prevTilePoint = map.tileTranslatePoint;
14555
15045
  map.previousProjection = map.projectionType;
14556
15046
  zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
14557
- zoomFactor = (type === 'Reset') ? 1 : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
15047
+ zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
14558
15048
  zoomFactor = (minZoom > zoomFactor && type === 'ZoomIn') ? minZoom + 1 : zoomFactor;
14559
- 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
14560
15050
  || map.isReset)) {
14561
15051
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14562
15052
  const min = map.baseMapRectBounds['min'];
@@ -14641,6 +15131,9 @@ class Zoom {
14641
15131
  this.maps.zoomNotApplied = false;
14642
15132
  }
14643
15133
  }
15134
+ /**
15135
+ * @private
15136
+ */
14644
15137
  createZoomingToolbars() {
14645
15138
  const map = this.maps;
14646
15139
  let zoomInElements;
@@ -14649,36 +15142,59 @@ class Zoom {
14649
15142
  id: map.element.id + '_Zooming_KitCollection',
14650
15143
  opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
14651
15144
  });
14652
- const kitHeight = 16;
14653
- const kitWidth = 16;
14654
15145
  let xSpacing = 15;
14655
15146
  let ySpacing = 15;
14656
- const padding = 20;
14657
- const orientation = map.zoomSettings.toolBarOrientation;
14658
- 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;
14659
15168
  let shadowElement = '<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';
14660
15169
  shadowElement += '<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>';
14661
15170
  shadowElement += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';
14662
- const toolBarLength = map.zoomSettings.toolbars.length;
14663
- const toolWidth = (map.zoomSettings.toolBarOrientation === 'Horizontal') ? (toolBarLength * kitWidth) + (toolBarLength * padding) : (kitWidth * 2);
14664
- 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));
14665
15174
  const defElement = map.renderer.createDefs();
14666
15175
  defElement.innerHTML = shadowElement;
14667
15176
  this.toolBarGroup.appendChild(defElement);
14668
- 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));
14669
- 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));
14670
15178
  this.toolBarGroup.appendChild(outerElement);
14671
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15179
+ const scaleX = (button.radius - (button.borderWidth / 2)) / 30;
14672
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
+ }
14673
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;
14674
15188
  this.currentToolbarEle = map.renderer.createGroup({
14675
15189
  id: map.element.id + '_Zooming_ToolBar_' + toolbar + '_Group',
14676
15190
  transform: 'translate( ' + xSpacing + ' ' + ySpacing + ' ) '
14677
15191
  });
14678
15192
  this.currentToolbarEle.setAttribute('class', 'e-maps-toolbar');
14679
- 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;
14680
15195
  let direction = '';
14681
- 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;
14682
15198
  switch (toolbar.toLowerCase()) {
14683
15199
  case 'zoom': {
14684
15200
  let fillColor;
@@ -14686,36 +15202,51 @@ class Zoom {
14686
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,';
14687
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';
14688
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' : ''));
14689
15206
  if (this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
14690
15207
  fillColor = fill;
14691
- strokeColor = this.maps.themeStyle.zoomFillColor;
15208
+ strokeColor = pathStroke;
14692
15209
  }
14693
15210
  else if (this.maps.zoomSettings.enablePanning && this.maps.zoomSettings.enableSelectionZooming) {
14694
15211
  fillColor = fill;
14695
- strokeColor = this.maps.themeStyle.zoomFillColor;
15212
+ strokeColor = pathStroke;
14696
15213
  }
14697
15214
  else if (!this.maps.zoomSettings.enablePanning && !this.maps.zoomSettings.enableSelectionZooming) {
14698
15215
  fillColor = fill;
14699
- 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;
14700
15225
  }
14701
15226
  else {
14702
15227
  fillColor = this.selectionColor;
14703
15228
  strokeColor = this.selectionColor;
14704
15229
  }
14705
- 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);
14706
15233
  this.zoomElements = this.currentToolbarEle;
14707
15234
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14708
15235
  break;
14709
15236
  }
14710
15237
  case 'zoomin':
14711
15238
  direction = 'M 8, 0 L 8, 16 M 0, 8 L 16, 8';
14712
- 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);
14713
15242
  zoomInElements = this.currentToolbarEle;
14714
15243
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14715
15244
  break;
14716
15245
  case 'zoomout':
14717
15246
  direction = 'M 0, 8 L 16, 8';
14718
- 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);
14719
15250
  zoomOutElements = this.currentToolbarEle;
14720
15251
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14721
15252
  break;
@@ -14723,17 +15254,20 @@ class Zoom {
14723
15254
  let color;
14724
15255
  direction = 'M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,';
14725
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' : ''));
14726
15258
  if (this.maps.zoomSettings.enablePanning && this.maps.zoomModule.isDragZoom) {
14727
- color = '#737373';
15259
+ color = this.selectionColor || this.maps.themeStyle.zoomFillColor;
14728
15260
  }
14729
15261
  else if (!this.maps.zoomSettings.enablePanning) {
14730
- color = '#737373';
15262
+ color = this.selectionColor || this.maps.themeStyle.zoomFillColor;
14731
15263
  this.currentToolbarEle.setAttribute('class', '');
14732
15264
  }
14733
15265
  else {
14734
- color = this.selectionColor;
15266
+ color = fill || this.maps.themeStyle.zoomFillColor;
14735
15267
  }
14736
- 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);
14737
15271
  this.panColor = color;
14738
15272
  this.panElements = this.currentToolbarEle;
14739
15273
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
@@ -14743,16 +15277,18 @@ class Zoom {
14743
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,';
14744
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,';
14745
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,';
14746
- 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);
14747
15283
  this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
14748
15284
  break;
14749
15285
  }
14750
- 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, '')));
14751
- xSpacing = (orientation === 'Horizontal') ? (xSpacing + (kitWidth + padding)) : xSpacing;
14752
- ySpacing = (orientation === 'Horizontal') ? ySpacing : (ySpacing + (kitHeight + padding));
14753
15286
  this.toolBarGroup.appendChild(this.currentToolbarEle);
14754
15287
  }
14755
15288
  }
15289
+ /**
15290
+ * @private
15291
+ */
14756
15292
  performToolBarAction(e) {
14757
15293
  const target = e.target;
14758
15294
  e.stopImmediatePropagation();
@@ -14778,29 +15314,30 @@ class Zoom {
14778
15314
  performZoomingByToolBar(type) {
14779
15315
  const map = this.maps;
14780
15316
  map.isReset = false;
15317
+ let scale = 0;
15318
+ const stateColor = this.fillColor || this.maps.themeStyle.zoomFillColor;
14781
15319
  switch (type.toLowerCase()) {
14782
15320
  case 'zoom':
14783
- this.panColor = this.fillColor;
14784
- this.zoomColor = this.selectionColor;
14785
- this.applySelection(this.zoomElements, this.selectionColor);
14786
- 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;
14787
15327
  break;
14788
15328
  case 'pan':
14789
- if (!this.maps.zoomSettings.enablePanning) {
14790
- this.panColor = '#737373';
14791
- }
14792
- else {
14793
- this.panColor = this.selectionColor;
14794
- }
14795
- this.zoomColor = this.fillColor;
15329
+ this.panColor = this.maps.zoomSettings.enablePanning ? this.selectionColor : stateColor;
15330
+ this.zoomColor = stateColor;
14796
15331
  if (!this.maps.zoomSettings.enablePanning) {
14797
15332
  this.applySelection(this.zoomElements, this.selectionColor);
14798
15333
  this.applySelection(this.panElements, this.panColor);
14799
15334
  }
14800
15335
  else {
14801
- this.applySelection(this.zoomElements, this.fillColor);
15336
+ this.applySelection(this.zoomElements, (this.fillColor || stateColor));
14802
15337
  this.applySelection(this.panElements, this.panColor);
14803
15338
  }
15339
+ this.isPan = this.maps.zoomSettings.enablePanning;
15340
+ this.isZoomSelection = false;
14804
15341
  break;
14805
15342
  case 'zoomin':
14806
15343
  map.staticMapZoom = map.tileZoomLevel;
@@ -14808,32 +15345,66 @@ class Zoom {
14808
15345
  map.staticMapZoom += 1;
14809
15346
  }
14810
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
+ }
14811
15359
  break;
14812
15360
  case 'zoomout':
14813
15361
  map.staticMapZoom = map.tileZoomLevel;
14814
15362
  map.markerCenterLatitude = null;
14815
15363
  map.markerCenterLongitude = null;
14816
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
+ }
14817
15380
  break;
14818
15381
  case 'reset':
14819
15382
  map.staticMapZoom = map.zoomSettings.enable ? map.zoomSettings.zoomFactor : 0;
14820
15383
  map.markerCenterLatitude = null;
14821
15384
  map.markerCenterLongitude = null;
14822
- this.toolBarZooming(1, 'Reset');
14823
- if (!this.maps.zoomSettings.enablePanning) {
14824
- this.applySelection(this.zoomElements, this.selectionColor);
14825
- 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
+ }
14826
15397
  }
14827
- else {
14828
- this.applySelection(this.zoomElements, this.fillColor);
14829
- 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);
14830
15401
  }
14831
15402
  }
14832
15403
  this.panningStyle(type.toLowerCase());
14833
15404
  }
14834
15405
  panningStyle(toolbar) {
14835
15406
  const svg = getElementByID(this.maps.element.id + '_svg');
14836
- if (toolbar === 'pan' || this.isPanning) {
15407
+ if (toolbar === 'pan' || (this.isPanning && toolbar !== 'reset')) {
14837
15408
  svg.setAttribute('class', 'e-maps-panning');
14838
15409
  }
14839
15410
  else {
@@ -14848,22 +15419,50 @@ class Zoom {
14848
15419
  for (let i = 0; i < elements.childElementCount; i++) {
14849
15420
  childElement = elements.childNodes[i];
14850
15421
  if (childElement.tagName !== 'circle') {
14851
- childElement.setAttribute('fill', color);
15422
+ childElement.setAttribute('fill', (elements.id.indexOf('Pan') > -1 ? color : 'transparent'));
14852
15423
  childElement.setAttribute('stroke', color);
14853
15424
  }
14854
15425
  }
14855
15426
  }
15427
+ /**
15428
+ * @private
15429
+ */
14856
15430
  showTooltip(e) {
14857
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;
14858
15447
  if (!this.isTouch) {
14859
- 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
+ }
14860
15453
  }
14861
15454
  }
15455
+ /**
15456
+ * @private
15457
+ */
14862
15458
  removeTooltip() {
14863
15459
  if (getElementByID('EJ2_Map_Toolbar_Tip')) {
14864
15460
  remove(getElementByID('EJ2_Map_Toolbar_Tip'));
14865
15461
  }
14866
15462
  }
15463
+ /**
15464
+ * @private
15465
+ */
14867
15466
  alignToolBar() {
14868
15467
  const map = this.maps;
14869
15468
  const padding = 10;
@@ -14878,12 +15477,12 @@ class Zoom {
14878
15477
  getElementByID(map.element.id + '_Secondary_Element').appendChild(element);
14879
15478
  }
14880
15479
  const toolBarSize = this.toolBarGroup.getBoundingClientRect();
14881
- rectSVGObject.setAttribute('height', (toolBarSize.height + padding / 2).toString());
14882
- 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());
14883
15482
  const size = !isNullOrUndefined(map.totalRect) ? map.totalRect : map.mapAreaRect;
14884
15483
  let x = 0;
14885
15484
  let y = 0;
14886
- switch (map.zoomSettings.verticalAlignment) {
15485
+ switch (map.toolbarProperties.verticalAlignment) {
14887
15486
  case 'Near':
14888
15487
  y = size.y;
14889
15488
  break;
@@ -14894,7 +15493,7 @@ class Zoom {
14894
15493
  y = (size.height - toolBarSize.height) - padding;
14895
15494
  break;
14896
15495
  }
14897
- switch (map.zoomSettings.horizontalAlignment) {
15496
+ switch (map.toolbarProperties.horizontalAlignment) {
14898
15497
  case 'Near':
14899
15498
  x = size.x;
14900
15499
  break;
@@ -14913,7 +15512,7 @@ class Zoom {
14913
15512
  const extraPosition = map.getExtraPosition();
14914
15513
  element.style.left = x + extraPosition.x + 'px';
14915
15514
  element.style.top = y + extraPosition.y + 'px';
14916
- const color = this.maps.zoomSettings.highlightColor || this.maps.themeStyle.zoomSelectionColor;
15515
+ const color = this.maps.toolbarProperties.highlightColor || this.maps.themeStyle.zoomSelectionColor;
14917
15516
  const css = ' .e-maps-toolbar:hover > circle { stroke:' + color + '; } .e-maps-toolbar:hover > path { fill: ' + color + ' ; stroke: ' + color + '; }' +
14918
15517
  '.e-maps-toolbar:hover { cursor: pointer; } .e-maps-cursor-disable:hover { cursor: not-allowed; } .e-maps-panning:hover { cursor: pointer; } ' +
14919
15518
  '.e-maps-popup-close { display: block; opacity: 0; }';
@@ -14921,6 +15520,141 @@ class Zoom {
14921
15520
  style.appendChild(document.createTextNode(css));
14922
15521
  element.appendChild(style);
14923
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
+ }
14924
15658
  /**
14925
15659
  * To bind events.
14926
15660
  *
@@ -14935,6 +15669,9 @@ class Zoom {
14935
15669
  EventHandler.add(element, 'mouseover', this.showTooltip, this);
14936
15670
  EventHandler.add(element, 'mouseout', this.removeTooltip, this);
14937
15671
  }
15672
+ /**
15673
+ * @private
15674
+ */
14938
15675
  mapMouseWheel(e) {
14939
15676
  if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
14940
15677
  const map = this.maps;
@@ -14975,8 +15712,13 @@ class Zoom {
14975
15712
  this.performZooming(position, (value - delta), direction);
14976
15713
  }
14977
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_'));
14978
15717
  }
14979
15718
  }
15719
+ /**
15720
+ * @private
15721
+ */
14980
15722
  doubleClick(e) {
14981
15723
  const pageX = e.pageX;
14982
15724
  const pageY = e.pageY;
@@ -14996,6 +15738,9 @@ class Zoom {
14996
15738
  }
14997
15739
  }
14998
15740
  }
15741
+ /**
15742
+ * @private
15743
+ */
14999
15744
  mouseDownHandler(e) {
15000
15745
  let pageX;
15001
15746
  let pageY;
@@ -15015,15 +15760,15 @@ class Zoom {
15015
15760
  target = e.target;
15016
15761
  }
15017
15762
  if (!this.maps.zoomSettings.enablePanning) {
15018
- this.isPanning = this.panColor !== this.selectionColor ? this.maps.zoomSettings.enablePanning
15763
+ this.isPan = this.isPanning = this.panColor !== this.selectionColor ? this.maps.zoomSettings.enablePanning
15019
15764
  : this.zoomColor === this.selectionColor;
15020
15765
  }
15021
15766
  else {
15022
- this.isPanning = this.panColor === this.selectionColor ? this.maps.zoomSettings.enablePanning
15023
- : this.zoomColor !== this.selectionColor;
15767
+ this.isPan = this.isPanning = !this.isZoomSelection;
15024
15768
  }
15025
15769
  this.mouseDownLatLong = { x: pageX, y: pageY };
15026
- 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);
15027
15772
  this.mouseDownPoints = this.getMousePosition(pageX, pageY);
15028
15773
  if (this.isTouch) {
15029
15774
  this.firstMove = true;
@@ -15032,6 +15777,9 @@ class Zoom {
15032
15777
  }
15033
15778
  this.isSingleClick = true;
15034
15779
  }
15780
+ /**
15781
+ * @private
15782
+ */
15035
15783
  mouseMoveHandler(e) {
15036
15784
  let pageX;
15037
15785
  let pageY;
@@ -15054,21 +15802,9 @@ class Zoom {
15054
15802
  if (getElementByID(map.element.id + '_Zooming_KitCollection')) {
15055
15803
  if (target.id.indexOf('_Zooming_') > -1) {
15056
15804
  getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '1');
15057
- if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
15058
- if (!this.maps.zoomSettings.enablePanning) {
15059
- if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
15060
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
15061
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
15062
- }
15063
- }
15064
- }
15065
15805
  }
15066
- else {
15806
+ else if (!map.isDevice) {
15067
15807
  getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
15068
- if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
15069
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
15070
- getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
15071
- }
15072
15808
  }
15073
15809
  }
15074
15810
  if (this.isTouch) {
@@ -15090,7 +15826,7 @@ class Zoom {
15090
15826
  this.mouseMovePoints = this.getMousePosition(pageX, pageY);
15091
15827
  const targetId = e.target['id'];
15092
15828
  const targetEle = e.target;
15093
- 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)) {
15094
15830
  e.preventDefault();
15095
15831
  this.maps.element.style.cursor = 'pointer';
15096
15832
  this.mouseMoveLatLong = { x: pageX, y: pageY };
@@ -15104,11 +15840,19 @@ class Zoom {
15104
15840
  }
15105
15841
  if (this.isTouch ? (touches.length === 1 && this.rectZoomingStart) : this.rectZoomingStart) {
15106
15842
  e.preventDefault();
15107
- 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) {
15108
15845
  this.drawZoomRectangle();
15109
15846
  }
15847
+ else {
15848
+ this.rectZoomingStart = false;
15849
+ this.isPan = true;
15850
+ }
15110
15851
  }
15111
15852
  }
15853
+ /**
15854
+ * @private
15855
+ */
15112
15856
  mouseUpHandler(e) {
15113
15857
  const map = this.maps;
15114
15858
  this.rectZoomingStart = false;
@@ -15131,6 +15875,9 @@ class Zoom {
15131
15875
  this.mouseMoveLatLong = { x: 0, y: 0 };
15132
15876
  this.mouseDownLatLong = { x: 0, y: 0 };
15133
15877
  }
15878
+ /**
15879
+ * @private
15880
+ */
15134
15881
  mouseCancelHandler(e) {
15135
15882
  this.isPanning = false;
15136
15883
  this.isTouch = false;
@@ -15146,6 +15893,7 @@ class Zoom {
15146
15893
  *
15147
15894
  * @param {PointerEvent} e - Specifies the pointer event.
15148
15895
  * @returns {void}
15896
+ * @private
15149
15897
  */
15150
15898
  click(e) {
15151
15899
  const map = this.maps;
@@ -15168,6 +15916,9 @@ class Zoom {
15168
15916
  }
15169
15917
  }
15170
15918
  }
15919
+ /**
15920
+ * @private
15921
+ */
15171
15922
  getMousePosition(pageX, pageY) {
15172
15923
  const map = this.maps;
15173
15924
  const elementRect = map.element.getBoundingClientRect();
@@ -15179,6 +15930,9 @@ class Zoom {
15179
15930
  const positionY = elementRect.top + pageYOffset - clientTop;
15180
15931
  return new Point(Math.abs(pageX - positionX), Math.abs(pageY - positionY));
15181
15932
  }
15933
+ /**
15934
+ * @private
15935
+ */
15182
15936
  addEventListener() {
15183
15937
  if (this.maps.isDestroyed) {
15184
15938
  return;
@@ -15191,6 +15945,9 @@ class Zoom {
15191
15945
  this.maps.on(Browser.touchEndEvent, this.mouseUpHandler, this);
15192
15946
  EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this);
15193
15947
  }
15948
+ /**
15949
+ * @private
15950
+ */
15194
15951
  removeEventListener() {
15195
15952
  if (this.maps.isDestroyed) {
15196
15953
  return;
@@ -15343,7 +16100,7 @@ class Print {
15343
16100
  }
15344
16101
 
15345
16102
  /**
15346
- * This module enables the export to Image functionality in Maps control.
16103
+ * This module enables the export to Image functionality in maps.
15347
16104
  *
15348
16105
  * @hidden
15349
16106
  */
@@ -15512,7 +16269,7 @@ class ImageExport {
15512
16269
  }
15513
16270
 
15514
16271
  /**
15515
- * This module enables the export to PDF functionality in Maps control.
16272
+ * This module enables the export to PDF functionality in maps.
15516
16273
  *
15517
16274
  * @hidden
15518
16275
  */
@@ -15530,7 +16287,7 @@ class PdfExport {
15530
16287
  * @param {ExportType} type - Specifies the type of the document.
15531
16288
  * @param {string} fileName - Specifies the name of the PDF document.
15532
16289
  * @param {boolean} allowDownload - Specifies whether to download the document or not.
15533
- * @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.
15534
16291
  * @returns {Promise<string>} - Returns "null" value when the allowDownload is set to false.
15535
16292
  * @private
15536
16293
  */
@@ -15676,5 +16433,5 @@ class PdfExport {
15676
16433
  * exporting all modules from maps index
15677
16434
  */
15678
16435
 
15679
- 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 };
15680
16437
  //# sourceMappingURL=ej2-maps.es2015.js.map