@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/es6/ej2-maps.es5.js
CHANGED
|
@@ -1106,11 +1106,14 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1106
1106
|
while (0 < clusterGroup.childNodes.length) {
|
|
1107
1107
|
markerCollection.insertBefore(clusterGroup.childNodes[0], markerCollection.firstChild);
|
|
1108
1108
|
}
|
|
1109
|
-
if (check) {
|
|
1110
|
-
|
|
1109
|
+
if (!check) {
|
|
1110
|
+
getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
|
|
1111
|
+
}
|
|
1112
|
+
var element = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_Polygon_Group');
|
|
1113
|
+
if (isNullOrUndefined(element)) {
|
|
1114
|
+
layerElement.insertBefore(markerCollection, layerElement.firstChild);
|
|
1111
1115
|
}
|
|
1112
1116
|
else {
|
|
1113
|
-
getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
|
|
1114
1117
|
layerElement.appendChild(markerCollection);
|
|
1115
1118
|
}
|
|
1116
1119
|
var markerCluster = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_markerCluster');
|
|
@@ -1119,7 +1122,11 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
1119
1122
|
}
|
|
1120
1123
|
if (zoomCheck) {
|
|
1121
1124
|
var layerGroupElement = document.getElementById(maps.element.id + '_Layer_Collections');
|
|
1122
|
-
|
|
1125
|
+
var element_1 = document.getElementById(maps.element.id + '_LayerIndex_' + (layerIndex + 1));
|
|
1126
|
+
if (!isNullOrUndefined(layerGroupElement) && !isNullOrUndefined(element_1)) {
|
|
1127
|
+
layerGroupElement.insertBefore(layerElement, element_1);
|
|
1128
|
+
}
|
|
1129
|
+
else if (!isNullOrUndefined(layerGroupElement)) {
|
|
1123
1130
|
layerGroupElement.appendChild(layerElement);
|
|
1124
1131
|
}
|
|
1125
1132
|
}
|
|
@@ -2195,6 +2202,9 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2195
2202
|
// eslint-disable-next-line no-self-assign
|
|
2196
2203
|
mapObject.mapScaleValue = mapObject.mapScaleValue;
|
|
2197
2204
|
}
|
|
2205
|
+
else if (!isNullOrUndefined(mapObject.mapScaleValue) && mapObject.mapScaleValue <= mapObject.scale) {
|
|
2206
|
+
mapObject.mapScaleValue = mapObject.scale;
|
|
2207
|
+
}
|
|
2198
2208
|
else {
|
|
2199
2209
|
mapObject.mapScaleValue = zoomFactorValue;
|
|
2200
2210
|
}
|
|
@@ -5318,6 +5328,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5318
5328
|
maps.element.appendChild(maps.svgObject);
|
|
5319
5329
|
if ((currentLayer.layerType === 'OSM' || (currentLayer.urlTemplate.indexOf('openstreetmap') !== -1 && isNullOrUndefined(currentLayer.shapeData)))
|
|
5320
5330
|
&& maps.zoomSettings.enable) {
|
|
5331
|
+
clusterTemplate(currentLayer, _this.markerSVGObject, maps, layerIndex, _this.markerSVGObject, layerElement, true, false);
|
|
5321
5332
|
layerElement.appendChild(_this.markerSVGObject);
|
|
5322
5333
|
}
|
|
5323
5334
|
else {
|
|
@@ -6806,7 +6817,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6806
6817
|
pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
|
|
6807
6818
|
(currentShapeData['property'][properties]) : ''));
|
|
6808
6819
|
if (this.currentLayer.selectionSettings.enable || this.currentLayer.highlightSettings.enable) {
|
|
6809
|
-
pathEle.tabIndex = this.mapObject.tabIndex
|
|
6820
|
+
pathEle.tabIndex = this.mapObject.tabIndex;
|
|
6810
6821
|
pathEle.setAttribute('role', 'button');
|
|
6811
6822
|
pathEle.style.cursor = this.currentLayer.highlightSettings.enable && !this.currentLayer.selectionSettings.enable ? 'default' : 'pointer';
|
|
6812
6823
|
}
|
|
@@ -8397,7 +8408,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8397
8408
|
*/
|
|
8398
8409
|
Maps.prototype.addTabIndex = function () {
|
|
8399
8410
|
this.element.setAttribute('aria-label', this.description || 'Maps Element');
|
|
8400
|
-
this.element.setAttribute('role', '');
|
|
8411
|
+
this.element.setAttribute('role', 'region');
|
|
8401
8412
|
this.element.tabIndex = this.tabIndex;
|
|
8402
8413
|
};
|
|
8403
8414
|
Maps.prototype.setSecondaryElementPosition = function () {
|
|
@@ -8645,7 +8656,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8645
8656
|
var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
|
|
8646
8657
|
var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
|
|
8647
8658
|
element.setAttribute('aria-label', this.description || title.text);
|
|
8648
|
-
element.setAttribute('role', '');
|
|
8649
8659
|
if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
|
|
8650
8660
|
height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
|
|
8651
8661
|
this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
|
|
@@ -9398,6 +9408,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9398
9408
|
if (!this.isDestroyed) {
|
|
9399
9409
|
this.zoomNotApplied = false;
|
|
9400
9410
|
var isRefresh = this.zoomSettings.zoomFactor === zoomFactor;
|
|
9411
|
+
this.previousProjection = null;
|
|
9401
9412
|
if (!this.isTileMap && this.zoomModule) {
|
|
9402
9413
|
if (!isNullOrUndefined(centerPosition)) {
|
|
9403
9414
|
this.zoomSettings.zoomFactor = zoomFactor;
|
|
@@ -10316,7 +10327,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
10316
10327
|
Property(null)
|
|
10317
10328
|
], Maps.prototype, "description", void 0);
|
|
10318
10329
|
__decorate([
|
|
10319
|
-
Property(
|
|
10330
|
+
Property(0)
|
|
10320
10331
|
], Maps.prototype, "tabIndex", void 0);
|
|
10321
10332
|
__decorate([
|
|
10322
10333
|
Complex({ latitude: null, longitude: null }, CenterPosition)
|
|
@@ -11856,14 +11867,34 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11856
11867
|
leftPageElement.appendChild(render.drawPath(leftPageOptions));
|
|
11857
11868
|
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, '', '');
|
|
11858
11869
|
var pathEle = render.drawRectangle(leftRectPageOptions);
|
|
11859
|
-
pathEle.
|
|
11870
|
+
pathEle.setAttribute('aria-label', 'Navigate to the previous legend items');
|
|
11871
|
+
pathEle.setAttribute('role', 'button');
|
|
11872
|
+
pathEle.tabIndex = (page + 1) === 1 ? -1 : map.tabIndex;
|
|
11873
|
+
if ((page + 1) === 1) {
|
|
11874
|
+
pathEle.style.cursor = 'default';
|
|
11875
|
+
pathEle.style.setProperty('outline', 'none');
|
|
11876
|
+
}
|
|
11877
|
+
else {
|
|
11878
|
+
pathEle.style.cursor = 'pointer';
|
|
11879
|
+
pathEle.style.removeProperty('outline');
|
|
11880
|
+
}
|
|
11860
11881
|
leftPageElement.appendChild(pathEle);
|
|
11861
11882
|
this.wireEvents(leftPageElement);
|
|
11862
11883
|
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);
|
|
11863
11884
|
rightPageElement.appendChild(render.drawPath(rightPageOptions));
|
|
11864
11885
|
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, '', '');
|
|
11865
11886
|
pathEle = render.drawRectangle(rightRectPageOptions);
|
|
11866
|
-
pathEle.
|
|
11887
|
+
pathEle.setAttribute('aria-label', 'Navigate to the next legend items');
|
|
11888
|
+
pathEle.setAttribute('role', 'button');
|
|
11889
|
+
pathEle.tabIndex = (page + 1) === this.totalPages.length ? -1 : map.tabIndex;
|
|
11890
|
+
if ((page + 1) === this.totalPages.length) {
|
|
11891
|
+
pathEle.style.cursor = 'default';
|
|
11892
|
+
pathEle.style.setProperty('outline', 'none');
|
|
11893
|
+
}
|
|
11894
|
+
else {
|
|
11895
|
+
pathEle.style.cursor = 'pointer';
|
|
11896
|
+
pathEle.style.removeProperty('outline');
|
|
11897
|
+
}
|
|
11867
11898
|
rightPageElement.appendChild(pathEle);
|
|
11868
11899
|
this.wireEvents(rightPageElement);
|
|
11869
11900
|
pagingGroup.appendChild(leftPageElement);
|
|
@@ -14304,7 +14335,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14304
14335
|
areaBounds: _this.maps.mapAreaRect,
|
|
14305
14336
|
textStyle: option['textStyle'],
|
|
14306
14337
|
availableSize: _this.maps.availableSize,
|
|
14307
|
-
fill: option.fill || _this.maps.themeStyle.tooltipFillColor
|
|
14338
|
+
fill: option.fill || _this.maps.themeStyle.tooltipFillColor,
|
|
14339
|
+
enableShadow: true
|
|
14308
14340
|
});
|
|
14309
14341
|
}
|
|
14310
14342
|
else {
|
|
@@ -14321,7 +14353,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
14321
14353
|
areaBounds: _this.maps.mapAreaRect,
|
|
14322
14354
|
textStyle: tooltipArgs.options['textStyle'],
|
|
14323
14355
|
availableSize: _this.maps.availableSize,
|
|
14324
|
-
fill: tooltipArgs.fill || _this.maps.themeStyle.tooltipFillColor
|
|
14356
|
+
fill: tooltipArgs.fill || _this.maps.themeStyle.tooltipFillColor,
|
|
14357
|
+
enableShadow: true
|
|
14325
14358
|
});
|
|
14326
14359
|
}
|
|
14327
14360
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -14801,6 +14834,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14801
14834
|
var availSize = map.mapAreaRect;
|
|
14802
14835
|
map.previousScale = map.scale;
|
|
14803
14836
|
map.previousPoint = map.translatePoint;
|
|
14837
|
+
map.previousProjection = map.projectionType;
|
|
14804
14838
|
var prevTilePoint = map.tileTranslatePoint;
|
|
14805
14839
|
var scale = calculateScale(this.touchStartList, this.touchMoveList);
|
|
14806
14840
|
var touchCenter = getTouchCenter(getTouches(this.touchMoveList, this.maps));
|
|
@@ -14864,6 +14898,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14864
14898
|
map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
|
|
14865
14899
|
}
|
|
14866
14900
|
}
|
|
14901
|
+
map.mapScaleValue = zoomCalculationFactor;
|
|
14867
14902
|
if (!isZoomCancelled) {
|
|
14868
14903
|
this.applyTransform(map);
|
|
14869
14904
|
}
|
|
@@ -15181,7 +15216,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15181
15216
|
? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
|
|
15182
15217
|
var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
|
|
15183
15218
|
if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
|
|
15184
|
-
|
|
15219
|
+
if (_this.maps.isTileMap) {
|
|
15220
|
+
layerElement.insertBefore(markerSVGObject, layerElement.firstElementChild);
|
|
15221
|
+
}
|
|
15222
|
+
else {
|
|
15223
|
+
layerElement.appendChild(markerSVGObject);
|
|
15224
|
+
}
|
|
15185
15225
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
15186
15226
|
_this.maps.svgObject.appendChild(markerSVGObject);
|
|
15187
15227
|
_this.maps.element.appendChild(_this.maps.svgObject);
|
|
@@ -15579,7 +15619,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15579
15619
|
var size = map.mapAreaRect;
|
|
15580
15620
|
var translatePoint = map.previousPoint = map.translatePoint;
|
|
15581
15621
|
var prevTilePoint = map.tileTranslatePoint;
|
|
15582
|
-
map.previousProjection = map.projectionType;
|
|
15622
|
+
map.previousProjection = (type !== 'Reset') ? map.projectionType : null;
|
|
15583
15623
|
zoomFactor = (type === 'ZoomOut') ? (Math.round(zoomFactor) === 1 ? 1 : zoomFactor) : zoomFactor;
|
|
15584
15624
|
zoomFactor = (type === 'Reset') ? minZoom : (Math.round(zoomFactor) === 0) ? 1 : zoomFactor;
|
|
15585
15625
|
zoomFactor = (minZoom > zoomFactor && type === 'ZoomIn') ? minZoom + 1 : zoomFactor;
|