@syncfusion/ej2-maps 25.2.5 → 26.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/.eslintrc.json +3 -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 +1011 -941
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +1049 -980
- 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/bing-map.d.ts +2 -2
- package/src/maps/layers/data-label.js +5 -5
- package/src/maps/layers/layer-panel.js +118 -173
- package/src/maps/layers/legend.js +52 -37
- package/src/maps/layers/marker.js +101 -97
- package/src/maps/layers/navigation-selected-line.js +1 -1
- package/src/maps/layers/polygon.js +9 -6
- package/src/maps/maps.js +7 -16
- package/src/maps/model/base-model.d.ts +2 -91
- package/src/maps/model/base.d.ts +3 -81
- package/src/maps/model/base.js +6 -39
- package/src/maps/model/export-image.js +5 -2
- package/src/maps/model/export-pdf.js +5 -2
- package/src/maps/model/interface.d.ts +12 -0
- package/src/maps/model/interface.js +0 -1
- package/src/maps/model/print.js +5 -2
- package/src/maps/model/theme.js +189 -14
- package/src/maps/user-interaction/tooltip.js +12 -2
- package/src/maps/user-interaction/zoom.js +27 -40
- package/src/maps/utils/enum.d.ts +7 -53
- package/src/maps/utils/helper.js +16 -24
- package/CHANGELOG.md +0 -653
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 26.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-Myn9Jq0qlj9LhFEWF5E3ZlJf2aC/YeI/UDw0MkeFzjQ20+7j/h3Nse+kKPN6FszbnHaoT6WxPqfv2s7FJssQSQ==",
|
|
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.syncfusioninternal.com/repository/ej2-
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-maps/-/ej2-maps-16.42.7.tgz",
|
|
27
|
+
"_shasum": "e3ef11dcc7cc21756247b863a09e785965d7bc80",
|
|
28
28
|
"_spec": "@syncfusion/ej2-maps@*",
|
|
29
|
-
"_where": "/jenkins/workspace/elease-
|
|
29
|
+
"_where": "/jenkins/workspace/elease-automation_release_26.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": "~26.1.35",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~26.1.35",
|
|
40
|
+
"@syncfusion/ej2-compression": "~26.1.35",
|
|
41
|
+
"@syncfusion/ej2-data": "~26.1.35",
|
|
42
|
+
"@syncfusion/ej2-file-utils": "~26.1.35",
|
|
43
|
+
"@syncfusion/ej2-pdf-export": "~26.1.35",
|
|
44
|
+
"@syncfusion/ej2-svg-base": "~26.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": "26.1.35",
|
|
97
97
|
"sideEffects": false
|
|
98
98
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Maps } from '../maps';
|
|
2
|
-
import { Tile
|
|
2
|
+
import { Tile } from '../index';
|
|
3
3
|
/**
|
|
4
4
|
* Bing map src doc
|
|
5
5
|
*/
|
|
@@ -12,7 +12,7 @@ export declare class BingMap {
|
|
|
12
12
|
imageUrl: string;
|
|
13
13
|
maxZoom: string;
|
|
14
14
|
constructor(maps: Maps);
|
|
15
|
-
getBingMap(tile: Tile, key: string, type:
|
|
15
|
+
getBingMap(tile: Tile, key: string, type: string, language: string, imageUrl: string, subDomains: string[]): string;
|
|
16
16
|
/**
|
|
17
17
|
* @returns {void}
|
|
18
18
|
* @private
|
|
@@ -1,7 +1,6 @@
|
|
|
1
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
|
-
import { Theme } from '../model/theme';
|
|
5
4
|
/**
|
|
6
5
|
* DataLabel Module used to render the maps datalabel
|
|
7
6
|
*/
|
|
@@ -17,7 +16,7 @@ var DataLabel = /** @class */ (function () {
|
|
|
17
16
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
17
|
var text;
|
|
19
18
|
var shapeNameValue;
|
|
20
|
-
for (var i = 0; i < dataSource.length; i++) {
|
|
19
|
+
for (var i = 0; i < (isNullOrUndefined(dataSource) ? 0 : dataSource.length); i++) {
|
|
21
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
21
|
var data = dataSource[i];
|
|
23
22
|
var dataShapePathValue = !isNullOrUndefined(data[shapeDataPath]) && isNaN(data[shapeDataPath]) &&
|
|
@@ -80,7 +79,8 @@ var DataLabel = /** @class */ (function () {
|
|
|
80
79
|
var locationX;
|
|
81
80
|
var locationY;
|
|
82
81
|
style.fontFamily = this.maps.theme.toLowerCase() !== 'material' ? this.maps.themeStyle.labelFontFamily : style.fontFamily;
|
|
83
|
-
style.fontWeight = style.fontWeight || this.maps.themeStyle.fontWeight
|
|
82
|
+
style.fontWeight = style.fontWeight || this.maps.themeStyle.fontWeight;
|
|
83
|
+
style.size = style.size || this.maps.themeStyle.fontSize;
|
|
84
84
|
shape = !isNullOrUndefined(shapes) ? shapes['property'] : null;
|
|
85
85
|
var properties = (Object.prototype.toString.call(layer.shapePropertyPath) === '[object Array]' ?
|
|
86
86
|
layer.shapePropertyPath : [layer.shapePropertyPath]);
|
|
@@ -141,7 +141,7 @@ var DataLabel = /** @class */ (function () {
|
|
|
141
141
|
text = (!isNullOrUndefined(datasrcObj)) ? !isNullOrUndefined(datasrcObj[labelpath]) ?
|
|
142
142
|
datasrcObj[labelpath].toString() : datasrcObj[layer.shapeDataPath] : shapeData['properties'][labelpath];
|
|
143
143
|
if ((Object.prototype.toString.call(layer.shapePropertyPath) === '[object Array]') &&
|
|
144
|
-
(isNullOrUndefined(text) && layer.dataSource['length'] === 0)) {
|
|
144
|
+
(isNullOrUndefined(text) && (!isNullOrUndefined(layer.dataSource) && layer.dataSource['length'] === 0))) {
|
|
145
145
|
for (var l = 0; l < layer.shapePropertyPath.length; l++) {
|
|
146
146
|
if (shapeData['properties'][layer.shapePropertyPath[l]]) {
|
|
147
147
|
text = shapeData['properties'][layer.shapePropertyPath[l]];
|
|
@@ -152,7 +152,7 @@ var DataLabel = /** @class */ (function () {
|
|
|
152
152
|
if (isNullOrUndefined(text) && (layer.dataLabelSettings.template !== '' && layer.dataSource['length'] === 0)) {
|
|
153
153
|
text = shapeData['properties'][layer.shapePropertyPath];
|
|
154
154
|
}
|
|
155
|
-
if (isNullOrUndefined(text) && layer.dataSource['length'] > 0) {
|
|
155
|
+
if (isNullOrUndefined(text) && (!isNullOrUndefined(layer.dataSource) && layer.dataSource['length'] > 0)) {
|
|
156
156
|
text = '';
|
|
157
157
|
}
|
|
158
158
|
var dataLabelText = text;
|
|
@@ -43,19 +43,10 @@ var LayerPanel = /** @class */ (function () {
|
|
|
43
43
|
id: this.mapObject.element.id + '_Layer_Collections',
|
|
44
44
|
'clip-path': 'url(#' + this.mapObject.element.id + '_MapArea_ClipRect)'
|
|
45
45
|
}));
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
width: staticMapSize, height: areaRect.height
|
|
51
|
-
}));
|
|
52
|
-
}
|
|
53
|
-
else {
|
|
54
|
-
this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption(this.mapObject.element.id + '_MapArea_ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
|
|
55
|
-
x: this.mapObject.isTileMap ? 0 : areaRect.x, y: this.mapObject.isTileMap ? 0 : areaRect.y,
|
|
56
|
-
width: areaRect.width, height: areaRect.height
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
46
|
+
this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption(this.mapObject.element.id + '_MapArea_ClipRect', 'transparent', { width: 1, color: 'Gray' }, 1, {
|
|
47
|
+
x: this.mapObject.isTileMap ? 0 : areaRect.x, y: this.mapObject.isTileMap ? 0 : areaRect.y,
|
|
48
|
+
width: areaRect.width, height: areaRect.height
|
|
49
|
+
}));
|
|
59
50
|
this.layerGroup.appendChild(this.clipRectElement);
|
|
60
51
|
this.mapObject.baseMapBounds = null;
|
|
61
52
|
this.mapObject.baseMapRectBounds = null;
|
|
@@ -189,8 +180,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
189
180
|
&& this.mapObject.availableSize.height > 512) {
|
|
190
181
|
this.mapObject.applyZoomReset = true;
|
|
191
182
|
this.mapObject.initialZoomLevel = Math.floor(this.mapObject.availableSize.height / 512);
|
|
192
|
-
var padding =
|
|
193
|
-
20 : 0;
|
|
183
|
+
var padding = 20;
|
|
194
184
|
var totalSize = Math.pow(2, this.mapObject.initialZoomLevel) * 256;
|
|
195
185
|
if (!isNullOrUndefined(this.mapObject.initialTileTranslate)) {
|
|
196
186
|
this.mapObject.initialTileTranslate.x = (this.mapObject.availableSize.width / 2) - (totalSize / 2);
|
|
@@ -248,55 +238,13 @@ var LayerPanel = /** @class */ (function () {
|
|
|
248
238
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
249
239
|
this.mapObject.trigger('layerRendering', eventArgs, function (observedArgs) {
|
|
250
240
|
if (!eventArgs.cancel && eventArgs.visible) {
|
|
251
|
-
if (layer.
|
|
252
|
-
layer.urlTemplate
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
layer.urlTemplate = 'https://mt1.google.com/vt/lyrs=m@129&hl=en&x=tileX&y=tileY&z=level';
|
|
256
|
-
}
|
|
257
|
-
if (layer.layerType !== 'Geometry' || (isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
|
|
258
|
-
if (layer.layerType !== 'Bing' || _this.bing) {
|
|
259
|
-
if (!isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate.indexOf('quadkey') > -1) {
|
|
260
|
-
var bing = new BingMap(_this.mapObject);
|
|
261
|
-
_this.bingMapCalculation(layer, layerIndex, _this, bing);
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
_this.renderTileLayer(_this, layer, layerIndex);
|
|
265
|
-
}
|
|
241
|
+
if ((isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
|
|
242
|
+
if (!isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate.indexOf('quadkey') > -1) {
|
|
243
|
+
var bing = new BingMap(_this.mapObject);
|
|
244
|
+
_this.bingMapCalculation(layer, layerIndex, _this, bing);
|
|
266
245
|
}
|
|
267
|
-
else
|
|
268
|
-
|
|
269
|
-
var proxy_1 = _this;
|
|
270
|
-
var bing_1 = new BingMap(_this.mapObject);
|
|
271
|
-
var bingType = layer.bingMapType === 'AerialWithLabel' ? 'AerialWithLabelsOnDemand' : layer.bingMapType;
|
|
272
|
-
var url = 'https://dev.virtualearth.net/REST/V1/Imagery/Metadata/' + bingType;
|
|
273
|
-
var ajax = new Fetch({
|
|
274
|
-
url: url + '?output=json&include=ImageryProviders&urischeme=https&key=' + layer.key
|
|
275
|
-
});
|
|
276
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
277
|
-
ajax.onSuccess = function (json) {
|
|
278
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
279
|
-
var resource = json['resourceSets'][0]['resources'][0];
|
|
280
|
-
var imageUrl = resource['imageUrl'];
|
|
281
|
-
var subDomains = resource['imageUrlSubdomains'];
|
|
282
|
-
var maxZoom = resource['zoomMax'];
|
|
283
|
-
if (imageUrl !== null && imageUrl !== undefined && imageUrl !== bing_1.imageUrl) {
|
|
284
|
-
bing_1.imageUrl = imageUrl;
|
|
285
|
-
}
|
|
286
|
-
if (subDomains !== null && subDomains !== undefined && subDomains !== bing_1.subDomains) {
|
|
287
|
-
bing_1.subDomains = subDomains;
|
|
288
|
-
}
|
|
289
|
-
if (maxZoom !== null && maxZoom !== undefined && maxZoom !== bing_1.maxZoom) {
|
|
290
|
-
bing_1.maxZoom = maxZoom;
|
|
291
|
-
}
|
|
292
|
-
proxy_1.mapObject['bingMap'] = bing_1;
|
|
293
|
-
proxy_1.renderTileLayer(proxy_1, layer, layerIndex, bing_1);
|
|
294
|
-
_this.mapObject.arrangeTemplate();
|
|
295
|
-
if (_this.mapObject.zoomModule && (_this.mapObject.previousScale !== _this.mapObject.scale)) {
|
|
296
|
-
_this.mapObject.zoomModule.applyTransform(_this.mapObject, true);
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
ajax.send();
|
|
246
|
+
else {
|
|
247
|
+
_this.renderTileLayer(_this, layer, layerIndex);
|
|
300
248
|
}
|
|
301
249
|
}
|
|
302
250
|
else {
|
|
@@ -404,7 +352,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
404
352
|
var _loop_1 = function (i) {
|
|
405
353
|
var k = void 0;
|
|
406
354
|
var borderValue = {
|
|
407
|
-
color: shapeSettings.border.color,
|
|
355
|
+
color: shapeSettings.border.color || this_1.mapObject.themeStyle.shapeBorderColor,
|
|
408
356
|
width: shapeSettings.border.width,
|
|
409
357
|
opacity: shapeSettings.border.opacity
|
|
410
358
|
};
|
|
@@ -469,21 +417,20 @@ var LayerPanel = /** @class */ (function () {
|
|
|
469
417
|
if (!eventArgs.cancel) {
|
|
470
418
|
eventArgs.fill = eventArgs.fill === '#A6A6A6' ? eventArgs.shape.fill ||
|
|
471
419
|
_this.mapObject.themeStyle.shapeFill : eventArgs.fill;
|
|
472
|
-
eventArgs.border.color = eventArgs.border.color === '
|
|
420
|
+
eventArgs.border.color = eventArgs.border.color === 'transparent' ?
|
|
473
421
|
eventArgs.shape.border.color : eventArgs.border.color;
|
|
474
422
|
eventArgs.border.width = eventArgs.border.width === 0 ? eventArgs.shape.border.width : eventArgs.border.width;
|
|
475
423
|
if (isNullOrUndefined(shapeSettings.borderColorValuePath)) {
|
|
476
|
-
|
|
424
|
+
borderValue.color = eventArgs.border.color;
|
|
477
425
|
}
|
|
478
426
|
if (isNullOrUndefined(shapeSettings.borderWidthValuePath)) {
|
|
479
|
-
|
|
427
|
+
borderValue.width = eventArgs.border.width;
|
|
480
428
|
}
|
|
481
429
|
}
|
|
482
430
|
else {
|
|
483
431
|
eventArgs.fill = fill;
|
|
484
|
-
eventArgs.border.color = shapeSettings.border.color;
|
|
432
|
+
eventArgs.border.color = shapeSettings.border.color || _this.mapObject.themeStyle.shapeBorderColor;
|
|
485
433
|
eventArgs.border.width = shapeSettings.border.width;
|
|
486
|
-
_this.mapObject.layers[layerIndex].shapeSettings.border = shapeSettings.border;
|
|
487
434
|
}
|
|
488
435
|
eventArgs.border.opacity = isNullOrUndefined(eventArgs.border.opacity) ? opacity : eventArgs.border.opacity;
|
|
489
436
|
if (_this.groupElements.length < 1) {
|
|
@@ -680,10 +627,12 @@ var LayerPanel = /** @class */ (function () {
|
|
|
680
627
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
681
628
|
var bubbleDataSource = bubble_1.dataSource;
|
|
682
629
|
this_2.mapObject.bubbleModule.bubbleCollection = [];
|
|
683
|
-
bubbleDataSource.
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
630
|
+
if (!isNullOrUndefined(bubbleDataSource) && bubbleDataSource.length > 0) {
|
|
631
|
+
bubbleDataSource.map(function (bubbleData, i) {
|
|
632
|
+
_this.renderBubble(_this.currentLayer, bubbleData, colors[i % colors.length], range, j, i, bubbleG, layerIndex, bubble_1);
|
|
633
|
+
});
|
|
634
|
+
this_2.groupElements.push(bubbleG);
|
|
635
|
+
}
|
|
687
636
|
};
|
|
688
637
|
var this_2 = this;
|
|
689
638
|
for (var j = 0; j < length_1; j++) {
|
|
@@ -709,9 +658,13 @@ var LayerPanel = /** @class */ (function () {
|
|
|
709
658
|
if (this.mapObject.navigationLineModule) {
|
|
710
659
|
this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer, this.currentFactor, layerIndex));
|
|
711
660
|
}
|
|
712
|
-
this.groupElements
|
|
713
|
-
|
|
714
|
-
|
|
661
|
+
if (!isNullOrUndefined(this.groupElements) && !isNullOrUndefined(this.layerObject)) {
|
|
662
|
+
this.groupElements.map(function (element) {
|
|
663
|
+
if (!isNullOrUndefined(element)) {
|
|
664
|
+
_this.layerObject.appendChild(element);
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
}
|
|
715
668
|
if (this.mapObject.markerModule) {
|
|
716
669
|
this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor) :
|
|
717
670
|
this.currentFactor), null);
|
|
@@ -802,7 +755,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
802
755
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
803
756
|
var index = checkShapeDataFields(layer.dataSource, shape, layer.shapeDataPath, layer.shapePropertyPath, layer);
|
|
804
757
|
var colorMapping = new ColorMapping(this.mapObject);
|
|
805
|
-
if (isNullOrUndefined(layer.dataSource[index])) {
|
|
758
|
+
if (isNullOrUndefined(layer.dataSource) || isNullOrUndefined(layer.dataSource[index])) {
|
|
806
759
|
return color;
|
|
807
760
|
}
|
|
808
761
|
return colorMapping.getShapeColorMapping(layer.shapeSettings, layer.dataSource[index], color);
|
|
@@ -1183,9 +1136,8 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1183
1136
|
var tile = new Tile(tileI % ycount, j);
|
|
1184
1137
|
tile.left = Math.round(x);
|
|
1185
1138
|
tile.top = Math.round(y);
|
|
1186
|
-
if (
|
|
1187
|
-
|
|
1188
|
-
tile.src = bing.getBingMap(tile, key, baseLayer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
|
|
1139
|
+
if ((bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
|
|
1140
|
+
tile.src = bing.getBingMap(tile, '', '', userLang, bing.imageUrl, bing.subDomains);
|
|
1189
1141
|
}
|
|
1190
1142
|
else {
|
|
1191
1143
|
tile.src = this.urlTemplate.replace('level', zoomLevel.toString()).replace('tileX', tile.x.toString())
|
|
@@ -1212,14 +1164,13 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1212
1164
|
if (!(layer.type === 'SubLayer' && layer.visible)) {
|
|
1213
1165
|
continue;
|
|
1214
1166
|
}
|
|
1215
|
-
if ((layer.
|
|
1216
|
-
isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '')) {
|
|
1167
|
+
if (isNullOrUndefined(layer.shapeData) && !isNullOrUndefined(layer.urlTemplate) && layer.urlTemplate !== '') {
|
|
1217
1168
|
for (var _b = 0, proxTiles_1 = proxTiles; _b < proxTiles_1.length; _b++) {
|
|
1218
1169
|
var baseTile = proxTiles_1[_b];
|
|
1219
1170
|
var subtile = extend({}, baseTile, {}, true);
|
|
1220
|
-
if (layer.
|
|
1171
|
+
if (layer.urlTemplate.indexOf('quadkey')) {
|
|
1221
1172
|
bing = new BingMap(this.mapObject);
|
|
1222
|
-
subtile.src = bing.getBingMap(subtile,
|
|
1173
|
+
subtile.src = bing.getBingMap(subtile, '', '', userLang, bing.imageUrl, bing.subDomains);
|
|
1223
1174
|
}
|
|
1224
1175
|
else {
|
|
1225
1176
|
subtile.src = layer.urlTemplate.replace('level', zoomLevel.toString()).replace('tileX', baseTile.x.toString())
|
|
@@ -1247,111 +1198,106 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1247
1198
|
else {
|
|
1248
1199
|
timeOut = 0;
|
|
1249
1200
|
}
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1201
|
+
setTimeout(function () {
|
|
1202
|
+
if (element) {
|
|
1203
|
+
element.style.zIndex = '1';
|
|
1204
|
+
}
|
|
1205
|
+
if (element1) {
|
|
1206
|
+
element1.style.zIndex = '0';
|
|
1207
|
+
}
|
|
1208
|
+
var animateElement;
|
|
1209
|
+
if (!document.getElementById(_this.mapObject.element.id + '_animated_tiles') && element) {
|
|
1210
|
+
animateElement = createElement('div', { id: _this.mapObject.element.id + '_animated_tiles' });
|
|
1211
|
+
element.appendChild(animateElement);
|
|
1212
|
+
}
|
|
1213
|
+
else {
|
|
1214
|
+
if (type !== 'Pan' && element1 && element) {
|
|
1215
|
+
element1.appendChild(element.children[0]);
|
|
1216
|
+
if (!_this.mapObject.isAddLayer && !isNullOrUndefined(document.getElementById(_this.mapObject.element.id + '_animated_tiles'))) {
|
|
1217
|
+
document.getElementById(_this.mapObject.element.id + '_animated_tiles').id =
|
|
1218
|
+
_this.mapObject.element.id + '_animated_tiles_old';
|
|
1219
|
+
}
|
|
1263
1220
|
animateElement = createElement('div', { id: _this.mapObject.element.id + '_animated_tiles' });
|
|
1264
1221
|
element.appendChild(animateElement);
|
|
1265
1222
|
}
|
|
1266
1223
|
else {
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1224
|
+
animateElement = element ? element.children[0] : null;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
for (var id = 0; id < _this.tiles.length; id++) {
|
|
1228
|
+
var tile = _this.tiles[id];
|
|
1229
|
+
var imgElement = null;
|
|
1230
|
+
var mapId = _this.mapObject.element.id;
|
|
1231
|
+
if (type === 'Pan') {
|
|
1232
|
+
var child = document.getElementById(mapId + '_tile_' + id);
|
|
1233
|
+
var isNewTile = false;
|
|
1234
|
+
if (isNullOrUndefined(child)) {
|
|
1235
|
+
isNewTile = true;
|
|
1236
|
+
child = createElement('div', { id: mapId + '_tile_' + id });
|
|
1237
|
+
imgElement = createElement('img');
|
|
1275
1238
|
}
|
|
1276
1239
|
else {
|
|
1277
|
-
|
|
1240
|
+
child.style.removeProperty('display');
|
|
1241
|
+
imgElement = child.children[0];
|
|
1278
1242
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
var tile = _this.tiles[id];
|
|
1282
|
-
var imgElement = null;
|
|
1283
|
-
var mapId = _this.mapObject.element.id;
|
|
1284
|
-
if (type === 'Pan') {
|
|
1285
|
-
var child = document.getElementById(mapId + '_tile_' + id);
|
|
1286
|
-
var isNewTile = false;
|
|
1287
|
-
if (isNullOrUndefined(child)) {
|
|
1288
|
-
isNewTile = true;
|
|
1289
|
-
child = createElement('div', { id: mapId + '_tile_' + id });
|
|
1290
|
-
imgElement = createElement('img');
|
|
1291
|
-
}
|
|
1292
|
-
else {
|
|
1293
|
-
child.style.removeProperty('display');
|
|
1294
|
-
imgElement = child.children[0];
|
|
1295
|
-
}
|
|
1296
|
-
if (!isNewTile && imgElement && imgElement.src !== tile.src) {
|
|
1297
|
-
imgElement.src = tile.src;
|
|
1298
|
-
}
|
|
1299
|
-
child.style.position = 'absolute';
|
|
1300
|
-
child.style.left = tile.left + 'px';
|
|
1301
|
-
child.style.top = tile.top + 'px';
|
|
1302
|
-
child.style.height = tile.height + 'px';
|
|
1303
|
-
child.style.width = tile.width + 'px';
|
|
1304
|
-
if (isNewTile) {
|
|
1305
|
-
imgElement.setAttribute('height', '256px');
|
|
1306
|
-
imgElement.setAttribute('width', '256px');
|
|
1307
|
-
imgElement.setAttribute('src', tile.src);
|
|
1308
|
-
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
1309
|
-
imgElement.style.setProperty('user-select', 'none');
|
|
1310
|
-
child.appendChild(imgElement);
|
|
1311
|
-
animateElement.appendChild(child);
|
|
1312
|
-
}
|
|
1243
|
+
if (!isNewTile && imgElement && imgElement.src !== tile.src) {
|
|
1244
|
+
imgElement.src = tile.src;
|
|
1313
1245
|
}
|
|
1314
|
-
|
|
1315
|
-
|
|
1246
|
+
child.style.position = 'absolute';
|
|
1247
|
+
child.style.left = tile.left + 'px';
|
|
1248
|
+
child.style.top = tile.top + 'px';
|
|
1249
|
+
child.style.height = tile.height + 'px';
|
|
1250
|
+
child.style.width = tile.width + 'px';
|
|
1251
|
+
if (isNewTile) {
|
|
1316
1252
|
imgElement.setAttribute('height', '256px');
|
|
1317
1253
|
imgElement.setAttribute('width', '256px');
|
|
1318
1254
|
imgElement.setAttribute('src', tile.src);
|
|
1319
|
-
imgElement.style.setProperty('user-select', 'none');
|
|
1320
1255
|
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
1321
|
-
|
|
1322
|
-
child.style.position = 'absolute';
|
|
1323
|
-
child.style.left = tile.left + 'px';
|
|
1324
|
-
child.style.top = tile.top + 'px';
|
|
1325
|
-
child.style.height = tile.height + 'px';
|
|
1326
|
-
child.style.width = tile.width + 'px';
|
|
1256
|
+
imgElement.style.setProperty('user-select', 'none');
|
|
1327
1257
|
child.appendChild(imgElement);
|
|
1328
|
-
|
|
1329
|
-
animateElement.appendChild(child);
|
|
1330
|
-
}
|
|
1258
|
+
animateElement.appendChild(child);
|
|
1331
1259
|
}
|
|
1332
|
-
|
|
1333
|
-
|
|
1260
|
+
}
|
|
1261
|
+
else {
|
|
1262
|
+
imgElement = createElement('img');
|
|
1263
|
+
imgElement.setAttribute('height', '256px');
|
|
1264
|
+
imgElement.setAttribute('width', '256px');
|
|
1265
|
+
imgElement.setAttribute('src', tile.src);
|
|
1266
|
+
imgElement.style.setProperty('user-select', 'none');
|
|
1267
|
+
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
1268
|
+
var child = createElement('div', { id: mapId + '_tile_' + id });
|
|
1269
|
+
child.style.position = 'absolute';
|
|
1270
|
+
child.style.left = tile.left + 'px';
|
|
1271
|
+
child.style.top = tile.top + 'px';
|
|
1272
|
+
child.style.height = tile.height + 'px';
|
|
1273
|
+
child.style.width = tile.width + 'px';
|
|
1274
|
+
child.appendChild(imgElement);
|
|
1275
|
+
if (animateElement) {
|
|
1276
|
+
animateElement.appendChild(child);
|
|
1334
1277
|
}
|
|
1335
1278
|
}
|
|
1336
|
-
if (
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
}
|
|
1348
|
-
else {
|
|
1349
|
-
animateElement.removeChild(animateElement.children[l]);
|
|
1279
|
+
if (id === (_this.tiles.length - 1) && document.getElementById(_this.mapObject.element.id + '_animated_tiles_old')) {
|
|
1280
|
+
removeElement(_this.mapObject.element.id + '_animated_tiles_old');
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
if (!isNullOrUndefined(_this.mapObject.currentTiles)) {
|
|
1284
|
+
for (var l = _this.tiles.length; l < animateElement.childElementCount; l++) {
|
|
1285
|
+
var isExistingElement = false;
|
|
1286
|
+
for (var a = 0; a < _this.mapObject.currentTiles.childElementCount; a++) {
|
|
1287
|
+
if (!isExistingElement &&
|
|
1288
|
+
_this.mapObject.currentTiles.children[a].id === animateElement.children[l].id) {
|
|
1289
|
+
isExistingElement = true;
|
|
1350
1290
|
}
|
|
1351
1291
|
}
|
|
1292
|
+
if (isExistingElement) {
|
|
1293
|
+
animateElement.children[l].style.display = 'none';
|
|
1294
|
+
}
|
|
1295
|
+
else {
|
|
1296
|
+
animateElement.removeChild(animateElement.children[l]);
|
|
1297
|
+
}
|
|
1352
1298
|
}
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1299
|
+
}
|
|
1300
|
+
}, timeOut);
|
|
1355
1301
|
};
|
|
1356
1302
|
/**
|
|
1357
1303
|
* Animation for tile layers and hide the group element until the tile layer rendering.
|
|
@@ -1426,7 +1372,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1426
1372
|
var eleWidth = mapWidth > 640 ? (mapWidth - 640) / 2 : 0;
|
|
1427
1373
|
var eleHeight = mapHeight > 640 ? (mapHeight - 640) / 2 : 0;
|
|
1428
1374
|
var center;
|
|
1429
|
-
var mapType =
|
|
1375
|
+
var mapType = 'roadmap';
|
|
1430
1376
|
if (map.centerPosition.latitude && map.centerPosition.longitude) {
|
|
1431
1377
|
center = map.centerPosition.latitude.toString() + ',' + map.centerPosition.longitude.toString();
|
|
1432
1378
|
}
|
|
@@ -1452,8 +1398,7 @@ var LayerPanel = /** @class */ (function () {
|
|
|
1452
1398
|
this.mapObject.tileZoomLevel = this.mapObject.tileZoomScale;
|
|
1453
1399
|
}
|
|
1454
1400
|
var level = this.mapObject.tileZoomLevel;
|
|
1455
|
-
var padding =
|
|
1456
|
-
20 : 0;
|
|
1401
|
+
var padding = 20;
|
|
1457
1402
|
var x;
|
|
1458
1403
|
var y;
|
|
1459
1404
|
var totalSize = Math.pow(2, level) * 256;
|