@syncfusion/ej2-maps 19.4.55 → 20.1.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -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 +253 -117
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +254 -118
- 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/data-label.js +1 -1
- package/src/maps/layers/legend.js +1 -1
- package/src/maps/layers/marker.js +4 -4
- package/src/maps/maps.js +20 -8
- package/src/maps/model/export-image.js +21 -12
- package/src/maps/model/export-pdf.js +16 -9
- package/src/maps/model/print.js +24 -2
- package/src/maps/model/theme.js +4 -4
- package/src/maps/user-interaction/annotation.js +1 -1
- package/src/maps/user-interaction/tooltip.d.ts +2 -1
- package/src/maps/user-interaction/tooltip.js +17 -9
- package/src/maps/user-interaction/zoom.js +121 -68
- package/src/maps/utils/enum.d.ts +5 -1
- package/src/maps/utils/helper.d.ts +9 -1
- package/src/maps/utils/helper.js +29 -4
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -1257,7 +1257,7 @@ function marker(eventArgs, markerSettings, markerData, dataIndex, location, tran
|
|
|
1257
1257
|
*/
|
|
1258
1258
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1259
1259
|
function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
|
|
1260
|
-
templateFn = getTemplateFunction(eventArgs.template);
|
|
1260
|
+
templateFn = getTemplateFunction(eventArgs.template, maps);
|
|
1261
1261
|
if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
|
|
1262
1262
|
var templateElement = templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false);
|
|
1263
1263
|
var markerElement = convertElement(templateElement, markerID, data, markerIndex, maps);
|
|
@@ -1293,8 +1293,10 @@ function maintainSelection(elementId, elementClass, element, className) {
|
|
|
1293
1293
|
if (elementId) {
|
|
1294
1294
|
for (var index = 0; index < elementId.length; index++) {
|
|
1295
1295
|
if (element.getAttribute('id') === elementId[index]) {
|
|
1296
|
-
if (
|
|
1297
|
-
|
|
1296
|
+
if (index === 0 || element.tagName === 'g') {
|
|
1297
|
+
if (!isNullOrUndefined(elementClass) && !isNullOrUndefined(elementClass.id)) {
|
|
1298
|
+
document.body.appendChild(elementClass);
|
|
1299
|
+
}
|
|
1298
1300
|
if (element.id.indexOf('_MarkerIndex_') > -1 && element.childElementCount > 0) {
|
|
1299
1301
|
element.children[0].setAttribute('class', className);
|
|
1300
1302
|
}
|
|
@@ -2254,6 +2256,22 @@ function fixInitialScaleForTile(map) {
|
|
|
2254
2256
|
function getElementByID(id) {
|
|
2255
2257
|
return document.getElementById(id);
|
|
2256
2258
|
}
|
|
2259
|
+
/**
|
|
2260
|
+
* Function to get clientElement from id.
|
|
2261
|
+
*
|
|
2262
|
+
* @param {string} id - Specifies the id
|
|
2263
|
+
* @returns {Element} - Returns the element
|
|
2264
|
+
* @private
|
|
2265
|
+
*/
|
|
2266
|
+
function getClientElement(id) {
|
|
2267
|
+
var element = document.getElementById(id);
|
|
2268
|
+
if (!isNullOrUndefined(element)) {
|
|
2269
|
+
return element.getClientRects()[0];
|
|
2270
|
+
}
|
|
2271
|
+
else {
|
|
2272
|
+
return null;
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2257
2275
|
/**
|
|
2258
2276
|
* To apply internalization
|
|
2259
2277
|
*
|
|
@@ -2274,7 +2292,7 @@ function Internalize(maps, value) {
|
|
|
2274
2292
|
* @private
|
|
2275
2293
|
*/
|
|
2276
2294
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2277
|
-
function getTemplateFunction(template) {
|
|
2295
|
+
function getTemplateFunction(template, maps) {
|
|
2278
2296
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2279
2297
|
var templateFn = null;
|
|
2280
2298
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2282,6 +2300,9 @@ function getTemplateFunction(template) {
|
|
|
2282
2300
|
if (document.querySelectorAll(template).length) {
|
|
2283
2301
|
templateFn = compile(document.querySelector(template).innerHTML.trim());
|
|
2284
2302
|
}
|
|
2303
|
+
else if (maps.isVue || maps.isVue3) {
|
|
2304
|
+
templateFn = compile(template);
|
|
2305
|
+
}
|
|
2285
2306
|
}
|
|
2286
2307
|
catch (e) {
|
|
2287
2308
|
templateFn = compile(template);
|
|
@@ -2685,6 +2706,7 @@ function createTooltip(id, text, top, left, fontSize) {
|
|
|
2685
2706
|
'left:' + left.toString() + 'px;' +
|
|
2686
2707
|
'color: #000000; ' +
|
|
2687
2708
|
'background:' + '#FFFFFF' + ';' +
|
|
2709
|
+
'z-index: 2;' +
|
|
2688
2710
|
'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
|
|
2689
2711
|
if (!tooltip) {
|
|
2690
2712
|
tooltip = createElement('div', {
|
|
@@ -2885,6 +2907,9 @@ function changeBorderWidth(element, index, scale, maps) {
|
|
|
2885
2907
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2886
2908
|
}
|
|
2887
2909
|
}
|
|
2910
|
+
else {
|
|
2911
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2912
|
+
}
|
|
2888
2913
|
}
|
|
2889
2914
|
else {
|
|
2890
2915
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
@@ -3413,11 +3438,11 @@ function getShapeColor(theme) {
|
|
|
3413
3438
|
themePalette = ['#5ECB9B', '#A860F1', '#EBA844', '#557EF7', '#E9599B',
|
|
3414
3439
|
'#BFC529', '#3BC6CF', '#7A68EC', '#74B706', '#EA6266'];
|
|
3415
3440
|
break;
|
|
3416
|
-
case '
|
|
3441
|
+
case 'fluent':
|
|
3417
3442
|
themePalette = ['#614570', '#4C6FB1', '#CC6952', '#3F579A', '#4EA09B',
|
|
3418
3443
|
'#6E7A89', '#D4515C', '#E6AF5D', '#639751', '#9D4D69'];
|
|
3419
3444
|
break;
|
|
3420
|
-
case '
|
|
3445
|
+
case 'fluentdark':
|
|
3421
3446
|
themePalette = ['#8AB113', '#2A72D5', '#43B786', '#584EC6', '#E85F9C',
|
|
3422
3447
|
'#6E7A89', '#EA6266', '#EBA844', '#26BC7A', '#BC4870'];
|
|
3423
3448
|
break;
|
|
@@ -3706,7 +3731,7 @@ function getThemeStyle(theme) {
|
|
|
3706
3731
|
shapeFill: '#495057'
|
|
3707
3732
|
};
|
|
3708
3733
|
break;
|
|
3709
|
-
case '
|
|
3734
|
+
case 'fluent':
|
|
3710
3735
|
style = {
|
|
3711
3736
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3712
3737
|
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
@@ -3729,7 +3754,7 @@ function getThemeStyle(theme) {
|
|
|
3729
3754
|
shapeFill: '#F3F2F1'
|
|
3730
3755
|
};
|
|
3731
3756
|
break;
|
|
3732
|
-
case '
|
|
3757
|
+
case 'fluentdark':
|
|
3733
3758
|
style = {
|
|
3734
3759
|
backgroundColor: 'rgba(255,255,255, 0.0)',
|
|
3735
3760
|
areaBackgroundColor: 'rgba(255,255,255, 0.0)',
|
|
@@ -4858,10 +4883,10 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
4858
4883
|
eventArgs = markerShapeChoose(eventArgs, data);
|
|
4859
4884
|
var lng = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
4860
4885
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
4861
|
-
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) :
|
|
4886
|
+
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : null;
|
|
4862
4887
|
var lat = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
|
|
4863
4888
|
Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
|
|
4864
|
-
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) :
|
|
4889
|
+
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
|
|
4865
4890
|
var offset = markerSettings.offset;
|
|
4866
4891
|
if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(lng) && !isNullOrUndefined(lat)) {
|
|
4867
4892
|
var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
@@ -4906,7 +4931,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
4906
4931
|
_this.maps.renderReactTemplates();
|
|
4907
4932
|
}
|
|
4908
4933
|
}
|
|
4909
|
-
if (markerTemplateEle.childElementCount === (
|
|
4934
|
+
if (markerTemplateEle.childElementCount === (markerDataLength - markerCount - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
|
|
4910
4935
|
getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateEle);
|
|
4911
4936
|
if (_this.maps.checkInitialRender) {
|
|
4912
4937
|
if (currentLayer.markerClusterSettings.allowClustering) {
|
|
@@ -5156,7 +5181,7 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5156
5181
|
if ((target.indexOf('_cluster_') > -1)) {
|
|
5157
5182
|
var isClusterSame = false;
|
|
5158
5183
|
var clusterElement = document.getElementById(target.indexOf('_datalabel_') > -1 ? target.split('_datalabel_')[0] : target);
|
|
5159
|
-
var indexes = clusterElement.innerHTML.split(',').map(Number);
|
|
5184
|
+
var indexes = layer.markerClusterSettings.shape === 'Balloon' ? clusterElement.children[0].innerHTML.split(',').map(Number) : clusterElement.innerHTML.split(',').map(Number);
|
|
5160
5185
|
collection_1 = [];
|
|
5161
5186
|
for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
|
|
5162
5187
|
var i = indexes_1[_i];
|
|
@@ -7021,7 +7046,7 @@ var Annotations = /** @__PURE__ @class */ (function () {
|
|
|
7021
7046
|
if (argsData.cancel) {
|
|
7022
7047
|
return;
|
|
7023
7048
|
}
|
|
7024
|
-
templateFn = getTemplateFunction(argsData.content);
|
|
7049
|
+
templateFn = getTemplateFunction(argsData.content, _this.map);
|
|
7025
7050
|
if (templateFn && templateFn(_this.map, _this.map, argsData.content, _this.map.element.id + '_ContentTemplate_' + annotationIndex).length) {
|
|
7026
7051
|
templateElement = Array.prototype.slice.call(templateFn(_this.map, _this.map, argsData.content, _this.map.element.id + '_ContentTemplate_' + annotationIndex));
|
|
7027
7052
|
var length_1 = templateElement.length;
|
|
@@ -7148,6 +7173,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7148
7173
|
* Resize the map
|
|
7149
7174
|
*/
|
|
7150
7175
|
_this.isResize = false;
|
|
7176
|
+
/**
|
|
7177
|
+
* @private
|
|
7178
|
+
*/
|
|
7179
|
+
_this.isReset = false;
|
|
7151
7180
|
/** @private */
|
|
7152
7181
|
_this.baseSize = new Size(0, 0);
|
|
7153
7182
|
/** @public */
|
|
@@ -7488,12 +7517,14 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7488
7517
|
this.checkInitialRender = false;
|
|
7489
7518
|
}
|
|
7490
7519
|
}
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
&& this.layers[i].markerSettings[k].
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7520
|
+
if (!this.isResize) {
|
|
7521
|
+
for (var k = 0; k < this.layers[i].markerSettings.length; k++) {
|
|
7522
|
+
if (this.layers[i].markerSettings[k].selectionSettings && this.layers[i].markerSettings[k].selectionSettings.enable
|
|
7523
|
+
&& this.layers[i].markerSettings[k].initialMarkerSelection.length > 0) {
|
|
7524
|
+
var markerSelectionValues = this.layers[i].markerSettings[k].initialMarkerSelection;
|
|
7525
|
+
for (var j = 0; j < markerSelectionValues.length; j++) {
|
|
7526
|
+
this.markerInitialSelection(i, k, this.layers[i].markerSettings[k], markerSelectionValues[j].latitude, markerSelectionValues[j].longitude);
|
|
7527
|
+
}
|
|
7497
7528
|
}
|
|
7498
7529
|
}
|
|
7499
7530
|
}
|
|
@@ -7571,7 +7602,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7571
7602
|
Maps.prototype.markerSelection = function (selectionSettings, map, targetElement, data) {
|
|
7572
7603
|
var border = {
|
|
7573
7604
|
color: selectionSettings.border.color,
|
|
7574
|
-
width: selectionSettings.border.width / map.scale
|
|
7605
|
+
width: selectionSettings.border.width / map.scale,
|
|
7606
|
+
opacity: selectionSettings.border.opacity
|
|
7575
7607
|
};
|
|
7576
7608
|
var markerSelectionProperties = {
|
|
7577
7609
|
opacity: selectionSettings.opacity,
|
|
@@ -7591,9 +7623,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7591
7623
|
if (this.selectedMarkerElementId.length === 0 || selectionSettings.enableMultiSelect) {
|
|
7592
7624
|
if (targetElement.tagName === 'g') {
|
|
7593
7625
|
targetElement.children[0].setAttribute('class', 'MarkerselectionMapStyle');
|
|
7626
|
+
this.selectedMarkerElementId.push(targetElement.children[0].id);
|
|
7594
7627
|
}
|
|
7595
7628
|
else {
|
|
7596
7629
|
targetElement.setAttribute('class', 'MarkerselectionMapStyle');
|
|
7630
|
+
this.selectedMarkerElementId.push(targetElement.id);
|
|
7597
7631
|
}
|
|
7598
7632
|
}
|
|
7599
7633
|
};
|
|
@@ -8813,7 +8847,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8813
8847
|
var collection = Object.keys(newProp.layers[x]);
|
|
8814
8848
|
for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
|
|
8815
8849
|
var collectionProp = collection_1[_b];
|
|
8816
|
-
if (collectionProp === '
|
|
8850
|
+
if (collectionProp === 'layerType' && newProp.layers[x].layerType === 'OSM') {
|
|
8851
|
+
this.isReset = true;
|
|
8852
|
+
}
|
|
8853
|
+
else if (collectionProp === 'markerSettings') {
|
|
8817
8854
|
isMarker = true;
|
|
8818
8855
|
}
|
|
8819
8856
|
else if (collectionProp === 'staticMapType') {
|
|
@@ -9915,7 +9952,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
9915
9952
|
_this.value[index] = { rightWidth: xpositionEnds, leftWidth: xpositionStart, heightTop: start, heightBottom: end };
|
|
9916
9953
|
var labelElement;
|
|
9917
9954
|
if (eventargs_1.template !== '') {
|
|
9918
|
-
templateFn = getTemplateFunction(eventargs_1.template);
|
|
9955
|
+
templateFn = getTemplateFunction(eventargs_1.template, _this.maps);
|
|
9919
9956
|
var templateElement = templateFn ? templateFn(!isNullOrUndefined(datasrcObj) ?
|
|
9920
9957
|
datasrcObj : shapeData['properties'], _this.maps, eventargs_1.template, _this.maps.element.id + '_LabelTemplate', false) : document.createElement('div');
|
|
9921
9958
|
templateElement.innerHTML = !templateFn ? eventargs_1.template : '';
|
|
@@ -11527,7 +11564,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11527
11564
|
data[_this.maps.legendSettings.showLegendPath];
|
|
11528
11565
|
if (marker$$1.visible && showLegend && (!isNullOrUndefined(data['latitude'])) && (!isNullOrUndefined(data['longitude']))) {
|
|
11529
11566
|
if (marker$$1.template) {
|
|
11530
|
-
templateFn = getTemplateFunction(marker$$1.template);
|
|
11567
|
+
templateFn = getTemplateFunction(marker$$1.template, _this.maps);
|
|
11531
11568
|
var templateElement = templateFn(_this.maps);
|
|
11532
11569
|
var markerEle = isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] :
|
|
11533
11570
|
templateElement;
|
|
@@ -13020,6 +13057,10 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13020
13057
|
fill: tooltipArgs.fill || _this.maps.themeStyle.tooltipFillColor
|
|
13021
13058
|
});
|
|
13022
13059
|
}
|
|
13060
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13061
|
+
if (_this.maps.isVue || _this.maps.isVue3) {
|
|
13062
|
+
_this.svgTooltip.controlInstance = _this.maps;
|
|
13063
|
+
}
|
|
13023
13064
|
_this.svgTooltip.opacity = _this.maps.themeStyle.tooltipFillOpacity || _this.svgTooltip.opacity;
|
|
13024
13065
|
_this.svgTooltip.appendTo(tooltipEle);
|
|
13025
13066
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -13033,9 +13074,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13033
13074
|
}
|
|
13034
13075
|
}
|
|
13035
13076
|
else {
|
|
13036
|
-
_this.
|
|
13037
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13038
|
-
_this.maps.clearTemplate();
|
|
13077
|
+
_this.clearTooltip();
|
|
13039
13078
|
}
|
|
13040
13079
|
});
|
|
13041
13080
|
if (this.svgTooltip) {
|
|
@@ -13050,9 +13089,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13050
13089
|
});
|
|
13051
13090
|
}
|
|
13052
13091
|
else {
|
|
13053
|
-
this.
|
|
13054
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13055
|
-
this.maps.clearTemplate();
|
|
13092
|
+
this.clearTooltip();
|
|
13056
13093
|
}
|
|
13057
13094
|
}
|
|
13058
13095
|
else {
|
|
@@ -13062,9 +13099,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13062
13099
|
this.maps.notify(click, this);
|
|
13063
13100
|
}
|
|
13064
13101
|
else {
|
|
13065
|
-
this.
|
|
13066
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13067
|
-
this.maps.clearTemplate();
|
|
13102
|
+
this.clearTooltip();
|
|
13068
13103
|
}
|
|
13069
13104
|
}
|
|
13070
13105
|
};
|
|
@@ -13110,8 +13145,18 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13110
13145
|
}
|
|
13111
13146
|
};
|
|
13112
13147
|
MapsTooltip.prototype.removeTooltip = function () {
|
|
13148
|
+
var isTooltipRemoved = false;
|
|
13113
13149
|
if (document.getElementsByClassName('EJ2-maps-Tooltip').length > 0) {
|
|
13114
13150
|
remove(document.getElementsByClassName('EJ2-maps-Tooltip')[0]);
|
|
13151
|
+
isTooltipRemoved = true;
|
|
13152
|
+
}
|
|
13153
|
+
return isTooltipRemoved;
|
|
13154
|
+
};
|
|
13155
|
+
MapsTooltip.prototype.clearTooltip = function () {
|
|
13156
|
+
var isTooltipRemoved = this.removeTooltip();
|
|
13157
|
+
if (isTooltipRemoved) {
|
|
13158
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13159
|
+
this.maps.clearTemplate();
|
|
13115
13160
|
}
|
|
13116
13161
|
};
|
|
13117
13162
|
// eslint-disable-next-line valid-jsdoc
|
|
@@ -13245,8 +13290,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13245
13290
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
13246
13291
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13247
13292
|
map.scale = newZoomFactor;
|
|
13248
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
13249
|
-
|
|
13293
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
13294
|
+
map.translatePoint = map.previousPoint;
|
|
13295
|
+
map.scale = map.previousScale;
|
|
13296
|
+
}
|
|
13297
|
+
else {
|
|
13298
|
+
this.applyTransform();
|
|
13299
|
+
}
|
|
13250
13300
|
}
|
|
13251
13301
|
else if ((map.isTileMap) && (newZoomFactor >= minZoom && newZoomFactor <= maxZoom)) {
|
|
13252
13302
|
this.getTileTranslatePosition(prevLevel, newZoomFactor, position, type);
|
|
@@ -13263,31 +13313,38 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13263
13313
|
}
|
|
13264
13314
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13265
13315
|
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
13266
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
13267
|
-
|
|
13268
|
-
|
|
13316
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
13317
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13318
|
+
map.scale = map.previousScale;
|
|
13319
|
+
map.tileZoomLevel = prevLevel;
|
|
13320
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
13269
13321
|
}
|
|
13270
|
-
|
|
13271
|
-
document.
|
|
13322
|
+
else {
|
|
13323
|
+
if (document.querySelector('.GroupElement')) {
|
|
13324
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
13325
|
+
}
|
|
13326
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
13327
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
13328
|
+
}
|
|
13329
|
+
this.markerLineAnimation(map);
|
|
13330
|
+
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
13331
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13332
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13333
|
+
setTimeout(function () {
|
|
13334
|
+
// if (type === 'ZoomOut') {
|
|
13335
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13336
|
+
// if (element1.childElementCount) {
|
|
13337
|
+
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13338
|
+
// } else {
|
|
13339
|
+
// element1 = element1;
|
|
13340
|
+
// }
|
|
13341
|
+
// }
|
|
13342
|
+
_this.applyTransform();
|
|
13343
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
13344
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13345
|
+
}
|
|
13346
|
+
}, animationDuration);
|
|
13272
13347
|
}
|
|
13273
|
-
this.markerLineAnimation(map);
|
|
13274
|
-
map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint, type + 'wheel', null, position);
|
|
13275
|
-
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
13276
|
-
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
13277
|
-
setTimeout(function () {
|
|
13278
|
-
// if (type === 'ZoomOut') {
|
|
13279
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13280
|
-
// if (element1.childElementCount) {
|
|
13281
|
-
// element1.removeChild(element1.children[element1.childElementCount - 1]);
|
|
13282
|
-
// } else {
|
|
13283
|
-
// element1 = element1;
|
|
13284
|
-
// }
|
|
13285
|
-
// }
|
|
13286
|
-
_this.applyTransform();
|
|
13287
|
-
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
13288
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
13289
|
-
}
|
|
13290
|
-
}, animationDuration);
|
|
13291
13348
|
}
|
|
13292
13349
|
this.maps.zoomNotApplied = false;
|
|
13293
13350
|
};
|
|
@@ -13309,6 +13366,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13309
13366
|
};
|
|
13310
13367
|
}
|
|
13311
13368
|
map.trigger('zoom', zoomArgs);
|
|
13369
|
+
return zoomArgs.cancel;
|
|
13312
13370
|
};
|
|
13313
13371
|
Zoom.prototype.getTileTranslatePosition = function (prevLevel, currentLevel, position, type) {
|
|
13314
13372
|
var map = this.maps;
|
|
@@ -13334,6 +13392,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13334
13392
|
var zoomRect = this.zoomingRect;
|
|
13335
13393
|
var maxZoom = map.zoomSettings.maxZoom;
|
|
13336
13394
|
var minZoom = map.zoomSettings.minZoom;
|
|
13395
|
+
var isZoomCancelled;
|
|
13337
13396
|
if (zoomRect.height > 0 && zoomRect.width > 0) {
|
|
13338
13397
|
var x = this.zoomingRect.x + (this.zoomingRect.width / 2);
|
|
13339
13398
|
var y = this.zoomingRect.y + (this.zoomingRect.height / 2);
|
|
@@ -13346,7 +13405,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13346
13405
|
var translatePointY = translatePoint.y - (((size.height / scale) - (size.height / zoomCalculationFactor)) / (size.height / y));
|
|
13347
13406
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13348
13407
|
map.scale = zoomCalculationFactor;
|
|
13349
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13408
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13409
|
+
if (isZoomCancelled) {
|
|
13410
|
+
map.translatePoint = map.previousPoint;
|
|
13411
|
+
map.scale = map.previousScale;
|
|
13412
|
+
}
|
|
13350
13413
|
}
|
|
13351
13414
|
else {
|
|
13352
13415
|
zoomCalculationFactor = prevLevel + (Math.round(prevLevel + (((size.width / zoomRect.width) + (size.height / zoomRect.height)) / 2)));
|
|
@@ -13359,13 +13422,21 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13359
13422
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, zoomCalculationFactor))) /
|
|
13360
13423
|
(Math.pow(2, zoomCalculationFactor));
|
|
13361
13424
|
map.scale = (Math.pow(2, zoomCalculationFactor));
|
|
13362
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13363
|
-
|
|
13425
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13426
|
+
if (isZoomCancelled) {
|
|
13427
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13428
|
+
map.scale = map.tileZoomLevel = map.zoomSettings.zoomFactor = prevLevel;
|
|
13429
|
+
}
|
|
13430
|
+
else {
|
|
13431
|
+
map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint);
|
|
13432
|
+
}
|
|
13433
|
+
}
|
|
13434
|
+
if (!isZoomCancelled) {
|
|
13435
|
+
map.mapScaleValue = zoomCalculationFactor;
|
|
13436
|
+
this.applyTransform(true);
|
|
13437
|
+
this.maps.zoomNotApplied = false;
|
|
13438
|
+
this.zoomingRect = null;
|
|
13364
13439
|
}
|
|
13365
|
-
map.mapScaleValue = zoomCalculationFactor;
|
|
13366
|
-
this.applyTransform(true);
|
|
13367
|
-
this.maps.zoomNotApplied = false;
|
|
13368
|
-
this.zoomingRect = null;
|
|
13369
13440
|
}
|
|
13370
13441
|
};
|
|
13371
13442
|
Zoom.prototype.setInteraction = function (newInteraction) {
|
|
@@ -13394,6 +13465,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13394
13465
|
this.pinchFactor *= newScale;
|
|
13395
13466
|
this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
|
|
13396
13467
|
var zoomCalculationFactor = this.pinchFactor;
|
|
13468
|
+
var isZoomCancelled;
|
|
13397
13469
|
if (!map.isTileMap) {
|
|
13398
13470
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13399
13471
|
var minBounds = map.baseMapRectBounds['min'];
|
|
@@ -13409,7 +13481,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13409
13481
|
translatePointY = (currentHeight < map.mapAreaRect.height) ? (availSize.y + ((-(minBounds['y'])) + ((availSize.height / 2) - (mapTotalHeight / 2)))) : translatePointY;
|
|
13410
13482
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
13411
13483
|
map.scale = zoomCalculationFactor;
|
|
13412
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13484
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13485
|
+
if (isZoomCancelled) {
|
|
13486
|
+
map.translatePoint = map.previousPoint;
|
|
13487
|
+
map.scale = map.previousScale;
|
|
13488
|
+
}
|
|
13413
13489
|
}
|
|
13414
13490
|
else {
|
|
13415
13491
|
var newTileFactor = zoomCalculationFactor;
|
|
@@ -13420,10 +13496,20 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13420
13496
|
map.translatePoint.y = (map.tileTranslatePoint.y - (0.5 * Math.pow(2, newTileFactor))) /
|
|
13421
13497
|
(Math.pow(2, newTileFactor));
|
|
13422
13498
|
map.scale = (Math.pow(2, newTileFactor));
|
|
13423
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13424
|
-
|
|
13499
|
+
isZoomCancelled = this.triggerZoomEvent(prevTilePoint, prevLevel, '');
|
|
13500
|
+
if (isZoomCancelled) {
|
|
13501
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
13502
|
+
map.scale = map.previousScale;
|
|
13503
|
+
map.tileZoomLevel = prevLevel;
|
|
13504
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
13505
|
+
}
|
|
13506
|
+
else {
|
|
13507
|
+
map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint);
|
|
13508
|
+
}
|
|
13509
|
+
}
|
|
13510
|
+
if (!isZoomCancelled) {
|
|
13511
|
+
this.applyTransform();
|
|
13425
13512
|
}
|
|
13426
|
-
this.applyTransform();
|
|
13427
13513
|
};
|
|
13428
13514
|
Zoom.prototype.drawZoomRectangle = function () {
|
|
13429
13515
|
var map = this.maps;
|
|
@@ -13702,10 +13788,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13702
13788
|
}
|
|
13703
13789
|
var lati = (!isNullOrUndefined(markerSettings.latitudeValuePath)) ?
|
|
13704
13790
|
Number(getValueFromObject(data, markerSettings.latitudeValuePath)) : !isNullOrUndefined(data['latitude']) ?
|
|
13705
|
-
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] :
|
|
13791
|
+
parseFloat(data['latitude']) : !isNullOrUndefined(data['Latitude']) ? data['Latitude'] : null;
|
|
13706
13792
|
var long = (!isNullOrUndefined(markerSettings.longitudeValuePath)) ?
|
|
13707
13793
|
Number(getValueFromObject(data, markerSettings.longitudeValuePath)) : !isNullOrUndefined(data['longitude']) ?
|
|
13708
|
-
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] :
|
|
13794
|
+
parseFloat(data['longitude']) : !isNullOrUndefined(data['Longitude']) ? data['Longitude'] : null;
|
|
13709
13795
|
var offset = markerSettings.offset;
|
|
13710
13796
|
if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(long) && !isNullOrUndefined(lati)) {
|
|
13711
13797
|
var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
@@ -13725,10 +13811,10 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13725
13811
|
nullCount += (!isNaN(lati) && !isNaN(long)) ? 0 : 1;
|
|
13726
13812
|
markerTemplateCounts += (eventArgs.cancel) ? 1 : 0;
|
|
13727
13813
|
markerCounts += (eventArgs.cancel) ? 1 : 0;
|
|
13728
|
-
_this.maps.markerNullCount = (
|
|
13729
|
-
? _this.maps.markerNullCount : _this.maps.markerNullCount
|
|
13814
|
+
_this.maps.markerNullCount = (isNullOrUndefined(lati) || isNullOrUndefined(long))
|
|
13815
|
+
? _this.maps.markerNullCount + 1 : _this.maps.markerNullCount;
|
|
13730
13816
|
var markerDataLength = markerDatas.length - _this.maps.markerNullCount;
|
|
13731
|
-
if (markerSVGObject.childElementCount === (
|
|
13817
|
+
if (markerSVGObject.childElementCount === (markerDataLength - markerTemplateCounts - nullCount) && (type !== 'Template')) {
|
|
13732
13818
|
layerElement.appendChild(markerSVGObject);
|
|
13733
13819
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
13734
13820
|
_this.maps.svgObject.appendChild(markerSVGObject);
|
|
@@ -13736,7 +13822,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13736
13822
|
clusterTemplate(currentLayers, markerSVGObject, _this.maps, layerIndex, markerSVGObject, layerElement, true, true);
|
|
13737
13823
|
}
|
|
13738
13824
|
}
|
|
13739
|
-
if (markerTemplateElements.childElementCount === (
|
|
13825
|
+
if (markerTemplateElements.childElementCount === (markerDataLength - markerCounts - nullCount) && getElementByID(_this.maps.element.id + '_Secondary_Element')) {
|
|
13740
13826
|
getElementByID(_this.maps.element.id + '_Secondary_Element').appendChild(markerTemplateElements);
|
|
13741
13827
|
if (scale >= 1) {
|
|
13742
13828
|
if (currentLayers.markerClusterSettings.allowClustering) {
|
|
@@ -14134,8 +14220,13 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14134
14220
|
map.translatePoint = new Point(translatePointX, translatePointY);
|
|
14135
14221
|
map.zoomTranslatePoint = map.translatePoint;
|
|
14136
14222
|
map.scale = zoomFactor;
|
|
14137
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
14138
|
-
|
|
14223
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
14224
|
+
map.translatePoint = map.zoomTranslatePoint = map.previousPoint;
|
|
14225
|
+
map.scale = map.previousScale;
|
|
14226
|
+
}
|
|
14227
|
+
else {
|
|
14228
|
+
this.applyTransform(true);
|
|
14229
|
+
}
|
|
14139
14230
|
}
|
|
14140
14231
|
else if ((map.isTileMap) && ((zoomFactor >= minZoom && zoomFactor <= maxZoom) || map.isReset)) {
|
|
14141
14232
|
var tileZoomFactor = prevLevel < minZoom && !map.isReset ? minZoom : zoomFactor;
|
|
@@ -14152,25 +14243,32 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14152
14243
|
map.tileTranslatePoint.y = map.initialTileTranslate.y;
|
|
14153
14244
|
tileZoomFactor = map.tileZoomLevel = map.mapScaleValue = map.initialZoomLevel;
|
|
14154
14245
|
}
|
|
14155
|
-
this.triggerZoomEvent(prevTilePoint, prevLevel, type)
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
|
|
14159
|
-
|
|
14160
|
-
}
|
|
14161
|
-
if (document.querySelector('.GroupElement')) {
|
|
14162
|
-
document.querySelector('.GroupElement').style.display = 'none';
|
|
14246
|
+
if (this.triggerZoomEvent(prevTilePoint, prevLevel, type)) {
|
|
14247
|
+
map.translatePoint = map.tileTranslatePoint = new Point(0, 0);
|
|
14248
|
+
map.scale = map.previousScale;
|
|
14249
|
+
map.tileZoomLevel = prevLevel;
|
|
14250
|
+
map.zoomSettings.zoomFactor = map.previousScale;
|
|
14163
14251
|
}
|
|
14164
|
-
|
|
14165
|
-
|
|
14166
|
-
|
|
14167
|
-
|
|
14168
|
-
|
|
14169
|
-
_this.applyTransform(true);
|
|
14170
|
-
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
14171
|
-
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
14252
|
+
else {
|
|
14253
|
+
map.translatePoint.y = (map.tileTranslatePoint.y - (0.01 * map.mapScaleValue)) / map.scale;
|
|
14254
|
+
map.translatePoint.x = (map.tileTranslatePoint.x - (0.01 * map.mapScaleValue)) / map.scale;
|
|
14255
|
+
if (document.getElementById(this.maps.element.id + '_LayerIndex_1')) {
|
|
14256
|
+
document.getElementById(this.maps.element.id + '_LayerIndex_1').style.display = 'none';
|
|
14172
14257
|
}
|
|
14173
|
-
|
|
14258
|
+
if (document.querySelector('.GroupElement')) {
|
|
14259
|
+
document.querySelector('.GroupElement').style.display = 'none';
|
|
14260
|
+
}
|
|
14261
|
+
this.markerLineAnimation(map);
|
|
14262
|
+
map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint, type);
|
|
14263
|
+
var element1 = document.getElementById(this.maps.element.id + '_tiles');
|
|
14264
|
+
var animationDuration = this.maps.layersCollection[0].animationDuration;
|
|
14265
|
+
setTimeout(function () {
|
|
14266
|
+
_this.applyTransform(true);
|
|
14267
|
+
if (document.getElementById(_this.maps.element.id + '_LayerIndex_1')) {
|
|
14268
|
+
document.getElementById(_this.maps.element.id + '_LayerIndex_1').style.display = 'block';
|
|
14269
|
+
}
|
|
14270
|
+
}, animationDuration);
|
|
14271
|
+
}
|
|
14174
14272
|
}
|
|
14175
14273
|
this.maps.zoomNotApplied = false;
|
|
14176
14274
|
}
|
|
@@ -14179,7 +14277,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14179
14277
|
var map = this.maps;
|
|
14180
14278
|
this.toolBarGroup = map.renderer.createGroup({
|
|
14181
14279
|
id: map.element.id + '_Zooming_KitCollection',
|
|
14182
|
-
opacity: map.theme.toLowerCase() === '
|
|
14280
|
+
opacity: map.theme.toLowerCase() === 'fluentdark' ? 0.6 : 0.3
|
|
14183
14281
|
});
|
|
14184
14282
|
var kitHeight = 16;
|
|
14185
14283
|
var kitWidth = 16;
|
|
@@ -14583,14 +14681,14 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14583
14681
|
if (document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14584
14682
|
if (!this.maps.zoomSettings.enablePanning) {
|
|
14585
14683
|
if (target.id.indexOf('_Zooming_ToolBar') > -1 || target.id.indexOf('_Zooming_Rect') > -1) {
|
|
14586
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14587
|
-
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14684
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14685
|
+
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14588
14686
|
}
|
|
14589
14687
|
}
|
|
14590
14688
|
}
|
|
14591
14689
|
}
|
|
14592
14690
|
else {
|
|
14593
|
-
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === '
|
|
14691
|
+
getElementByID(map.element.id + '_Zooming_KitCollection').setAttribute('opacity', map.theme.toLowerCase() === 'fluentdark' ? '0.6' : '0.3');
|
|
14594
14692
|
if (!this.maps.zoomSettings.enablePanning && document.getElementById(map.element.id + '_Zooming_ToolBar_Pan_Group')) {
|
|
14595
14693
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan_Rect').setAttribute('opacity', '1');
|
|
14596
14694
|
getElementByID(map.element.id + '_Zooming_ToolBar_Pan').setAttribute('opacity', '1');
|
|
@@ -14797,7 +14895,29 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
14797
14895
|
* @private
|
|
14798
14896
|
*/
|
|
14799
14897
|
Print.prototype.getHTMLContent = function (elements) {
|
|
14898
|
+
var elementRect = getClientElement(this.control.element.id);
|
|
14800
14899
|
var div = createElement('div');
|
|
14900
|
+
var divElement = this.control.element.cloneNode(true);
|
|
14901
|
+
if (this.control.isTileMap) {
|
|
14902
|
+
for (var i = 0; i < divElement.childElementCount; i++) {
|
|
14903
|
+
if (divElement.children[i].id === this.control.element.id + '_tile_parent') {
|
|
14904
|
+
divElement.children[i].style.removeProperty('height');
|
|
14905
|
+
divElement.children[i].style.removeProperty('width');
|
|
14906
|
+
divElement.children[i].style.removeProperty('top');
|
|
14907
|
+
divElement.children[i].style.removeProperty('left');
|
|
14908
|
+
divElement.children[i].style.removeProperty('right');
|
|
14909
|
+
divElement.children[i].style.removeProperty('overflow');
|
|
14910
|
+
var svgElement = document.getElementById(this.control.element.id + '_Tile_SVG_Parent');
|
|
14911
|
+
divElement.children[i].children[0].style.overflow = 'hidden';
|
|
14912
|
+
divElement.children[i].children[0].style.position = 'absolute';
|
|
14913
|
+
divElement.children[i].children[0].style.height = svgElement.style.height;
|
|
14914
|
+
divElement.children[i].children[0].style.width = svgElement.style.width;
|
|
14915
|
+
divElement.children[i].children[0].style.left = svgElement.style.left;
|
|
14916
|
+
divElement.children[i].children[0].style.top = svgElement.style.top;
|
|
14917
|
+
break;
|
|
14918
|
+
}
|
|
14919
|
+
}
|
|
14920
|
+
}
|
|
14801
14921
|
if (elements) {
|
|
14802
14922
|
if (elements instanceof Array) {
|
|
14803
14923
|
Array.prototype.forEach.call(elements, function (value) {
|
|
@@ -14812,7 +14932,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
14812
14932
|
}
|
|
14813
14933
|
}
|
|
14814
14934
|
else {
|
|
14815
|
-
div.appendChild(
|
|
14935
|
+
div.appendChild(divElement);
|
|
14816
14936
|
}
|
|
14817
14937
|
return div;
|
|
14818
14938
|
};
|
|
@@ -14878,17 +14998,19 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
14878
14998
|
var toolbarEle = document.getElementById(_this.control.element.id + '_ToolBar');
|
|
14879
14999
|
var svgParent = document.getElementById(_this.control.element.id + '_Tile_SVG_Parent');
|
|
14880
15000
|
var svgDataElement;
|
|
15001
|
+
var tileSvg;
|
|
15002
|
+
var svgObject = getElementByID(_this.control.element.id + '_svg').cloneNode(true);
|
|
14881
15003
|
if (!_this.control.isTileMap) {
|
|
14882
15004
|
svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
|
|
14883
15005
|
_this.control.svgObject.outerHTML + '</svg>';
|
|
14884
15006
|
}
|
|
14885
15007
|
else {
|
|
14886
|
-
|
|
15008
|
+
tileSvg = getElementByID(_this.control.element.id + '_Tile_SVG').cloneNode(true);
|
|
14887
15009
|
svgDataElement = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' +
|
|
14888
|
-
|
|
15010
|
+
svgObject.outerHTML + tileSvg.outerHTML + '</svg>';
|
|
14889
15011
|
}
|
|
14890
15012
|
var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgDataElement] :
|
|
14891
|
-
[(new XMLSerializer()).serializeToString(
|
|
15013
|
+
[(new XMLSerializer()).serializeToString(svgObject)], { type: 'image/svg+xml' }));
|
|
14892
15014
|
if (type === 'SVG') {
|
|
14893
15015
|
if (allowDownload) {
|
|
14894
15016
|
triggerDownload(fileName, type, url, isDownload);
|
|
@@ -14919,6 +15041,9 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
14919
15041
|
image_1.src = url;
|
|
14920
15042
|
}
|
|
14921
15043
|
else {
|
|
15044
|
+
var svgParentElement = document.getElementById(_this.control.element.id + '_MapAreaBorder');
|
|
15045
|
+
var top_1 = parseFloat(svgParentElement.getAttribute('y'));
|
|
15046
|
+
var left_1 = parseFloat(svgParentElement.getAttribute('x'));
|
|
14922
15047
|
var imgxHttp = new XMLHttpRequest();
|
|
14923
15048
|
var imgTileLength_1 = _this.control.mapLayerPanel.tiles.length;
|
|
14924
15049
|
var _loop_1 = function (i) {
|
|
@@ -14928,22 +15053,26 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
14928
15053
|
ctxt_1.fillStyle = _this.control.background ? _this.control.background : '#FFFFFF';
|
|
14929
15054
|
ctxt_1.fillRect(0, 0, _this.control.availableSize.width, _this.control.availableSize.height);
|
|
14930
15055
|
ctxt_1.font = _this.control.titleSettings.textStyle.size + ' Arial';
|
|
14931
|
-
|
|
14932
|
-
|
|
15056
|
+
var titleElement = document.getElementById(_this.control.element.id + '_Map_title');
|
|
15057
|
+
if (!isNullOrUndefined(titleElement)) {
|
|
15058
|
+
ctxt_1.fillStyle = titleElement.getAttribute('fill');
|
|
15059
|
+
ctxt_1.fillText(_this.control.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
|
|
15060
|
+
}
|
|
14933
15061
|
exportTileImg.onload = (function () {
|
|
14934
15062
|
if (i === 0 || i === imgTileLength_1 + 1) {
|
|
14935
15063
|
if (i === 0) {
|
|
14936
15064
|
ctxt_1.setTransform(1, 0, 0, 1, 0, 0);
|
|
14937
|
-
ctxt_1.rect(0,
|
|
15065
|
+
ctxt_1.rect(0, top_1, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
|
|
14938
15066
|
ctxt_1.clip();
|
|
14939
15067
|
}
|
|
14940
15068
|
else {
|
|
14941
|
-
ctxt_1.setTransform(1, 0, 0, 1,
|
|
15069
|
+
ctxt_1.setTransform(1, 0, 0, 1, left_1, top_1);
|
|
14942
15070
|
}
|
|
14943
15071
|
}
|
|
14944
15072
|
else {
|
|
14945
|
-
|
|
14946
|
-
|
|
15073
|
+
var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
|
|
15074
|
+
ctxt_1.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) +
|
|
15075
|
+
top_1);
|
|
14947
15076
|
}
|
|
14948
15077
|
ctxt_1.drawImage(exportTileImg, 0, 0);
|
|
14949
15078
|
if (i === imgTileLength_1 + 1) {
|
|
@@ -14969,7 +15098,7 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
14969
15098
|
}
|
|
14970
15099
|
else {
|
|
14971
15100
|
setTimeout(function () {
|
|
14972
|
-
exportTileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(
|
|
15101
|
+
exportTileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(tileSvg)], { type: 'image/svg+xml' }));
|
|
14973
15102
|
}, 300);
|
|
14974
15103
|
}
|
|
14975
15104
|
}
|
|
@@ -15052,8 +15181,8 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15052
15181
|
var exportElement = _this.control.svgObject.cloneNode(true);
|
|
15053
15182
|
var backgroundElement = exportElement.childNodes[0];
|
|
15054
15183
|
var backgroundColor = backgroundElement.getAttribute('fill');
|
|
15055
|
-
if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
|
|
15056
|
-
&& (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
15184
|
+
if ((_this.control.theme === 'Tailwind' || _this.control.theme === 'TailwindDark' || _this.control.theme === 'Bootstrap5' || _this.control.theme === 'Bootstrap5Dark'
|
|
15185
|
+
|| _this.control.theme === 'Fluent' || _this.control.theme === 'FluentDark') && (backgroundColor === 'rgba(255,255,255, 0.0)' || backgroundColor === 'transparent')) {
|
|
15057
15186
|
exportElement.childNodes[0].setAttribute('fill', 'rgba(255,255,255, 1)');
|
|
15058
15187
|
}
|
|
15059
15188
|
var url = window.URL.createObjectURL(new Blob(type === 'SVG' ? [svgData] :
|
|
@@ -15082,6 +15211,9 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15082
15211
|
image.src = url;
|
|
15083
15212
|
}
|
|
15084
15213
|
else {
|
|
15214
|
+
var svgParentElement = document.getElementById(_this.control.element.id + '_MapAreaBorder');
|
|
15215
|
+
var top_1 = parseFloat(svgParentElement.getAttribute('y'));
|
|
15216
|
+
var left_1 = parseFloat(svgParentElement.getAttribute('x'));
|
|
15085
15217
|
var xHttp = new XMLHttpRequest();
|
|
15086
15218
|
var tileLength_1 = _this.control.mapLayerPanel.tiles.length;
|
|
15087
15219
|
var _loop_1 = function (i) {
|
|
@@ -15091,22 +15223,25 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15091
15223
|
ctx.fillStyle = _this.control.background ? _this.control.background : '#FFFFFF';
|
|
15092
15224
|
ctx.fillRect(0, 0, _this.control.availableSize.width, _this.control.availableSize.height);
|
|
15093
15225
|
ctx.font = _this.control.titleSettings.textStyle.size + ' Arial';
|
|
15094
|
-
|
|
15095
|
-
|
|
15226
|
+
var titleElement = document.getElementById(_this.control.element.id + '_Map_title');
|
|
15227
|
+
if (!isNullOrUndefined(titleElement)) {
|
|
15228
|
+
ctx.fillStyle = titleElement.getAttribute('fill');
|
|
15229
|
+
ctx.fillText(_this.control.titleSettings.text, parseFloat(titleElement.getAttribute('x')), parseFloat(titleElement.getAttribute('y')));
|
|
15230
|
+
}
|
|
15096
15231
|
tileImg.onload = (function () {
|
|
15097
15232
|
if (i === 0 || i === tileLength_1 + 1) {
|
|
15098
15233
|
if (i === 0) {
|
|
15099
15234
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
15100
|
-
ctx.rect(0,
|
|
15235
|
+
ctx.rect(0, top_1, parseFloat(svgParent.style.width), parseFloat(svgParent.style.height));
|
|
15101
15236
|
ctx.clip();
|
|
15102
15237
|
}
|
|
15103
15238
|
else {
|
|
15104
|
-
ctx.setTransform(1, 0, 0, 1,
|
|
15239
|
+
ctx.setTransform(1, 0, 0, 1, left_1, top_1);
|
|
15105
15240
|
}
|
|
15106
15241
|
}
|
|
15107
15242
|
else {
|
|
15108
|
-
|
|
15109
|
-
|
|
15243
|
+
var tileParent = document.getElementById(_this.control.element.id + '_tile_parent');
|
|
15244
|
+
ctx.setTransform(1, 0, 0, 1, parseFloat(tile.style.left) + left_1, parseFloat(tile.style.top) + top_1);
|
|
15110
15245
|
}
|
|
15111
15246
|
ctx.drawImage(tileImg, 0, 0);
|
|
15112
15247
|
if (i === tileLength_1 + 1) {
|
|
@@ -15132,7 +15267,8 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15132
15267
|
}
|
|
15133
15268
|
else {
|
|
15134
15269
|
setTimeout(function () {
|
|
15135
|
-
|
|
15270
|
+
var tileSvg = document.getElementById(_this.control.element.id + '_Tile_SVG');
|
|
15271
|
+
tileImg.src = window.URL.createObjectURL(new Blob([(new XMLSerializer()).serializeToString(tileSvg)], { type: 'image/svg+xml' }));
|
|
15136
15272
|
}, 300);
|
|
15137
15273
|
}
|
|
15138
15274
|
}
|
|
@@ -15180,5 +15316,5 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15180
15316
|
* exporting all modules from maps index
|
|
15181
15317
|
*/
|
|
15182
15318
|
|
|
15183
|
-
export { Maps, load, loaded, click, rightClick, doubleClick, resize, tooltipRender, shapeSelected, shapeHighlight, mousemove, mouseup, mousedown, layerRendering, shapeRendering, markerRendering, markerClusterRendering, markerClick, markerClusterClick, markerMouseMove, markerClusterMouseMove, dataLabelRendering, bubbleRendering, bubbleClick, bubbleMouseMove, animationComplete, legendRendering, annotationRendering, itemSelection, itemHighlight, beforePrint, zoomIn, zoomOut, pan, Annotation, Arrow, Font, Border, CenterPosition, TooltipSettings, Margin, ConnectorLineSettings, MarkerClusterSettings, MarkerClusterData, ColorMappingSettings, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, SelectionSettings, HighlightSettings, NavigationLineSettings, BubbleSettings, CommonTitleSettings, SubTitleSettings, TitleSettings, ZoomSettings, ToggleLegendSettings, LegendSettings, DataLabelSettings, ShapeSettings, MarkerBase, MarkerSettings, LayerSettings, Tile, MapsAreaSettings, Size, stringToNumber, calculateSize, createSvg, getMousePosition, degreesToRadians, radiansToDegrees, convertGeoToPoint, convertTileLatLongToPoint, xToCoordinate, yToCoordinate, aitoff, roundTo, sinci, acos, calculateBound, triggerDownload, Point, MinMax, GeoLocation, measureText, TextOption, PathOption, ColorValue, RectOption, CircleOption, PolygonOption, PolylineOption, LineOption, Line, MapLocation, Rect, PatternOptions, renderTextElement, convertElement, formatValue, convertStringToValue, convertElementFromLabel, drawSymbols, getValueFromObject, markerColorChoose, markerShapeChoose, clusterTemplate, mergeSeparateCluster, clusterSeparate, marker, markerTemplate, maintainSelection, maintainStyleClass, appendShape, drawCircle, drawRectangle, drawPath, drawPolygon, drawPolyline, drawLine, calculateShapes, drawDiamond, drawTriangle, drawCross, drawHorizontalLine, drawVerticalLine, drawStar, drawBalloon, drawPattern, getFieldData, checkShapeDataFields, checkPropertyPath, filter, getRatioOfBubble, findMidPointOfPolygon, isCustomPath, textTrim, findPosition, removeElement, calculateCenterFromPixel, getTranslate, getZoomTranslate, fixInitialScaleForTile, getElementByID, Internalize, getTemplateFunction, getElement, getShapeData, triggerShapeEvent, getElementsByClassName, querySelector, getTargetElement, createStyle, customizeStyle, triggerItemSelectionEvent, removeClass, elementAnimate, timeout, showTooltip, wordWrap, createTooltip, drawSymbol, renderLegendShape, getElementOffset, changeBorderWidth, changeNavaigationLineWidth, targetTouches, calculateScale, getDistance, getTouches, getTouchCenter, sum, zoomAnimate, animate, MapAjax, smoothTranslate, compareZoomFactor, calculateZoomLevel, processResult, LayerPanel, Bubble, BingMap, Marker, ColorMapping, DataLabel, NavigationLine, Legend, Highlight, Selection, MapsTooltip, Zoom, Annotations, Print, ImageExport, PdfExport };
|
|
15319
|
+
export { Maps, load, loaded, click, rightClick, doubleClick, resize, tooltipRender, shapeSelected, shapeHighlight, mousemove, mouseup, mousedown, layerRendering, shapeRendering, markerRendering, markerClusterRendering, markerClick, markerClusterClick, markerMouseMove, markerClusterMouseMove, dataLabelRendering, bubbleRendering, bubbleClick, bubbleMouseMove, animationComplete, legendRendering, annotationRendering, itemSelection, itemHighlight, beforePrint, zoomIn, zoomOut, pan, Annotation, Arrow, Font, Border, CenterPosition, TooltipSettings, Margin, ConnectorLineSettings, MarkerClusterSettings, MarkerClusterData, ColorMappingSettings, InitialMarkerSelectionSettings, InitialShapeSelectionSettings, SelectionSettings, HighlightSettings, NavigationLineSettings, BubbleSettings, CommonTitleSettings, SubTitleSettings, TitleSettings, ZoomSettings, ToggleLegendSettings, LegendSettings, DataLabelSettings, ShapeSettings, MarkerBase, MarkerSettings, LayerSettings, Tile, MapsAreaSettings, Size, stringToNumber, calculateSize, createSvg, getMousePosition, degreesToRadians, radiansToDegrees, convertGeoToPoint, convertTileLatLongToPoint, xToCoordinate, yToCoordinate, aitoff, roundTo, sinci, acos, calculateBound, triggerDownload, Point, MinMax, GeoLocation, measureText, TextOption, PathOption, ColorValue, RectOption, CircleOption, PolygonOption, PolylineOption, LineOption, Line, MapLocation, Rect, PatternOptions, renderTextElement, convertElement, formatValue, convertStringToValue, convertElementFromLabel, drawSymbols, getValueFromObject, markerColorChoose, markerShapeChoose, clusterTemplate, mergeSeparateCluster, clusterSeparate, marker, markerTemplate, maintainSelection, maintainStyleClass, appendShape, drawCircle, drawRectangle, drawPath, drawPolygon, drawPolyline, drawLine, calculateShapes, drawDiamond, drawTriangle, drawCross, drawHorizontalLine, drawVerticalLine, drawStar, drawBalloon, drawPattern, getFieldData, checkShapeDataFields, checkPropertyPath, filter, getRatioOfBubble, findMidPointOfPolygon, isCustomPath, textTrim, findPosition, removeElement, calculateCenterFromPixel, getTranslate, getZoomTranslate, fixInitialScaleForTile, getElementByID, getClientElement, Internalize, getTemplateFunction, getElement, getShapeData, triggerShapeEvent, getElementsByClassName, querySelector, getTargetElement, createStyle, customizeStyle, triggerItemSelectionEvent, removeClass, elementAnimate, timeout, showTooltip, wordWrap, createTooltip, drawSymbol, renderLegendShape, getElementOffset, changeBorderWidth, changeNavaigationLineWidth, targetTouches, calculateScale, getDistance, getTouches, getTouchCenter, sum, zoomAnimate, animate, MapAjax, smoothTranslate, compareZoomFactor, calculateZoomLevel, processResult, LayerPanel, Bubble, BingMap, Marker, ColorMapping, DataLabel, NavigationLine, Legend, Highlight, Selection, MapsTooltip, Zoom, Annotations, Print, ImageExport, PdfExport };
|
|
15184
15320
|
//# sourceMappingURL=ej2-maps.es5.js.map
|