@syncfusion/ej2-maps 20.1.47 → 20.1.48
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 +9 -1
- 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 +127 -62
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +129 -64
- 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/maps.js +8 -1
- package/src/maps/model/export-image.js +7 -4
- package/src/maps/model/export-pdf.js +6 -4
- package/src/maps/user-interaction/zoom.js +111 -58
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.1.
|
|
3
|
+
* version : 20.1.48
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@20.1.47",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-AIYN3vlXCy9FrAV4jFucL91cSCEdhWgUxCpB5MPDnaJBbpo7zCb1TxdnUJsu1QB8ovMBZj5wix+lkYmYAGZhLw==",
|
|
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": "http://nexus.syncfusion.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-maps/-/ej2-maps-20.1.47.tgz",
|
|
27
|
+
"_shasum": "4a50e290ff70a897de5c1f42dfdd8de89ed6d705",
|
|
28
28
|
"_spec": "@syncfusion/ej2-maps@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~20.1.
|
|
38
|
+
"@syncfusion/ej2-base": "~20.1.48",
|
|
39
39
|
"@syncfusion/ej2-buttons": "~20.1.47",
|
|
40
40
|
"@syncfusion/ej2-compression": "~20.1.47",
|
|
41
41
|
"@syncfusion/ej2-data": "~20.1.47",
|
|
42
42
|
"@syncfusion/ej2-file-utils": "~20.1.47",
|
|
43
43
|
"@syncfusion/ej2-pdf-export": "~20.1.47",
|
|
44
|
-
"@syncfusion/ej2-svg-base": "~20.1.
|
|
44
|
+
"@syncfusion/ej2-svg-base": "~20.1.48"
|
|
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",
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
"url": "git+https://github.com/syncfusion/ej2-javascript-ui-controls.git"
|
|
81
81
|
},
|
|
82
82
|
"typings": "index.d.ts",
|
|
83
|
-
"version": "20.1.
|
|
83
|
+
"version": "20.1.48",
|
|
84
84
|
"sideEffects": false
|
|
85
85
|
}
|
package/src/maps/maps.js
CHANGED
|
@@ -75,6 +75,10 @@ var Maps = /** @class */ (function (_super) {
|
|
|
75
75
|
* Resize the map
|
|
76
76
|
*/
|
|
77
77
|
_this.isResize = false;
|
|
78
|
+
/**
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
_this.isReset = false;
|
|
78
82
|
/** @private */
|
|
79
83
|
_this.baseSize = new Size(0, 0);
|
|
80
84
|
/** @public */
|
|
@@ -1759,7 +1763,10 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1759
1763
|
var collection = Object.keys(newProp.layers[x]);
|
|
1760
1764
|
for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
|
|
1761
1765
|
var collectionProp = collection_1[_b];
|
|
1762
|
-
if (collectionProp === '
|
|
1766
|
+
if (collectionProp === 'layerType' && newProp.layers[x].layerType === 'OSM') {
|
|
1767
|
+
this.isReset = true;
|
|
1768
|
+
}
|
|
1769
|
+
else if (collectionProp === 'markerSettings') {
|
|
1763
1770
|
isMarker = true;
|
|
1764
1771
|
}
|
|
1765
1772
|
else if (collectionProp === 'staticMapType') {
|
|
@@ -82,6 +82,9 @@ var ImageExport = /** @class */ (function () {
|
|
|
82
82
|
image_1.src = url;
|
|
83
83
|
}
|
|
84
84
|
else {
|
|
85
|
+
var svgParentElement = document.getElementById(_this.control.element.id + '_MapAreaBorder');
|
|
86
|
+
var top_1 = parseFloat(svgParentElement.getAttribute('y'));
|
|
87
|
+
var left_1 = parseFloat(svgParentElement.getAttribute('x'));
|
|
85
88
|
var imgxHttp = new XMLHttpRequest();
|
|
86
89
|
var imgTileLength_1 = _this.control.mapLayerPanel.tiles.length;
|
|
87
90
|
var _loop_1 = function (i) {
|
|
@@ -100,17 +103,17 @@ var ImageExport = /** @class */ (function () {
|
|
|
100
103
|
if (i === 0 || i === imgTileLength_1 + 1) {
|
|
101
104
|
if (i === 0) {
|
|
102
105
|
ctxt_1.setTransform(1, 0, 0, 1, 0, 0);
|
|
103
|
-
ctxt_1.rect(0,
|
|
106
|
+
ctxt_1.rect(0, top_1, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
|
|
104
107
|
ctxt_1.clip();
|
|
105
108
|
}
|
|
106
109
|
else {
|
|
107
|
-
ctxt_1.setTransform(1, 0, 0, 1,
|
|
110
|
+
ctxt_1.setTransform(1, 0, 0, 1, left_1, top_1);
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
113
|
else {
|
|
111
114
|
var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
|
|
112
|
-
ctxt_1.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) +
|
|
113
|
-
|
|
115
|
+
ctxt_1.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) +
|
|
116
|
+
top_1);
|
|
114
117
|
}
|
|
115
118
|
ctxt_1.drawImage(exportTileImg, 0, 0);
|
|
116
119
|
if (i === imgTileLength_1 + 1) {
|
|
@@ -72,6 +72,9 @@ var PdfExport = /** @class */ (function () {
|
|
|
72
72
|
image.src = url;
|
|
73
73
|
}
|
|
74
74
|
else {
|
|
75
|
+
var svgParentElement = document.getElementById(_this.control.element.id + '_MapAreaBorder');
|
|
76
|
+
var top_1 = parseFloat(svgParentElement.getAttribute('y'));
|
|
77
|
+
var left_1 = parseFloat(svgParentElement.getAttribute('x'));
|
|
75
78
|
var xHttp = new XMLHttpRequest();
|
|
76
79
|
var tileLength_1 = _this.control.mapLayerPanel.tiles.length;
|
|
77
80
|
var _loop_1 = function (i) {
|
|
@@ -90,17 +93,16 @@ var PdfExport = /** @class */ (function () {
|
|
|
90
93
|
if (i === 0 || i === tileLength_1 + 1) {
|
|
91
94
|
if (i === 0) {
|
|
92
95
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
93
|
-
ctx.rect(0,
|
|
96
|
+
ctx.rect(0, top_1, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
|
|
94
97
|
ctx.clip();
|
|
95
98
|
}
|
|
96
99
|
else {
|
|
97
|
-
ctx.setTransform(1, 0, 0, 1,
|
|
100
|
+
ctx.setTransform(1, 0, 0, 1, left_1, top_1);
|
|
98
101
|
}
|
|
99
102
|
}
|
|
100
103
|
else {
|
|
101
104
|
var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
|
|
102
|
-
ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) +
|
|
103
|
-
(parseFloat(tileParent.style.top)));
|
|
105
|
+
ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) + top_1);
|
|
104
106
|
}
|
|
105
107
|
ctx.drawImage(tileImg, 0, 0);
|
|
106
108
|
if (i === tileLength_1 + 1) {
|
|
@@ -82,8 +82,13 @@ var Zoom = /** @class */ (function () {
|
|
|
82
82
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
83
83
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
84
84
|
map.scale = newZoomFactor;
|
|
85
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
86
|
-
|
|
85
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
86
|
+
map.translatePoint = map.previousPoint;
|
|
87
|
+
map.scale = map.previousScale;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
this.applyTransform();
|
|
91
|
+
}
|
|
87
92
|
}
|
|
88
93
|
else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
|
|
89
94
|
this.getTileTranslatePosition(prevLevel, newZoomFactor, position, type);
|
|
@@ -100,31 +105,38 @@ var Zoom = /** @class */ (function () {
|
|
|
100
105
|
}
|
|
101
106
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
102
107
|
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
103
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
109
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
110
|
+
map.scale = map.previousScale;
|
|
111
|
+
map.tileZoomLevel = prevLevel;
|
|
112
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
106
113
|
}
|
|
107
|
-
|
|
108
|
-
document.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
114
|
-
setTimeout(function () {
|
|
115
|
-
// if (type === 'ZoomOut') {
|
|
116
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
117
|
-
// if (element1.childElementCount) {
|
|
118
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
119
|
-
// } else {
|
|
120
|
-
// element1 = element1;
|
|
121
|
-
// }
|
|
122
|
-
// }
|
|
123
|
-
_this.applyTransform();
|
|
124
|
-
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
125
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
114
|
+
else {
|
|
115
|
+
if (document.querySelector('.GroupElement')) {
|
|
116
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
117
|
+
}
|
|
118
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
119
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
126
120
|
}
|
|
127
|
-
|
|
121
|
+
this.markerLineAnimation(map);
|
|
122
|
+
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
123
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
124
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
125
|
+
setTimeout(function () {
|
|
126
|
+
// if (type === 'ZoomOut') {
|
|
127
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
128
|
+
// if (element1.childElementCount) {
|
|
129
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
130
|
+
// } else {
|
|
131
|
+
// element1 = element1;
|
|
132
|
+
// }
|
|
133
|
+
// }
|
|
134
|
+
_this.applyTransform();
|
|
135
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
136
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
137
|
+
}
|
|
138
|
+
}, animationDuration);
|
|
139
|
+
}
|
|
128
140
|
}
|
|
129
141
|
this.maps.zoomNotApplied = false;
|
|
130
142
|
};
|
|
@@ -146,6 +158,7 @@ var Zoom = /** @class */ (function () {
|
|
|
146
158
|
};
|
|
147
159
|
}
|
|
148
160
|
map.trigger('zoom', zoomArgs);
|
|
161
|
+
return zoomArgs.cancel;
|
|
149
162
|
};
|
|
150
163
|
Zoom.prototype.getTileTranslatePosition = function (prevLevel, currentLevel, position, type) {
|
|
151
164
|
var map = this.maps;
|
|
@@ -171,6 +184,7 @@ var Zoom = /** @class */ (function () {
|
|
|
171
184
|
var zoomRect = this.zoomingRect;
|
|
172
185
|
var maxZoom = map.zoomSettings.maxZoom;
|
|
173
186
|
var minZoom = map.zoomSettings.minZoom;
|
|
187
|
+
var isZoomCancelled;
|
|
174
188
|
if (zoomRect.height > 0 && zoomRect.width > 0) {
|
|
175
189
|
var x = this.zoomingRect.x + (this.zoomingRect.width / 2);
|
|
176
190
|
var y = this.zoomingRect.y + (this.zoomingRect.height / 2);
|
|
@@ -183,7 +197,11 @@ var Zoom = /** @class */ (function () {
|
|
|
183
197
|
var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
|
|
184
198
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
185
199
|
map.scale = zoomCalculationFactor;
|
|
186
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
200
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
201
|
+
if (isZoomCancelled) {
|
|
202
|
+
map.translatePoint = map.previousPoint;
|
|
203
|
+
map.scale = map.previousScale;
|
|
204
|
+
}
|
|
187
205
|
}
|
|
188
206
|
else {
|
|
189
207
|
zoomCalculationFactor = prevLevel + (Math.round(prevLevel + (((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2)));
|
|
@@ -196,13 +214,21 @@ var Zoom = /** @class */ (function () {
|
|
|
196
214
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, zoomCalculationFactor))) /
|
|
197
215
|
(Math.pow(2, zoomCalculationFactor));
|
|
198
216
|
map.scale = (Math.pow(2, zoomCalculationFactor));
|
|
199
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
200
|
-
|
|
217
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
218
|
+
if (isZoomCancelled) {
|
|
219
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
220
|
+
map.scale = map.tileZoomLevel = map.zoomSettings.zoomFactor = prevLevel;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (!isZoomCancelled) {
|
|
227
|
+
map.mapScaleValue = zoomCalculationFactor;
|
|
228
|
+
this.applyTransform(true);
|
|
229
|
+
this.maps.zoomNotApplied = false;
|
|
230
|
+
this.zoomingRect = null;
|
|
201
231
|
}
|
|
202
|
-
map.mapScaleValue = zoomCalculationFactor;
|
|
203
|
-
this.applyTransform(true);
|
|
204
|
-
this.maps.zoomNotApplied = false;
|
|
205
|
-
this.zoomingRect = null;
|
|
206
232
|
}
|
|
207
233
|
};
|
|
208
234
|
Zoom.prototype.setInteraction = function (newInteraction) {
|
|
@@ -232,6 +258,7 @@ var Zoom = /** @class */ (function () {
|
|
|
232
258
|
this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
|
|
233
259
|
var zoomCalculationFactor = this.pinchFactor;
|
|
234
260
|
var zoomArgs;
|
|
261
|
+
var isZoomCancelled;
|
|
235
262
|
if (!map.isTileMap) {
|
|
236
263
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
237
264
|
var minBounds = map.baseMapRectBounds['min'];
|
|
@@ -247,7 +274,11 @@ var Zoom = /** @class */ (function () {
|
|
|
247
274
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
248
275
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
249
276
|
map.scale = zoomCalculationFactor;
|
|
250
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
277
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
278
|
+
if (isZoomCancelled) {
|
|
279
|
+
map.translatePoint = map.previousPoint;
|
|
280
|
+
map.scale = map.previousScale;
|
|
281
|
+
}
|
|
251
282
|
}
|
|
252
283
|
else {
|
|
253
284
|
var newTileFactor = zoomCalculationFactor;
|
|
@@ -258,10 +289,20 @@ var Zoom = /** @class */ (function () {
|
|
|
258
289
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
|
|
259
290
|
(Math.pow(2, newTileFactor));
|
|
260
291
|
map.scale = (Math.pow(2, newTileFactor));
|
|
261
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
262
|
-
|
|
292
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
293
|
+
if (isZoomCancelled) {
|
|
294
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
295
|
+
map.scale = map.previousScale;
|
|
296
|
+
map.tileZoomLevel = prevLevel;
|
|
297
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (!isZoomCancelled) {
|
|
304
|
+
this.applyTransform();
|
|
263
305
|
}
|
|
264
|
-
this.applyTransform();
|
|
265
306
|
};
|
|
266
307
|
Zoom.prototype.drawZoomRectangle = function () {
|
|
267
308
|
var map = this.maps;
|
|
@@ -978,8 +1019,13 @@ var Zoom = /** @class */ (function () {
|
|
|
978
1019
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
979
1020
|
map.zoomTranslatePoint = map.translatePoint;
|
|
980
1021
|
map.scale = zoomFactor;
|
|
981
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
982
|
-
|
|
1022
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
1023
|
+
map.translatePoint = map.zoomTranslatePoint = map.previousPoint;
|
|
1024
|
+
map.scale = map.previousScale;
|
|
1025
|
+
}
|
|
1026
|
+
else {
|
|
1027
|
+
this.applyTransform(true);
|
|
1028
|
+
}
|
|
983
1029
|
}
|
|
984
1030
|
else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
|
|
985
1031
|
var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
@@ -996,29 +1042,36 @@ var Zoom = /** @class */ (function () {
|
|
|
996
1042
|
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
997
1043
|
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
998
1044
|
}
|
|
999
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1045
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
1046
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
1047
|
+
map.scale = map.previousScale;
|
|
1048
|
+
map.tileZoomLevel = prevLevel;
|
|
1049
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
1004
1050
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
1011
|
-
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
1012
|
-
setTimeout(function () {
|
|
1013
|
-
if (type === 'ZoomOut' || type === 'Reset') {
|
|
1014
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
1015
|
-
// element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
|
|
1051
|
+
else {
|
|
1052
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
1053
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
1054
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
1055
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
1016
1056
|
}
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
1057
|
+
if (document.querySelector('.GroupElement')) {
|
|
1058
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
1020
1059
|
}
|
|
1021
|
-
|
|
1060
|
+
this.markerLineAnimation(map);
|
|
1061
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
1062
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
1063
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
1064
|
+
setTimeout(function () {
|
|
1065
|
+
if (type === 'ZoomOut' || type === 'Reset') {
|
|
1066
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
1067
|
+
// element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
|
|
1068
|
+
}
|
|
1069
|
+
_this.applyTransform(true);
|
|
1070
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
1071
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
1072
|
+
}
|
|
1073
|
+
}, animationDuration);
|
|
1074
|
+
}
|
|
1022
1075
|
}
|
|
1023
1076
|
this.maps.zoomNotApplied = false;
|
|
1024
1077
|
}
|