@syncfusion/ej2-maps 25.2.4 → 25.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/ej2-maps.min.js +2 -2
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +322 -202
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +331 -205
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/maps/layers/bubble.d.ts +3 -4
- package/src/maps/layers/bubble.js +3 -4
- package/src/maps/layers/color-mapping.d.ts +2 -2
- package/src/maps/layers/color-mapping.js +2 -2
- package/src/maps/layers/data-label.d.ts +1 -1
- package/src/maps/layers/data-label.js +1 -1
- package/src/maps/layers/layer-panel.d.ts +7 -7
- package/src/maps/layers/layer-panel.js +11 -20
- package/src/maps/layers/legend.d.ts +9 -0
- package/src/maps/layers/legend.js +96 -19
- package/src/maps/layers/marker.d.ts +8 -8
- package/src/maps/layers/marker.js +8 -8
- package/src/maps/layers/navigation-selected-line.d.ts +1 -1
- package/src/maps/layers/navigation-selected-line.js +1 -1
- package/src/maps/layers/polygon.d.ts +1 -1
- package/src/maps/layers/polygon.js +1 -1
- package/src/maps/maps.d.ts +24 -26
- package/src/maps/maps.js +32 -30
- package/src/maps/model/base-model.d.ts +18 -2
- package/src/maps/model/base.d.ts +16 -2
- package/src/maps/model/base.js +7 -1
- package/src/maps/model/constants.d.ts +0 -4
- package/src/maps/model/constants.js +0 -4
- package/src/maps/model/interface.d.ts +2 -1
- package/src/maps/model/print.d.ts +3 -3
- package/src/maps/model/print.js +3 -3
- package/src/maps/model/theme.d.ts +1 -1
- package/src/maps/model/theme.js +1 -1
- package/src/maps/user-interaction/annotation.d.ts +1 -2
- package/src/maps/user-interaction/annotation.js +1 -2
- package/src/maps/user-interaction/highlight.d.ts +4 -4
- package/src/maps/user-interaction/highlight.js +4 -4
- package/src/maps/user-interaction/selection.d.ts +5 -5
- package/src/maps/user-interaction/selection.js +5 -5
- package/src/maps/user-interaction/tooltip.d.ts +6 -6
- package/src/maps/user-interaction/tooltip.js +18 -11
- package/src/maps/user-interaction/zoom.d.ts +6 -4
- package/src/maps/user-interaction/zoom.js +23 -10
- package/src/maps/utils/helper.d.ts +87 -72
- package/src/maps/utils/helper.js +114 -78
package/src/maps/utils/helper.js
CHANGED
|
@@ -33,7 +33,7 @@ var Size = /** @class */ (function () {
|
|
|
33
33
|
}());
|
|
34
34
|
export { Size };
|
|
35
35
|
/**
|
|
36
|
-
* To find number from string
|
|
36
|
+
* To find number from string.
|
|
37
37
|
*
|
|
38
38
|
* @param {string} value Specifies the value
|
|
39
39
|
* @param {number} containerSize Specifies the container size
|
|
@@ -47,7 +47,7 @@ export function stringToNumber(value, containerSize) {
|
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* Method to calculate the width and height of the maps
|
|
50
|
+
* Method to calculate the width and height of the maps.
|
|
51
51
|
*
|
|
52
52
|
* @param {Maps} maps Specifies the maps instance
|
|
53
53
|
* @returns {void}
|
|
@@ -92,7 +92,7 @@ export function createSvg(maps) {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
* Method to get the mouse position
|
|
95
|
+
* Method to get the mouse position.
|
|
96
96
|
*
|
|
97
97
|
* @param {number} pageX - Specifies the pageX.
|
|
98
98
|
* @param {number} pageY - Specifies the pageY.
|
|
@@ -111,7 +111,7 @@ export function getMousePosition(pageX, pageY, element) {
|
|
|
111
111
|
return new MapLocation((pageX - positionX), (pageY - positionY));
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
|
-
* Method to convert degrees to radians
|
|
114
|
+
* Method to convert degrees to radians.
|
|
115
115
|
*
|
|
116
116
|
* @param {number} deg Specifies the degree value
|
|
117
117
|
* @returns {number} Returns the number
|
|
@@ -121,7 +121,7 @@ export function degreesToRadians(deg) {
|
|
|
121
121
|
return deg * (Math.PI / 180);
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
* Convert radians to degrees method
|
|
124
|
+
* Convert radians to degrees method.
|
|
125
125
|
*
|
|
126
126
|
* @param {number} radian Specifies the radian value
|
|
127
127
|
* @returns {number} Returns the number
|
|
@@ -131,7 +131,7 @@ export function radiansToDegrees(radian) {
|
|
|
131
131
|
return radian * (180 / Math.PI);
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
|
-
* Method for converting from latitude and longitude values to points
|
|
134
|
+
* Method for converting from latitude and longitude values to points.
|
|
135
135
|
*
|
|
136
136
|
* @param {number} latitude - Specifies the latitude.
|
|
137
137
|
* @param {number} longitude - Specifies the longitude.
|
|
@@ -240,7 +240,7 @@ export function calculatePolygonPath(maps, factor, currentLayer, markerData) {
|
|
|
240
240
|
return path;
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
|
-
* Converting tile latitude and longitude to point
|
|
243
|
+
* Converting tile latitude and longitude to point.
|
|
244
244
|
*
|
|
245
245
|
* @param {MapLocation} center Specifies the map center location
|
|
246
246
|
* @param {number} zoomLevel Specifies the zoom level
|
|
@@ -263,7 +263,7 @@ export function convertTileLatLongToPoint(center, zoomLevel, tileTranslatePoint,
|
|
|
263
263
|
return { x: pixelX, y: pixelY };
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
|
-
* Method for calculate x point
|
|
266
|
+
* Method for calculate x point.
|
|
267
267
|
*
|
|
268
268
|
* @param {Maps} mapObject - Specifies the maps.
|
|
269
269
|
* @param {number} val - Specifies the value.
|
|
@@ -277,7 +277,7 @@ export function xToCoordinate(mapObject, val) {
|
|
|
277
277
|
return Math.round(totalSize * (val - longitudeMinMax.min) / (longitudeMinMax.max - longitudeMinMax.min) * 100) / 100;
|
|
278
278
|
}
|
|
279
279
|
/**
|
|
280
|
-
* Method for calculate y point
|
|
280
|
+
* Method for calculate y point.
|
|
281
281
|
*
|
|
282
282
|
* @param {Maps} mapObject - Specifies the maps.
|
|
283
283
|
* @param {number} val - Specifies the value.
|
|
@@ -289,7 +289,7 @@ export function yToCoordinate(mapObject, val) {
|
|
|
289
289
|
return Math.round(mapObject.mapAreaRect.height * (val - latitudeMinMax.min) / (latitudeMinMax.max - latitudeMinMax.min) * 100) / 100;
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
292
|
-
* Method for calculate aitoff projection
|
|
292
|
+
* Method for calculate aitoff projection.
|
|
293
293
|
*
|
|
294
294
|
* @param {number} x - Specifies the x value.
|
|
295
295
|
* @param {number} y - Specifies the y value.
|
|
@@ -302,7 +302,7 @@ export function aitoff(x, y) {
|
|
|
302
302
|
return new Point(2 * cosy * Math.sin(x) * sincia, Math.sin(y) * sincia);
|
|
303
303
|
}
|
|
304
304
|
/**
|
|
305
|
-
* Method to round the number
|
|
305
|
+
* Method to round the number.
|
|
306
306
|
*
|
|
307
307
|
* @param {number} a - Specifies the a value
|
|
308
308
|
* @param {number} b - Specifies the b value
|
|
@@ -332,7 +332,7 @@ export function acos(a) {
|
|
|
332
332
|
return Math.acos(a);
|
|
333
333
|
}
|
|
334
334
|
/**
|
|
335
|
-
* Method to calculate bound
|
|
335
|
+
* Method to calculate bound.
|
|
336
336
|
*
|
|
337
337
|
* @param {number} value Specifies the value
|
|
338
338
|
* @param {number} min Specifies the minimum value
|
|
@@ -350,7 +350,7 @@ export function calculateBound(value, min, max) {
|
|
|
350
350
|
return value;
|
|
351
351
|
}
|
|
352
352
|
/**
|
|
353
|
-
* To trigger the download element
|
|
353
|
+
* To trigger the download element.
|
|
354
354
|
*
|
|
355
355
|
* @param {string} fileName Specifies the file name
|
|
356
356
|
* @param {ExportType} type Specifies the type
|
|
@@ -441,7 +441,8 @@ export function measureText(text, font) {
|
|
|
441
441
|
* @param {string} text - Specifies the text.
|
|
442
442
|
* @param {FontModel} font - Specifies the font.
|
|
443
443
|
* @returns {Size} - Returns the size of text.
|
|
444
|
-
* @private
|
|
444
|
+
* @private
|
|
445
|
+
*/
|
|
445
446
|
export function measureTextElement(text, font) {
|
|
446
447
|
var canvas = document.createElement('canvas');
|
|
447
448
|
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
@@ -453,7 +454,7 @@ export function measureTextElement(text, font) {
|
|
|
453
454
|
return new Size(width, height);
|
|
454
455
|
}
|
|
455
456
|
/**
|
|
456
|
-
* Internal use of text options
|
|
457
|
+
* Internal use of text options.
|
|
457
458
|
*
|
|
458
459
|
* @private
|
|
459
460
|
*/
|
|
@@ -474,7 +475,7 @@ var TextOption = /** @class */ (function () {
|
|
|
474
475
|
}());
|
|
475
476
|
export { TextOption };
|
|
476
477
|
/**
|
|
477
|
-
* Internal use of path options
|
|
478
|
+
* Internal use of path options.
|
|
478
479
|
*
|
|
479
480
|
* @private
|
|
480
481
|
*/
|
|
@@ -503,7 +504,7 @@ var ColorValue = /** @class */ (function () {
|
|
|
503
504
|
}());
|
|
504
505
|
export { ColorValue };
|
|
505
506
|
/**
|
|
506
|
-
* Internal use of rectangle options
|
|
507
|
+
* Internal use of rectangle options.
|
|
507
508
|
*
|
|
508
509
|
* @private
|
|
509
510
|
*/
|
|
@@ -527,7 +528,7 @@ var RectOption = /** @class */ (function (_super) {
|
|
|
527
528
|
}(PathOption));
|
|
528
529
|
export { RectOption };
|
|
529
530
|
/**
|
|
530
|
-
* Internal use of circle options
|
|
531
|
+
* Internal use of circle options.
|
|
531
532
|
*
|
|
532
533
|
* @private
|
|
533
534
|
*/
|
|
@@ -547,7 +548,7 @@ var CircleOption = /** @class */ (function (_super) {
|
|
|
547
548
|
}(PathOption));
|
|
548
549
|
export { CircleOption };
|
|
549
550
|
/**
|
|
550
|
-
* Internal use of polygon options
|
|
551
|
+
* Internal use of polygon options.
|
|
551
552
|
*
|
|
552
553
|
* @private
|
|
553
554
|
*/
|
|
@@ -565,7 +566,7 @@ var PolygonOption = /** @class */ (function (_super) {
|
|
|
565
566
|
}(PathOption));
|
|
566
567
|
export { PolygonOption };
|
|
567
568
|
/**
|
|
568
|
-
* Internal use of polyline options
|
|
569
|
+
* Internal use of polyline options.
|
|
569
570
|
*
|
|
570
571
|
* @private
|
|
571
572
|
*/
|
|
@@ -581,7 +582,7 @@ var PolylineOption = /** @class */ (function (_super) {
|
|
|
581
582
|
}(PolygonOption));
|
|
582
583
|
export { PolylineOption };
|
|
583
584
|
/**
|
|
584
|
-
* Internal use of line options
|
|
585
|
+
* Internal use of line options.
|
|
585
586
|
*
|
|
586
587
|
* @private
|
|
587
588
|
*/
|
|
@@ -602,7 +603,7 @@ var LineOption = /** @class */ (function (_super) {
|
|
|
602
603
|
}(PathOption));
|
|
603
604
|
export { LineOption };
|
|
604
605
|
/**
|
|
605
|
-
* Internal use of line
|
|
606
|
+
* Internal use of line.
|
|
606
607
|
*
|
|
607
608
|
* @property {number} Line - Specifies the line class
|
|
608
609
|
* @private
|
|
@@ -618,7 +619,7 @@ var Line = /** @class */ (function () {
|
|
|
618
619
|
}());
|
|
619
620
|
export { Line };
|
|
620
621
|
/**
|
|
621
|
-
* Internal use of map location type
|
|
622
|
+
* Internal use of map location type.
|
|
622
623
|
*
|
|
623
624
|
* @private
|
|
624
625
|
*/
|
|
@@ -631,7 +632,7 @@ var MapLocation = /** @class */ (function () {
|
|
|
631
632
|
}());
|
|
632
633
|
export { MapLocation };
|
|
633
634
|
/**
|
|
634
|
-
* Internal use of type rect
|
|
635
|
+
* Internal use of type rect.
|
|
635
636
|
*
|
|
636
637
|
* @private
|
|
637
638
|
*/
|
|
@@ -671,7 +672,7 @@ var PatternOptions = /** @class */ (function () {
|
|
|
671
672
|
}());
|
|
672
673
|
export { PatternOptions };
|
|
673
674
|
/**
|
|
674
|
-
* Internal rendering of text
|
|
675
|
+
* Internal rendering of text.
|
|
675
676
|
*
|
|
676
677
|
* @param {TextOption} option Specifies the text option
|
|
677
678
|
* @param {FontModel} style Specifies the style
|
|
@@ -851,7 +852,7 @@ export function convertElementFromLabel(element, labelId, data) {
|
|
|
851
852
|
* @returns {Element} - Returns the element
|
|
852
853
|
* @private
|
|
853
854
|
*/
|
|
854
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
855
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
855
856
|
export function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, markerCollection, maps) {
|
|
856
857
|
var markerEle;
|
|
857
858
|
var x;
|
|
@@ -1209,7 +1210,8 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
|
|
|
1209
1210
|
* @param {number} index - Specifies the index.
|
|
1210
1211
|
* @param {number} indexCollection - Specifies the index Collection.
|
|
1211
1212
|
* @returns {void}
|
|
1212
|
-
* @private
|
|
1213
|
+
* @private
|
|
1214
|
+
*/
|
|
1213
1215
|
export function markerClusterListHandler(maps, currentZoomFactor, layerIndex, index, indexCollection) {
|
|
1214
1216
|
if (currentZoomFactor === 1) {
|
|
1215
1217
|
var initialMarkerClusterList = isNullOrUndefined(maps.markerModule.initialMarkerCluster[layerIndex][index]) ? [] : indexCollection.length > 1 ? indexCollection : [];
|
|
@@ -1228,7 +1230,8 @@ export function markerClusterListHandler(maps, currentZoomFactor, layerIndex, in
|
|
|
1228
1230
|
* @param {number[]} indexCollection - Specifies the index collection.
|
|
1229
1231
|
* @param {number} p - Specifies the p.
|
|
1230
1232
|
* @returns {void}
|
|
1231
|
-
* @private
|
|
1233
|
+
* @private
|
|
1234
|
+
*/
|
|
1232
1235
|
export function markerBoundsComparer(tempElement, markerBounds, colloideBounds, indexCollection, p) {
|
|
1233
1236
|
// eslint-disable-next-line @typescript-eslint/tslint/config
|
|
1234
1237
|
var currentMarkerBound = tempElement.getBoundingClientRect();
|
|
@@ -1388,6 +1391,11 @@ export function marker(eventArgs, markerSettings, markerData, dataIndex, locatio
|
|
|
1388
1391
|
var y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y;
|
|
1389
1392
|
ele.setAttribute('transform', 'translate( ' + x + ' ' + y + ' )');
|
|
1390
1393
|
maintainSelection(maps.selectedMarkerElementId, maps.markerSelectionClass, ele, 'MarkerselectionMapStyle');
|
|
1394
|
+
if (maps.legendSettings.toggleLegendSettings.enable && maps.legendSettings.type === 'Markers') {
|
|
1395
|
+
var layerIndex = parseInt(ele.id.split('_LayerIndex_')[1], 10);
|
|
1396
|
+
maintainToggleSelection(maps.toggledElementId, ele.tagName === 'g' ? ele.children[0] : ele, maps.legendSettings.toggleLegendSettings.applyShapeSettings ?
|
|
1397
|
+
maps.layers[layerIndex].shapeSettings : maps.legendSettings.toggleLegendSettings);
|
|
1398
|
+
}
|
|
1391
1399
|
markerCollection.appendChild(ele);
|
|
1392
1400
|
var element = (markerData.length - 1) === dataIndex ? 'marker' : null;
|
|
1393
1401
|
var markerPoint = new Point(x, y);
|
|
@@ -1412,7 +1420,7 @@ export function marker(eventArgs, markerSettings, markerData, dataIndex, locatio
|
|
|
1412
1420
|
* @returns {HTMLElement} - Returns the html element
|
|
1413
1421
|
* @private
|
|
1414
1422
|
*/
|
|
1415
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1423
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1416
1424
|
export function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
|
|
1417
1425
|
templateFn = getTemplateFunction(eventArgs.template, maps);
|
|
1418
1426
|
if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
|
|
@@ -1437,7 +1445,7 @@ export function markerTemplate(eventArgs, templateFn, markerID, data, markerInde
|
|
|
1437
1445
|
return markerTemplate;
|
|
1438
1446
|
}
|
|
1439
1447
|
/**
|
|
1440
|
-
* To maintain selection during page resize
|
|
1448
|
+
* To maintain selection during page resize.
|
|
1441
1449
|
*
|
|
1442
1450
|
* @param {string[]} elementId - Specifies the element id
|
|
1443
1451
|
* @param {Element} elementClass - Specifies the element class
|
|
@@ -1464,7 +1472,30 @@ export function maintainSelection(elementId, elementClass, element, className) {
|
|
|
1464
1472
|
}
|
|
1465
1473
|
}
|
|
1466
1474
|
/**
|
|
1467
|
-
* To maintain
|
|
1475
|
+
* To maintain toggle state during page resize.
|
|
1476
|
+
*
|
|
1477
|
+
* @param {string[]} toggledElements - Specifies the list of toggled elements
|
|
1478
|
+
* @param {Element} element - Specifies the element id
|
|
1479
|
+
* @param {any} styleProperty - Specifies the style properties
|
|
1480
|
+
* @returns {void}
|
|
1481
|
+
* @private
|
|
1482
|
+
*/
|
|
1483
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1484
|
+
export function maintainToggleSelection(toggledElements, element, styleProperty) {
|
|
1485
|
+
if (!isNullOrUndefined(toggledElements) && toggledElements.length > 0) {
|
|
1486
|
+
for (var j = 0; j < toggledElements.length; j++) {
|
|
1487
|
+
if (toggledElements[j] === element.id) {
|
|
1488
|
+
element.setAttribute('fill', styleProperty.fill);
|
|
1489
|
+
element.setAttribute('stroke', styleProperty.border.color);
|
|
1490
|
+
element.setAttribute('fill-opacity', (styleProperty.opacity).toString());
|
|
1491
|
+
element.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
|
|
1492
|
+
element.setAttribute('stroke-width', (isNullOrUndefined(styleProperty.border.width) ? 0 : styleProperty.border.width).toString());
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* To maintain selection style class.
|
|
1468
1499
|
*
|
|
1469
1500
|
* @param {string} id - Specifies the id
|
|
1470
1501
|
* @param {string} idClass - Specifies the class id
|
|
@@ -1490,7 +1521,7 @@ export function maintainStyleClass(id, idClass, fill, opacity, borderColor, bord
|
|
|
1490
1521
|
}
|
|
1491
1522
|
}
|
|
1492
1523
|
/**
|
|
1493
|
-
* Internal use of append shape element
|
|
1524
|
+
* Internal use of append shape element.
|
|
1494
1525
|
*
|
|
1495
1526
|
* @param {Element} shape - Specifies the shape
|
|
1496
1527
|
* @param {Element} element - Specifies the element
|
|
@@ -1504,7 +1535,7 @@ export function appendShape(shape, element) {
|
|
|
1504
1535
|
return shape;
|
|
1505
1536
|
}
|
|
1506
1537
|
/**
|
|
1507
|
-
* Internal rendering of Circle
|
|
1538
|
+
* Internal rendering of Circle.
|
|
1508
1539
|
*
|
|
1509
1540
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1510
1541
|
* @param {CircleOption} options - Specifies the circle options
|
|
@@ -1516,7 +1547,7 @@ export function drawCircle(maps, options, element) {
|
|
|
1516
1547
|
return appendShape(maps.renderer.drawCircle(options), element);
|
|
1517
1548
|
}
|
|
1518
1549
|
/**
|
|
1519
|
-
* Internal rendering of Rectangle
|
|
1550
|
+
* Internal rendering of Rectangle.
|
|
1520
1551
|
*
|
|
1521
1552
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1522
1553
|
* @param {RectOption} options - Specifies the rect options
|
|
@@ -1528,7 +1559,7 @@ export function drawRectangle(maps, options, element) {
|
|
|
1528
1559
|
return appendShape(maps.renderer.drawRectangle(options), element);
|
|
1529
1560
|
}
|
|
1530
1561
|
/**
|
|
1531
|
-
* Internal rendering of Path
|
|
1562
|
+
* Internal rendering of Path.
|
|
1532
1563
|
*
|
|
1533
1564
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1534
1565
|
* @param {PathOption} options - Specifies the polygon options
|
|
@@ -1540,7 +1571,7 @@ export function drawPath(maps, options, element) {
|
|
|
1540
1571
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1541
1572
|
}
|
|
1542
1573
|
/**
|
|
1543
|
-
* Internal rendering of Polygon
|
|
1574
|
+
* Internal rendering of Polygon.
|
|
1544
1575
|
*
|
|
1545
1576
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1546
1577
|
* @param {PolygonOption} options - Specifies the polygon options
|
|
@@ -1552,7 +1583,7 @@ export function drawPolygon(maps, options, element) {
|
|
|
1552
1583
|
return appendShape(maps.renderer.drawPolygon(options), element);
|
|
1553
1584
|
}
|
|
1554
1585
|
/**
|
|
1555
|
-
* Internal rendering of Polyline
|
|
1586
|
+
* Internal rendering of Polyline.
|
|
1556
1587
|
*
|
|
1557
1588
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1558
1589
|
* @param {PolylineOption} options - Specifies the poly line options
|
|
@@ -1564,7 +1595,7 @@ export function drawPolyline(maps, options, element) {
|
|
|
1564
1595
|
return appendShape(maps.renderer.drawPolyline(options), element);
|
|
1565
1596
|
}
|
|
1566
1597
|
/**
|
|
1567
|
-
* Internal rendering of Line
|
|
1598
|
+
* Internal rendering of Line.
|
|
1568
1599
|
*
|
|
1569
1600
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1570
1601
|
* @param {LineOption} options - Specifies the line options
|
|
@@ -1576,7 +1607,7 @@ export function drawLine(maps, options, element) {
|
|
|
1576
1607
|
return appendShape(maps.renderer.drawLine(options), element);
|
|
1577
1608
|
}
|
|
1578
1609
|
/**
|
|
1579
|
-
* Calculate marker shapes
|
|
1610
|
+
* Calculate marker shapes.
|
|
1580
1611
|
*
|
|
1581
1612
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1582
1613
|
* @param {MarkerType} shape - Specifies the marker type
|
|
@@ -1643,7 +1674,7 @@ export function calculateShapes(maps, shape, options, size, location, markerEle)
|
|
|
1643
1674
|
return shape === 'Balloon' ? tempGroup : maps.renderer.drawPath(options);
|
|
1644
1675
|
}
|
|
1645
1676
|
/**
|
|
1646
|
-
* Internal rendering of Diamond
|
|
1677
|
+
* Internal rendering of Diamond.
|
|
1647
1678
|
*
|
|
1648
1679
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1649
1680
|
* @param {PathOption} options - Specifies the path options
|
|
@@ -1659,7 +1690,7 @@ export function drawDiamond(maps, options, size, location, element) {
|
|
|
1659
1690
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1660
1691
|
}
|
|
1661
1692
|
/**
|
|
1662
|
-
* Internal rendering of Triangle
|
|
1693
|
+
* Internal rendering of Triangle.
|
|
1663
1694
|
*
|
|
1664
1695
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1665
1696
|
* @param {PathOption} options - Specifies the path options
|
|
@@ -1675,7 +1706,7 @@ export function drawTriangle(maps, options, size, location, element) {
|
|
|
1675
1706
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1676
1707
|
}
|
|
1677
1708
|
/**
|
|
1678
|
-
* Internal rendering of Cross
|
|
1709
|
+
* Internal rendering of Cross.
|
|
1679
1710
|
*
|
|
1680
1711
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1681
1712
|
* @param {PathOption} options - Specifies the path options
|
|
@@ -1691,7 +1722,7 @@ export function drawCross(maps, options, size, location, element) {
|
|
|
1691
1722
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1692
1723
|
}
|
|
1693
1724
|
/**
|
|
1694
|
-
* Internal rendering of HorizontalLine
|
|
1725
|
+
* Internal rendering of HorizontalLine.
|
|
1695
1726
|
*
|
|
1696
1727
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1697
1728
|
* @param {PathOption} options - Specifies the path options
|
|
@@ -1706,7 +1737,7 @@ export function drawHorizontalLine(maps, options, size, location, element) {
|
|
|
1706
1737
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1707
1738
|
}
|
|
1708
1739
|
/**
|
|
1709
|
-
* Internal rendering of VerticalLine
|
|
1740
|
+
* Internal rendering of VerticalLine.
|
|
1710
1741
|
*
|
|
1711
1742
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1712
1743
|
* @param {PathOption} options - Specifies the path options
|
|
@@ -1721,7 +1752,7 @@ export function drawVerticalLine(maps, options, size, location, element) {
|
|
|
1721
1752
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1722
1753
|
}
|
|
1723
1754
|
/**
|
|
1724
|
-
* Internal rendering of Star
|
|
1755
|
+
* Internal rendering of Star.
|
|
1725
1756
|
*
|
|
1726
1757
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1727
1758
|
* @param {PathOption} options - Specifies the path options
|
|
@@ -1739,7 +1770,7 @@ export function drawStar(maps, options, size, location, element) {
|
|
|
1739
1770
|
return appendShape(maps.renderer.drawPath(options), element);
|
|
1740
1771
|
}
|
|
1741
1772
|
/**
|
|
1742
|
-
* Internal rendering of Balloon
|
|
1773
|
+
* Internal rendering of Balloon.
|
|
1743
1774
|
*
|
|
1744
1775
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1745
1776
|
* @param {PathOption} options - Specifies the path options
|
|
@@ -1773,7 +1804,7 @@ export function drawBalloon(maps, options, size, location, type, element) {
|
|
|
1773
1804
|
return pathElement;
|
|
1774
1805
|
}
|
|
1775
1806
|
/**
|
|
1776
|
-
* Internal rendering of Pattern
|
|
1807
|
+
* Internal rendering of Pattern.
|
|
1777
1808
|
*
|
|
1778
1809
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
1779
1810
|
* @param {PatternOptions} options - Specifies the pattern options
|
|
@@ -1820,7 +1851,7 @@ export function getFieldData(dataSource, fields) {
|
|
|
1820
1851
|
return newData;
|
|
1821
1852
|
}
|
|
1822
1853
|
/**
|
|
1823
|
-
* To find the index of dataSource from shape properties
|
|
1854
|
+
* To find the index of dataSource from shape properties.
|
|
1824
1855
|
*
|
|
1825
1856
|
* @param {any[]} dataSource - Specifies the data source
|
|
1826
1857
|
* @param {any} properties - Specifies the properties
|
|
@@ -1830,7 +1861,7 @@ export function getFieldData(dataSource, fields) {
|
|
|
1830
1861
|
* @returns {number} - Returns the number
|
|
1831
1862
|
* @private
|
|
1832
1863
|
*/
|
|
1833
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1864
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1834
1865
|
export function checkShapeDataFields(dataSource, properties, dataPath, propertyPath,
|
|
1835
1866
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1836
1867
|
layer) {
|
|
@@ -1913,7 +1944,7 @@ export function getRatioOfBubble(min, max, value, minValue, maxValue) {
|
|
|
1913
1944
|
return bubbleRadius;
|
|
1914
1945
|
}
|
|
1915
1946
|
/**
|
|
1916
|
-
* To find the midpoint of the polygon from points
|
|
1947
|
+
* To find the midpoint of the polygon from points.
|
|
1917
1948
|
*
|
|
1918
1949
|
* @param {MapLocation[]} points - Specifies the points
|
|
1919
1950
|
* @param {string} type - Specifies the type
|
|
@@ -2009,7 +2040,7 @@ export function findMidPointOfPolygon(points, type, geometryType) {
|
|
|
2009
2040
|
};
|
|
2010
2041
|
}
|
|
2011
2042
|
/**
|
|
2012
|
-
* Check custom path
|
|
2043
|
+
* Check custom path.
|
|
2013
2044
|
*
|
|
2014
2045
|
* @param {any[]} layerData - Specifies the layer data
|
|
2015
2046
|
* @returns {boolean} - Returns the boolean vlue
|
|
@@ -2028,7 +2059,7 @@ export function isCustomPath(layerData) {
|
|
|
2028
2059
|
return customPath;
|
|
2029
2060
|
}
|
|
2030
2061
|
/**
|
|
2031
|
-
* Trim the title text
|
|
2062
|
+
* Trim the title text.
|
|
2032
2063
|
*
|
|
2033
2064
|
* @param {number} maxWidth - Specifies the maximum width
|
|
2034
2065
|
* @param {string} text - Specifies the text
|
|
@@ -2076,7 +2107,7 @@ export function textTrim(maxWidth, text, font, width, isCanvasMeasure, widthList
|
|
|
2076
2107
|
return label;
|
|
2077
2108
|
}
|
|
2078
2109
|
/**
|
|
2079
|
-
* Method to calculate x position of title
|
|
2110
|
+
* Method to calculate x position of title.
|
|
2080
2111
|
*
|
|
2081
2112
|
* @param {Rect} location - Specifies the location
|
|
2082
2113
|
* @param {Alignment} alignment - Specifies the alignment
|
|
@@ -2104,7 +2135,7 @@ export function findPosition(location, alignment, textSize, type) {
|
|
|
2104
2135
|
return new Point(x, y);
|
|
2105
2136
|
}
|
|
2106
2137
|
/**
|
|
2107
|
-
* To remove element by id
|
|
2138
|
+
* To remove element by id.
|
|
2108
2139
|
*
|
|
2109
2140
|
* @param {string} id - Specifies the id
|
|
2110
2141
|
* @returns {void}
|
|
@@ -2115,7 +2146,7 @@ export function removeElement(id) {
|
|
|
2115
2146
|
return element ? remove(element) : null;
|
|
2116
2147
|
}
|
|
2117
2148
|
/**
|
|
2118
|
-
* To calculate map center position from pixel values
|
|
2149
|
+
* To calculate map center position from pixel values.
|
|
2119
2150
|
*
|
|
2120
2151
|
* @param {Maps} mapObject - Specifies the map object
|
|
2121
2152
|
* @param {LayerSettings} layer - Specifies the layer settings
|
|
@@ -2450,7 +2481,7 @@ export function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2450
2481
|
return { scale: animate ? 1 : scaleFactor, location: new Point(x, y) };
|
|
2451
2482
|
}
|
|
2452
2483
|
/**
|
|
2453
|
-
* To get the html element by specified id
|
|
2484
|
+
* To get the html element by specified id.
|
|
2454
2485
|
*
|
|
2455
2486
|
* @param {Maps} map - Specifies the instance of the maps
|
|
2456
2487
|
* @returns {void}
|
|
@@ -2467,7 +2498,7 @@ export function fixInitialScaleForTile(map) {
|
|
|
2467
2498
|
map.previousTileHeight = map.availableSize.height;
|
|
2468
2499
|
}
|
|
2469
2500
|
/**
|
|
2470
|
-
* To get the html element by specified id
|
|
2501
|
+
* To get the html element by specified id.
|
|
2471
2502
|
*
|
|
2472
2503
|
* @param {string} id - Specifies the id
|
|
2473
2504
|
* @returns {Element} - Returns the element
|
|
@@ -2493,7 +2524,7 @@ export function getClientElement(id) {
|
|
|
2493
2524
|
}
|
|
2494
2525
|
}
|
|
2495
2526
|
/**
|
|
2496
|
-
* To apply internalization
|
|
2527
|
+
* To apply internalization.
|
|
2497
2528
|
*
|
|
2498
2529
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
2499
2530
|
* @param {number} value - Specifies the value
|
|
@@ -2545,7 +2576,7 @@ export function getElement(id) {
|
|
|
2545
2576
|
return document.getElementById(id);
|
|
2546
2577
|
}
|
|
2547
2578
|
/**
|
|
2548
|
-
* Function to get shape data using target id
|
|
2579
|
+
* Function to get shape data using target id.
|
|
2549
2580
|
*
|
|
2550
2581
|
* @param {string} targetId - Specifies the target id
|
|
2551
2582
|
* @param {Maps} map - Specifies the instance of the maps
|
|
@@ -2568,7 +2599,7 @@ export function getShapeData(targetId, map) {
|
|
|
2568
2599
|
return { shapeData: shapeData, data: data };
|
|
2569
2600
|
}
|
|
2570
2601
|
/**
|
|
2571
|
-
* Function to trigger shapeSelected event
|
|
2602
|
+
* Function to trigger shapeSelected event.
|
|
2572
2603
|
*
|
|
2573
2604
|
* @param {string} targetId - Specifies the target id
|
|
2574
2605
|
* @param {SelectionSettingsModel} selection - Specifies the selection
|
|
@@ -2612,7 +2643,7 @@ export function triggerShapeEvent(targetId, selection, maps, eventName) {
|
|
|
2612
2643
|
return eventArgs;
|
|
2613
2644
|
}
|
|
2614
2645
|
/**
|
|
2615
|
-
* Function to get elements using class name
|
|
2646
|
+
* Function to get elements using class name.
|
|
2616
2647
|
*
|
|
2617
2648
|
* @param {string} className - Specifies the class name
|
|
2618
2649
|
* @returns {HTMLCollectionOf<Element>} - Returns the collection
|
|
@@ -2628,7 +2659,7 @@ export function getElementsByClassName(className) {
|
|
|
2628
2659
|
// return element.querySelectorAll('.' + args);
|
|
2629
2660
|
// }
|
|
2630
2661
|
/**
|
|
2631
|
-
* Function to get elements using querySelector
|
|
2662
|
+
* Function to get elements using querySelector.
|
|
2632
2663
|
*
|
|
2633
2664
|
* @param {string} args - Specifies the args
|
|
2634
2665
|
* @param {string} elementSelector - Specifies the element selector
|
|
@@ -2643,7 +2674,7 @@ export function querySelector(args, elementSelector) {
|
|
|
2643
2674
|
return targetEle;
|
|
2644
2675
|
}
|
|
2645
2676
|
/**
|
|
2646
|
-
* Function to get the element for selection and highlight using public method
|
|
2677
|
+
* Function to get the element for selection and highlight using public method.
|
|
2647
2678
|
*
|
|
2648
2679
|
* @param {number} layerIndex - Specifies the layer index
|
|
2649
2680
|
* @param {string} name - Specifies the layer name
|
|
@@ -2666,7 +2697,7 @@ export function getTargetElement(layerIndex, name, enable, map) {
|
|
|
2666
2697
|
return targetEle;
|
|
2667
2698
|
}
|
|
2668
2699
|
/**
|
|
2669
|
-
* Function to create style element for highlight and selection
|
|
2700
|
+
* Function to create style element for highlight and selection.
|
|
2670
2701
|
*
|
|
2671
2702
|
* @param {string} id - Specifies the id
|
|
2672
2703
|
* @param {string} className - Specifies the class name
|
|
@@ -2687,7 +2718,7 @@ export function createStyle(id, className, eventArgs) {
|
|
|
2687
2718
|
return styleEle;
|
|
2688
2719
|
}
|
|
2689
2720
|
/**
|
|
2690
|
-
* Function to customize the style for highlight and selection
|
|
2721
|
+
* Function to customize the style for highlight and selection.
|
|
2691
2722
|
*
|
|
2692
2723
|
* @param {string} id - Specifies the id
|
|
2693
2724
|
* @param {string} className - Specifies the class name
|
|
@@ -2707,7 +2738,7 @@ export function customizeStyle(id, className, eventArgs) {
|
|
|
2707
2738
|
}
|
|
2708
2739
|
}
|
|
2709
2740
|
/**
|
|
2710
|
-
* Function to trigger itemSelection event for legend selection and public method
|
|
2741
|
+
* Function to trigger itemSelection event for legend selection and public method.
|
|
2711
2742
|
*
|
|
2712
2743
|
* @param {SelectionSettingsModel} selectionSettings - Specifies the selection settings
|
|
2713
2744
|
* @param {Maps} map - Specifies the instance of the maps
|
|
@@ -2748,7 +2779,7 @@ export function triggerItemSelectionEvent(selectionSettings, map, targetElement,
|
|
|
2748
2779
|
});
|
|
2749
2780
|
}
|
|
2750
2781
|
/**
|
|
2751
|
-
* Function to remove class from element
|
|
2782
|
+
* Function to remove class from element.
|
|
2752
2783
|
*
|
|
2753
2784
|
* @param {Element} element - Specifies the element
|
|
2754
2785
|
* @returns {void}
|
|
@@ -2780,7 +2811,7 @@ export function elementAnimate(element, delay, duration, point, maps, ele, radiu
|
|
|
2780
2811
|
duration: (duration === 0 && animationMode === 'Enable') ? 1000 : duration,
|
|
2781
2812
|
delay: delay,
|
|
2782
2813
|
progress: function (args) {
|
|
2783
|
-
if (args.timeStamp > args.delay) {
|
|
2814
|
+
if ((args.timeStamp > args.delay) && !maps.zoomModule.isPanningInProgress) {
|
|
2784
2815
|
if (maps.isTileMap && height === 0) {
|
|
2785
2816
|
var layerGroupElement = document.querySelector('.GroupElement');
|
|
2786
2817
|
if (!isNullOrUndefined(layerGroupElement)) {
|
|
@@ -2794,7 +2825,10 @@ export function elementAnimate(element, delay, duration, point, maps, ele, radiu
|
|
|
2794
2825
|
},
|
|
2795
2826
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2796
2827
|
end: function (model) {
|
|
2797
|
-
|
|
2828
|
+
if (!maps.zoomModule.isPanningInProgress) {
|
|
2829
|
+
element.setAttribute('transform', transform);
|
|
2830
|
+
}
|
|
2831
|
+
maps.zoomModule.isPanningInProgress = false;
|
|
2798
2832
|
if (!ele) {
|
|
2799
2833
|
return;
|
|
2800
2834
|
}
|
|
@@ -3226,7 +3260,8 @@ export function changeNavaigationLineWidth(element, index, scale, maps) {
|
|
|
3226
3260
|
/**
|
|
3227
3261
|
* @param {PointerEvent | TouchEvent} event - Specifies the pointer or touch event
|
|
3228
3262
|
* @returns {ITouches[]} - Returns the target
|
|
3229
|
-
* @private
|
|
3263
|
+
* @private
|
|
3264
|
+
*/
|
|
3230
3265
|
export function targetTouches(event) {
|
|
3231
3266
|
var targetTouches = [];
|
|
3232
3267
|
var touches = event.touches;
|
|
@@ -3250,7 +3285,8 @@ export function calculateScale(startTouches, endTouches) {
|
|
|
3250
3285
|
* @param {ITouches} a - Specifies the a value
|
|
3251
3286
|
* @param {ITouches} b - Specifies the b value
|
|
3252
3287
|
* @returns {number} - Returns the number
|
|
3253
|
-
* @private
|
|
3288
|
+
* @private
|
|
3289
|
+
*/
|
|
3254
3290
|
export function getDistance(a, b) {
|
|
3255
3291
|
var x = a.pageX - b.pageX;
|
|
3256
3292
|
var y = a.pageY - b.pageY;
|
|
@@ -3298,7 +3334,7 @@ export function sum(a, b) {
|
|
|
3298
3334
|
return a + b;
|
|
3299
3335
|
}
|
|
3300
3336
|
/**
|
|
3301
|
-
* Animation Effect Calculation End
|
|
3337
|
+
* Animation Effect Calculation End.
|
|
3302
3338
|
*
|
|
3303
3339
|
* @param {Element} element - Specifies the element.
|
|
3304
3340
|
* @param {number} delay - Specifies the delay.
|
|
@@ -3364,7 +3400,7 @@ export function zoomAnimate(element, delay, duration, point, scale, size, maps)
|
|
|
3364
3400
|
});
|
|
3365
3401
|
}
|
|
3366
3402
|
/**
|
|
3367
|
-
* To process custom animation
|
|
3403
|
+
* To process custom animation.
|
|
3368
3404
|
*
|
|
3369
3405
|
* @param {Element} element - Specifies the element
|
|
3370
3406
|
* @param {number} delay - Specifies the delay
|
|
@@ -3417,7 +3453,7 @@ var MapAjax = /** @class */ (function () {
|
|
|
3417
3453
|
}());
|
|
3418
3454
|
export { MapAjax };
|
|
3419
3455
|
/**
|
|
3420
|
-
* Animation Translate
|
|
3456
|
+
* Animation Translate.
|
|
3421
3457
|
*
|
|
3422
3458
|
* @param {Element} element - Specifies the element
|
|
3423
3459
|
* @param {number} delay - Specifies the delay
|
|
@@ -3449,7 +3485,7 @@ export function smoothTranslate(element, delay, duration, point) {
|
|
|
3449
3485
|
});
|
|
3450
3486
|
}
|
|
3451
3487
|
/**
|
|
3452
|
-
* To find compare should zoom factor with previous factor and current factor
|
|
3488
|
+
* To find compare should zoom factor with previous factor and current factor.
|
|
3453
3489
|
*
|
|
3454
3490
|
* @param {number} scaleFactor - Specifies the scale factor
|
|
3455
3491
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
@@ -3475,7 +3511,7 @@ export function compareZoomFactor(scaleFactor, maps) {
|
|
|
3475
3511
|
}
|
|
3476
3512
|
}
|
|
3477
3513
|
/**
|
|
3478
|
-
* To find zoom level for the min and max latitude values
|
|
3514
|
+
* To find zoom level for the min and max latitude values.
|
|
3479
3515
|
*
|
|
3480
3516
|
* @param {number} minLat - Specifies the minimum latitude
|
|
3481
3517
|
* @param {number} maxLat - Specifies the maximum latitude
|
|
@@ -3520,13 +3556,13 @@ export function calculateZoomLevel(minLat, maxLat, minLong, maxLong, mapWidth, m
|
|
|
3520
3556
|
return scaleFactor;
|
|
3521
3557
|
}
|
|
3522
3558
|
/**
|
|
3523
|
-
* Method to get the result
|
|
3559
|
+
* Method to get the result.
|
|
3524
3560
|
*
|
|
3525
3561
|
* @param {any} e - Specifies the any type value
|
|
3526
3562
|
* @returns {any} - Returns the data value
|
|
3527
3563
|
* @private
|
|
3528
3564
|
*/
|
|
3529
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3565
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3530
3566
|
export function processResult(e) {
|
|
3531
3567
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3532
3568
|
var dataValue;
|