@syncfusion/ej2-maps 20.3.49 → 20.3.56
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 +12 -1
- 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 +226 -170
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +226 -170
- 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/data-label.js +8 -2
- package/src/maps/layers/layer-panel.js +21 -19
- package/src/maps/layers/legend.js +11 -6
- package/src/maps/layers/marker.js +11 -10
- package/src/maps/layers/navigation-selected-line.js +40 -42
- package/src/maps/maps.d.ts +2 -0
- package/src/maps/maps.js +41 -38
- package/src/maps/model/base.js +1 -1
- package/src/maps/user-interaction/annotation.js +2 -1
- package/src/maps/user-interaction/highlight.js +34 -11
- package/src/maps/user-interaction/tooltip.js +3 -3
- package/src/maps/user-interaction/zoom.js +33 -23
- package/src/maps/utils/helper.js +21 -15
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -667,9 +667,9 @@ function renderTextElement(option, style, color, parent, isMinus) {
|
|
|
667
667
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
668
668
|
function convertElement(element, markerId, data, index, mapObj) {
|
|
669
669
|
var childElement = createElement('div', {
|
|
670
|
-
id: markerId
|
|
671
|
-
styles: 'position: absolute;pointer-events: auto;'
|
|
670
|
+
id: markerId
|
|
672
671
|
});
|
|
672
|
+
childElement.style.cssText = 'position: absolute;pointer-events: auto;';
|
|
673
673
|
var elementLength = element.length;
|
|
674
674
|
while (elementLength > 0) {
|
|
675
675
|
childElement.appendChild(element[0]);
|
|
@@ -755,11 +755,12 @@ function convertElementFromLabel(element, labelId, data, index, mapObj) {
|
|
|
755
755
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
756
756
|
templateHtml = templateHtml.replace(new RegExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
|
|
757
757
|
}
|
|
758
|
-
|
|
758
|
+
var templateEle = createElement('div', {
|
|
759
759
|
id: labelId,
|
|
760
|
-
innerHTML: templateHtml
|
|
761
|
-
styles: 'position: absolute'
|
|
760
|
+
innerHTML: templateHtml
|
|
762
761
|
});
|
|
762
|
+
templateEle.style.position = 'absolute';
|
|
763
|
+
return templateEle;
|
|
763
764
|
}
|
|
764
765
|
/**
|
|
765
766
|
*
|
|
@@ -2160,7 +2161,7 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2160
2161
|
mapObject.zoomSettings.zoomFactor ===
|
|
2161
2162
|
mapObject.mapScaleValue ? mapObject.zoomSettings.zoomFactor :
|
|
2162
2163
|
mapObject.zoomSettings.zoomFactor !== mapObject.mapScaleValue && !mapObject.centerPositionChanged ? mapObject.mapScaleValue : mapObject.zoomSettings.zoomFactor;
|
|
2163
|
-
if (mapObject.zoomSettings.shouldZoomInitially) {
|
|
2164
|
+
if (mapObject.zoomSettings.shouldZoomInitially && !mapObject.isZoomByPosition) {
|
|
2164
2165
|
mapObject.mapScaleValue = zoomFactorValue = scaleFactor = ((mapObject.enablePersistence || mapObject.zoomSettings.shouldZoomInitially) && mapObject.scale === 1)
|
|
2165
2166
|
? mapObject.scale : (isNullOrUndefined(mapObject.markerZoomFactor)) ? mapObject.mapScaleValue : mapObject.markerZoomFactor;
|
|
2166
2167
|
zoomFactorValue = mapObject.mapScaleValue;
|
|
@@ -2194,6 +2195,10 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2194
2195
|
y = -point.y + topPosition;
|
|
2195
2196
|
}
|
|
2196
2197
|
else {
|
|
2198
|
+
if (mapObject.isZoomByPosition) {
|
|
2199
|
+
mapObject.zoomTranslatePoint.x = -point.x + leftPosition;
|
|
2200
|
+
mapObject.zoomTranslatePoint.y = -point.y + topPosition;
|
|
2201
|
+
}
|
|
2197
2202
|
x = mapObject.zoomTranslatePoint.x;
|
|
2198
2203
|
y = mapObject.zoomTranslatePoint.y;
|
|
2199
2204
|
zoomFactorValue = zoomFactor;
|
|
@@ -2401,7 +2406,7 @@ function triggerShapeEvent(targetId, selection, maps, eventName) {
|
|
|
2401
2406
|
target: targetId,
|
|
2402
2407
|
maps: maps
|
|
2403
2408
|
};
|
|
2404
|
-
maps.trigger(eventName, eventArgs, function (
|
|
2409
|
+
maps.trigger(eventName, eventArgs, function () {
|
|
2405
2410
|
eventArgs.border.opacity = isNullOrUndefined(eventArgs.border.opacity) ? eventArgs.opacity : eventArgs.border.opacity;
|
|
2406
2411
|
});
|
|
2407
2412
|
return eventArgs;
|
|
@@ -2629,11 +2634,11 @@ function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element, isTou
|
|
|
2629
2634
|
}
|
|
2630
2635
|
if (!tooltip) {
|
|
2631
2636
|
tooltip = createElement('div', {
|
|
2632
|
-
id: id
|
|
2633
|
-
styles: 'background-color: rgb(255, 255, 255) !important; color:black !important; ' +
|
|
2634
|
-
'position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;' +
|
|
2635
|
-
'font-size:12px; font-family: "Segoe UI"; text-align:center'
|
|
2637
|
+
id: id
|
|
2636
2638
|
});
|
|
2639
|
+
tooltip.style.cssText = 'background-color: rgb(255, 255, 255) !important; color:black !important; ' +
|
|
2640
|
+
'position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;' +
|
|
2641
|
+
'font-size:12px; font-family: "Segoe UI"; text-align:center';
|
|
2637
2642
|
}
|
|
2638
2643
|
if (x < (areaWidth - width)) {
|
|
2639
2644
|
// eslint-disable-next-line no-self-assign
|
|
@@ -2731,13 +2736,14 @@ function createTooltip(id, text, top, left, fontSize) {
|
|
|
2731
2736
|
'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
|
|
2732
2737
|
if (!tooltip) {
|
|
2733
2738
|
tooltip = createElement('div', {
|
|
2734
|
-
id: id, innerHTML: ' ' + text + ' '
|
|
2739
|
+
id: id, innerHTML: ' ' + text + ' '
|
|
2735
2740
|
});
|
|
2741
|
+
tooltip.style.cssText = style;
|
|
2736
2742
|
document.body.appendChild(tooltip);
|
|
2737
2743
|
}
|
|
2738
2744
|
else {
|
|
2739
|
-
tooltip.
|
|
2740
|
-
tooltip.
|
|
2745
|
+
tooltip.innerHTML = ' ' + text + ' ';
|
|
2746
|
+
tooltip.style.cssText = style;
|
|
2741
2747
|
}
|
|
2742
2748
|
}
|
|
2743
2749
|
/**
|
|
@@ -3134,7 +3140,7 @@ function animate(element, delay, duration, process, end) {
|
|
|
3134
3140
|
end.call(_this, { element: element });
|
|
3135
3141
|
if (element.id.indexOf('Marker') > -1) {
|
|
3136
3142
|
var markerElement = getElementByID(element.id.split('_Layer')[0] + '_Markers_Group');
|
|
3137
|
-
markerElement.
|
|
3143
|
+
markerElement.style.cssText = markerStyle;
|
|
3138
3144
|
}
|
|
3139
3145
|
}
|
|
3140
3146
|
};
|
|
@@ -4405,7 +4411,7 @@ var ZoomSettings = /** @__PURE__ @class */ (function (_super) {
|
|
|
4405
4411
|
Property(false)
|
|
4406
4412
|
], ZoomSettings.prototype, "doubleClickZoom", void 0);
|
|
4407
4413
|
__decorate$1([
|
|
4408
|
-
Property(
|
|
4414
|
+
Property(true)
|
|
4409
4415
|
], ZoomSettings.prototype, "pinchZooming", void 0);
|
|
4410
4416
|
__decorate$1([
|
|
4411
4417
|
Property(false)
|
|
@@ -4881,18 +4887,18 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
4881
4887
|
var currentLayer = maps.layersCollection[layerIndex];
|
|
4882
4888
|
this.markerSVGObject = maps.renderer.createGroup({
|
|
4883
4889
|
id: maps.element.id + '_Markers_Group',
|
|
4884
|
-
class: 'GroupElement'
|
|
4885
|
-
style: 'pointer-events: auto;'
|
|
4890
|
+
class: 'GroupElement'
|
|
4886
4891
|
});
|
|
4892
|
+
this.markerSVGObject.style.pointerEvents = 'auto';
|
|
4887
4893
|
var markerTemplateEle = createElement('div', {
|
|
4888
4894
|
id: maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
|
|
4889
|
-
className: maps.element.id + '_template'
|
|
4890
|
-
styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
|
|
4891
|
-
'top:' + maps.mapAreaRect.y + 'px;' +
|
|
4892
|
-
'left:' + maps.mapAreaRect.x + 'px;' +
|
|
4893
|
-
'height:' + maps.mapAreaRect.height + 'px;' +
|
|
4894
|
-
'width:' + maps.mapAreaRect.width + 'px;'
|
|
4895
|
+
className: maps.element.id + '_template'
|
|
4895
4896
|
});
|
|
4897
|
+
markerTemplateEle.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
|
|
4898
|
+
'top:' + maps.mapAreaRect.y + 'px;' +
|
|
4899
|
+
'left:' + maps.mapAreaRect.x + 'px;' +
|
|
4900
|
+
'height:' + maps.mapAreaRect.height + 'px;' +
|
|
4901
|
+
'width:' + maps.mapAreaRect.width + 'px;';
|
|
4896
4902
|
currentLayer.markerSettings.map(function (markerSettings, markerIndex) {
|
|
4897
4903
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4898
4904
|
var markerData = markerSettings.dataSource;
|
|
@@ -5109,7 +5115,8 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5109
5115
|
}
|
|
5110
5116
|
if (this.maps.isTileMap && !this.maps.enablePersistence
|
|
5111
5117
|
&& this.maps.mapScaleValue <= 1) {
|
|
5112
|
-
this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ?
|
|
5118
|
+
this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ? (this.maps.isZoomByPosition ? this.maps.tileZoomLevel : 1)
|
|
5119
|
+
: this.maps.mapScaleValue;
|
|
5113
5120
|
if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1) {
|
|
5114
5121
|
this.maps.tileTranslatePoint.x = 0;
|
|
5115
5122
|
this.maps.tileTranslatePoint.y = 0;
|
|
@@ -5257,7 +5264,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5257
5264
|
}
|
|
5258
5265
|
var options = this.getMarker(targetId);
|
|
5259
5266
|
if (this.maps.markerClusterExpand) {
|
|
5260
|
-
e.target.
|
|
5267
|
+
e.target.style.cursor = 'pointer';
|
|
5261
5268
|
}
|
|
5262
5269
|
if (isNullOrUndefined(options)) {
|
|
5263
5270
|
return;
|
|
@@ -5778,10 +5785,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5778
5785
|
height: areaRect.height
|
|
5779
5786
|
});
|
|
5780
5787
|
var parentElement = createElement('div', {
|
|
5781
|
-
id: this.mapObject.element.id + '_Tile_SVG_Parent'
|
|
5782
|
-
(areaRect.height) + 'px; width: '
|
|
5783
|
-
+ (areaRect.width) + 'px;'
|
|
5788
|
+
id: this.mapObject.element.id + '_Tile_SVG_Parent'
|
|
5784
5789
|
});
|
|
5790
|
+
parentElement.style.cssText = 'position: absolute; height: ' + (areaRect.height) + 'px; width: ' +
|
|
5791
|
+
(areaRect.width) + 'px;';
|
|
5785
5792
|
parentElement.appendChild(this.tileSvgObject);
|
|
5786
5793
|
secondaryEle.appendChild(parentElement);
|
|
5787
5794
|
}
|
|
@@ -5835,13 +5842,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5835
5842
|
(!isNullOrUndefined(panel.mapObject.tileZoomLevel) && panel.mapObject.tileZoomLevel !== 1)) ?
|
|
5836
5843
|
false : true;
|
|
5837
5844
|
if (isNullOrUndefined(panel.mapObject.previousCenterLatitude) &&
|
|
5838
|
-
isNullOrUndefined(panel.mapObject.previousCenterLongitude)) {
|
|
5845
|
+
isNullOrUndefined(panel.mapObject.previousCenterLongitude) && !panel.mapObject.isZoomByPosition) {
|
|
5839
5846
|
panel.mapObject.previousCenterLatitude = panel.mapObject.centerPosition.latitude;
|
|
5840
5847
|
panel.mapObject.previousCenterLongitude = panel.mapObject.centerPosition.longitude;
|
|
5841
5848
|
}
|
|
5842
|
-
else if (panel.mapObject.previousCenterLatitude !==
|
|
5849
|
+
else if ((panel.mapObject.previousCenterLatitude !==
|
|
5843
5850
|
panel.mapObject.centerPosition.latitude && panel.mapObject.previousCenterLongitude !==
|
|
5844
|
-
panel.mapObject.centerPosition.longitude) {
|
|
5851
|
+
panel.mapObject.centerPosition.longitude) || panel.mapObject.isZoomByPosition) {
|
|
5845
5852
|
panel.mapObject.centerPositionChanged = true;
|
|
5846
5853
|
panel.mapObject.previousCenterLatitude = panel.mapObject.centerPosition.latitude;
|
|
5847
5854
|
panel.mapObject.previousCenterLongitude = panel.mapObject.centerPosition.longitude;
|
|
@@ -5853,7 +5860,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5853
5860
|
var centerTileMap = center;
|
|
5854
5861
|
if ((this.mapObject.isTileMap && panel.mapObject.markerModule) && panel.mapObject.zoomSettings.enable) {
|
|
5855
5862
|
panel.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);
|
|
5856
|
-
if (!isNullOrUndefined(this.mapObject.markerCenterLatitude) && !isNullOrUndefined(this.mapObject.markerCenterLongitude)
|
|
5863
|
+
if (!isNullOrUndefined(this.mapObject.markerCenterLatitude) && !isNullOrUndefined(this.mapObject.markerCenterLongitude)
|
|
5864
|
+
&& !panel.mapObject.isZoomByPosition) {
|
|
5857
5865
|
centerTileMap = new Point(panel.mapObject.markerCenterLongitude, panel.mapObject.markerCenterLatitude);
|
|
5858
5866
|
}
|
|
5859
5867
|
}
|
|
@@ -5869,7 +5877,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5869
5877
|
else {
|
|
5870
5878
|
center = { x: null, y: null };
|
|
5871
5879
|
}
|
|
5872
|
-
var zoomFactorValue = panel.mapObject.zoomSettings.shouldZoomInitially ?
|
|
5880
|
+
var zoomFactorValue = (panel.mapObject.zoomSettings.shouldZoomInitially && !panel.mapObject.isZoomByPosition) ?
|
|
5873
5881
|
isNullOrUndefined(panel.mapObject.markerZoomFactor) ? 1 :
|
|
5874
5882
|
panel.mapObject.markerZoomFactor : panel.mapObject.zoomSettings.zoomFactor;
|
|
5875
5883
|
zoomFactorValue = (panel.mapObject.enablePersistence) ? ((isNullOrUndefined(panel.mapObject.mapScaleValue))
|
|
@@ -6125,13 +6133,13 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6125
6133
|
var colors = shapeSettings.palette.length > 1 ? shapeSettings.palette : getShapeColor(this.mapObject.theme);
|
|
6126
6134
|
var labelTemplateEle = createElement('div', {
|
|
6127
6135
|
id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_Label_Template_Group',
|
|
6128
|
-
className: this.mapObject.element.id + '_template'
|
|
6129
|
-
styles: 'pointer-events: none; overflow: hidden; position: absolute;' +
|
|
6130
|
-
'top:' + this.mapObject.mapAreaRect.y + 'px;' +
|
|
6131
|
-
'left:' + this.mapObject.mapAreaRect.x + 'px;' +
|
|
6132
|
-
'height:' + this.mapObject.mapAreaRect.height + 'px;' +
|
|
6133
|
-
'width:' + this.mapObject.mapAreaRect.width + 'px;'
|
|
6136
|
+
className: this.mapObject.element.id + '_template'
|
|
6134
6137
|
});
|
|
6138
|
+
labelTemplateEle.style.cssText = 'pointer-events: none; overflow: hidden; position: absolute;' +
|
|
6139
|
+
'top:' + this.mapObject.mapAreaRect.y + 'px;' +
|
|
6140
|
+
'left:' + this.mapObject.mapAreaRect.x + 'px;' +
|
|
6141
|
+
'height:' + this.mapObject.mapAreaRect.height + 'px;' +
|
|
6142
|
+
'width:' + this.mapObject.mapAreaRect.width + 'px;';
|
|
6135
6143
|
if (this.currentLayer.layerData.length !== 0) {
|
|
6136
6144
|
var _loop_1 = function (i) {
|
|
6137
6145
|
var k = void 0;
|
|
@@ -6363,10 +6371,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6363
6371
|
}
|
|
6364
6372
|
pathEle.setAttribute('aria-label', ((!isNullOrUndefined(currentShapeData['property'])) ?
|
|
6365
6373
|
(currentShapeData['property'][properties]) : ''));
|
|
6366
|
-
pathEle.
|
|
6374
|
+
pathEle.tabIndex = this.mapObject.tabIndex + index + 3;
|
|
6367
6375
|
pathEle.setAttribute('role', '');
|
|
6368
6376
|
if (drawingType === 'LineString' || drawingType === 'MultiLineString') {
|
|
6369
|
-
pathEle.
|
|
6377
|
+
pathEle.style.cssText = 'outline:none';
|
|
6370
6378
|
}
|
|
6371
6379
|
maintainSelection(this.mapObject.selectedElementId, this.mapObject.shapeSelectionClass, pathEle, 'ShapeselectionMapStyle');
|
|
6372
6380
|
if (this.mapObject.toggledShapeElementId) {
|
|
@@ -6425,9 +6433,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6425
6433
|
this.mapObject.markerModule.calculateZoomCenterPositionAndFactor(this.mapObject.layersCollection);
|
|
6426
6434
|
}
|
|
6427
6435
|
var group = (this.mapObject.renderer.createGroup({
|
|
6428
|
-
id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_dataLableIndex_Group'
|
|
6429
|
-
style: 'pointer-events: none;'
|
|
6436
|
+
id: this.mapObject.element.id + '_LayerIndex_' + layerIndex + '_dataLableIndex_Group'
|
|
6430
6437
|
}));
|
|
6438
|
+
group.style.pointerEvents = 'none';
|
|
6431
6439
|
if (this.mapObject.dataLabelModule && this.currentLayer.dataLabelSettings.visible) {
|
|
6432
6440
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6433
6441
|
var intersect_1 = [];
|
|
@@ -6949,7 +6957,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6949
6957
|
}
|
|
6950
6958
|
}
|
|
6951
6959
|
}
|
|
6952
|
-
if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset
|
|
6960
|
+
if (this.mapObject.previousScale !== this.mapObject.scale || this.mapObject.isReset || this.mapObject.isZoomByPosition
|
|
6961
|
+
|| this.mapObject.zoomNotApplied) {
|
|
6953
6962
|
this.arrangeTiles(zoomType, this.animateToZoomX, this.animateToZoomY);
|
|
6954
6963
|
}
|
|
6955
6964
|
};
|
|
@@ -7237,8 +7246,9 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7237
7246
|
var availSize = map.availableSize;
|
|
7238
7247
|
var id = map.element.id + '_Annotation_' + annotationIndex;
|
|
7239
7248
|
var childElement = createElement('div', {
|
|
7240
|
-
id: map.element.id + '_Annotation_' + annotationIndex
|
|
7249
|
+
id: map.element.id + '_Annotation_' + annotationIndex
|
|
7241
7250
|
});
|
|
7251
|
+
childElement.style.cssText = 'position: absolute; z-index:' + annotation.zIndex + ';';
|
|
7242
7252
|
var argsData = {
|
|
7243
7253
|
cancel: false, name: annotationRendering, content: annotation.content,
|
|
7244
7254
|
annotation: annotation
|
|
@@ -7784,7 +7794,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7784
7794
|
}
|
|
7785
7795
|
}
|
|
7786
7796
|
this.zoomingChange();
|
|
7787
|
-
this.
|
|
7797
|
+
if (!this.isZoomByPosition && !this.zoomNotApplied) {
|
|
7798
|
+
this.trigger(loaded, { maps: this, isResized: this.isResize });
|
|
7799
|
+
}
|
|
7788
7800
|
this.isResize = false;
|
|
7789
7801
|
};
|
|
7790
7802
|
/**
|
|
@@ -7878,7 +7890,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7878
7890
|
Maps.prototype.addTabIndex = function () {
|
|
7879
7891
|
this.element.setAttribute('aria-label', this.description || 'Maps Element');
|
|
7880
7892
|
this.element.setAttribute('role', '');
|
|
7881
|
-
this.element.
|
|
7893
|
+
this.element.tabIndex = this.tabIndex;
|
|
7882
7894
|
};
|
|
7883
7895
|
// private setSecondaryElementPosition(): void {
|
|
7884
7896
|
// if (!this.isTileMap) {
|
|
@@ -7941,7 +7953,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7941
7953
|
}
|
|
7942
7954
|
}
|
|
7943
7955
|
}
|
|
7944
|
-
if (this.zoomModule && (this.previousScale !== this.scale)) {
|
|
7956
|
+
if (this.zoomModule && ((this.previousScale !== this.scale) || this.zoomNotApplied || this.isZoomByPosition)) {
|
|
7945
7957
|
this.zoomModule.applyTransform(this, true);
|
|
7946
7958
|
}
|
|
7947
7959
|
}
|
|
@@ -7949,9 +7961,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7949
7961
|
Maps.prototype.createSecondaryElement = function () {
|
|
7950
7962
|
if (isNullOrUndefined(document.getElementById(this.element.id + '_Secondary_Element'))) {
|
|
7951
7963
|
var secondaryElement = createElement('div', {
|
|
7952
|
-
id: this.element.id + '_Secondary_Element'
|
|
7953
|
-
styles: 'position: absolute;z-index:2;'
|
|
7964
|
+
id: this.element.id + '_Secondary_Element'
|
|
7954
7965
|
});
|
|
7966
|
+
secondaryElement.style.cssText = 'position: absolute;z-index:2;';
|
|
7955
7967
|
this.element.appendChild(secondaryElement);
|
|
7956
7968
|
}
|
|
7957
7969
|
};
|
|
@@ -8005,18 +8017,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8005
8017
|
removeElement(this.element.id + '_tiles');
|
|
8006
8018
|
removeElement('animated_tiles');
|
|
8007
8019
|
var ele = createElement('div', {
|
|
8008
|
-
id: this.element.id + '_tile_parent'
|
|
8009
|
-
(this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
|
|
8010
|
-
+ (this.mapAreaRect.y + padding) + 'px; height: ' +
|
|
8011
|
-
(this.mapAreaRect.height) + 'px; width: '
|
|
8012
|
-
+ (this.mapAreaRect.width) + 'px; overflow: hidden;'
|
|
8020
|
+
id: this.element.id + '_tile_parent'
|
|
8013
8021
|
});
|
|
8022
|
+
ele.style.cssText = 'position: absolute; left: ' +
|
|
8023
|
+
(this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
|
|
8024
|
+
+ (this.mapAreaRect.y + padding) + 'px; height: ' +
|
|
8025
|
+
(this.mapAreaRect.height) + 'px; width: '
|
|
8026
|
+
+ (this.mapAreaRect.width) + 'px; overflow: hidden;';
|
|
8014
8027
|
var ele1 = createElement('div', {
|
|
8015
|
-
id: this.element.id + '_tiles'
|
|
8016
|
-
(this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
|
|
8017
|
-
+ (this.mapAreaRect.y + padding) + 'px; height: ' + (this.mapAreaRect.height) + 'px; width: '
|
|
8018
|
-
+ (this.mapAreaRect.width) + 'px; overflow: hidden;'
|
|
8028
|
+
id: this.element.id + '_tiles'
|
|
8019
8029
|
});
|
|
8030
|
+
ele1.style.cssText = 'position: absolute; left: ' +
|
|
8031
|
+
(this.mapAreaRect.x) + 'px; right: ' + (this.margin.right) + 'px; top: '
|
|
8032
|
+
+ (this.mapAreaRect.y + padding) + 'px; height: ' + (this.mapAreaRect.height) + 'px; width: '
|
|
8033
|
+
+ (this.mapAreaRect.width) + 'px; overflow: hidden;';
|
|
8020
8034
|
this.element.appendChild(ele);
|
|
8021
8035
|
this.element.appendChild(ele1);
|
|
8022
8036
|
}
|
|
@@ -8500,9 +8514,6 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8500
8514
|
var markerModule = this.markerModule;
|
|
8501
8515
|
if (element.id.indexOf('shapeIndex') > -1 || element.id.indexOf('Tile') > -1) {
|
|
8502
8516
|
this.mergeCluster();
|
|
8503
|
-
if (element.id.indexOf('shapeIndex') > -1) {
|
|
8504
|
-
this.triggerShapeSelection(element);
|
|
8505
|
-
}
|
|
8506
8517
|
}
|
|
8507
8518
|
if (markerModule) {
|
|
8508
8519
|
markerModule.markerClick(e);
|
|
@@ -8683,32 +8694,30 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8683
8694
|
* @returns {void}
|
|
8684
8695
|
*/
|
|
8685
8696
|
Maps.prototype.zoomByPosition = function (centerPosition, zoomFactor) {
|
|
8686
|
-
|
|
8687
|
-
var
|
|
8688
|
-
var size = this.mapAreaRect;
|
|
8697
|
+
this.zoomNotApplied = false;
|
|
8698
|
+
var isRefresh = this.zoomSettings.zoomFactor == zoomFactor;
|
|
8689
8699
|
if (!this.isTileMap && this.zoomModule) {
|
|
8690
8700
|
if (!isNullOrUndefined(centerPosition)) {
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
var x = this.translatePoint.x + xDiff;
|
|
8697
|
-
var y = this.translatePoint.y + yDiff;
|
|
8698
|
-
this.scale = zoomFactor;
|
|
8699
|
-
this.translatePoint.x = ((mapRect.left < svgRect.left ? x : 0) + (size.width / 2) - (position.x * zoomFactor)) / zoomFactor;
|
|
8700
|
-
this.translatePoint.y = ((mapRect.top < svgRect.top ? y : 0) + (size.height / 2) - (position.y * zoomFactor)) / zoomFactor;
|
|
8701
|
-
this.zoomModule.applyTransform(this);
|
|
8701
|
+
this.zoomSettings.zoomFactor = zoomFactor;
|
|
8702
|
+
isRefresh = this.centerPosition.latitude === centerPosition.latitude && this.centerPosition.longitude === centerPosition.longitude ? true : isRefresh;
|
|
8703
|
+
this.centerPosition = centerPosition;
|
|
8704
|
+
this.isZoomByPosition = true;
|
|
8705
|
+
this.mapScaleValue = null;
|
|
8702
8706
|
}
|
|
8703
8707
|
else {
|
|
8704
|
-
|
|
8705
|
-
this.
|
|
8708
|
+
this.zoomSettings.zoomFactor = zoomFactor;
|
|
8709
|
+
this.isZoomByPosition = true;
|
|
8710
|
+
this.mapScaleValue = null;
|
|
8706
8711
|
}
|
|
8707
8712
|
}
|
|
8708
8713
|
else if (this.zoomModule) {
|
|
8709
|
-
this.tileZoomLevel = zoomFactor;
|
|
8710
|
-
|
|
8711
|
-
this.
|
|
8714
|
+
this.tileZoomLevel = this.zoomSettings.zoomFactor = zoomFactor;
|
|
8715
|
+
isRefresh = this.centerPosition.latitude === centerPosition.latitude && this.centerPosition.longitude === centerPosition.longitude ? true : isRefresh;
|
|
8716
|
+
this.centerPosition = centerPosition;
|
|
8717
|
+
this.isZoomByPosition = true;
|
|
8718
|
+
}
|
|
8719
|
+
if (isRefresh) {
|
|
8720
|
+
this.refresh();
|
|
8712
8721
|
}
|
|
8713
8722
|
};
|
|
8714
8723
|
/**
|
|
@@ -8901,6 +8910,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8901
8910
|
var centerLatitude;
|
|
8902
8911
|
var centerLongtitude;
|
|
8903
8912
|
var isTwoCoordinates = false;
|
|
8913
|
+
this.centerPosition = {
|
|
8914
|
+
latitude: null,
|
|
8915
|
+
longitude: null
|
|
8916
|
+
};
|
|
8917
|
+
this.isZoomByPosition = false;
|
|
8904
8918
|
if (isNullOrUndefined(maxLatitude) && isNullOrUndefined(maxLongitude)
|
|
8905
8919
|
|| isNullOrUndefined(minLatitude) && isNullOrUndefined(minLongitude)) {
|
|
8906
8920
|
minLatitude = isNullOrUndefined(minLatitude) ? 0 : minLatitude;
|
|
@@ -10195,8 +10209,14 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10195
10209
|
datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
|
|
10196
10210
|
templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
|
|
10197
10211
|
labelElement = convertElementFromLabel(templateElement, labelId, !isNullOrUndefined(datasrcObj) ? datasrcObj : shapeData['properties'], index, _this.maps);
|
|
10198
|
-
|
|
10199
|
-
|
|
10212
|
+
if (_this.maps.isTileMap) {
|
|
10213
|
+
labelElement.style.left = (((location['x'] + transPoint['x']) * scale) - (textSize['width'] / 2)) + 'px';
|
|
10214
|
+
labelElement.style.top = (((location['y'] + transPoint['y']) * scale) - textSize['height']) + 'px';
|
|
10215
|
+
}
|
|
10216
|
+
else {
|
|
10217
|
+
labelElement.style.left = ((Math.abs(_this.maps.baseMapRectBounds['min']['x'] - location['x'])) * scale) + labelArgs.offsetX + 'px';
|
|
10218
|
+
labelElement.style.top = ((Math.abs(_this.maps.baseMapRectBounds['min']['y'] - location['y'])) * scale) + labelArgs.offsetY + 'px';
|
|
10219
|
+
}
|
|
10200
10220
|
labelTemplateElement.appendChild(labelElement);
|
|
10201
10221
|
}
|
|
10202
10222
|
else {
|
|
@@ -10437,51 +10457,49 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
|
|
|
10437
10457
|
direction = 0;
|
|
10438
10458
|
}
|
|
10439
10459
|
}
|
|
10440
|
-
if (
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
pathOption = new PathOption(triId, arrowColor, width, color, 1, 1, dashArray, d2);
|
|
10464
|
-
navigationEle = this.maps.renderer.drawPath(pathOption);
|
|
10465
|
-
markerEle.appendChild(navigationEle);
|
|
10466
|
-
defElement.appendChild(markerEle);
|
|
10467
|
-
navigationGroup.appendChild(defElement);
|
|
10468
|
-
}
|
|
10469
|
-
angle = Math.abs(angle);
|
|
10470
|
-
d = (angle === 0) ? 'M ' + point[j]['x'] + ',' + point[j]['y'] + 'L ' + point[j + 1]['x']
|
|
10471
|
-
+ ',' + point[j + 1]['y'] + ' ' :
|
|
10472
|
-
'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) +
|
|
10473
|
-
' ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
|
|
10474
|
-
+ direction + ' , ' + point[j + 1]['x'] + ',' + point[j + 1]['y'] + ' ';
|
|
10475
|
-
pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
|
|
10460
|
+
if (showArrow) {
|
|
10461
|
+
arrowColor = arrowSettings['properties']['color'];
|
|
10462
|
+
arrowSize = arrowSettings['properties']['size'];
|
|
10463
|
+
offSetValue = (arrowSettings['properties']['offSet'] === undefined) ? 0 : arrowSettings['properties']['offSet'];
|
|
10464
|
+
var divide = (Math.round(arrowSize / 2));
|
|
10465
|
+
arrowPosition = arrowSettings['properties']['position'];
|
|
10466
|
+
startArrow = (arrowPosition === 'Start') ? 'url(#triangle' + i + ')' : null;
|
|
10467
|
+
endArrow = (arrowPosition === 'End') ? 'url(#triangle' + i + ')' : null;
|
|
10468
|
+
if (offSet !== 0 && angle === 0) {
|
|
10469
|
+
offSet = (arrowPosition === 'Start') ? offSetValue : -(offSetValue);
|
|
10470
|
+
}
|
|
10471
|
+
offSet = (isNullOrUndefined(offSet)) ? 0 : offSet;
|
|
10472
|
+
var triId = this.maps.element.id + '_triangle';
|
|
10473
|
+
var defElement = this.maps.renderer.createDefs();
|
|
10474
|
+
defElement.innerHTML += '<marker id="' + 'triangle' + i + '"></marker>';
|
|
10475
|
+
var markerEle = defElement.querySelector('#' + 'triangle' + i);
|
|
10476
|
+
markerEle.setAttribute('markerWidth', (arrowSize.toString()));
|
|
10477
|
+
markerEle.setAttribute('markerHeight', (arrowSize.toString()));
|
|
10478
|
+
markerEle.setAttribute('refX', (divide - offSet).toString());
|
|
10479
|
+
markerEle.setAttribute('refY', divide.toString());
|
|
10480
|
+
markerEle.setAttribute('orient', 'auto');
|
|
10481
|
+
var d2 = 'M 0,0 L 0,' + arrowSize + ' L ' + divide + ', ' + divide + ' Z';
|
|
10482
|
+
pathOption = new PathOption(triId, arrowColor, width, color, 1, 1, dashArray, d2);
|
|
10476
10483
|
navigationEle = this.maps.renderer.drawPath(pathOption);
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10484
|
+
markerEle.appendChild(navigationEle);
|
|
10485
|
+
defElement.appendChild(markerEle);
|
|
10486
|
+
navigationGroup.appendChild(defElement);
|
|
10487
|
+
}
|
|
10488
|
+
angle = Math.abs(angle);
|
|
10489
|
+
d = (angle === 0) ? 'M ' + point[j]['x'] + ',' + point[j]['y'] + 'L ' + point[j + 1]['x']
|
|
10490
|
+
+ ',' + point[j + 1]['y'] + ' ' :
|
|
10491
|
+
'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) +
|
|
10492
|
+
' ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
|
|
10493
|
+
+ direction + ' , ' + point[j + 1]['x'] + ',' + point[j + 1]['y'] + ' ';
|
|
10494
|
+
pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
|
|
10495
|
+
navigationEle = this.maps.renderer.drawPath(pathOption);
|
|
10496
|
+
if (!isNullOrUndefined(arrowPosition)) {
|
|
10497
|
+
var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
|
|
10498
|
+
: navigationEle.setAttribute('marker-end', endArrow);
|
|
10499
|
+
}
|
|
10500
|
+
maintainSelection(this.maps.selectedNavigationElementId, this.maps.navigationSelectionClass, navigationEle, 'navigationlineselectionMapStyle');
|
|
10501
|
+
navigationGroup.appendChild(navigationEle);
|
|
10502
|
+
group.appendChild(navigationGroup);
|
|
10485
10503
|
}
|
|
10486
10504
|
point = [];
|
|
10487
10505
|
}
|
|
@@ -11050,14 +11068,14 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11050
11068
|
leftPageElement.appendChild(render.drawPath(leftPageOptions));
|
|
11051
11069
|
var leftRectPageOptions = new RectOption(map.element.id + '_Left_Page_Rect', 'transparent', {}, 1, new Rect(leftPageX - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
|
|
11052
11070
|
var pathEle = render.drawRectangle(leftRectPageOptions);
|
|
11053
|
-
pathEle.
|
|
11071
|
+
pathEle.tabIndex = (page + 1) === 1 ? -1 : (map.tabIndex + 1);
|
|
11054
11072
|
leftPageElement.appendChild(pathEle);
|
|
11055
11073
|
this.wireEvents(leftPageElement);
|
|
11056
11074
|
var rightPageOptions = new PathOption(map.element.id + '_Right_Page', '#a6a6a6', 0, '#a6a6a6', ((page + 1) === this.totalPages.length ? 0.5 : 1), 1, '', rightPath);
|
|
11057
11075
|
rightPageElement.appendChild(render.drawPath(rightPageOptions));
|
|
11058
11076
|
var rightRectPageOptions = new RectOption(map.element.id + '_Right_Page_Rect', 'transparent', {}, 1, new Rect(rightPageX - spacing - (width / 2), (locY - (height * 2)), width * 2, spacing * 2), null, null, '', '');
|
|
11059
11077
|
pathEle = render.drawRectangle(rightRectPageOptions);
|
|
11060
|
-
pathEle.
|
|
11078
|
+
pathEle.tabIndex = (page + 1) === this.totalPages.length ? -1 : (map.tabIndex + 2);
|
|
11061
11079
|
rightPageElement.appendChild(pathEle);
|
|
11062
11080
|
this.wireEvents(rightPageElement);
|
|
11063
11081
|
pagingGroup.appendChild(leftPageElement);
|
|
@@ -11078,7 +11096,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11078
11096
|
'dominant-baseline': ''
|
|
11079
11097
|
};
|
|
11080
11098
|
var pagingTextElement = render.createText(pageTextOptions, pagingText);
|
|
11081
|
-
pagingTextElement.
|
|
11099
|
+
pagingTextElement.style.cssText = 'user-select: none;';
|
|
11082
11100
|
pagingGroup.appendChild(pagingTextElement);
|
|
11083
11101
|
this.legendGroup.appendChild(pagingGroup);
|
|
11084
11102
|
}
|
|
@@ -11212,11 +11230,14 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11212
11230
|
this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].push(shapeElement);
|
|
11213
11231
|
var shapeItemCount = this.legendHighlightCollection[length - 1]['MapShapeCollection']['Elements'].length - 1;
|
|
11214
11232
|
var shapeOldFillColor = shapeElement.getAttribute('fill');
|
|
11233
|
+
var shapeOldOpacity = shapeElement.getAttribute('fill-opacity');
|
|
11215
11234
|
this.legendHighlightCollection[length - 1]['shapeOldFillColor'].push(shapeOldFillColor);
|
|
11235
|
+
this.legendHighlightCollection[length - 1]['shapeOldOpacity'] = shapeOldOpacity;
|
|
11216
11236
|
var shapeOldColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'][shapeItemCount];
|
|
11237
|
+
var shapeOldFillOpacity = this.legendHighlightCollection[length - 1]['shapeOldOpacity'];
|
|
11217
11238
|
this.shapePreviousColor = this.legendHighlightCollection[length - 1]['shapeOldFillColor'];
|
|
11218
|
-
this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
11219
|
-
this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
11239
|
+
this.setColor(shapeElement, !isNullOrUndefined(module.fill) ? module.fill : shapeOldColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
11240
|
+
this.setColor(targetElement, !isNullOrUndefined(module.fill) ? module.fill : legendHighlightColor, isNullOrUndefined(module.opacity) ? shapeOldFillOpacity : module.opacity.toString(), module.border.color, module.border.width.toString(), 'highlight');
|
|
11220
11241
|
}
|
|
11221
11242
|
else if (value === 'selection') {
|
|
11222
11243
|
this.legendHighlightCollection = [];
|
|
@@ -11281,6 +11302,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11281
11302
|
var length = collection.length;
|
|
11282
11303
|
collection[length - 1]['MapShapeCollection'] = { Elements: [] };
|
|
11283
11304
|
collection[length - 1]['shapeOldFillColor'] = [];
|
|
11305
|
+
collection[length - 1]['shapeOldOpacity'] = null;
|
|
11284
11306
|
};
|
|
11285
11307
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11286
11308
|
Legend.prototype.removeLegend = function (collection) {
|
|
@@ -11292,7 +11314,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11292
11314
|
for (var j = 0; j < dataCount; j++) {
|
|
11293
11315
|
var shapeFillColor = item['legendOldFill'].indexOf('url') !== -1
|
|
11294
11316
|
? item['shapeOldFillColor'][j] : item['legendOldFill'];
|
|
11295
|
-
|
|
11317
|
+
var shapeOpacity = !isNullOrUndefined(item['shapeOldOpacity']) ? item['shapeOldOpacity'] : item['shapeOpacity'];
|
|
11318
|
+
this.setColor(item['MapShapeCollection']['Elements'][j], shapeFillColor, shapeOpacity, item['shapeOldBorderColor'], item['shapeOldBorderWidth'], 'highlight');
|
|
11296
11319
|
}
|
|
11297
11320
|
}
|
|
11298
11321
|
};
|
|
@@ -12839,16 +12862,34 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12839
12862
|
var marker$$1 = parseInt(targetEle.id.split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
12840
12863
|
isMarkerSelect = this.maps.layers[layerIndex].markerSettings[marker$$1].highlightSettings.enable;
|
|
12841
12864
|
}
|
|
12842
|
-
var
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
opacity: this.highlightSettings.border.opacity
|
|
12846
|
-
};
|
|
12865
|
+
var borderColor = (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color);
|
|
12866
|
+
var borderWidth = (targetEle.parentElement.id.indexOf('LineString') === -1) ? (this.highlightSettings.border.width / (isMarkerSelect ? 1 : this.maps.scale)) : (this.highlightSettings.border.width / this.maps.scale);
|
|
12867
|
+
var borderOpacity = isNullOrUndefined(this.highlightSettings.border.opacity) ? this.highlightSettings.opacity : this.highlightSettings.border.opacity;
|
|
12847
12868
|
var eventArgs = {
|
|
12848
12869
|
opacity: this.highlightSettings.opacity,
|
|
12849
12870
|
fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
12850
12871
|
? this.highlightSettings.fill : targetEle.getAttribute('fill') : 'none') : 'transparent',
|
|
12851
|
-
border:
|
|
12872
|
+
border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
|
|
12873
|
+
cancel: false
|
|
12874
|
+
};
|
|
12875
|
+
var shapeEventArgs = {
|
|
12876
|
+
opacity: eventArgs.opacity,
|
|
12877
|
+
fill: eventArgs.fill,
|
|
12878
|
+
border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
|
|
12879
|
+
name: shapeHighlight,
|
|
12880
|
+
target: targetEle.id,
|
|
12881
|
+
cancel: false,
|
|
12882
|
+
shapeData: shapeData,
|
|
12883
|
+
data: data,
|
|
12884
|
+
maps: this.maps
|
|
12885
|
+
};
|
|
12886
|
+
if (targetEle.id.indexOf('shapeIndex') > -1) {
|
|
12887
|
+
this.maps.trigger(shapeHighlight, shapeEventArgs, function () { });
|
|
12888
|
+
}
|
|
12889
|
+
var itemEventArgs = {
|
|
12890
|
+
opacity: eventArgs.opacity,
|
|
12891
|
+
fill: eventArgs.fill,
|
|
12892
|
+
border: { color: borderColor, width: borderWidth, opacity: borderOpacity },
|
|
12852
12893
|
name: itemHighlight,
|
|
12853
12894
|
target: targetEle.id,
|
|
12854
12895
|
cancel: false,
|
|
@@ -12856,13 +12897,18 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12856
12897
|
data: data,
|
|
12857
12898
|
maps: this.maps
|
|
12858
12899
|
};
|
|
12859
|
-
this.maps.trigger(itemHighlight,
|
|
12860
|
-
eventArgs.
|
|
12861
|
-
|
|
12900
|
+
this.maps.trigger(itemHighlight, itemEventArgs, function () {
|
|
12901
|
+
itemEventArgs.cancel = eventArgs.cancel !== itemEventArgs.cancel ? itemEventArgs.cancel : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.cancel : eventArgs.cancel;
|
|
12902
|
+
itemEventArgs.fill = eventArgs.fill !== itemEventArgs.fill ? itemEventArgs.fill : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.fill : eventArgs.fill;
|
|
12903
|
+
itemEventArgs.opacity = eventArgs.opacity !== itemEventArgs.opacity ? itemEventArgs.opacity : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.opacity : eventArgs.opacity;
|
|
12904
|
+
itemEventArgs.border.color = eventArgs.border.color !== itemEventArgs.border.color ? itemEventArgs.border.color : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.color : eventArgs.border.color;
|
|
12905
|
+
itemEventArgs.border.width = eventArgs.border.width !== itemEventArgs.border.width ? itemEventArgs.border.width : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.width : eventArgs.border.width;
|
|
12906
|
+
itemEventArgs.border.opacity = eventArgs.border.opacity !== itemEventArgs.border.opacity ? itemEventArgs.border.opacity : targetEle.id.indexOf('shapeIndex') > -1 ? shapeEventArgs.border.opacity : eventArgs.border.opacity;
|
|
12907
|
+
_this.highlightMap(targetEle, itemEventArgs);
|
|
12862
12908
|
});
|
|
12863
12909
|
};
|
|
12864
12910
|
Highlight.prototype.highlightMap = function (targetEle, eventArgs) {
|
|
12865
|
-
if (targetEle.getAttribute('class') === 'highlightMapStyle') {
|
|
12911
|
+
if (targetEle.getAttribute('class') === 'highlightMapStyle' || eventArgs.cancel) {
|
|
12866
12912
|
return;
|
|
12867
12913
|
}
|
|
12868
12914
|
else {
|
|
@@ -13368,9 +13414,9 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13368
13414
|
else {
|
|
13369
13415
|
tooltipEle = createElement('div', {
|
|
13370
13416
|
id: this.maps.element.id + '_mapsTooltip',
|
|
13371
|
-
className: 'EJ2-maps-Tooltip'
|
|
13372
|
-
styles: 'position: absolute;pointer-events:none;'
|
|
13417
|
+
className: 'EJ2-maps-Tooltip'
|
|
13373
13418
|
});
|
|
13419
|
+
tooltipEle.style.cssText = 'position: absolute;pointer-events:none;';
|
|
13374
13420
|
document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
|
|
13375
13421
|
}
|
|
13376
13422
|
if (option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
|
|
@@ -13448,7 +13494,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13448
13494
|
&& tooltipTemplateElement.innerHTML.indexOf('</a>') !== -1) {
|
|
13449
13495
|
var templateStyle = tooltipTemplateElement.getAttribute('style');
|
|
13450
13496
|
templateStyle = templateStyle.replace('pointer-events: none;', 'position-events:all;');
|
|
13451
|
-
tooltipTemplateElement.
|
|
13497
|
+
tooltipTemplateElement.style.cssText = templateStyle;
|
|
13452
13498
|
}
|
|
13453
13499
|
}
|
|
13454
13500
|
else {
|
|
@@ -14040,7 +14086,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14040
14086
|
}
|
|
14041
14087
|
else {
|
|
14042
14088
|
markerStyle = 'visibility:hidden';
|
|
14043
|
-
currentEle.
|
|
14089
|
+
currentEle.style.cssText = markerStyle;
|
|
14044
14090
|
}
|
|
14045
14091
|
}
|
|
14046
14092
|
}
|
|
@@ -14158,22 +14204,22 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14158
14204
|
var layerIndex = parseInt((element ? element : layerElement).id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
14159
14205
|
var markerSVGObject = this.maps.renderer.createGroup({
|
|
14160
14206
|
id: this.maps.element.id + '_Markers_Group',
|
|
14161
|
-
class: 'GroupElement'
|
|
14162
|
-
style: 'pointer-events: auto;'
|
|
14207
|
+
class: 'GroupElement'
|
|
14163
14208
|
});
|
|
14209
|
+
markerSVGObject.style.pointerEvents = 'auto';
|
|
14164
14210
|
if (document.getElementById(markerSVGObject.id)) {
|
|
14165
14211
|
removeElement(markerSVGObject.id);
|
|
14166
14212
|
}
|
|
14167
14213
|
var mapsAreaRect = this.maps.mapAreaRect;
|
|
14168
14214
|
var markerTemplateElements = createElement('div', {
|
|
14169
14215
|
id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_Markers_Template_Group',
|
|
14170
|
-
className: 'template'
|
|
14171
|
-
styles: 'overflow: hidden; position: absolute;pointer-events: none;' +
|
|
14172
|
-
'top:' + mapsAreaRect.y + 'px;' +
|
|
14173
|
-
'left:' + mapsAreaRect.x + 'px;' +
|
|
14174
|
-
'height:' + mapsAreaRect.height + 'px;' +
|
|
14175
|
-
'width:' + mapsAreaRect.width + 'px;'
|
|
14216
|
+
className: 'template'
|
|
14176
14217
|
});
|
|
14218
|
+
markerTemplateElements.style.cssText = 'overflow: hidden; position: absolute;pointer-events: none;' +
|
|
14219
|
+
'top:' + mapsAreaRect.y + 'px;' +
|
|
14220
|
+
'left:' + mapsAreaRect.x + 'px;' +
|
|
14221
|
+
'height:' + mapsAreaRect.height + 'px;' +
|
|
14222
|
+
'width:' + mapsAreaRect.width + 'px;';
|
|
14177
14223
|
if (document.getElementById(markerTemplateElements.id)) {
|
|
14178
14224
|
removeElement(markerTemplateElements.id);
|
|
14179
14225
|
}
|
|
@@ -14305,16 +14351,26 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14305
14351
|
var labelX = label['location']['x'];
|
|
14306
14352
|
var labelY = label['location']['y'];
|
|
14307
14353
|
if (type === 'Template') {
|
|
14308
|
-
var
|
|
14309
|
-
|
|
14310
|
-
|
|
14311
|
-
|
|
14312
|
-
|
|
14313
|
-
|
|
14314
|
-
|
|
14315
|
-
|
|
14316
|
-
|
|
14317
|
-
|
|
14354
|
+
var locationX = 0;
|
|
14355
|
+
var locationY = 0;
|
|
14356
|
+
if (this.maps.isTileMap) {
|
|
14357
|
+
zoomtext = label['dataLabelText'];
|
|
14358
|
+
zoomtextSize = measureText(zoomtext, style);
|
|
14359
|
+
locationX = ((labelX + x) * scale) - (zoomtextSize['width'] / 2);
|
|
14360
|
+
locationY = ((labelY + y) * scale) - (zoomtextSize['height']);
|
|
14361
|
+
}
|
|
14362
|
+
else {
|
|
14363
|
+
var layerEle = getElementByID(this.maps.element.id + '_Layer_Collections');
|
|
14364
|
+
labelX = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - labelX)) * scale);
|
|
14365
|
+
labelY = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - labelY)) * scale);
|
|
14366
|
+
var templateOffset = element.getBoundingClientRect();
|
|
14367
|
+
var layerOffset = layerEle.getBoundingClientRect();
|
|
14368
|
+
var elementOffset = element.parentElement.getBoundingClientRect();
|
|
14369
|
+
locationX = ((labelX) + (layerOffset.left - elementOffset.left));
|
|
14370
|
+
locationY = ((labelY) + (layerOffset.top - elementOffset.top));
|
|
14371
|
+
}
|
|
14372
|
+
element.style.left = locationX + 'px';
|
|
14373
|
+
element.style.top = locationY + 'px';
|
|
14318
14374
|
}
|
|
14319
14375
|
else {
|
|
14320
14376
|
labelX = ((labelX + x) * scale);
|
|
@@ -14446,10 +14502,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14446
14502
|
if (element['style']['display'] !== 'none') {
|
|
14447
14503
|
if ((staticMapOffset['x'] > templateOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < templateOffset['x'] + templateOffset['width'])
|
|
14448
14504
|
&& (staticMapOffset['y'] > templateOffset['y'] || staticMapOffset['y'] + staticMapOffset['height'] < templateOffset['y'] + templateOffset['height'])) {
|
|
14449
|
-
element
|
|
14505
|
+
element.style.display = 'none';
|
|
14450
14506
|
}
|
|
14451
14507
|
else if ((staticMapOffset['x'] > templateOffset['x'] || staticMapOffset['x'] + staticMapOffsetWidth < templateOffset['x'] + templateOffset['width'])) {
|
|
14452
|
-
element
|
|
14508
|
+
element.style.display = 'none';
|
|
14453
14509
|
}
|
|
14454
14510
|
}
|
|
14455
14511
|
}
|
|
@@ -14586,7 +14642,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14586
14642
|
}
|
|
14587
14643
|
map.zoomTranslatePoint = map.translatePoint;
|
|
14588
14644
|
this.mouseDownPoints = this.mouseMovePoints;
|
|
14589
|
-
this.maps.zoomNotApplied = false;
|
|
14590
14645
|
this.isSingleClick = false;
|
|
14591
14646
|
};
|
|
14592
14647
|
Zoom.prototype.toAlignSublayer = function () {
|
|
@@ -14927,7 +14982,8 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14927
14982
|
Zoom.prototype.alignToolBar = function () {
|
|
14928
14983
|
var map = this.maps;
|
|
14929
14984
|
var padding = 10;
|
|
14930
|
-
var element = createElement('div', { id: map.element.id + '_ToolBar'
|
|
14985
|
+
var element = createElement('div', { id: map.element.id + '_ToolBar' });
|
|
14986
|
+
element.style.cssText = 'position:absolute;z-index:2';
|
|
14931
14987
|
var rectSVGObject = map.renderer.createSvg({
|
|
14932
14988
|
id: map.element.id + '_Zooming_ToolBar', width: 10, height: 10
|
|
14933
14989
|
});
|