@syncfusion/ej2-maps 24.2.4 → 25.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -2
- 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 +646 -331
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +660 -346
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/maps/layers/bubble.js +2 -3
- package/src/maps/layers/color-mapping.d.ts +0 -1
- package/src/maps/layers/color-mapping.js +0 -1
- package/src/maps/layers/data-label.js +19 -17
- package/src/maps/layers/layer-panel.js +13 -7
- package/src/maps/layers/legend.js +11 -3
- package/src/maps/layers/marker.d.ts +4 -0
- package/src/maps/layers/marker.js +16 -13
- package/src/maps/layers/polygon.d.ts +0 -1
- package/src/maps/layers/polygon.js +1 -4
- package/src/maps/maps-model.d.ts +14 -0
- package/src/maps/maps.d.ts +14 -2
- package/src/maps/maps.js +118 -46
- package/src/maps/model/base-model.d.ts +51 -0
- package/src/maps/model/base.d.ts +43 -1
- package/src/maps/model/base.js +32 -0
- package/src/maps/model/constants.d.ts +12 -0
- package/src/maps/model/constants.js +12 -0
- package/src/maps/model/interface.d.ts +8 -0
- package/src/maps/user-interaction/tooltip.js +151 -110
- package/src/maps/user-interaction/zoom.d.ts +3 -5
- package/src/maps/user-interaction/zoom.js +198 -106
- package/src/maps/utils/helper.d.ts +7 -1
- package/src/maps/utils/helper.js +89 -37
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -72
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -49
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 25.1.35
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-maps@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-maps@
|
|
3
|
+
"_id": "@syncfusion/ej2-maps@16.42.7",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-NlcqBKvee5acIzRhuW6lTfmKVWkT3FvyKs3eSTanBYPLHOgQ2RvL7o3QCH0YhoqWHtSm/DlwKxR9ZN2qqv7//g==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-maps",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-maps",
|
|
24
24
|
"/@syncfusion/ej2-vue-maps"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-maps/-/ej2-maps-16.42.7.tgz",
|
|
27
|
+
"_shasum": "fc9aee98313d4f59d93909fbcb1bbe912d0a2ce2",
|
|
28
28
|
"_spec": "@syncfusion/ej2-maps@*",
|
|
29
|
-
"_where": "/jenkins/workspace/elease-
|
|
29
|
+
"_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Syncfusion Inc."
|
|
32
32
|
},
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~
|
|
39
|
-
"@syncfusion/ej2-buttons": "~
|
|
40
|
-
"@syncfusion/ej2-compression": "~
|
|
41
|
-
"@syncfusion/ej2-data": "~
|
|
42
|
-
"@syncfusion/ej2-file-utils": "~
|
|
43
|
-
"@syncfusion/ej2-pdf-export": "~
|
|
44
|
-
"@syncfusion/ej2-svg-base": "~
|
|
38
|
+
"@syncfusion/ej2-base": "~25.1.35",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~25.1.35",
|
|
40
|
+
"@syncfusion/ej2-compression": "~25.1.35",
|
|
41
|
+
"@syncfusion/ej2-data": "~25.1.35",
|
|
42
|
+
"@syncfusion/ej2-file-utils": "~25.1.35",
|
|
43
|
+
"@syncfusion/ej2-pdf-export": "~25.1.35",
|
|
44
|
+
"@syncfusion/ej2-svg-base": "~25.1.35"
|
|
45
45
|
},
|
|
46
46
|
"deprecated": false,
|
|
47
47
|
"description": "The Maps component is used to visualize the geographical data and represent the statistical data of a particular geographical area on earth with user interactivity, and provides various customizing options",
|
|
@@ -93,6 +93,6 @@
|
|
|
93
93
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
94
94
|
},
|
|
95
95
|
"typings": "index.d.ts",
|
|
96
|
-
"version": "
|
|
96
|
+
"version": "25.1.35",
|
|
97
97
|
"sideEffects": false
|
|
98
98
|
}
|
|
@@ -224,10 +224,10 @@ var Bubble = /** @class */ (function () {
|
|
|
224
224
|
Bubble.prototype.getbubble = function (target) {
|
|
225
225
|
var id = target.split('_LayerIndex_');
|
|
226
226
|
var index = parseInt(id[1].split('_')[0], 10);
|
|
227
|
-
var layer = this.maps.layers[index];
|
|
228
227
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
229
228
|
var data;
|
|
230
229
|
if (target.indexOf('_BubbleIndex_') > -1) {
|
|
230
|
+
var layer = this.maps.layers[index];
|
|
231
231
|
var bubbleIndex = parseInt(id[1].split('_BubbleIndex_')[1], 10);
|
|
232
232
|
var dataIndex = parseInt(id[1].split('_BubbleIndex_')[1].split('_dataIndex_')[1], 10);
|
|
233
233
|
if (!isNaN(bubbleIndex)) {
|
|
@@ -277,8 +277,7 @@ var Bubble = /** @class */ (function () {
|
|
|
277
277
|
*/
|
|
278
278
|
Bubble.prototype.destroy = function () {
|
|
279
279
|
this.bubbleCollection = [];
|
|
280
|
-
|
|
281
|
-
//this.maps = null;
|
|
280
|
+
this.maps = null;
|
|
282
281
|
};
|
|
283
282
|
return Bubble;
|
|
284
283
|
}());
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { findMidPointOfPolygon, Rect, filter, getTemplateFunction, getZoomTranslate, getTranslate, RectOption, convertElementFromLabel, Point, TextOption, renderTextElement, textTrim,
|
|
1
|
+
import { findMidPointOfPolygon, Rect, filter, getTemplateFunction, getZoomTranslate, getTranslate, RectOption, convertElementFromLabel, Point, TextOption, renderTextElement, textTrim, Internalize, measureTextElement } from '../utils/helper';
|
|
2
2
|
import { isNullOrUndefined, Animation, animationMode } from '@syncfusion/ej2-base';
|
|
3
3
|
import { dataLabelRendering } from '../model/constants';
|
|
4
4
|
import { Theme } from '../model/theme';
|
|
@@ -83,7 +83,7 @@ var DataLabel = /** @class */ (function () {
|
|
|
83
83
|
var locationY;
|
|
84
84
|
style.fontFamily = this.maps.theme.toLowerCase() !== 'material' ? this.maps.themeStyle.labelFontFamily : style.fontFamily;
|
|
85
85
|
style.fontWeight = style.fontWeight || this.maps.themeStyle.fontWeight || Theme.dataLabelFont.fontWeight;
|
|
86
|
-
shape = shapes['property'];
|
|
86
|
+
shape = !isNullOrUndefined(shapes) ? shapes['property'] : null;
|
|
87
87
|
var properties = (Object.prototype.toString.call(layer.shapePropertyPath) === '[object Array]' ?
|
|
88
88
|
layer.shapePropertyPath : [layer.shapePropertyPath]);
|
|
89
89
|
var propertyPath;
|
|
@@ -115,7 +115,7 @@ var DataLabel = /** @class */ (function () {
|
|
|
115
115
|
datasrcObj = this.getDataLabel(
|
|
116
116
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
117
117
|
layer.dataSource, layer.shapeDataPath, shapeData['properties'][propertyPath], layer.shapeDataPath);
|
|
118
|
-
if (!isNullOrUndefined(shapes['property'])) {
|
|
118
|
+
if (!isNullOrUndefined(shapes) && !isNullOrUndefined(shapes['property'])) {
|
|
119
119
|
shapePoint = [[]];
|
|
120
120
|
if (!layerData[index]['_isMultiPolygon'] && layerData[index]['type'] !== 'Point' && layerData[index]['type'] !== 'MultiPoint') {
|
|
121
121
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -218,13 +218,13 @@ var DataLabel = /** @class */ (function () {
|
|
|
218
218
|
if (eventargs_1.text !== text && !eventargs_1.cancel) {
|
|
219
219
|
text = eventargs_1.text;
|
|
220
220
|
}
|
|
221
|
-
var textSize =
|
|
221
|
+
var textSize = measureTextElement(text, style);
|
|
222
222
|
var trimmedLable = text;
|
|
223
223
|
var elementSize = textSize;
|
|
224
|
-
var startY = location['y'] - textSize['height'] /
|
|
225
|
-
var endY = location['y'] + textSize['height'] /
|
|
226
|
-
var start = ((location['y'] + transPoint['y']) * scale) - textSize['height'] /
|
|
227
|
-
var end = ((location['y'] + transPoint['y']) * scale) + textSize['height'] /
|
|
224
|
+
var startY = location['y'] - textSize['height'] / 2;
|
|
225
|
+
var endY = location['y'] + textSize['height'] / 2;
|
|
226
|
+
var start = ((location['y'] + transPoint['y']) * scale) - textSize['height'] / 2;
|
|
227
|
+
var end = ((location['y'] + transPoint['y']) * scale) + textSize['height'] / 2;
|
|
228
228
|
position = filter(shapePoint[midIndex], startY, endY);
|
|
229
229
|
if (!isPoint && position.length > 5 && (shapeData['geometry']['type'] !== 'MultiPolygon') &&
|
|
230
230
|
(shapeData['type'] !== 'MultiPolygon')) {
|
|
@@ -265,8 +265,8 @@ var DataLabel = /** @class */ (function () {
|
|
|
265
265
|
if (dataLabelSettings.smartLabelMode === 'Trim') {
|
|
266
266
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
267
267
|
var textType = typeof text === 'number' ? text.toString() : text;
|
|
268
|
-
trimmedLable = textTrim(width, textType, style);
|
|
269
|
-
elementSize =
|
|
268
|
+
trimmedLable = textTrim(width, textType, style, null, true);
|
|
269
|
+
elementSize = measureTextElement(trimmedLable, style);
|
|
270
270
|
options = new TextOption(labelId, textLocation.x, textLocation.y, 'middle', trimmedLable, '', '');
|
|
271
271
|
}
|
|
272
272
|
if (dataLabelSettings.smartLabelMode === 'None') {
|
|
@@ -307,19 +307,19 @@ var DataLabel = /** @class */ (function () {
|
|
|
307
307
|
if (_this.value[index]['leftWidth'] > intersect[j]['leftWidth']) {
|
|
308
308
|
width = intersect[j]['rightWidth'] - _this.value[index]['leftWidth'];
|
|
309
309
|
difference = width - (_this.value[index]['rightWidth'] - _this.value[index]['leftWidth']);
|
|
310
|
-
trimmedLable = textTrim(difference, text, style);
|
|
310
|
+
trimmedLable = textTrim(difference, text, style, null, true);
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
if (_this.value[index]['leftWidth'] < intersect[j]['leftWidth']) {
|
|
314
314
|
width = _this.value[index]['rightWidth'] - intersect[j]['leftWidth'];
|
|
315
315
|
difference = Math.abs(width - (_this.value[index]['rightWidth'] - _this.value[index]['leftWidth']));
|
|
316
|
-
trimmedLable = textTrim(difference, text, style);
|
|
316
|
+
trimmedLable = textTrim(difference, text, style, null, true);
|
|
317
317
|
break;
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
elementSize =
|
|
322
|
+
elementSize = measureTextElement(trimmedLable, style);
|
|
323
323
|
intersect.push(_this.value[index]);
|
|
324
324
|
options = new TextOption(labelId, textLocation.x, (textLocation.y), 'middle', trimmedLable, '', '');
|
|
325
325
|
}
|
|
@@ -353,6 +353,8 @@ var DataLabel = /** @class */ (function () {
|
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
element = renderTextElement(options, style, style.color || _this.maps.themeStyle.dataLabelFontColor, group);
|
|
356
|
+
element.setAttribute('aria-label', text);
|
|
357
|
+
element.setAttribute('role', 'region');
|
|
356
358
|
element.setAttribute('visibility', layer.dataLabelSettings.animationDuration > 0 || animationMode === 'Enable' ? 'hidden' : 'visibile');
|
|
357
359
|
if (zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied) {
|
|
358
360
|
element.setAttribute('transform', 'translate( ' + ((location['x'] + labelArgs.offsetX)) + ' '
|
|
@@ -362,7 +364,7 @@ var DataLabel = /** @class */ (function () {
|
|
|
362
364
|
}
|
|
363
365
|
else {
|
|
364
366
|
element.setAttribute('transform', 'translate( ' + (((location['x'] + transPoint.x) * scale) + labelArgs.offsetX) + ' '
|
|
365
|
-
+ ((((location['y'] + transPoint.y) * scale) + (elementSize.height /
|
|
367
|
+
+ ((((location['y'] + transPoint.y) * scale) + (elementSize.height / 2)) + labelArgs.offsetY) + ' )');
|
|
366
368
|
}
|
|
367
369
|
group.appendChild(element);
|
|
368
370
|
}
|
|
@@ -412,16 +414,16 @@ var DataLabel = /** @class */ (function () {
|
|
|
412
414
|
DataLabel.prototype.getPoint = function (shapes, points) {
|
|
413
415
|
if (shapes['type'] === 'MultiLineString') {
|
|
414
416
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
415
|
-
|
|
417
|
+
Array.prototype.forEach.call(shapes, function (current) {
|
|
416
418
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
417
|
-
|
|
419
|
+
Array.prototype.forEach.call(current, function (shape) {
|
|
418
420
|
points.push(new Point(shape['point']['x'], shape['point']['y']));
|
|
419
421
|
});
|
|
420
422
|
});
|
|
421
423
|
}
|
|
422
424
|
else {
|
|
423
425
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
424
|
-
|
|
426
|
+
Array.prototype.forEach.call(shapes, function (current) {
|
|
425
427
|
points.push(new Point(current['point']['x'], current['point']['y']));
|
|
426
428
|
});
|
|
427
429
|
}
|
|
@@ -167,8 +167,10 @@ var LayerPanel = /** @class */ (function () {
|
|
|
167
167
|
else if (panel.mapObject.defaultState) {
|
|
168
168
|
panel.mapObject.previousZoomFactor = panel.mapObject.tileZoomLevel;
|
|
169
169
|
panel.mapObject.tileZoomLevel = zoomFactorValue;
|
|
170
|
-
panel.mapObject.tileTranslatePoint
|
|
171
|
-
|
|
170
|
+
if (!isNullOrUndefined(panel.mapObject.tileTranslatePoint)) {
|
|
171
|
+
panel.mapObject.tileTranslatePoint.x = 0;
|
|
172
|
+
panel.mapObject.tileTranslatePoint.y = 0;
|
|
173
|
+
}
|
|
172
174
|
}
|
|
173
175
|
if (zoomFactorValue <= 1 && !isNullOrUndefined(panel.mapObject.height) && !panel.mapObject.zoomSettings.shouldZoomInitially
|
|
174
176
|
&& (panel.mapObject.tileZoomLevel === panel.mapObject.tileZoomScale) && this.mapObject.initialCheck) {
|
|
@@ -176,8 +178,10 @@ var LayerPanel = /** @class */ (function () {
|
|
|
176
178
|
}
|
|
177
179
|
if (!isNullOrUndefined(panel.mapObject.centerLatOfGivenLocation) && !isNullOrUndefined(panel.mapObject.centerLongOfGivenLocation) &&
|
|
178
180
|
panel.mapObject.zoomNotApplied) {
|
|
179
|
-
centerTileMap
|
|
180
|
-
|
|
181
|
+
if (!isNullOrUndefined(centerTileMap)) {
|
|
182
|
+
centerTileMap.y = panel.mapObject.centerLatOfGivenLocation;
|
|
183
|
+
centerTileMap.x = panel.mapObject.centerLongOfGivenLocation;
|
|
184
|
+
}
|
|
181
185
|
panel.mapObject.tileZoomLevel = panel.mapObject.mapScaleValue = panel.mapObject.scaleOfGivenLocation;
|
|
182
186
|
}
|
|
183
187
|
panel.mapObject.tileTranslatePoint = panel.panTileMap(panel.mapObject.availableSize.width, panel.mapObject.availableSize.height, centerTileMap);
|
|
@@ -188,8 +192,10 @@ var LayerPanel = /** @class */ (function () {
|
|
|
188
192
|
var padding = this.mapObject.layers[this.mapObject.baseLayerIndex].layerType !== 'GoogleStaticMap' ?
|
|
189
193
|
20 : 0;
|
|
190
194
|
var totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
|
|
191
|
-
|
|
192
|
-
|
|
195
|
+
if (!isNullOrUndefined(this.mapObject.initialTileTranslate)) {
|
|
196
|
+
this.mapObject.initialTileTranslate.x = (this.mapObject.availableSize.width / 2) - (totalSize / 2);
|
|
197
|
+
this.mapObject.initialTileTranslate.y = (this.mapObject.availableSize.height / 2) - (totalSize / 2) + padding;
|
|
198
|
+
}
|
|
193
199
|
}
|
|
194
200
|
panel.generateTiles(panel.mapObject.tileZoomLevel, panel.mapObject.tileTranslatePoint, null, bing);
|
|
195
201
|
if (!isNullOrUndefined(panel.mapObject.previousZoomFactor)
|
|
@@ -708,7 +714,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
708
714
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
709
715
|
var intersect_1 = [];
|
|
710
716
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
711
|
-
|
|
717
|
+
Array.prototype.forEach.call(renderData, function (currentShapeData, i) {
|
|
712
718
|
_this.renderLabel(_this.currentLayer, layerIndex, currentShapeData, group, i, labelTemplateEle, intersect_1);
|
|
713
719
|
});
|
|
714
720
|
this.groupElements.push(group);
|
|
@@ -442,7 +442,9 @@ var Legend = /** @class */ (function () {
|
|
|
442
442
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'middle', item['text'], '', '');
|
|
443
443
|
textFont.fontFamily = !isNullOrUndefined(textFont.fontFamily) ? textFont.fontFamily : this.maps.themeStyle.fontFamily;
|
|
444
444
|
textFont.size = map.themeStyle.legendFontSize || textFont.size;
|
|
445
|
-
renderTextElement(textOptions, textFont, textFont.color, this.legendGroup);
|
|
445
|
+
var element = renderTextElement(textOptions, textFont, textFont.color, this.legendGroup);
|
|
446
|
+
element.setAttribute('aria-label', item['text']);
|
|
447
|
+
element.setAttribute('role', 'region');
|
|
446
448
|
this.legendGroup.appendChild(render.drawRectangle(rectOptions));
|
|
447
449
|
this.legendToggle();
|
|
448
450
|
}
|
|
@@ -519,7 +521,9 @@ var Legend = /** @class */ (function () {
|
|
|
519
521
|
legendText = trimmedText;
|
|
520
522
|
}
|
|
521
523
|
textOptions = new TextOption(textId, textLocation.x, textLocation.y, 'start', legendText, '', '');
|
|
522
|
-
renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
|
|
524
|
+
var element = renderTextElement(textOptions, legendTextStyle, legendTextStyle.color, legendElement);
|
|
525
|
+
element.setAttribute('aria-label', legendText);
|
|
526
|
+
element.setAttribute('role', 'region');
|
|
523
527
|
this.legendGroup.appendChild(legendElement);
|
|
524
528
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
525
529
|
if (i === (this.totalPages[page]['Collection'].length - 1)) {
|
|
@@ -595,6 +599,8 @@ var Legend = /** @class */ (function () {
|
|
|
595
599
|
};
|
|
596
600
|
var pagingTextElement = render.createText(pageTextOptions, pagingText);
|
|
597
601
|
pagingTextElement.style.cssText = 'user-select: none;';
|
|
602
|
+
pagingTextElement.setAttribute('aria-label', pagingText);
|
|
603
|
+
pagingTextElement.setAttribute('role', 'region');
|
|
598
604
|
pagingGroup.appendChild(pagingTextElement);
|
|
599
605
|
this.legendGroup.appendChild(pagingGroup);
|
|
600
606
|
}
|
|
@@ -1290,7 +1296,9 @@ var Legend = /** @class */ (function () {
|
|
|
1290
1296
|
textStyle.size = !isNullOrUndefined(textStyle.size) ? textStyle.size : this.maps.themeStyle.subTitleFontSize || Theme.legendTitleFont.size;
|
|
1291
1297
|
textStyle.fontWeight = !isNullOrUndefined(textStyle.fontWeight) ? textStyle.fontWeight : this.maps.themeStyle.titleFontWeight || Theme.legendTitleFont.fontWeight;
|
|
1292
1298
|
textOptions = new TextOption(map.element.id + '_LegendTitle', (this.legendItemRect.x) + (this.legendItemRect.width / 2), this.legendItemRect.y - (textSize.height / 2) - spacing / 2, 'middle', trimTitle, '');
|
|
1293
|
-
renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
1299
|
+
var element = renderTextElement(textOptions, textStyle, textStyle.color, this.legendGroup);
|
|
1300
|
+
element.setAttribute('aria-label', legendTitle);
|
|
1301
|
+
element.setAttribute('role', 'region');
|
|
1294
1302
|
}
|
|
1295
1303
|
};
|
|
1296
1304
|
Legend.prototype.changeNextPage = function (e) {
|
|
@@ -8,6 +8,8 @@ export declare class Marker {
|
|
|
8
8
|
private isMarkerExplode;
|
|
9
9
|
private trackElements;
|
|
10
10
|
private markerSVGObject;
|
|
11
|
+
initialMarkerCluster: number[][][];
|
|
12
|
+
zoomedMarkerCluster: number[][][];
|
|
11
13
|
/**
|
|
12
14
|
* @private
|
|
13
15
|
*/
|
|
@@ -68,6 +70,8 @@ export declare class Marker {
|
|
|
68
70
|
* @private
|
|
69
71
|
*/
|
|
70
72
|
markerClusterMouseMove(e: PointerEvent): void;
|
|
73
|
+
/** @private */
|
|
74
|
+
initializeMarkerClusterList(): void;
|
|
71
75
|
/**
|
|
72
76
|
* Get module name.
|
|
73
77
|
*
|
|
@@ -11,6 +11,8 @@ var Marker = /** @class */ (function () {
|
|
|
11
11
|
this.maps = maps;
|
|
12
12
|
this.trackElements = [];
|
|
13
13
|
this.sameMarkerData = [];
|
|
14
|
+
this.initialMarkerCluster = [];
|
|
15
|
+
this.zoomedMarkerCluster = [];
|
|
14
16
|
}
|
|
15
17
|
Marker.prototype.markerRender = function (maps, layerElement, layerIndex, factor, type) {
|
|
16
18
|
var _this = this;
|
|
@@ -43,12 +45,11 @@ var Marker = /** @class */ (function () {
|
|
|
43
45
|
getZoomTranslate(maps, currentLayer, allowAnimation) :
|
|
44
46
|
getTranslate(maps, currentLayer, allowAnimation);
|
|
45
47
|
}
|
|
46
|
-
|
|
47
|
-
var markerSettings = currentLayer.markerSettings[markerIndex];
|
|
48
|
+
Array.prototype.forEach.call(currentLayer.markerSettings, function (markerSettings, markerIndex) {
|
|
48
49
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
50
|
var markerData = markerSettings.dataSource;
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
|
+
Array.prototype.forEach.call(markerData, function (data, dataIndex) {
|
|
52
53
|
maps.markerNullCount = markerIndex > 0 && dataIndex === 0 ? 0 : maps.markerNullCount;
|
|
53
54
|
var eventArgs = {
|
|
54
55
|
cancel: false, name: markerRendering, fill: markerSettings.fill, height: markerSettings.height,
|
|
@@ -122,15 +123,8 @@ var Marker = /** @class */ (function () {
|
|
|
122
123
|
}
|
|
123
124
|
}
|
|
124
125
|
});
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
for (var dataIndex = 0; dataIndex < markerData.length; dataIndex++) {
|
|
128
|
-
_loop_2(dataIndex);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
for (var markerIndex = 0; markerIndex < currentLayer.markerSettings.length; markerIndex++) {
|
|
132
|
-
_loop_1(markerIndex);
|
|
133
|
-
}
|
|
126
|
+
});
|
|
127
|
+
});
|
|
134
128
|
};
|
|
135
129
|
/**
|
|
136
130
|
* To find zoom level for individual layers like India, USA.
|
|
@@ -493,6 +487,13 @@ var Marker = /** @class */ (function () {
|
|
|
493
487
|
};
|
|
494
488
|
this.maps.trigger(markerClusterMouseMove, eventArgs);
|
|
495
489
|
};
|
|
490
|
+
/** @private */
|
|
491
|
+
Marker.prototype.initializeMarkerClusterList = function () {
|
|
492
|
+
for (var i = 0; i < this.maps.layers.length; i++) {
|
|
493
|
+
this.initialMarkerCluster[i] = [];
|
|
494
|
+
this.zoomedMarkerCluster[i] = [];
|
|
495
|
+
}
|
|
496
|
+
};
|
|
496
497
|
/**
|
|
497
498
|
* Get module name.
|
|
498
499
|
*
|
|
@@ -512,6 +513,8 @@ var Marker = /** @class */ (function () {
|
|
|
512
513
|
this.trackElements = [];
|
|
513
514
|
this.markerSVGObject = null;
|
|
514
515
|
this.sameMarkerData = [];
|
|
516
|
+
this.initialMarkerCluster = [];
|
|
517
|
+
this.zoomedMarkerCluster = [];
|
|
515
518
|
};
|
|
516
519
|
return Marker;
|
|
517
520
|
}());
|
|
@@ -4,7 +4,6 @@ import { PathOption, calculatePolygonPath, maintainSelection } from '../utils/he
|
|
|
4
4
|
*/
|
|
5
5
|
var Polygon = /** @class */ (function () {
|
|
6
6
|
function Polygon(maps) {
|
|
7
|
-
this.maps = maps;
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
10
9
|
* To render polygon for maps
|
|
@@ -16,7 +15,6 @@ var Polygon = /** @class */ (function () {
|
|
|
16
15
|
* @private
|
|
17
16
|
*/
|
|
18
17
|
Polygon.prototype.polygonRender = function (maps, layerIndex, factor) {
|
|
19
|
-
var _this = this;
|
|
20
18
|
var currentLayer = maps.layersCollection[layerIndex];
|
|
21
19
|
var polygonsSVGObject = maps.renderer.createGroup({
|
|
22
20
|
id: maps.element.id + '_LayerIndex_' + layerIndex + '_Polygons_Group'
|
|
@@ -30,7 +28,7 @@ var Polygon = /** @class */ (function () {
|
|
|
30
28
|
var path = calculatePolygonPath(maps, factor, currentLayer, polygonData);
|
|
31
29
|
var pathOptions = new PathOption(maps.element.id + '_LayerIndex_' + layerIndex + '_PolygonIndex_' + polygonIndex, polygonSetting.fill, (polygonSetting.borderWidth / factor), polygonSetting.borderColor, polygonSetting.opacity, polygonSetting.borderOpacity, '', path);
|
|
32
30
|
var polygonEle = maps.renderer.drawPath(pathOptions);
|
|
33
|
-
maintainSelection(
|
|
31
|
+
maintainSelection(maps.selectedPolygonElementId, maps.polygonSelectionClass, polygonEle, 'PolygonselectionMapStyle');
|
|
34
32
|
polygonSVGObject.appendChild(polygonEle);
|
|
35
33
|
polygonsSVGObject.appendChild(polygonSVGObject);
|
|
36
34
|
});
|
|
@@ -51,7 +49,6 @@ var Polygon = /** @class */ (function () {
|
|
|
51
49
|
* @private
|
|
52
50
|
*/
|
|
53
51
|
Polygon.prototype.destroy = function () {
|
|
54
|
-
this.maps = null;
|
|
55
52
|
};
|
|
56
53
|
return Polygon;
|
|
57
54
|
}());
|
package/src/maps/maps-model.d.ts
CHANGED
|
@@ -385,4 +385,18 @@ export interface MapsModel extends ComponentModel{
|
|
|
385
385
|
*/
|
|
386
386
|
pan?: EmitType<IMapPanEventArgs>;
|
|
387
387
|
|
|
388
|
+
/**
|
|
389
|
+
* This event is triggered after performing the panning action.
|
|
390
|
+
*
|
|
391
|
+
* @event panComplete
|
|
392
|
+
*/
|
|
393
|
+
panComplete?: EmitType<IMapPanEventArgs>;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* This event is triggered after the zooming operation is completed.
|
|
397
|
+
*
|
|
398
|
+
* @event zoomComplete
|
|
399
|
+
*/
|
|
400
|
+
zoomComplete?: EmitType<IMapPanEventArgs>;
|
|
401
|
+
|
|
388
402
|
}
|
package/src/maps/maps.d.ts
CHANGED
|
@@ -458,6 +458,18 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
458
458
|
* @event pan
|
|
459
459
|
*/
|
|
460
460
|
pan: EmitType<IMapPanEventArgs>;
|
|
461
|
+
/**
|
|
462
|
+
* This event is triggered after performing the panning action.
|
|
463
|
+
*
|
|
464
|
+
* @event panComplete
|
|
465
|
+
*/
|
|
466
|
+
panComplete: EmitType<IMapPanEventArgs>;
|
|
467
|
+
/**
|
|
468
|
+
* This event is triggered after the zooming operation is completed.
|
|
469
|
+
*
|
|
470
|
+
* @event zoomComplete
|
|
471
|
+
*/
|
|
472
|
+
zoomComplete: EmitType<IMapPanEventArgs>;
|
|
461
473
|
/**
|
|
462
474
|
* Specifies the function to format the text contents in the maps.
|
|
463
475
|
*
|
|
@@ -660,7 +672,7 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
660
672
|
zoomNotApplied: boolean;
|
|
661
673
|
/** @public */
|
|
662
674
|
dataLabelShape: number[];
|
|
663
|
-
zoomShapeCollection:
|
|
675
|
+
zoomShapeCollection: string[];
|
|
664
676
|
zoomLabelPositions: object[];
|
|
665
677
|
mouseDownEvent: Object;
|
|
666
678
|
mouseClickEvent: Object;
|
|
@@ -909,7 +921,7 @@ export declare class Maps extends Component<HTMLElement> implements INotifyPrope
|
|
|
909
921
|
private triggerShapeSelection;
|
|
910
922
|
private getMarkerClickLocation;
|
|
911
923
|
/** @private */
|
|
912
|
-
getClickLocation(targetId: string, pageX: number, pageY: number, targetElement: HTMLElement, x: number, y: number): GeoPosition;
|
|
924
|
+
getClickLocation(targetId: string, pageX: number, pageY: number, targetElement: HTMLElement, x: number, y: number, type?: string): GeoPosition;
|
|
913
925
|
private removeTileMap;
|
|
914
926
|
/**
|
|
915
927
|
* This method is used to perform operations when mouse click on maps.
|