@syncfusion/ej2-maps 19.3.44 → 19.4.42
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 +1 -1
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -0
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -0
- package/CHANGELOG.md +36 -5
- package/README.md +4 -4
- 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 +655 -647
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +652 -645
- 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 +10 -25
- package/src/maps/layers/data-label.js +6 -17
- package/src/maps/layers/layer-panel.d.ts +2 -1
- package/src/maps/layers/layer-panel.js +86 -72
- package/src/maps/layers/legend.js +48 -19
- package/src/maps/layers/marker.js +2 -24
- package/src/maps/maps-model.d.ts +1 -28
- package/src/maps/maps.d.ts +5 -38
- package/src/maps/maps.js +80 -102
- package/src/maps/model/base-model.d.ts +7 -5
- package/src/maps/model/base.d.ts +6 -5
- package/src/maps/model/base.js +5 -2
- package/src/maps/model/export-pdf.js +1 -1
- package/src/maps/model/interface.d.ts +1 -3
- package/src/maps/model/theme.js +116 -6
- package/src/maps/user-interaction/annotation.js +3 -7
- package/src/maps/user-interaction/highlight.js +4 -17
- package/src/maps/user-interaction/selection.js +10 -22
- package/src/maps/user-interaction/tooltip.js +61 -125
- package/src/maps/user-interaction/zoom.d.ts +1 -0
- package/src/maps/user-interaction/zoom.js +92 -110
- package/src/maps/utils/enum.d.ts +8 -2
- package/src/maps/utils/helper.d.ts +5 -3
- package/src/maps/utils/helper.js +136 -104
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
|
|
7
|
-
t[p[i]] = s[p[i]];
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
1
|
import { Point, getElementByID, PathOption, Rect, convertGeoToPoint, CircleOption, convertTileLatLongToPoint } from '../utils/helper';
|
|
11
2
|
import { RectOption, createTooltip, calculateScale, getTouchCenter, getTouches, targetTouches } from '../utils/helper';
|
|
12
3
|
import { MapLocation, zoomAnimate, smoothTranslate, measureText, textTrim, clusterTemplate, marker } from '../utils/helper';
|
|
@@ -116,8 +107,10 @@ var Zoom = /** @class */ (function () {
|
|
|
116
107
|
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
117
108
|
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
118
109
|
}
|
|
110
|
+
this.markerLineAnimation(map);
|
|
119
111
|
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
120
112
|
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
113
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
121
114
|
setTimeout(function () {
|
|
122
115
|
// if (type === 'ZoomOut') {
|
|
123
116
|
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
@@ -131,7 +124,7 @@ var Zoom = /** @class */ (function () {
|
|
|
131
124
|
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
132
125
|
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
133
126
|
}
|
|
134
|
-
},
|
|
127
|
+
}, animationDuration);
|
|
135
128
|
}
|
|
136
129
|
this.maps.zoomNotApplied = false;
|
|
137
130
|
};
|
|
@@ -140,14 +133,14 @@ var Zoom = /** @class */ (function () {
|
|
|
140
133
|
var zoomArgs;
|
|
141
134
|
if (!map.isTileMap) {
|
|
142
135
|
zoomArgs = {
|
|
143
|
-
cancel: false, name: 'zoom', type: type, maps:
|
|
136
|
+
cancel: false, name: 'zoom', type: type, maps: map,
|
|
144
137
|
tileTranslatePoint: {}, translatePoint: { previous: map.previousPoint, current: map.translatePoint },
|
|
145
138
|
tileZoomLevel: {}, scale: { previous: map.previousScale, current: map.scale }
|
|
146
139
|
};
|
|
147
140
|
}
|
|
148
141
|
else {
|
|
149
142
|
zoomArgs = {
|
|
150
|
-
cancel: false, name: 'zoom', type: type, maps:
|
|
143
|
+
cancel: false, name: 'zoom', type: type, maps: map,
|
|
151
144
|
tileTranslatePoint: { previous: prevTilePoint, current: map.tileTranslatePoint }, translatePoint: { previous: map.previousPoint, current: map.translatePoint },
|
|
152
145
|
tileZoomLevel: { previous: prevLevel, current: map.tileZoomLevel }, scale: { previous: map.previousScale, current: map.scale }
|
|
153
146
|
};
|
|
@@ -306,11 +299,13 @@ var Zoom = /** @class */ (function () {
|
|
|
306
299
|
*/
|
|
307
300
|
Zoom.prototype.animateTransform = function (element, animate, x, y, scale) {
|
|
308
301
|
var duration = this.currentLayer.animationDuration;
|
|
309
|
-
if (!animate || duration === 0) {
|
|
302
|
+
if (!animate || duration === 0 || this.maps.isTileMap) {
|
|
310
303
|
element.setAttribute('transform', 'scale(' + (scale) + ') translate( ' + x + ' ' + y + ' )');
|
|
311
304
|
return;
|
|
312
305
|
}
|
|
313
|
-
|
|
306
|
+
if (!this.maps.isTileMap) {
|
|
307
|
+
zoomAnimate(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps);
|
|
308
|
+
}
|
|
314
309
|
};
|
|
315
310
|
Zoom.prototype.applyTransform = function (animate) {
|
|
316
311
|
var layerIndex;
|
|
@@ -358,16 +353,18 @@ var Zoom = /** @class */ (function () {
|
|
|
358
353
|
}
|
|
359
354
|
}
|
|
360
355
|
else if (currentEle.id.indexOf('_Markers_Group') > -1) {
|
|
361
|
-
if (!this.isPanning
|
|
356
|
+
if (!this.isPanning) {
|
|
362
357
|
this.markerTranslates(currentEle.childNodes[0], factor, x, y, scale, 'Marker', layerElement, animate);
|
|
363
358
|
}
|
|
364
359
|
currentEle = layerElement.childNodes[j];
|
|
360
|
+
var markerAnimation = void 0;
|
|
365
361
|
if (!isNullOrUndefined(currentEle) && currentEle.id.indexOf('Markers') !== -1) {
|
|
366
362
|
for (var k = 0; k < currentEle.childElementCount; k++) {
|
|
367
363
|
this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, 'Marker', animate);
|
|
368
364
|
var layerIndex_1 = parseInt(currentEle.childNodes[k]['id'].split('_LayerIndex_')[1].split('_')[0], 10);
|
|
369
365
|
var dataIndex = parseInt(currentEle.childNodes[k]['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
370
366
|
var markerIndex = parseInt(currentEle.childNodes[k]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
367
|
+
markerAnimation = this.currentLayer.markerSettings[markerIndex].animationDuration > 0;
|
|
371
368
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
372
369
|
var markerSelectionValues = this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex];
|
|
373
370
|
for (var x_1 = 0; x_1 < this.currentLayer.markerSettings[markerIndex].initialMarkerSelection.length; x_1++) {
|
|
@@ -378,9 +375,17 @@ var Zoom = /** @class */ (function () {
|
|
|
378
375
|
this.maps.markerSelection(this.currentLayer.markerSettings[markerIndex].selectionSettings, this.maps, currentEle.children[k], this.currentLayer.markerSettings[markerIndex].dataSource[dataIndex]);
|
|
379
376
|
}
|
|
380
377
|
}
|
|
381
|
-
if (
|
|
382
|
-
|
|
383
|
-
|
|
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
|
+
}
|
|
384
389
|
}
|
|
385
390
|
}
|
|
386
391
|
if (this.isPanning && this.maps.markerModule.sameMarkerData.length > 0) {
|
|
@@ -477,10 +482,9 @@ var Zoom = /** @class */ (function () {
|
|
|
477
482
|
}
|
|
478
483
|
}
|
|
479
484
|
this.maps.arrangeTemplate();
|
|
480
|
-
var blazor = this.maps.isBlazor ? this.maps.blazorTemplates() : null;
|
|
481
485
|
}
|
|
482
486
|
if (!isNullOrUndefined(this.currentLayer)) {
|
|
483
|
-
if (!animate || this.currentLayer.animationDuration === 0) {
|
|
487
|
+
if (!animate || this.currentLayer.animationDuration === 0 || this.maps.isTileMap) {
|
|
484
488
|
this.processTemplate(x, y, scale, this.maps);
|
|
485
489
|
}
|
|
486
490
|
}
|
|
@@ -532,18 +536,6 @@ var Zoom = /** @class */ (function () {
|
|
|
532
536
|
};
|
|
533
537
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
534
538
|
eventArgs = markerColorChoose(eventArgs, data);
|
|
535
|
-
if (_this.maps.isBlazor) {
|
|
536
|
-
var maps = eventArgs.maps, marker_1 = eventArgs.marker, blazorEventArgs = __rest(eventArgs, ["maps", "marker"]);
|
|
537
|
-
eventArgs = blazorEventArgs;
|
|
538
|
-
var latitudeValue = 'Latitude';
|
|
539
|
-
var longitudeValue = 'Longitude';
|
|
540
|
-
markerSettings.longitudeValuePath = !isNullOrUndefined(markerSettings.longitudeValuePath) ?
|
|
541
|
-
markerSettings.longitudeValuePath : !isNullOrUndefined(data['Longitude']) ? longitudeValue :
|
|
542
|
-
!isNullOrUndefined(data['longitude']) ? 'longitude' : null;
|
|
543
|
-
markerSettings.latitudeValuePath = !isNullOrUndefined(markerSettings.latitudeValuePath) ?
|
|
544
|
-
markerSettings.latitudeValuePath : !isNullOrUndefined(data['Latitude']) ? latitudeValue :
|
|
545
|
-
!isNullOrUndefined(data['latitude']) ? 'latitude' : null;
|
|
546
|
-
}
|
|
547
539
|
_this.maps.trigger('markerRendering', eventArgs, function (MarkerArgs) {
|
|
548
540
|
if (markerSettings.shapeValuePath !== eventArgs.shapeValuePath) {
|
|
549
541
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
@@ -557,22 +549,6 @@ var Zoom = /** @class */ (function () {
|
|
|
557
549
|
var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
558
550
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
559
551
|
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : 0;
|
|
560
|
-
if (_this.maps.isBlazor) {
|
|
561
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
562
|
-
var data1 = {};
|
|
563
|
-
var j = 0;
|
|
564
|
-
var text = [];
|
|
565
|
-
for (var i = 0; i < Object.keys(data).length; i++) {
|
|
566
|
-
if (Object.keys(data)[i].toLowerCase() !== 'text' && Object.keys(data)[i].toLowerCase() !== 'latitude'
|
|
567
|
-
&& Object.keys(data)[i].toLowerCase() !== 'blazortemplateid' && Object.keys(data)[i].toLowerCase() !== 'longitude'
|
|
568
|
-
&& Object.keys(data)[i].toLowerCase() !== 'name') {
|
|
569
|
-
data1['text'] = text;
|
|
570
|
-
text[j] = data[Object.keys(data)[i].toLowerCase()];
|
|
571
|
-
j++;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
data['text'] = data1['text'];
|
|
575
|
-
}
|
|
576
552
|
var offset = markerSettings.offset;
|
|
577
553
|
if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
|
|
578
554
|
var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
@@ -627,7 +603,6 @@ var Zoom = /** @class */ (function () {
|
|
|
627
603
|
*/
|
|
628
604
|
Zoom.prototype.processTemplate = function (x, y, scale, maps) {
|
|
629
605
|
for (var i = 0; i < this.templateCount; i++) {
|
|
630
|
-
this.currentLayer = maps.layersCollection[i];
|
|
631
606
|
var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer);
|
|
632
607
|
var markerTemplateElement = getElementByID(maps.element.id + '_LayerIndex_' +
|
|
633
608
|
i + '_Markers_Template_Group');
|
|
@@ -793,28 +768,6 @@ var Zoom = /** @class */ (function () {
|
|
|
793
768
|
var layer = this.maps.layersCollection[layerIndex];
|
|
794
769
|
var marker = layer.markerSettings[markerIndex];
|
|
795
770
|
if (!isNullOrUndefined(marker) && !isNullOrUndefined(marker.dataSource) && !isNullOrUndefined(marker.dataSource[dataIndex])) {
|
|
796
|
-
if (this.maps.isBlazor) {
|
|
797
|
-
marker.longitudeValuePath = !isNullOrUndefined(marker.longitudeValuePath) ?
|
|
798
|
-
marker.longitudeValuePath : !isNullOrUndefined(marker.dataSource[dataIndex]['Longitude']) ? 'Longitude' :
|
|
799
|
-
!isNullOrUndefined(marker.dataSource[dataIndex]['longitude']) ? 'longitude' : null;
|
|
800
|
-
marker.latitudeValuePath = !isNullOrUndefined(marker.latitudeValuePath) ?
|
|
801
|
-
marker.latitudeValuePath : !isNullOrUndefined(marker.dataSource[dataIndex]['Latitude']) ? 'Latitude' :
|
|
802
|
-
!isNullOrUndefined(marker.dataSource[dataIndex]['latitude']) ? 'latitude' : null;
|
|
803
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
804
|
-
var data1 = {};
|
|
805
|
-
var j = 0;
|
|
806
|
-
var text = [];
|
|
807
|
-
for (var i = 0; i < Object.keys(marker.dataSource[dataIndex]).length; i++) {
|
|
808
|
-
if (Object.keys(marker.dataSource[dataIndex])[i].toLowerCase() !== 'text' && Object.keys(marker.dataSource[dataIndex])[i].toLowerCase() !== 'longitude'
|
|
809
|
-
&& Object.keys(marker.dataSource[dataIndex])[i].toLowerCase() !== 'latitude' && Object.keys(marker.dataSource[dataIndex])[i].toLowerCase() !== 'blazortemplateid'
|
|
810
|
-
&& Object.keys(marker.dataSource[dataIndex])[i].toLowerCase() !== 'name') {
|
|
811
|
-
data1['text'] = text;
|
|
812
|
-
text[j] = marker.dataSource[dataIndex][Object.keys(marker.dataSource[dataIndex])[i].toLowerCase()];
|
|
813
|
-
j++;
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
marker.dataSource[dataIndex]['text'] = data1['text'];
|
|
817
|
-
}
|
|
818
771
|
var lng = (!isNullOrUndefined(marker.longitudeValuePath)) ?
|
|
819
772
|
Number(getValueFromObject(marker.dataSource[dataIndex], marker.longitudeValuePath)) :
|
|
820
773
|
!isNullOrUndefined(marker.dataSource[dataIndex]['longitude']) ? parseFloat(marker.dataSource[dataIndex]['longitude']) :
|
|
@@ -852,9 +805,20 @@ var Zoom = /** @class */ (function () {
|
|
|
852
805
|
}
|
|
853
806
|
else {
|
|
854
807
|
if (type === 'Template') {
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
808
|
+
if (duration > 0) {
|
|
809
|
+
location_2.x = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - location_2.x)) * scale);
|
|
810
|
+
location_2.y = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - location_2.y)) * scale);
|
|
811
|
+
var layerOffset = getElementByID(this.maps.element.id + '_Layer_Collections').getBoundingClientRect();
|
|
812
|
+
var elementOffset = element.parentElement.getBoundingClientRect();
|
|
813
|
+
element.style.left = (((location_2.x) + (layerOffset.left - elementOffset.left)) + marker.offset.x) + 'px';
|
|
814
|
+
element.style.top = (((location_2.y) + (layerOffset.top - elementOffset.top)) + marker.offset.y) + 'px';
|
|
815
|
+
element.style.transform = 'translate(-50%, -50%)';
|
|
816
|
+
}
|
|
817
|
+
else {
|
|
818
|
+
var elementOffset = element.getBoundingClientRect();
|
|
819
|
+
element.style.left = ((location_2.x + x) * scale) + marker.offset.x - this.maps.mapAreaRect.x - (elementOffset.width / 2) + 'px';
|
|
820
|
+
element.style.top = ((location_2.y + y) * scale) + marker.offset.y - this.maps.mapAreaRect.y - (elementOffset.height / 2) + 'px';
|
|
821
|
+
}
|
|
858
822
|
}
|
|
859
823
|
else {
|
|
860
824
|
location_2.x = (((location_2.x + x) * scale) + marker.offset.x);
|
|
@@ -869,6 +833,20 @@ var Zoom = /** @class */ (function () {
|
|
|
869
833
|
}
|
|
870
834
|
}
|
|
871
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
|
+
};
|
|
872
850
|
Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
|
|
873
851
|
var map = this.maps;
|
|
874
852
|
var panArgs;
|
|
@@ -898,7 +876,7 @@ var Zoom = /** @class */ (function () {
|
|
|
898
876
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
899
877
|
var location_3 = this.maps.getGeoLocation(this.maps.layersCollection.length - 1, mouseLocation['layerX'], mouseLocation['layerY']);
|
|
900
878
|
panArgs = {
|
|
901
|
-
cancel: false, name: pan, maps:
|
|
879
|
+
cancel: false, name: pan, maps: map,
|
|
902
880
|
tileTranslatePoint: {}, translatePoint: { previous: translatePoint, current: new Point(x, y) },
|
|
903
881
|
scale: map.scale, tileZoomLevel: map.tileZoomLevel, latitude: location_3['latitude'], longitude: location_3['longitude']
|
|
904
882
|
};
|
|
@@ -935,7 +913,7 @@ var Zoom = /** @class */ (function () {
|
|
|
935
913
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
936
914
|
var location_4 = this.maps.getTileGeoLocation(mouseLocation['layerX'], mouseLocation['layerY']);
|
|
937
915
|
panArgs = {
|
|
938
|
-
cancel: false, name: pan, maps:
|
|
916
|
+
cancel: false, name: pan, maps: map,
|
|
939
917
|
tileTranslatePoint: { previous: prevTilePoint, current: map.tileTranslatePoint },
|
|
940
918
|
translatePoint: { previous: translatePoint, current: map.translatePoint }, scale: map.scale,
|
|
941
919
|
tileZoomLevel: map.tileZoomLevel, latitude: location_4['latitude'], longitude: location_4['longitude']
|
|
@@ -1002,45 +980,49 @@ var Zoom = /** @class */ (function () {
|
|
|
1002
980
|
var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
1003
981
|
map.scale = Math.pow(2, tileZoomFactor - 1);
|
|
1004
982
|
map.tileZoomLevel = tileZoomFactor;
|
|
1005
|
-
map.
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
map.
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type);
|
|
1016
|
-
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
1017
|
-
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
1018
|
-
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
1019
|
-
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
1020
|
-
}
|
|
1021
|
-
if (document.querySelector('.GroupElement')) {
|
|
1022
|
-
document.querySelector('.GroupElement').style.display = 'none';
|
|
1023
|
-
}
|
|
1024
|
-
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
1025
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
1026
|
-
setTimeout(function () {
|
|
1027
|
-
if (type === 'ZoomOut' || type === 'Reset') {
|
|
1028
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
1029
|
-
// 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;
|
|
1030
993
|
}
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
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';
|
|
999
|
+
}
|
|
1000
|
+
if (document.querySelector('.GroupElement')) {
|
|
1001
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
1034
1002
|
}
|
|
1035
|
-
|
|
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;
|
|
1036
1019
|
}
|
|
1037
|
-
this.maps.zoomNotApplied = false;
|
|
1038
1020
|
};
|
|
1039
1021
|
Zoom.prototype.createZoomingToolbars = function () {
|
|
1040
1022
|
var map = this.maps;
|
|
1041
1023
|
this.toolBarGroup = map.renderer.createGroup({
|
|
1042
1024
|
id: map.element.id + '_Zooming_KitCollection',
|
|
1043
|
-
opacity: 0.3
|
|
1025
|
+
opacity: map.theme.toLowerCase() === 'fluentuidark' ? 0.6 : 0.3
|
|
1044
1026
|
});
|
|
1045
1027
|
var kitHeight = 16;
|
|
1046
1028
|
var kitWidth = 16;
|
|
@@ -1449,14 +1431,14 @@ var Zoom = /** @class */ (function () {
|
|
|
1449
1431
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
1450
1432
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
1451
1433
|
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
1452
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '0.3');
|
|
1453
|
-
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');
|
|
1454
1436
|
}
|
|
1455
1437
|
}
|
|
1456
1438
|
}
|
|
1457
1439
|
}
|
|
1458
1440
|
else {
|
|
1459
|
-
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');
|
|
1460
1442
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
1461
1443
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
1462
1444
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|
package/src/maps/utils/enum.d.ts
CHANGED
|
@@ -36,7 +36,11 @@ export declare type MapsTheme =
|
|
|
36
36
|
/** Renders a map with Tailwind theme. */
|
|
37
37
|
'Tailwind' |
|
|
38
38
|
/** Renders a map with TailwindDark theme. */
|
|
39
|
-
'TailwindDark'
|
|
39
|
+
'TailwindDark' |
|
|
40
|
+
/** Renders a map with Bootstrap5 theme. */
|
|
41
|
+
'Bootstrap5' |
|
|
42
|
+
/** Render a map with Bootstrap5 dark theme. */
|
|
43
|
+
'Bootstrap5Dark';
|
|
40
44
|
/**
|
|
41
45
|
* Defines the position of the legend.
|
|
42
46
|
*/
|
|
@@ -241,7 +245,9 @@ export declare type LegendShape =
|
|
|
241
245
|
/** Specifies the legend shape as a pentagon. */
|
|
242
246
|
'Pentagon' |
|
|
243
247
|
/** Specifies the legend shape as a inverted triangle. */
|
|
244
|
-
'InvertedTriangle'
|
|
248
|
+
'InvertedTriangle' |
|
|
249
|
+
/** Specifies to render the marker shape as balloon on maps. */
|
|
250
|
+
'Balloon';
|
|
245
251
|
/**
|
|
246
252
|
* Defines the legend arrangement in the maps component.
|
|
247
253
|
*/
|
|
@@ -31,7 +31,7 @@ export declare function stringToNumber(value: string, containerSize: number): nu
|
|
|
31
31
|
* @param {Maps} maps Specifies the maps instance
|
|
32
32
|
* @returns {void}
|
|
33
33
|
*/
|
|
34
|
-
export declare function calculateSize(maps: Maps):
|
|
34
|
+
export declare function calculateSize(maps: Maps): Size;
|
|
35
35
|
/**
|
|
36
36
|
* Method to create svg for maps.
|
|
37
37
|
*
|
|
@@ -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
|
|
@@ -677,7 +678,7 @@ export declare function drawStar(maps: Maps, options: PathOption, size: Size, lo
|
|
|
677
678
|
* @returns {Element} - Returns the element
|
|
678
679
|
* @private
|
|
679
680
|
*/
|
|
680
|
-
export declare function drawBalloon(maps: Maps, options: PathOption, size: Size, location: MapLocation, element?: Element): Element;
|
|
681
|
+
export declare function drawBalloon(maps: Maps, options: PathOption, size: Size, location: MapLocation, type: string, element?: Element): Element;
|
|
681
682
|
/**
|
|
682
683
|
* Internal rendering of Pattern
|
|
683
684
|
*
|
|
@@ -740,9 +741,10 @@ 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
|
-
export declare function findMidPointOfPolygon(points: MapLocation[], type: string): any;
|
|
747
|
+
export declare function findMidPointOfPolygon(points: MapLocation[], type: string, geometryType?: string): any;
|
|
746
748
|
/**
|
|
747
749
|
* Check custom path
|
|
748
750
|
*
|