@syncfusion/ej2-maps 23.1.38 → 23.1.40
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 +8 -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 +54 -14
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +54 -14
- 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/layer-panel.js +1 -1
- package/src/maps/layers/legend.js +22 -2
- package/src/maps/layers/marker.js +1 -0
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +1 -1
- package/src/maps/maps.js +3 -3
- package/src/maps/user-interaction/tooltip.js +4 -2
- package/src/maps/user-interaction/zoom.js +9 -2
- package/src/maps/utils/helper.js +14 -4
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 23.1.
|
|
3
|
+
* version : 23.1.40
|
|
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@23.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-maps@23.1.38",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-dICyZztGFAexcEDWDd/2HtAZRapAEuwJH/vYMSuRWSlnGIrr29XVmMKJfIcCnEvubdL3DXKs4OeWP/ONdFkmuw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-maps",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-maps",
|
|
24
24
|
"/@syncfusion/ej2-vue-maps"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-23.1.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-23.1.38.tgz",
|
|
27
|
+
"_shasum": "94a28ab3e94bf0ea9954f88baf9abe6808bc5664",
|
|
28
28
|
"_spec": "@syncfusion/ej2-maps@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@syncfusion/ej2-base": "~23.1.38",
|
|
39
|
-
"@syncfusion/ej2-buttons": "~23.1.
|
|
39
|
+
"@syncfusion/ej2-buttons": "~23.1.39",
|
|
40
40
|
"@syncfusion/ej2-compression": "~23.1.36",
|
|
41
41
|
"@syncfusion/ej2-data": "~23.1.36",
|
|
42
42
|
"@syncfusion/ej2-file-utils": "~23.1.36",
|
|
43
|
-
"@syncfusion/ej2-pdf-export": "~23.1.
|
|
43
|
+
"@syncfusion/ej2-pdf-export": "~23.1.39",
|
|
44
44
|
"@syncfusion/ej2-svg-base": "~23.1.36"
|
|
45
45
|
},
|
|
46
46
|
"deprecated": false,
|
|
@@ -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": "23.1.
|
|
96
|
+
"version": "23.1.40",
|
|
97
97
|
"sideEffects": false
|
|
98
98
|
}
|
|
@@ -624,7 +624,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
624
624
|
pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
|
|
625
625
|
(currentShapeData['property'][properties]) : ''));
|
|
626
626
|
if (this.currentLayer.selectionSettings.enable || this.currentLayer.highlightSettings.enable) {
|
|
627
|
-
pathEle.tabIndex = this.mapObject.tabIndex
|
|
627
|
+
pathEle.tabIndex = this.mapObject.tabIndex;
|
|
628
628
|
pathEle.setAttribute('role', 'button');
|
|
629
629
|
pathEle.style.cursor = this.currentLayer.highlightSettings.enable && !this.currentLayer.selectionSettings.enable ? 'default' : 'pointer';
|
|
630
630
|
}
|
|
@@ -546,14 +546,34 @@ var Legend = /** @class */ (function () {
|
|
|
546
546
|
leftPageElement.appendChild(render.drawPath(leftPageOptions));
|
|
547
547
|
var leftRectPageOptions = new RectOption(map.element.id + '_Left_Page_Rect', 'transparent', {}, 1, new Rect(leftPageX - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
|
|
548
548
|
var pathEle = render.drawRectangle(leftRectPageOptions);
|
|
549
|
-
pathEle.
|
|
549
|
+
pathEle.setAttribute('aria-label', 'Navigate to the previous legend items');
|
|
550
|
+
pathEle.setAttribute('role', 'button');
|
|
551
|
+
pathEle.tabIndex = (page + 1) === 1 ? -1 : map.tabIndex;
|
|
552
|
+
if ((page + 1) === 1) {
|
|
553
|
+
pathEle.style.cursor = 'default';
|
|
554
|
+
pathEle.style.setProperty('outline', 'none');
|
|
555
|
+
}
|
|
556
|
+
else {
|
|
557
|
+
pathEle.style.cursor = 'pointer';
|
|
558
|
+
pathEle.style.removeProperty('outline');
|
|
559
|
+
}
|
|
550
560
|
leftPageElement.appendChild(pathEle);
|
|
551
561
|
this.wireEvents(leftPageElement);
|
|
552
562
|
var rightPageOptions = new PathOption(map.element.id + '_Right_Page', this.maps.themeStyle.legendTextColor, 0, this.maps.themeStyle.legendTextColor, ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
|
|
553
563
|
rightPageElement.appendChild(render.drawPath(rightPageOptions));
|
|
554
564
|
var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect(rightPageX - spacing - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
|
|
555
565
|
pathEle = render.drawRectangle(rightRectPageOptions);
|
|
556
|
-
pathEle.
|
|
566
|
+
pathEle.setAttribute('aria-label', 'Navigate to the next legend items');
|
|
567
|
+
pathEle.setAttribute('role', 'button');
|
|
568
|
+
pathEle.tabIndex = (page + 1) === this.totalPages.length ? -1 : map.tabIndex;
|
|
569
|
+
if ((page + 1) === this.totalPages.length) {
|
|
570
|
+
pathEle.style.cursor = 'default';
|
|
571
|
+
pathEle.style.setProperty('outline', 'none');
|
|
572
|
+
}
|
|
573
|
+
else {
|
|
574
|
+
pathEle.style.cursor = 'pointer';
|
|
575
|
+
pathEle.style.removeProperty('outline');
|
|
576
|
+
}
|
|
557
577
|
rightPageElement.appendChild(pathEle);
|
|
558
578
|
this.wireEvents(rightPageElement);
|
|
559
579
|
pagingGroup.appendChild(leftPageElement);
|
|
@@ -94,6 +94,7 @@ var Marker = /** @class */ (function () {
|
|
|
94
94
|
maps.element.appendChild(maps.svgObject);
|
|
95
95
|
if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
|
|
96
96
|
&& maps.zoomSettings.enable) {
|
|
97
|
+
clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
|
|
97
98
|
layerElement.appendChild(_this.markerSVGObject);
|
|
98
99
|
}
|
|
99
100
|
else {
|
package/src/maps/maps-model.d.ts
CHANGED
package/src/maps/maps.d.ts
CHANGED
package/src/maps/maps.js
CHANGED
|
@@ -597,7 +597,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
597
597
|
*/
|
|
598
598
|
Maps.prototype.addTabIndex = function () {
|
|
599
599
|
this.element.setAttribute('aria-label', this.description || 'Maps Element');
|
|
600
|
-
this.element.setAttribute('role', '');
|
|
600
|
+
this.element.setAttribute('role', 'region');
|
|
601
601
|
this.element.tabIndex = this.tabIndex;
|
|
602
602
|
};
|
|
603
603
|
Maps.prototype.setSecondaryElementPosition = function () {
|
|
@@ -845,7 +845,6 @@ var Maps = /** @class */ (function (_super) {
|
|
|
845
845
|
var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
|
|
846
846
|
var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
|
|
847
847
|
element.setAttribute('aria-label', this.description || title.text);
|
|
848
|
-
element.setAttribute('role', '');
|
|
849
848
|
if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
|
|
850
849
|
height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
|
|
851
850
|
this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
|
|
@@ -1608,6 +1607,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1608
1607
|
if (!this.isDestroyed) {
|
|
1609
1608
|
this.zoomNotApplied = false;
|
|
1610
1609
|
var isRefresh = this.zoomSettings.zoomFactor === zoomFactor;
|
|
1610
|
+
this.previousProjection = null;
|
|
1611
1611
|
if (!this.isTileMap && this.zoomModule) {
|
|
1612
1612
|
if (!isNullOrUndefined(centerPosition)) {
|
|
1613
1613
|
this.zoomSettings.zoomFactor = zoomFactor;
|
|
@@ -2526,7 +2526,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2526
2526
|
Property(null)
|
|
2527
2527
|
], Maps.prototype, "description", void 0);
|
|
2528
2528
|
__decorate([
|
|
2529
|
-
Property(
|
|
2529
|
+
Property(0)
|
|
2530
2530
|
], Maps.prototype, "tabIndex", void 0);
|
|
2531
2531
|
__decorate([
|
|
2532
2532
|
Complex({ latitude: null, longitude: null }, CenterPosition)
|
|
@@ -225,7 +225,8 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
225
225
|
areaBounds: _this.maps.mapAreaRect,
|
|
226
226
|
textStyle: option['textStyle'],
|
|
227
227
|
availableSize: _this.maps.availableSize,
|
|
228
|
-
fill: option.fill || _this.maps.themeStyle.tooltipFillColor
|
|
228
|
+
fill: option.fill || _this.maps.themeStyle.tooltipFillColor,
|
|
229
|
+
enableShadow: true
|
|
229
230
|
});
|
|
230
231
|
}
|
|
231
232
|
else {
|
|
@@ -242,7 +243,8 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
242
243
|
areaBounds: _this.maps.mapAreaRect,
|
|
243
244
|
textStyle: tooltipArgs.options['textStyle'],
|
|
244
245
|
availableSize: _this.maps.availableSize,
|
|
245
|
-
fill: tooltipArgs.fill || _this.maps.themeStyle.tooltipFillColor
|
|
246
|
+
fill: tooltipArgs.fill || _this.maps.themeStyle.tooltipFillColor,
|
|
247
|
+
enableShadow: true
|
|
246
248
|
});
|
|
247
249
|
}
|
|
248
250
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -306,6 +306,7 @@ var Zoom = /** @class */ (function () {
|
|
|
306
306
|
var availSize = map.mapAreaRect;
|
|
307
307
|
map.previousScale = map.scale;
|
|
308
308
|
map.previousPoint = map.translatePoint;
|
|
309
|
+
map.previousProjection = map.projectionType;
|
|
309
310
|
var prevTilePoint = map.tileTranslatePoint;
|
|
310
311
|
var scale = calculateScale(this.touchStartList, this.touchMoveList);
|
|
311
312
|
var touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
|
|
@@ -370,6 +371,7 @@ var Zoom = /** @class */ (function () {
|
|
|
370
371
|
map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
|
|
371
372
|
}
|
|
372
373
|
}
|
|
374
|
+
map.mapScaleValue = zoomCalculationFactor;
|
|
373
375
|
if (!isZoomCancelled) {
|
|
374
376
|
this.applyTransform(map);
|
|
375
377
|
}
|
|
@@ -692,7 +694,12 @@ var Zoom = /** @class */ (function () {
|
|
|
692
694
|
? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
|
|
693
695
|
var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
|
|
694
696
|
if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
|
|
695
|
-
|
|
697
|
+
if (_this.maps.isTileMap) {
|
|
698
|
+
layerElement.insertBefore(markerSVGObject, layerElement.firstElementChild);
|
|
699
|
+
}
|
|
700
|
+
else {
|
|
701
|
+
layerElement.appendChild(markerSVGObject);
|
|
702
|
+
}
|
|
696
703
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
697
704
|
_this.maps.svgObject.appendChild(markerSVGObject);
|
|
698
705
|
_this.maps.element.appendChild(_this.maps.svgObject);
|
|
@@ -1090,7 +1097,7 @@ var Zoom = /** @class */ (function () {
|
|
|
1090
1097
|
var size = map.mapAreaRect;
|
|
1091
1098
|
var translatePoint = map.previousPoint = map.translatePoint;
|
|
1092
1099
|
var prevTilePoint = map.tileTranslatePoint;
|
|
1093
|
-
map.previousProjection = map.projectionType;
|
|
1100
|
+
map.previousProjection = (type !== 'Reset') ? map.projectionType : null;
|
|
1094
1101
|
zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
|
|
1095
1102
|
zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
|
|
1096
1103
|
zoomFactor = (minZoom > zoomFactor && type === 'ZoomIn') ? minZoom + 1 : zoomFactor;
|
package/src/maps/utils/helper.js
CHANGED
|
@@ -1124,11 +1124,14 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
|
|
|
1124
1124
|
while (0 < clusterGroup.childNodes.length) {
|
|
1125
1125
|
markerCollection.insertBefore(clusterGroup.childNodes[0], markerCollection.firstChild);
|
|
1126
1126
|
}
|
|
1127
|
-
if (check) {
|
|
1128
|
-
|
|
1127
|
+
if (!check) {
|
|
1128
|
+
getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
|
|
1129
|
+
}
|
|
1130
|
+
var element = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_Polygon_Group');
|
|
1131
|
+
if (isNullOrUndefined(element)) {
|
|
1132
|
+
layerElement.insertBefore(markerCollection, layerElement.firstChild);
|
|
1129
1133
|
}
|
|
1130
1134
|
else {
|
|
1131
|
-
getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
|
|
1132
1135
|
layerElement.appendChild(markerCollection);
|
|
1133
1136
|
}
|
|
1134
1137
|
var markerCluster = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_markerCluster');
|
|
@@ -1137,7 +1140,11 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
|
|
|
1137
1140
|
}
|
|
1138
1141
|
if (zoomCheck) {
|
|
1139
1142
|
var layerGroupElement = document.getElementById(maps.element.id + '_Layer_Collections');
|
|
1140
|
-
|
|
1143
|
+
var element_1 = document.getElementById(maps.element.id + '_LayerIndex_' + (layerIndex + 1));
|
|
1144
|
+
if (!isNullOrUndefined(layerGroupElement) && !isNullOrUndefined(element_1)) {
|
|
1145
|
+
layerGroupElement.insertBefore(layerElement, element_1);
|
|
1146
|
+
}
|
|
1147
|
+
else if (!isNullOrUndefined(layerGroupElement)) {
|
|
1141
1148
|
layerGroupElement.appendChild(layerElement);
|
|
1142
1149
|
}
|
|
1143
1150
|
}
|
|
@@ -2213,6 +2220,9 @@ export function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2213
2220
|
// eslint-disable-next-line no-self-assign
|
|
2214
2221
|
mapObject.mapScaleValue = mapObject.mapScaleValue;
|
|
2215
2222
|
}
|
|
2223
|
+
else if (!isNullOrUndefined(mapObject.mapScaleValue) && mapObject.mapScaleValue <= mapObject.scale) {
|
|
2224
|
+
mapObject.mapScaleValue = mapObject.scale;
|
|
2225
|
+
}
|
|
2216
2226
|
else {
|
|
2217
2227
|
mapObject.mapScaleValue = zoomFactorValue;
|
|
2218
2228
|
}
|