@syncfusion/ej2-maps 19.3.53 → 19.4.38
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/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
- package/CHANGELOG.md +13 -0
- 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 +384 -226
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +381 -223
- 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 +12 -12
- package/src/maps/layers/bubble.d.ts +6 -0
- package/src/maps/layers/bubble.js +7 -1
- package/src/maps/layers/data-label.js +1 -0
- package/src/maps/layers/layer-panel.d.ts +2 -1
- package/src/maps/layers/layer-panel.js +86 -50
- package/src/maps/layers/legend.js +25 -13
- package/src/maps/layers/marker.js +2 -8
- package/src/maps/maps.js +1 -1
- package/src/maps/model/base.js +2 -2
- package/src/maps/model/theme.js +62 -5
- package/src/maps/user-interaction/highlight.js +4 -4
- package/src/maps/user-interaction/selection.js +10 -9
- package/src/maps/user-interaction/tooltip.js +9 -3
- package/src/maps/user-interaction/zoom.d.ts +1 -0
- package/src/maps/user-interaction/zoom.js +73 -42
- package/src/maps/utils/helper.d.ts +2 -0
- package/src/maps/utils/helper.js +104 -88
package/src/maps/model/theme.js
CHANGED
|
@@ -26,15 +26,15 @@ export var Theme;
|
|
|
26
26
|
fontWeight: 'Regular',
|
|
27
27
|
color: null,
|
|
28
28
|
fontStyle: 'Regular',
|
|
29
|
-
fontFamily:
|
|
29
|
+
fontFamily: null
|
|
30
30
|
};
|
|
31
31
|
/** @private */
|
|
32
32
|
Theme.legendTitleFont = {
|
|
33
|
-
size: '
|
|
34
|
-
fontWeight: '
|
|
33
|
+
size: '12px',
|
|
34
|
+
fontWeight: 'Medium',
|
|
35
35
|
color: null,
|
|
36
|
-
fontStyle: '
|
|
37
|
-
fontFamily:
|
|
36
|
+
fontStyle: 'Medium',
|
|
37
|
+
fontFamily: null
|
|
38
38
|
};
|
|
39
39
|
/** @private */
|
|
40
40
|
Theme.legendLabelFont = {
|
|
@@ -183,6 +183,14 @@ export function getShapeColor(theme) {
|
|
|
183
183
|
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
184
184
|
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
185
185
|
break;
|
|
186
|
+
case 'fluentui':
|
|
187
|
+
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
188
|
+
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
189
|
+
break;
|
|
190
|
+
case 'fluentuidark':
|
|
191
|
+
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
192
|
+
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
193
|
+
break;
|
|
186
194
|
default:
|
|
187
195
|
themePalette = ['#B5E485', '#7BC1E8', '#DF819C', '#EC9B79', '#78D0D3',
|
|
188
196
|
'#D6D572', '#9178E3', '#A1E5B4', '#87A4B4', '#E4C16C'];
|
|
@@ -328,6 +336,7 @@ export function getThemeStyle(theme) {
|
|
|
328
336
|
tooltipFillColor: '#363F4C',
|
|
329
337
|
zoomFillColor: '#FFFFFF',
|
|
330
338
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
339
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
331
340
|
titleFontWeight: 'Medium',
|
|
332
341
|
zoomSelectionColor: '#e61576',
|
|
333
342
|
shapeFill: '#A6A6A6'
|
|
@@ -345,6 +354,7 @@ export function getThemeStyle(theme) {
|
|
|
345
354
|
tooltipFontColor: '#000000',
|
|
346
355
|
tooltipFillColor: '#ffffff',
|
|
347
356
|
zoomFillColor: '#FFFFFF',
|
|
357
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
348
358
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
349
359
|
titleFontWeight: 'Medium',
|
|
350
360
|
zoomSelectionColor: '#e61576',
|
|
@@ -466,6 +476,52 @@ export function getThemeStyle(theme) {
|
|
|
466
476
|
shapeFill: '#495057'
|
|
467
477
|
};
|
|
468
478
|
break;
|
|
479
|
+
case 'fluentui':
|
|
480
|
+
style = {
|
|
481
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
482
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
483
|
+
titleFontColor: '#201F1E',
|
|
484
|
+
subTitleFontColor: '#201F1E',
|
|
485
|
+
legendTitleFontColor: '#201F1E',
|
|
486
|
+
legendTextColor: '#201F1E',
|
|
487
|
+
dataLabelFontColor: '#201F1E',
|
|
488
|
+
tooltipFontColor: '#323130',
|
|
489
|
+
tooltipFillColor: '#FFFFFF',
|
|
490
|
+
zoomFillColor: '#A19F9D',
|
|
491
|
+
fontFamily: 'Segoe UI',
|
|
492
|
+
titleFontSize: '14px',
|
|
493
|
+
legendFontSize: '12px',
|
|
494
|
+
tooltipFillOpacity: 1,
|
|
495
|
+
tooltipTextOpacity: 1,
|
|
496
|
+
labelFontFamily: 'Segoe UI',
|
|
497
|
+
titleFontWeight: '600',
|
|
498
|
+
zoomSelectionColor: '#323130',
|
|
499
|
+
shapeFill: '#F3F2F1'
|
|
500
|
+
};
|
|
501
|
+
break;
|
|
502
|
+
case 'fluentuidark':
|
|
503
|
+
style = {
|
|
504
|
+
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
505
|
+
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
506
|
+
titleFontColor: '#F3F2F1',
|
|
507
|
+
subTitleFontColor: '#F3F2F1',
|
|
508
|
+
legendTitleFontColor: '#F3F2F1',
|
|
509
|
+
legendTextColor: '#F3F2F1',
|
|
510
|
+
dataLabelFontColor: '#F3F2F1',
|
|
511
|
+
tooltipFontColor: '#F3F2F1',
|
|
512
|
+
tooltipFillColor: '#252423',
|
|
513
|
+
zoomFillColor: '#484644',
|
|
514
|
+
fontFamily: 'Segoe UI',
|
|
515
|
+
titleFontSize: '14px',
|
|
516
|
+
legendFontSize: '12px',
|
|
517
|
+
tooltipFillOpacity: 1,
|
|
518
|
+
tooltipTextOpacity: 1,
|
|
519
|
+
labelFontFamily: 'Segoe UI',
|
|
520
|
+
titleFontWeight: '600',
|
|
521
|
+
zoomSelectionColor: '#F3F2F1',
|
|
522
|
+
shapeFill: '#252423'
|
|
523
|
+
};
|
|
524
|
+
break;
|
|
469
525
|
default:
|
|
470
526
|
style = {
|
|
471
527
|
backgroundColor: '#FFFFFF',
|
|
@@ -479,6 +535,7 @@ export function getThemeStyle(theme) {
|
|
|
479
535
|
tooltipFillColor: '#000000',
|
|
480
536
|
zoomFillColor: '#737373',
|
|
481
537
|
labelFontFamily: 'Roboto, Noto, Sans-serif',
|
|
538
|
+
fontFamily: 'Roboto, Noto, Sans-serif',
|
|
482
539
|
titleFontWeight: 'Medium',
|
|
483
540
|
zoomSelectionColor: '#e61576',
|
|
484
541
|
shapeFill: '#A6A6A6'
|
|
@@ -149,14 +149,14 @@ var Highlight = /** @class */ (function () {
|
|
|
149
149
|
isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker].highlightSettings.enable;
|
|
150
150
|
}
|
|
151
151
|
var border = {
|
|
152
|
-
color: this.highlightSettings.border.color,
|
|
153
|
-
width: this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale),
|
|
152
|
+
color: (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.border.color || this.highlightSettings.fill),
|
|
153
|
+
width: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale),
|
|
154
154
|
opacity: this.highlightSettings.border.opacity
|
|
155
155
|
};
|
|
156
156
|
var eventArgs = {
|
|
157
157
|
opacity: this.highlightSettings.opacity,
|
|
158
|
-
fill: targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
159
|
-
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none',
|
|
158
|
+
fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
159
|
+
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
|
|
160
160
|
border: border,
|
|
161
161
|
name: itemHighlight,
|
|
162
162
|
target: targetEle.id,
|
|
@@ -122,18 +122,19 @@ var Selection = /** @class */ (function () {
|
|
|
122
122
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
123
123
|
Selection.prototype.selectMap = function (targetElement, shapeData, data) {
|
|
124
124
|
var _this = this;
|
|
125
|
+
var layerIndex = parseInt(targetElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
125
126
|
var parentElement;
|
|
126
127
|
var children;
|
|
127
128
|
var selectionClass;
|
|
128
129
|
var selectionsettings = this.selectionsettings;
|
|
129
130
|
var border = {
|
|
130
|
-
color: this.selectionsettings.border.color,
|
|
131
|
-
width: this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale),
|
|
131
|
+
color: (targetElement.parentElement.id.indexOf('LineString') === -1) ? this.selectionsettings.border.color : (this.selectionsettings.border.color || this.selectionsettings.fill),
|
|
132
|
+
width: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)) : (this.selectionsettings.border.width / this.maps.scale),
|
|
132
133
|
opacity: this.selectionsettings.border.opacity
|
|
133
134
|
};
|
|
134
135
|
var eventArgs = {
|
|
135
136
|
opacity: this.selectionsettings.opacity,
|
|
136
|
-
fill: this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none',
|
|
137
|
+
fill: (targetElement.parentElement.id.indexOf('LineString') === -1) ? (this.selectionType !== 'navigationline' ? this.selectionsettings.fill : 'none') : 'transparent',
|
|
137
138
|
border: border,
|
|
138
139
|
name: itemSelection,
|
|
139
140
|
target: targetElement.id,
|
|
@@ -156,9 +157,9 @@ var Selection = /** @class */ (function () {
|
|
|
156
157
|
}
|
|
157
158
|
if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
158
159
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
159
|
-
var
|
|
160
|
-
targetElement.setAttribute('stroke-width', _this.maps.layers[
|
|
161
|
-
targetElement.setAttribute('stroke', _this.maps.layers[
|
|
160
|
+
var layerIndex_1 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
161
|
+
targetElement.setAttribute('stroke-width', _this.maps.layers[layerIndex_1].navigationLineSettings[index].width.toString());
|
|
162
|
+
targetElement.setAttribute('stroke', _this.maps.layers[layerIndex_1].navigationLineSettings[index].color);
|
|
162
163
|
}
|
|
163
164
|
}
|
|
164
165
|
else {
|
|
@@ -184,9 +185,9 @@ var Selection = /** @class */ (function () {
|
|
|
184
185
|
}
|
|
185
186
|
if (ele.id.indexOf('NavigationIndex') > -1) {
|
|
186
187
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
187
|
-
var
|
|
188
|
-
ele.setAttribute('stroke-width', _this.maps.layers[
|
|
189
|
-
ele.setAttribute('stroke', _this.maps.layers[
|
|
188
|
+
var layerIndex_2 = parseInt(targetElement.parentElement.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
189
|
+
ele.setAttribute('stroke-width', _this.maps.layers[layerIndex_2].navigationLineSettings[index].width.toString());
|
|
190
|
+
ele.setAttribute('stroke', _this.maps.layers[layerIndex_2].navigationLineSettings[index].color);
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
if (!getElement(_this.selectionType + 'selectionMap')) {
|
|
@@ -54,8 +54,6 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
54
54
|
if (istooltipRender) {
|
|
55
55
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
56
56
|
option = layer.tooltipSettings;
|
|
57
|
-
option.textStyle.fontFamily = this.maps.themeStyle.fontFamily || option.textStyle.fontFamily;
|
|
58
|
-
option.textStyle.opacity = this.maps.themeStyle.tooltipTextOpacity || option.textStyle.opacity;
|
|
59
57
|
var shape = parseInt(targetId.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
60
58
|
if (isNullOrUndefined(layer.layerData) || isNullOrUndefined(layer.layerData[shape])) {
|
|
61
59
|
return;
|
|
@@ -172,9 +170,13 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
172
170
|
option.template = option.template[Object.keys(option.template)[0]];
|
|
173
171
|
}
|
|
174
172
|
templateData = this.setTooltipContent(option, templateData);
|
|
173
|
+
var tooltipTextStyle = {
|
|
174
|
+
color: option.textStyle.color, fontFamily: option.textStyle.fontFamily, fontStyle: option.textStyle.fontStyle,
|
|
175
|
+
fontWeight: option.textStyle.fontWeight, opacity: option.textStyle.opacity, size: option.textStyle.size
|
|
176
|
+
};
|
|
175
177
|
var tooltipOption = {
|
|
176
178
|
location: location, text: tooltipContent, data: templateData,
|
|
177
|
-
textStyle:
|
|
179
|
+
textStyle: tooltipTextStyle,
|
|
178
180
|
template: option.template
|
|
179
181
|
};
|
|
180
182
|
tooltipArgs = {
|
|
@@ -190,6 +192,10 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
190
192
|
_this.maps['isProtectedOnChange'] = true;
|
|
191
193
|
tooltipArgs.options['textStyle']['color'] = tooltipArgs.options['textStyle']['color']
|
|
192
194
|
|| _this.maps.themeStyle.tooltipFontColor;
|
|
195
|
+
tooltipArgs.options['textStyle']['fontFamily'] = tooltipArgs.options['textStyle']['fontFamily']
|
|
196
|
+
|| _this.maps.themeStyle.fontFamily;
|
|
197
|
+
tooltipArgs.options['textStyle']['opacity'] = tooltipArgs.options['textStyle']['opacity']
|
|
198
|
+
|| _this.maps.themeStyle.tooltipTextOpacity;
|
|
193
199
|
if (tooltipArgs.cancel) {
|
|
194
200
|
_this.svgTooltip = new Tooltip({
|
|
195
201
|
enable: true,
|
|
@@ -102,6 +102,7 @@ export declare class Zoom {
|
|
|
102
102
|
processTemplate(x: number, y: number, scale: number, maps: Maps): void;
|
|
103
103
|
private dataLabelTranslate;
|
|
104
104
|
private markerTranslate;
|
|
105
|
+
private markerLineAnimation;
|
|
105
106
|
panning(direction: PanDirection, xDifference: number, yDifference: number, mouseLocation?: PointerEvent | TouchEvent): void;
|
|
106
107
|
private toAlignSublayer;
|
|
107
108
|
toolBarZooming(zoomFactor: number, type: string): void;
|
|
@@ -107,8 +107,10 @@ var Zoom = /** @class */ (function () {
|
|
|
107
107
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
108
108
|
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
109
109
|
}
|
|
110
|
+
this.markerLineAnimation(map);
|
|
110
111
|
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
111
112
|
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
113
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
112
114
|
setTimeout(function () {
|
|
113
115
|
// if (type === 'ZoomOut') {
|
|
114
116
|
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
@@ -122,7 +124,7 @@ var Zoom = /** @class */ (function () {
|
|
|
122
124
|
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
123
125
|
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
124
126
|
}
|
|
125
|
-
},
|
|
127
|
+
}, animationDuration);
|
|
126
128
|
}
|
|
127
129
|
this.maps.zoomNotApplied = false;
|
|
128
130
|
};
|
|
@@ -297,11 +299,13 @@ var Zoom = /** @class */ (function () {
|
|
|
297
299
|
*/
|
|
298
300
|
Zoom.prototype.animateTransform = function (element, animate, x, y, scale) {
|
|
299
301
|
var duration = this.currentLayer.animationDuration;
|
|
300
|
-
if (!animate || duration === 0) {
|
|
302
|
+
if (!animate || duration === 0 || this.maps.isTileMap) {
|
|
301
303
|
element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
|
|
302
304
|
return;
|
|
303
305
|
}
|
|
304
|
-
|
|
306
|
+
if (!this.maps.isTileMap) {
|
|
307
|
+
zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
|
|
308
|
+
}
|
|
305
309
|
};
|
|
306
310
|
Zoom.prototype.applyTransform = function (animate) {
|
|
307
311
|
var layerIndex;
|
|
@@ -353,12 +357,14 @@ var Zoom = /** @class */ (function () {
|
|
|
353
357
|
this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate);
|
|
354
358
|
}
|
|
355
359
|
currentEle = layerElement.childNodes[j];
|
|
360
|
+
var markerAnimation = void 0;
|
|
356
361
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
357
362
|
for (var k = 0; k < currentEle.childElementCount; k++) {
|
|
358
363
|
this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate);
|
|
359
364
|
var layerIndex_1 = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
360
365
|
var dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
361
366
|
var markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
367
|
+
markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
|
|
362
368
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
363
369
|
var markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
|
|
364
370
|
for (var x_1 = 0; x_1 < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x_1++) {
|
|
@@ -369,9 +375,17 @@ var Zoom = /** @class */ (function () {
|
|
|
369
375
|
this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
|
|
370
376
|
}
|
|
371
377
|
}
|
|
372
|
-
if (
|
|
373
|
-
|
|
374
|
-
|
|
378
|
+
if ((this.currentLayer.animationDuration > 0 || (this.maps.layersCollection[0].animationDuration > 0 && this.currentLayer.type === 'SubLayer')) && !this.isPanning) {
|
|
379
|
+
if (this.maps.isTileMap) {
|
|
380
|
+
var groupElement = document.querySelector('.GroupElement');
|
|
381
|
+
if (groupElement && !(document.querySelector('.ClusterGroupElement')) && markerAnimation) {
|
|
382
|
+
groupElement.style.display = 'none';
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
markerStyle = 'visibility:hidden';
|
|
387
|
+
currentEle.setAttribute('style', markerStyle);
|
|
388
|
+
}
|
|
375
389
|
}
|
|
376
390
|
}
|
|
377
391
|
if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
|
|
@@ -470,7 +484,7 @@ var Zoom = /** @class */ (function () {
|
|
|
470
484
|
this.maps.arrangeTemplate();
|
|
471
485
|
}
|
|
472
486
|
if (!isNullOrUndefined(this.currentLayer)) {
|
|
473
|
-
if (!animate || this.currentLayer.animationDuration === 0) {
|
|
487
|
+
if (!animate || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
|
|
474
488
|
this.processTemplate(x, y, scale, this.maps);
|
|
475
489
|
}
|
|
476
490
|
}
|
|
@@ -589,7 +603,6 @@ var Zoom = /** @class */ (function () {
|
|
|
589
603
|
*/
|
|
590
604
|
Zoom.prototype.processTemplate = function (x, y, scale, maps) {
|
|
591
605
|
for (var i = 0; i < this.templateCount; i++) {
|
|
592
|
-
this.currentLayer = maps.layersCollection[i];
|
|
593
606
|
var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
|
|
594
607
|
var markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
|
|
595
608
|
i + '_Markers_Template_Group');
|
|
@@ -820,6 +833,20 @@ var Zoom = /** @class */ (function () {
|
|
|
820
833
|
}
|
|
821
834
|
}
|
|
822
835
|
};
|
|
836
|
+
Zoom.prototype.markerLineAnimation = function (map) {
|
|
837
|
+
if (map.isTileMap) {
|
|
838
|
+
for (var i = 0; i < map.layersCollection.length; i++) {
|
|
839
|
+
var markerTemplateElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_Markers_Template_Group');
|
|
840
|
+
var lineElement = getElementByID(this.maps.element.id + '_LayerIndex_' + i + '_line_Group');
|
|
841
|
+
if (!isNullOrUndefined(markerTemplateElement)) {
|
|
842
|
+
markerTemplateElement.style.visibility = 'hidden';
|
|
843
|
+
}
|
|
844
|
+
if (!isNullOrUndefined(lineElement)) {
|
|
845
|
+
lineElement.style.visibility = 'hidden';
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
};
|
|
823
850
|
Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
|
|
824
851
|
var map = this.maps;
|
|
825
852
|
var panArgs;
|
|
@@ -953,45 +980,49 @@ var Zoom = /** @class */ (function () {
|
|
|
953
980
|
var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
954
981
|
map.scale = Math.pow(2, tileZoomFactor - 1);
|
|
955
982
|
map.tileZoomLevel = tileZoomFactor;
|
|
956
|
-
map.
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
map.
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type);
|
|
967
|
-
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
968
|
-
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
969
|
-
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
970
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
971
|
-
}
|
|
972
|
-
if (document.querySelector('.GroupElement')) {
|
|
973
|
-
document.querySelector('.GroupElement').style.display = 'none';
|
|
974
|
-
}
|
|
975
|
-
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
976
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
977
|
-
setTimeout(function () {
|
|
978
|
-
if (type === 'ZoomOut' || type === 'Reset') {
|
|
979
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
980
|
-
// element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
|
|
983
|
+
if (map.previousScale !== map.scale || map.isReset) {
|
|
984
|
+
map.zoomSettings.zoomFactor = zoomFactor;
|
|
985
|
+
var position = { x: map.availableSize.width / 2, y: map.availableSize.height / 2 };
|
|
986
|
+
this.getTileTranslatePosition(prevLevel, tileZoomFactor, position, type);
|
|
987
|
+
if (map.zoomSettings.resetToInitial && map.applyZoomReset && type === 'Reset' || (type === 'ZoomOut' && map.zoomSettings.resetToInitial && map.applyZoomReset && tileZoomFactor <= map.initialZoomLevel)) {
|
|
988
|
+
map.initialCheck = true;
|
|
989
|
+
map.zoomPersistence = false;
|
|
990
|
+
map.tileTranslatePoint.x = map.initialTileTranslate.x;
|
|
991
|
+
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
992
|
+
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
981
993
|
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
994
|
+
this.triggerZoomEvent(prevTilePoint, prevLevel, type);
|
|
995
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
996
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
997
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
998
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
985
999
|
}
|
|
986
|
-
|
|
1000
|
+
if (document.querySelector('.GroupElement')) {
|
|
1001
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
1002
|
+
}
|
|
1003
|
+
this.markerLineAnimation(map);
|
|
1004
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
1005
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
1006
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
1007
|
+
setTimeout(function () {
|
|
1008
|
+
if (type === 'ZoomOut' || type === 'Reset') {
|
|
1009
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
1010
|
+
// element1.childElementCount ? element1.removeChild(element1.children[element1.childElementCount - 1]) : element1;
|
|
1011
|
+
}
|
|
1012
|
+
_this.applyTransform(true);
|
|
1013
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
1014
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
1015
|
+
}
|
|
1016
|
+
}, animationDuration);
|
|
1017
|
+
}
|
|
1018
|
+
this.maps.zoomNotApplied = false;
|
|
987
1019
|
}
|
|
988
|
-
this.maps.zoomNotApplied = false;
|
|
989
1020
|
};
|
|
990
1021
|
Zoom.prototype.createZoomingToolbars = function () {
|
|
991
1022
|
var map = this.maps;
|
|
992
1023
|
this.toolBarGroup = map.renderer.createGroup({
|
|
993
1024
|
id: map.element.id + '_Zooming_KitCollection',
|
|
994
|
-
opacity: 0.3
|
|
1025
|
+
opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
|
|
995
1026
|
});
|
|
996
1027
|
var kitHeight = 16;
|
|
997
1028
|
var kitWidth = 16;
|
|
@@ -1400,14 +1431,14 @@ var Zoom = /** @class */ (function () {
|
|
|
1400
1431
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
1401
1432
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
1402
1433
|
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
1403
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '0.3');
|
|
1404
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '0.3');
|
|
1434
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
1435
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
1405
1436
|
}
|
|
1406
1437
|
}
|
|
1407
1438
|
}
|
|
1408
1439
|
}
|
|
1409
1440
|
else {
|
|
1410
|
-
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', '0.3');
|
|
1441
|
+
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentuidark' ? '0.6' : '0.3');
|
|
1411
1442
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
1412
1443
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
1413
1444
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|
|
@@ -481,6 +481,7 @@ export declare function marker(eventArgs: IMarkerRenderingEventArgs, markerSetti
|
|
|
481
481
|
* @param {number} markerIndex - Specifies the marker index
|
|
482
482
|
* @param {HTMLElement} markerTemplate - Specifies the marker template element
|
|
483
483
|
* @param {Point} location - Specifies the location
|
|
484
|
+
* @param {Point} transPoint - Specifies the translate point.
|
|
484
485
|
* @param {number} scale - Specifies the scale value
|
|
485
486
|
* @param {Point} offset - Specifies the offset value
|
|
486
487
|
* @param {Maps} maps - Specifies the instance of the maps
|
|
@@ -740,6 +741,7 @@ export declare function getRatioOfBubble(min: number, max: number, value: number
|
|
|
740
741
|
*
|
|
741
742
|
* @param {MapLocation[]} points - Specifies the points
|
|
742
743
|
* @param {string} type - Specifies the type
|
|
744
|
+
* @param {string} geometryType - Specified the type of the geometry
|
|
743
745
|
* @returns {any} - Specifies the object
|
|
744
746
|
*/
|
|
745
747
|
export declare function findMidPointOfPolygon(points: MapLocation[], type: string, geometryType?: string): any;
|