@syncfusion/ej2-maps 20.3.56 → 20.4.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +16 -1
- package/CHANGELOG.md +9 -1
- package/README.md +65 -51
- 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 +915 -722
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +901 -712
- 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 +33 -20
- package/src/maps/layers/bing-map.d.ts +1 -0
- package/src/maps/layers/bing-map.js +1 -0
- package/src/maps/layers/bubble.d.ts +4 -0
- package/src/maps/layers/bubble.js +7 -3
- package/src/maps/layers/color-mapping.d.ts +5 -0
- package/src/maps/layers/color-mapping.js +5 -3
- package/src/maps/layers/data-label.d.ts +0 -1
- package/src/maps/layers/data-label.js +5 -12
- package/src/maps/layers/layer-panel.d.ts +7 -7
- package/src/maps/layers/layer-panel.js +98 -53
- package/src/maps/layers/legend.js +19 -19
- package/src/maps/layers/marker.d.ts +13 -0
- package/src/maps/layers/marker.js +124 -107
- package/src/maps/layers/navigation-selected-line.d.ts +5 -0
- package/src/maps/layers/navigation-selected-line.js +111 -104
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +17 -0
- package/src/maps/maps.js +448 -364
- package/src/maps/model/base.js +1 -1
- package/src/maps/model/export-image.d.ts +4 -3
- package/src/maps/model/export-image.js +7 -6
- package/src/maps/model/export-pdf.d.ts +6 -6
- package/src/maps/model/export-pdf.js +8 -7
- package/src/maps/model/interface.d.ts +2 -2
- package/src/maps/model/print.d.ts +4 -2
- package/src/maps/model/print.js +6 -3
- package/src/maps/user-interaction/annotation.js +0 -2
- package/src/maps/user-interaction/highlight.js +4 -3
- package/src/maps/user-interaction/selection.js +4 -2
- package/src/maps/user-interaction/tooltip.js +5 -5
- package/src/maps/user-interaction/zoom.d.ts +5 -0
- package/src/maps/user-interaction/zoom.js +7 -7
- package/src/maps/utils/helper.d.ts +2 -0
- package/src/maps/utils/helper.js +37 -30
package/dist/es6/ej2-maps.es5.js
CHANGED
|
@@ -16,8 +16,6 @@ var __extends$1 = (undefined && undefined.__extends) || (function () {
|
|
|
16
16
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
17
17
|
};
|
|
18
18
|
})();
|
|
19
|
-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
20
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
21
19
|
/* eslint-disable max-len */
|
|
22
20
|
/**
|
|
23
21
|
* Helper functions for maps control
|
|
@@ -677,13 +675,14 @@ function convertElement(element, markerId, data, index, mapObj) {
|
|
|
677
675
|
}
|
|
678
676
|
var templateHtml = childElement.innerHTML;
|
|
679
677
|
var properties = Object.keys(data);
|
|
678
|
+
var regExp = RegExp;
|
|
680
679
|
for (var i = 0; i < properties.length; i++) {
|
|
681
680
|
if (typeof data[properties[i]] === 'object') {
|
|
682
681
|
templateHtml = convertStringToValue(templateHtml, '', data, mapObj);
|
|
683
682
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
684
683
|
}
|
|
685
684
|
else if (properties[i].toLowerCase() !== 'latitude' && properties[i].toLowerCase() !== 'longitude') {
|
|
686
|
-
templateHtml = templateHtml.replace(new
|
|
685
|
+
templateHtml = templateHtml.replace(new regExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
|
|
687
686
|
}
|
|
688
687
|
}
|
|
689
688
|
childElement.innerHTML = templateHtml;
|
|
@@ -720,6 +719,7 @@ function formatValue(value, maps) {
|
|
|
720
719
|
function convertStringToValue(stringTemplate, format, data, maps) {
|
|
721
720
|
var templateHtml = (stringTemplate === '') ? format : stringTemplate;
|
|
722
721
|
var templateValue = (stringTemplate === '') ? templateHtml.split('${') : templateHtml.split('{{:');
|
|
722
|
+
var regExp = RegExp;
|
|
723
723
|
for (var i = 0; i < templateValue.length; i++) {
|
|
724
724
|
if ((templateValue[i].indexOf('}}') > -1 && templateValue[i].indexOf('.') > -1) ||
|
|
725
725
|
(templateValue[i].indexOf('}') > -1 && templateValue[i].search('.') > -1)) {
|
|
@@ -729,7 +729,7 @@ function convertStringToValue(stringTemplate, format, data, maps) {
|
|
|
729
729
|
var templateSplitValue = (getValueFromObject(data, split[j])).toString();
|
|
730
730
|
templateHtml = (stringTemplate === '') ?
|
|
731
731
|
templateHtml.split('${' + split[j] + '}').join(formatValue(templateSplitValue, maps)) :
|
|
732
|
-
templateHtml.replace(new
|
|
732
|
+
templateHtml.replace(new regExp('{{:' + split[j] + '}}', 'g'), templateSplitValue);
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
}
|
|
@@ -751,9 +751,10 @@ function convertElementFromLabel(element, labelId, data, index, mapObj) {
|
|
|
751
751
|
var templateHtml = labelEle.outerHTML;
|
|
752
752
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
753
753
|
var properties = Object.keys(data);
|
|
754
|
+
var regExp = RegExp;
|
|
754
755
|
for (var i = 0; i < properties.length; i++) {
|
|
755
756
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
756
|
-
templateHtml = templateHtml.replace(new
|
|
757
|
+
templateHtml = templateHtml.replace(new regExp('{{:' + properties[i] + '}}', 'g'), data[properties[i].toString()]);
|
|
757
758
|
}
|
|
758
759
|
var templateEle = createElement('div', {
|
|
759
760
|
id: labelId,
|
|
@@ -862,7 +863,7 @@ function markerShapeChoose(eventArgs, data) {
|
|
|
862
863
|
var shape = ((eventArgs.shapeValuePath.indexOf('.') > -1) ?
|
|
863
864
|
(getValueFromObject(data, eventArgs.shapeValuePath).toString()) :
|
|
864
865
|
data[eventArgs.shapeValuePath]);
|
|
865
|
-
eventArgs.shape = (shape.toString() !==
|
|
866
|
+
eventArgs.shape = (shape.toString() !== '') ? shape : eventArgs.shape;
|
|
866
867
|
if (data[eventArgs.shapeValuePath] === 'Image') {
|
|
867
868
|
eventArgs.imageUrl = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
868
869
|
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
@@ -871,7 +872,7 @@ function markerShapeChoose(eventArgs, data) {
|
|
|
871
872
|
}
|
|
872
873
|
else {
|
|
873
874
|
var shapes = (!isNullOrUndefined(eventArgs.shapeValuePath)) ? ((eventArgs.shapeValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.shapeValuePath).toString() : eventArgs.shape) : eventArgs.shape;
|
|
874
|
-
eventArgs.shape = (shapes.toString() !==
|
|
875
|
+
eventArgs.shape = (shapes.toString() !== '') ? shapes : eventArgs.shape;
|
|
875
876
|
var shapeImage = (!isNullOrUndefined(eventArgs.imageUrlValuePath)) ?
|
|
876
877
|
((eventArgs.imageUrlValuePath.indexOf('.') > -1) ? getValueFromObject(data, eventArgs.imageUrlValuePath).toString() : (!isNullOrUndefined(data[eventArgs.imageUrlValuePath]) ?
|
|
877
878
|
data[eventArgs.imageUrlValuePath] : eventArgs.imageUrl)) : eventArgs.imageUrl;
|
|
@@ -950,8 +951,6 @@ function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex, markerC
|
|
|
950
951
|
container['top'] : (container['bottom'] - container['top'])));
|
|
951
952
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
952
953
|
var translate = (maps.isTileMap) ? new Object() : getTranslate(maps, currentLayer, false);
|
|
953
|
-
var transPoint = (maps.isTileMap) ? { x: 0, y: 0 } : (maps.translatePoint.x !== 0) ?
|
|
954
|
-
maps.translatePoint : translate['location'];
|
|
955
954
|
var dataIndex = parseInt(markerTemplate.childNodes[o]['id'].split('_dataIndex_')[1].split('_')[0], 10);
|
|
956
955
|
var markerIndex = parseInt(markerTemplate.childNodes[o]['id'].split('_MarkerIndex_')[1].split('_')[0], 10);
|
|
957
956
|
var markerSetting = currentLayer.markerSettings[markerIndex];
|
|
@@ -1600,6 +1599,7 @@ function drawStar(maps, options, size, location, element) {
|
|
|
1600
1599
|
* @param {PathOption} options - Specifies the path options
|
|
1601
1600
|
* @param {Size} size - Specifies the size
|
|
1602
1601
|
* @param {MapLocation} location - Specifies the map location
|
|
1602
|
+
* @param {string} type - Specifies the type.
|
|
1603
1603
|
* @param {Element} element - Specifies the element
|
|
1604
1604
|
* @returns {Element} - Returns the element
|
|
1605
1605
|
* @private
|
|
@@ -2090,7 +2090,8 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
2090
2090
|
mapObject.zoomTranslatePoint.y = y;
|
|
2091
2091
|
}
|
|
2092
2092
|
else {
|
|
2093
|
-
if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1
|
|
2093
|
+
if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1
|
|
2094
|
+
|| mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
|
|
2094
2095
|
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2095
2096
|
scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
|
|
2096
2097
|
mapWidth *= scaleFactor;
|
|
@@ -2108,8 +2109,10 @@ function getTranslate(mapObject, layer, animate) {
|
|
|
2108
2109
|
}
|
|
2109
2110
|
}
|
|
2110
2111
|
if (!isNullOrUndefined(mapObject.translatePoint)) {
|
|
2111
|
-
x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
|
|
2112
|
-
|
|
2112
|
+
x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
|
|
2113
|
+
mapObject.translatePoint.x : x;
|
|
2114
|
+
y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
|
|
2115
|
+
mapObject.translatePoint.y : y;
|
|
2113
2116
|
}
|
|
2114
2117
|
}
|
|
2115
2118
|
scaleFactor = (mapObject.enablePersistence) ? ((mapObject.mapScaleValue >= 1) ? mapObject.mapScaleValue : 1) : scaleFactor;
|
|
@@ -2160,9 +2163,11 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2160
2163
|
mapObject.mapScaleValue = mapObject.zoomSettings.zoomFactor !== 1 &&
|
|
2161
2164
|
mapObject.zoomSettings.zoomFactor ===
|
|
2162
2165
|
mapObject.mapScaleValue ? mapObject.zoomSettings.zoomFactor :
|
|
2163
|
-
mapObject.zoomSettings.zoomFactor !== mapObject.mapScaleValue && !mapObject.centerPositionChanged ?
|
|
2166
|
+
mapObject.zoomSettings.zoomFactor !== mapObject.mapScaleValue && !mapObject.centerPositionChanged ?
|
|
2167
|
+
mapObject.mapScaleValue : mapObject.zoomSettings.zoomFactor;
|
|
2164
2168
|
if (mapObject.zoomSettings.shouldZoomInitially && !mapObject.isZoomByPosition) {
|
|
2165
|
-
mapObject.mapScaleValue = zoomFactorValue = scaleFactor = ((mapObject.enablePersistence
|
|
2169
|
+
mapObject.mapScaleValue = zoomFactorValue = scaleFactor = ((mapObject.enablePersistence
|
|
2170
|
+
|| mapObject.zoomSettings.shouldZoomInitially) && mapObject.scale === 1)
|
|
2166
2171
|
? mapObject.scale : (isNullOrUndefined(mapObject.markerZoomFactor)) ? mapObject.mapScaleValue : mapObject.markerZoomFactor;
|
|
2167
2172
|
zoomFactorValue = mapObject.mapScaleValue;
|
|
2168
2173
|
if (!isNullOrUndefined(mapObject.markerCenterLatitude) && !isNullOrUndefined(mapObject.markerCenterLongitude)) {
|
|
@@ -2189,7 +2194,8 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2189
2194
|
var leftPosition = ((mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2) / factor;
|
|
2190
2195
|
var point = checkZoomMethod ? calculateCenterFromPixel(mapObject, layer) :
|
|
2191
2196
|
convertGeoToPoint(latitude, longitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
|
|
2192
|
-
if ((!isNullOrUndefined(mapObject.zoomTranslatePoint) || !isNullOrUndefined(mapObject.previousProjection)) &&
|
|
2197
|
+
if ((!isNullOrUndefined(mapObject.zoomTranslatePoint) || !isNullOrUndefined(mapObject.previousProjection)) &&
|
|
2198
|
+
!mapObject.zoomNotApplied) {
|
|
2193
2199
|
if (mapObject.previousProjection !== mapObject.projectionType) {
|
|
2194
2200
|
x = -point.x + leftPosition;
|
|
2195
2201
|
y = -point.y + topPosition;
|
|
@@ -2209,8 +2215,10 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2209
2215
|
y = -point.y + topPosition + mapObject.mapAreaRect.y / zoomFactor;
|
|
2210
2216
|
}
|
|
2211
2217
|
if (!isNullOrUndefined(mapObject.translatePoint)) {
|
|
2212
|
-
y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
|
|
2213
|
-
|
|
2218
|
+
y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
|
|
2219
|
+
mapObject.translatePoint.y : y;
|
|
2220
|
+
x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
|
|
2221
|
+
mapObject.translatePoint.x : x;
|
|
2214
2222
|
}
|
|
2215
2223
|
scaleFactor = zoomFactorValue !== 0 ? zoomFactorValue : 1;
|
|
2216
2224
|
}
|
|
@@ -2248,8 +2256,10 @@ function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2248
2256
|
}
|
|
2249
2257
|
}
|
|
2250
2258
|
if (!isNullOrUndefined(mapObject.translatePoint)) {
|
|
2251
|
-
x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
|
|
2252
|
-
|
|
2259
|
+
x = (mapObject.enablePersistence && mapObject.translatePoint.x !== 0 && !mapObject.zoomNotApplied) ?
|
|
2260
|
+
mapObject.translatePoint.x : leftPosition;
|
|
2261
|
+
y = (mapObject.enablePersistence && mapObject.translatePoint.y !== 0 && !mapObject.zoomNotApplied) ?
|
|
2262
|
+
mapObject.translatePoint.y : topPosition;
|
|
2253
2263
|
}
|
|
2254
2264
|
}
|
|
2255
2265
|
scaleFactor = (mapObject.enablePersistence) ? (mapObject.mapScaleValue === 0 ? 1 : mapObject.mapScaleValue) : scaleFactor;
|
|
@@ -2314,6 +2324,7 @@ function Internalize(maps, value) {
|
|
|
2314
2324
|
* Function to compile the template function for maps.
|
|
2315
2325
|
*
|
|
2316
2326
|
* @param {string} template - Specifies the template
|
|
2327
|
+
* @param {Maps} maps - Specifies the Maps instance.
|
|
2317
2328
|
* @returns {Function} - Returns the function
|
|
2318
2329
|
* @private
|
|
2319
2330
|
*/
|
|
@@ -2321,10 +2332,10 @@ function Internalize(maps, value) {
|
|
|
2321
2332
|
function getTemplateFunction(template, maps) {
|
|
2322
2333
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2323
2334
|
var templateFn = null;
|
|
2324
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2325
2335
|
try {
|
|
2326
2336
|
if (document.querySelectorAll(template).length) {
|
|
2327
2337
|
templateFn = compile(document.querySelector(template).innerHTML.trim());
|
|
2338
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2328
2339
|
}
|
|
2329
2340
|
else if (maps.isVue || maps.isVue3) {
|
|
2330
2341
|
templateFn = compile(template);
|
|
@@ -2529,7 +2540,8 @@ shapeData, data) {
|
|
|
2529
2540
|
maps: map
|
|
2530
2541
|
};
|
|
2531
2542
|
map.trigger('itemSelection', eventArgs, function (observedArgs) {
|
|
2532
|
-
eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity :
|
|
2543
|
+
eventArgs.border.opacity = isNullOrUndefined(selectionSettings.border.opacity) ? selectionSettings.opacity :
|
|
2544
|
+
selectionSettings.border.opacity;
|
|
2533
2545
|
map.shapeSelectionItem.push(eventArgs.shapeData);
|
|
2534
2546
|
if (!getElement('ShapeselectionMap')) {
|
|
2535
2547
|
document.body.appendChild(createStyle('ShapeselectionMap', 'ShapeselectionMapStyle', eventArgs));
|
|
@@ -2629,7 +2641,7 @@ function showTooltip(text, size, x, y, areaWidth, areaHeight, id, element, isTou
|
|
|
2629
2641
|
var demo = str[0].length;
|
|
2630
2642
|
for (var i = 1; i < str.length; i++) {
|
|
2631
2643
|
if (demo < str[i].length) {
|
|
2632
|
-
demo = str[i].length;
|
|
2644
|
+
demo = (str[i]).length;
|
|
2633
2645
|
}
|
|
2634
2646
|
}
|
|
2635
2647
|
if (!tooltip) {
|
|
@@ -2699,7 +2711,7 @@ function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
|
|
|
2699
2711
|
// if (touches) {
|
|
2700
2712
|
// touchList = [];
|
|
2701
2713
|
// for (let i: number = 0, length: number = touches.length; i < length; i++) {
|
|
2702
|
-
// touchList.push({ pageX: touches[i].clientX, pageY: touches[i].clientY, pointerId: null });
|
|
2714
|
+
// touchList.push({ pageX: touches[i as number].clientX, pageY: touches[i as number].clientY, pointerId: null });
|
|
2703
2715
|
// }
|
|
2704
2716
|
// } else {
|
|
2705
2717
|
// touchList = touchList ? touchList : [];
|
|
@@ -2707,8 +2719,8 @@ function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
|
|
|
2707
2719
|
// touchList.push({ pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId });
|
|
2708
2720
|
// } else {
|
|
2709
2721
|
// for (let i: number = 0, length: number = touchList.length; i < length; i++) {
|
|
2710
|
-
// if (touchList[i].pointerId === e.pointerId) {
|
|
2711
|
-
// touchList[i] = { pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId };
|
|
2722
|
+
// if (touchList[i as number].pointerId === e.pointerId) {
|
|
2723
|
+
// touchList[i as number] = { pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId };
|
|
2712
2724
|
// } else {
|
|
2713
2725
|
// touchList.push({ pageX: e.clientX, pageY: e.clientY, pointerId: e.pointerId });
|
|
2714
2726
|
// }
|
|
@@ -3853,7 +3865,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
|
|
|
3853
3865
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3854
3866
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3855
3867
|
};
|
|
3856
|
-
/* eslint-disable
|
|
3868
|
+
/* eslint-disable max-len */
|
|
3857
3869
|
/**
|
|
3858
3870
|
* Maps base document
|
|
3859
3871
|
*/
|
|
@@ -4948,7 +4960,8 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
4948
4960
|
nullCount += (!isNaN(lat) && !isNaN(lng)) ? 0 : 1;
|
|
4949
4961
|
markerTemplateCount += (eventArgs.cancel) ? 1 : 0;
|
|
4950
4962
|
markerCount += (eventArgs.cancel) ? 1 : 0;
|
|
4951
|
-
maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ?
|
|
4963
|
+
maps.markerNullCount = (isNullOrUndefined(lng) || isNullOrUndefined(lat)) ?
|
|
4964
|
+
maps.markerNullCount + 1 : maps.markerNullCount;
|
|
4952
4965
|
var markerDataLength = markerData.length - maps.markerNullCount;
|
|
4953
4966
|
if (_this.markerSVGObject.childElementCount === (markerDataLength - markerTemplateCount - nullCount) && (type !== 'Template')) {
|
|
4954
4967
|
layerElement.appendChild(_this.markerSVGObject);
|
|
@@ -5006,126 +5019,134 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5006
5019
|
};
|
|
5007
5020
|
/**
|
|
5008
5021
|
* To calculate center position and factor value dynamically
|
|
5022
|
+
*
|
|
5023
|
+
* @param {LayerSettings[]} layersCollection - Specifies the layer settings instance.
|
|
5024
|
+
* @returns {void}
|
|
5009
5025
|
*/
|
|
5010
5026
|
Marker.prototype.calculateZoomCenterPositionAndFactor = function (layersCollection) {
|
|
5011
|
-
if (this.maps
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5027
|
+
if (!isNullOrUndefined(this.maps)) {
|
|
5028
|
+
if (this.maps.zoomSettings.shouldZoomInitially && this.maps.markerModule) {
|
|
5029
|
+
var minLong_1;
|
|
5030
|
+
var maxLat_1;
|
|
5031
|
+
var minLat_1;
|
|
5032
|
+
var maxLong_1;
|
|
5033
|
+
var zoomLevel = void 0;
|
|
5034
|
+
var centerLat = void 0;
|
|
5035
|
+
var centerLong = void 0;
|
|
5036
|
+
var maxZoomFact = this.maps.zoomSettings.maxZoom;
|
|
5037
|
+
var mapWidth = this.maps.mapAreaRect.width;
|
|
5038
|
+
var mapHeight = this.maps.mapAreaRect.height;
|
|
5039
|
+
this.maps.markerZoomedState = this.maps.markerZoomedState ? this.maps.markerZoomedState :
|
|
5040
|
+
isNullOrUndefined(this.maps.markerZoomFactor) ? !this.maps.markerZoomedState :
|
|
5041
|
+
this.maps.markerZoomFactor > 1 ? this.maps.markerZoomedState : !this.maps.markerZoomedState;
|
|
5042
|
+
this.maps.defaultState = this.maps.markerZoomedState ? !this.maps.markerZoomedState : this.maps.defaultState;
|
|
5043
|
+
Array.prototype.forEach.call(layersCollection, function (currentLayer) {
|
|
5044
|
+
var isMarker = currentLayer.markerSettings.length !== 0;
|
|
5045
|
+
if (isMarker) {
|
|
5046
|
+
Array.prototype.forEach.call(currentLayer.markerSettings, function (markerSetting) {
|
|
5047
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5048
|
+
var markerData = markerSetting.dataSource;
|
|
5049
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5050
|
+
Array.prototype.forEach.call(markerData, function (data, dataIndex) {
|
|
5051
|
+
var latitude = !isNullOrUndefined(data['latitude']) ? parseFloat(data['latitude']) :
|
|
5052
|
+
!isNullOrUndefined(data['Latitude']) ? parseFloat(data['Latitude']) : null;
|
|
5053
|
+
var longitude = !isNullOrUndefined(data['longitude']) ? parseFloat(data['longitude']) :
|
|
5054
|
+
!isNullOrUndefined(data['Longitude']) ? parseFloat(data['Longitude']) : null;
|
|
5055
|
+
minLong_1 = isNullOrUndefined(minLong_1) && dataIndex === 0 ?
|
|
5056
|
+
longitude : minLong_1;
|
|
5057
|
+
maxLat_1 = isNullOrUndefined(maxLat_1) && dataIndex === 0 ?
|
|
5058
|
+
latitude : maxLat_1;
|
|
5059
|
+
minLat_1 = isNullOrUndefined(minLat_1) && dataIndex === 0 ?
|
|
5060
|
+
latitude : minLat_1;
|
|
5061
|
+
maxLong_1 = isNullOrUndefined(maxLong_1) && dataIndex === 0 ?
|
|
5062
|
+
longitude : maxLong_1;
|
|
5063
|
+
if (minLong_1 > longitude) {
|
|
5064
|
+
minLong_1 = longitude;
|
|
5065
|
+
}
|
|
5066
|
+
if (minLat_1 > latitude) {
|
|
5067
|
+
minLat_1 = latitude;
|
|
5068
|
+
}
|
|
5069
|
+
if (maxLong_1 < longitude) {
|
|
5070
|
+
maxLong_1 = longitude;
|
|
5071
|
+
}
|
|
5072
|
+
if (maxLat_1 < latitude) {
|
|
5073
|
+
maxLat_1 = latitude;
|
|
5074
|
+
}
|
|
5075
|
+
});
|
|
5057
5076
|
});
|
|
5058
|
-
}
|
|
5059
|
-
}
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
}
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5077
|
+
}
|
|
5078
|
+
});
|
|
5079
|
+
if (!isNullOrUndefined(minLat_1) && !isNullOrUndefined(minLong_1) &&
|
|
5080
|
+
!isNullOrUndefined(maxLong_1) && !isNullOrUndefined(maxLat_1)) {
|
|
5081
|
+
// To find the center position
|
|
5082
|
+
centerLat = (minLat_1 + maxLat_1) / 2;
|
|
5083
|
+
centerLong = (minLong_1 + maxLong_1) / 2;
|
|
5084
|
+
this.maps.markerCenterLatitude = centerLat;
|
|
5085
|
+
this.maps.markerCenterLongitude = centerLong;
|
|
5086
|
+
if (isNullOrUndefined(this.maps.markerZoomCenterPoint) || this.maps.markerZoomedState) {
|
|
5087
|
+
this.maps.markerZoomCenterPoint = {
|
|
5088
|
+
latitude: centerLat,
|
|
5089
|
+
longitude: centerLong
|
|
5090
|
+
};
|
|
5091
|
+
}
|
|
5092
|
+
var markerFactor = void 0;
|
|
5093
|
+
if (this.maps.isTileMap || this.maps.baseMapRectBounds['min']['x'] === 0) {
|
|
5094
|
+
zoomLevel = calculateZoomLevel(minLat_1, maxLat_1, minLong_1, maxLong_1, mapWidth, mapHeight, this.maps);
|
|
5095
|
+
if (this.maps.isTileMap) {
|
|
5096
|
+
markerFactor = isNullOrUndefined(this.maps.markerZoomFactor) ?
|
|
5097
|
+
zoomLevel : isNullOrUndefined(this.maps.mapScaleValue) ?
|
|
5098
|
+
zoomLevel : this.maps.mapScaleValue > 1 && this.maps.markerZoomFactor !== 1 ?
|
|
5099
|
+
this.maps.mapScaleValue : zoomLevel;
|
|
5100
|
+
}
|
|
5101
|
+
else {
|
|
5102
|
+
markerFactor = isNullOrUndefined(this.maps.mapScaleValue) ? zoomLevel :
|
|
5103
|
+
(Math.floor(this.maps.scale) !== 1 &&
|
|
5104
|
+
this.maps.mapScaleValue !== zoomLevel)
|
|
5105
|
+
&&
|
|
5106
|
+
(isNullOrUndefined(this.maps.shouldZoomCurrentFactor))
|
|
5107
|
+
? this.maps.mapScaleValue : zoomLevel;
|
|
5108
|
+
if (((markerFactor === this.maps.mapScaleValue &&
|
|
5109
|
+
(this.maps.markerZoomFactor === 1 || this.maps.mapScaleValue === 1))
|
|
5110
|
+
&& (!this.maps.enablePersistence))) {
|
|
5111
|
+
markerFactor = zoomLevel;
|
|
5112
|
+
}
|
|
5113
|
+
}
|
|
5082
5114
|
}
|
|
5083
5115
|
else {
|
|
5116
|
+
zoomLevel = this.calculateIndividualLayerMarkerZoomLevel(mapWidth, mapHeight, maxZoomFact);
|
|
5084
5117
|
markerFactor = isNullOrUndefined(this.maps.mapScaleValue) ? zoomLevel :
|
|
5085
|
-
(
|
|
5086
|
-
this.maps.mapScaleValue !== zoomLevel)
|
|
5087
|
-
&&
|
|
5088
|
-
(isNullOrUndefined(this.maps.shouldZoomCurrentFactor))
|
|
5118
|
+
(this.maps.mapScaleValue !== zoomLevel)
|
|
5089
5119
|
? this.maps.mapScaleValue : zoomLevel;
|
|
5090
|
-
if (((markerFactor === this.maps.mapScaleValue &&
|
|
5091
|
-
(this.maps.markerZoomFactor === 1 || this.maps.mapScaleValue === 1))
|
|
5092
|
-
&& (!this.maps.enablePersistence))) {
|
|
5093
|
-
markerFactor = zoomLevel;
|
|
5094
|
-
}
|
|
5095
5120
|
}
|
|
5121
|
+
this.maps.markerZoomFactor = markerFactor;
|
|
5096
5122
|
}
|
|
5097
|
-
else {
|
|
5098
|
-
zoomLevel = this.calculateIndividualLayerMarkerZoomLevel(mapWidth, mapHeight, maxZoomFact);
|
|
5099
|
-
markerFactor = isNullOrUndefined(this.maps.mapScaleValue) ? zoomLevel :
|
|
5100
|
-
(this.maps.mapScaleValue !== zoomLevel)
|
|
5101
|
-
? this.maps.mapScaleValue : zoomLevel;
|
|
5102
|
-
}
|
|
5103
|
-
this.maps.markerZoomFactor = markerFactor;
|
|
5104
5123
|
}
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5124
|
+
else {
|
|
5125
|
+
this.maps.markerZoomedState = false;
|
|
5126
|
+
if (this.maps.markerZoomFactor > 1) {
|
|
5127
|
+
this.maps.markerCenterLatitude = null;
|
|
5128
|
+
this.maps.markerCenterLongitude = null;
|
|
5129
|
+
this.maps.markerZoomFactor = 1;
|
|
5130
|
+
if (!this.maps.enablePersistence) {
|
|
5131
|
+
this.maps.mapScaleValue = 1;
|
|
5132
|
+
}
|
|
5114
5133
|
}
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5134
|
+
if (this.maps.isTileMap && !this.maps.enablePersistence
|
|
5135
|
+
&& this.maps.mapScaleValue <= 1) {
|
|
5136
|
+
this.maps.tileZoomLevel = this.maps.mapScaleValue === 0 ? (this.maps.isZoomByPosition ? this.maps.tileZoomLevel : 1)
|
|
5137
|
+
: this.maps.mapScaleValue;
|
|
5138
|
+
if (this.maps.mapScaleValue === 1 && this.maps.markerZoomFactor === 1) {
|
|
5139
|
+
this.maps.tileTranslatePoint.x = 0;
|
|
5140
|
+
this.maps.tileTranslatePoint.y = 0;
|
|
5141
|
+
}
|
|
5123
5142
|
}
|
|
5124
5143
|
}
|
|
5125
5144
|
}
|
|
5126
5145
|
};
|
|
5127
5146
|
/**
|
|
5128
5147
|
* To check and trigger marker click event
|
|
5148
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
5149
|
+
* @returns {void}
|
|
5129
5150
|
*/
|
|
5130
5151
|
Marker.prototype.markerClick = function (e) {
|
|
5131
5152
|
var target = e.target.id;
|
|
@@ -5147,6 +5168,8 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5147
5168
|
};
|
|
5148
5169
|
/**
|
|
5149
5170
|
* To check and trigger Cluster click event
|
|
5171
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
5172
|
+
* @returns {void}
|
|
5150
5173
|
*/
|
|
5151
5174
|
Marker.prototype.markerClusterClick = function (e) {
|
|
5152
5175
|
var target = e.target.id;
|
|
@@ -5238,6 +5261,9 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5238
5261
|
};
|
|
5239
5262
|
/**
|
|
5240
5263
|
* To check and trigger marker move event
|
|
5264
|
+
*
|
|
5265
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
5266
|
+
* @returns {void}
|
|
5241
5267
|
*/
|
|
5242
5268
|
Marker.prototype.markerMove = function (e) {
|
|
5243
5269
|
var targetId = e.target.id;
|
|
@@ -5256,6 +5282,9 @@ var Marker = /** @__PURE__ @class */ (function () {
|
|
|
5256
5282
|
};
|
|
5257
5283
|
/**
|
|
5258
5284
|
* To check and trigger cluster move event
|
|
5285
|
+
*
|
|
5286
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
5287
|
+
* @returns {void}
|
|
5259
5288
|
*/
|
|
5260
5289
|
Marker.prototype.markerClusterMouseMove = function (e) {
|
|
5261
5290
|
var targetId = e.target.id;
|
|
@@ -5529,6 +5558,7 @@ var BingMap = /** @__PURE__ @class */ (function () {
|
|
|
5529
5558
|
}
|
|
5530
5559
|
};
|
|
5531
5560
|
/**
|
|
5561
|
+
* @returns {void}
|
|
5532
5562
|
* @private
|
|
5533
5563
|
*/
|
|
5534
5564
|
BingMap.prototype.destroy = function () {
|
|
@@ -5566,6 +5596,11 @@ var ColorMapping = /** @__PURE__ @class */ (function () {
|
|
|
5566
5596
|
};
|
|
5567
5597
|
/**
|
|
5568
5598
|
* To color by value and color mapping
|
|
5599
|
+
*
|
|
5600
|
+
* @param {ColorMappingSettingsModel[]} colorMapping - Specifies the color mapping instance.
|
|
5601
|
+
* @param {number} colorValue - Specifies the color value
|
|
5602
|
+
* @param {string} equalValue - Specifies the equal value.
|
|
5603
|
+
* @returns {any} - Returns the color mapping values.
|
|
5569
5604
|
*/
|
|
5570
5605
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5571
5606
|
ColorMapping.prototype.getColorByValue = function (colorMapping, colorValue, equalValue) {
|
|
@@ -5758,10 +5793,7 @@ var ColorMapping = /** @__PURE__ @class */ (function () {
|
|
|
5758
5793
|
return ColorMapping;
|
|
5759
5794
|
}());
|
|
5760
5795
|
|
|
5761
|
-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
5762
|
-
/* eslint-disable jsdoc/require-param */
|
|
5763
5796
|
/* eslint-disable no-case-declarations */
|
|
5764
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5765
5797
|
/**
|
|
5766
5798
|
* To calculate and render the shape layer
|
|
5767
5799
|
*/
|
|
@@ -5950,7 +5982,10 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
5950
5982
|
panel.mapObject.previousZoomFactor = panel.mapObject.zoomSettings.zoomFactor;
|
|
5951
5983
|
}
|
|
5952
5984
|
if (panel.mapObject.navigationLineModule) {
|
|
5953
|
-
panel.
|
|
5985
|
+
var navigationLineElement = panel.mapObject.navigationLineModule.renderNavigation(panel.currentLayer, panel.mapObject.tileZoomLevel, layerIndex);
|
|
5986
|
+
if (!isNullOrUndefined(navigationLineElement)) {
|
|
5987
|
+
panel.layerObject.appendChild(navigationLineElement);
|
|
5988
|
+
}
|
|
5954
5989
|
}
|
|
5955
5990
|
if (panel.mapObject.markerModule) {
|
|
5956
5991
|
panel.mapObject.markerModule.markerRender(this.mapObject, panel.layerObject, layerIndex, panel.mapObject.tileZoomLevel, null);
|
|
@@ -6018,7 +6053,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6018
6053
|
var imageUrl = resource['imageUrl'];
|
|
6019
6054
|
var subDomains = resource['imageUrlSubdomains'];
|
|
6020
6055
|
var maxZoom = resource['zoomMax'];
|
|
6021
|
-
var markerGroupElement = document.getElementById(proxy_1.mapObject.element.id + '_Markers_Group');
|
|
6022
6056
|
if (imageUrl !== null && imageUrl !== undefined && imageUrl !== bing_1.imageUrl) {
|
|
6023
6057
|
bing_1.imageUrl = imageUrl;
|
|
6024
6058
|
}
|
|
@@ -6180,8 +6214,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6180
6214
|
fill = Object.prototype.toString.call(getShapeColor_1) === '[object Object]' && !isNullOrUndefined(getShapeColor_1['fill'])
|
|
6181
6215
|
? getShapeColor_1['fill'] : fill;
|
|
6182
6216
|
if (this_1.currentLayer.shapeSettings.borderColorValuePath || this_1.currentLayer.shapeSettings.borderWidthValuePath) {
|
|
6183
|
-
var borderColorValue = this_1.currentLayer.shapeSettings.borderColorValuePath;
|
|
6184
|
-
var borderWidthValue = this_1.currentLayer.shapeSettings.borderWidthValuePath;
|
|
6185
6217
|
k = checkShapeDataFields(
|
|
6186
6218
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6187
6219
|
this_1.currentLayer.dataSource, currentShapeData['property'], this_1.currentLayer.shapeDataPath, this_1.currentLayer.shapePropertyPath, this_1.currentLayer);
|
|
@@ -6308,7 +6340,9 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6308
6340
|
case 'Point':
|
|
6309
6341
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6310
6342
|
var pointData = currentShapeData['point'];
|
|
6311
|
-
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ?
|
|
6343
|
+
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ?
|
|
6344
|
+
shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ?
|
|
6345
|
+
_this.mapObject.scale : _this.currentFactor);
|
|
6312
6346
|
circleOptions = new CircleOption(shapeID, eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
|
|
6313
6347
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
6314
6348
|
break;
|
|
@@ -6318,7 +6352,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6318
6352
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6319
6353
|
var pointData = multiPointData['point'];
|
|
6320
6354
|
var circleRadius = (_this.mapObject.layers[layerIndex].type !== 'SubLayer') ? shapeSettings.circleRadius : shapeSettings.circleRadius / (_this.mapObject.isTileMap ? _this.mapObject.scale : _this.currentFactor);
|
|
6321
|
-
circleOptions = new CircleOption((shapeID +
|
|
6355
|
+
circleOptions = new CircleOption((shapeID + '_multiLine_' + index), eventArgs.fill, eventArgs.border, opacity, pointData['x'], pointData['y'], circleRadius, shapeSettings.dashArray);
|
|
6322
6356
|
pathEle = _this.mapObject.renderer.drawCircle(circleOptions);
|
|
6323
6357
|
_this.pathAttributeCalculate(groupElement, pathEle, drawingType, currentShapeData, i);
|
|
6324
6358
|
});
|
|
@@ -6351,15 +6385,16 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6351
6385
|
/**
|
|
6352
6386
|
* layer features as bubble, marker, datalabel, navigation line.
|
|
6353
6387
|
*
|
|
6354
|
-
* @param {
|
|
6355
|
-
* @param {
|
|
6356
|
-
* @param {
|
|
6357
|
-
* @param {
|
|
6358
|
-
* @param {
|
|
6388
|
+
* @param {Element} groupElement - Specifies the element to append the group.
|
|
6389
|
+
* @param {Element} pathEle - Specifies the svg element.
|
|
6390
|
+
* @param {string} drawingType - Specifies the data type.
|
|
6391
|
+
* @param {any} currentShapeData - Specifies the layer of shapedata.
|
|
6392
|
+
* @param {number} index - Specifies the tab index.
|
|
6359
6393
|
* @returns {void}
|
|
6360
6394
|
*/
|
|
6395
|
+
LayerPanel.prototype.pathAttributeCalculate = function (groupElement, pathEle, drawingType,
|
|
6361
6396
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6362
|
-
|
|
6397
|
+
currentShapeData, index) {
|
|
6363
6398
|
var property = (Object.prototype.toString.call(this.currentLayer.shapePropertyPath) === '[object Array]' ?
|
|
6364
6399
|
this.currentLayer.shapePropertyPath : [this.currentLayer.shapePropertyPath]);
|
|
6365
6400
|
var properties;
|
|
@@ -6386,7 +6421,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6386
6421
|
pathEle.setAttribute('stroke', styleProperty.border.color);
|
|
6387
6422
|
pathEle.setAttribute('fill-opacity', (styleProperty.opacity).toString());
|
|
6388
6423
|
pathEle.setAttribute('stroke-opacity', (isNullOrUndefined(styleProperty.border.opacity) ? styleProperty.opacity : styleProperty.border.opacity).toString());
|
|
6389
|
-
pathEle.setAttribute('stroke-width', (styleProperty.border.width).toString());
|
|
6424
|
+
pathEle.setAttribute('stroke-width', (isNullOrUndefined(styleProperty.border.width) ? 0 : styleProperty.border.width).toString());
|
|
6390
6425
|
}
|
|
6391
6426
|
}
|
|
6392
6427
|
}
|
|
@@ -6452,8 +6487,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6452
6487
|
_this.layerObject.appendChild(element);
|
|
6453
6488
|
});
|
|
6454
6489
|
if (this.mapObject.markerModule) {
|
|
6455
|
-
this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor)
|
|
6456
|
-
|
|
6490
|
+
this.mapObject.markerModule.markerRender(this.mapObject, this.layerObject, layerIndex, (this.mapObject.isTileMap ? Math.floor(this.currentFactor) :
|
|
6491
|
+
this.currentFactor), null);
|
|
6457
6492
|
}
|
|
6458
6493
|
this.translateLayerElements(this.layerObject, layerIndex);
|
|
6459
6494
|
this.layerGroup.appendChild(this.layerObject);
|
|
@@ -6463,11 +6498,11 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6463
6498
|
*
|
|
6464
6499
|
* @param {LayerSettings} layer - Specifies the layer
|
|
6465
6500
|
* @param {number} layerIndex - Specifies the layer index
|
|
6466
|
-
* @param {
|
|
6501
|
+
* @param {any[]} shape - Specifies the shape
|
|
6467
6502
|
* @param {Element} group - Specifies the group
|
|
6468
6503
|
* @param {number} shapeIndex - Specifies the shape index
|
|
6469
6504
|
* @param {HTMLElement} labelTemplateEle - Specifies the label template element
|
|
6470
|
-
* @param {
|
|
6505
|
+
* @param {any[]} intersect - Specifies the intersect
|
|
6471
6506
|
* @returns {void}
|
|
6472
6507
|
*/
|
|
6473
6508
|
LayerPanel.prototype.renderLabel = function (layer, layerIndex,
|
|
@@ -6566,10 +6601,12 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6566
6601
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6567
6602
|
var multiPolygonDatas = [];
|
|
6568
6603
|
for (var i = 0; i < coordinates.length; i++) {
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6604
|
+
for (var j = 0; j < coordinates[i].length; j++) {
|
|
6605
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6606
|
+
newData = this.calculatePolygonBox(coordinates[i][j], data, properties);
|
|
6607
|
+
if (newData.length > 0) {
|
|
6608
|
+
multiPolygonDatas.push(newData);
|
|
6609
|
+
}
|
|
6573
6610
|
}
|
|
6574
6611
|
}
|
|
6575
6612
|
multiPolygonDatas['property'] = properties;
|
|
@@ -6578,15 +6615,15 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6578
6615
|
this.currentLayer.layerData.push(multiPolygonDatas);
|
|
6579
6616
|
break;
|
|
6580
6617
|
case 'linestring':
|
|
6581
|
-
var
|
|
6618
|
+
var lineExtraSpace_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6582
6619
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
6583
6620
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
|
|
6584
6621
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6585
|
-
coordinates.map(function (points
|
|
6622
|
+
coordinates.map(function (points) {
|
|
6586
6623
|
latitude = points[1];
|
|
6587
6624
|
longitude = points[0];
|
|
6588
6625
|
var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
|
|
6589
|
-
_this.calculateBox(point,
|
|
6626
|
+
_this.calculateBox(point, lineExtraSpace_1);
|
|
6590
6627
|
newData.push({
|
|
6591
6628
|
point: point, lat: latitude, lng: longitude
|
|
6592
6629
|
});
|
|
@@ -6599,10 +6636,12 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6599
6636
|
var extraSpaces_1 = !isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6600
6637
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
6601
6638
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1;
|
|
6639
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6602
6640
|
var multiLineData_1 = [];
|
|
6603
6641
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6604
6642
|
coordinates.map(function (multiPoints) {
|
|
6605
6643
|
newData = [];
|
|
6644
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6606
6645
|
multiPoints.map(function (points) {
|
|
6607
6646
|
latitude = points[1];
|
|
6608
6647
|
longitude = points[0];
|
|
@@ -6631,8 +6670,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6631
6670
|
point: point, type: type, lat: latitude, lng: longitude, property: properties
|
|
6632
6671
|
});
|
|
6633
6672
|
break;
|
|
6634
|
-
case 'multipoint':
|
|
6635
|
-
var
|
|
6673
|
+
case 'multipoint':
|
|
6674
|
+
var extraSpace_1 = (!isNullOrUndefined(this.currentLayer.shapeSettings.border.width) ?
|
|
6636
6675
|
(typeof (this.currentLayer.shapeSettings.border.width) === 'string' ?
|
|
6637
6676
|
parseInt(this.currentLayer.shapeSettings.border.width, 10) : this.currentLayer.shapeSettings.border.width) : 1) +
|
|
6638
6677
|
(this.currentLayer.shapeSettings.circleRadius * 2);
|
|
@@ -6642,7 +6681,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6642
6681
|
latitude = points[1];
|
|
6643
6682
|
longitude = points[0];
|
|
6644
6683
|
var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
|
|
6645
|
-
_this.calculateBox(point,
|
|
6684
|
+
_this.calculateBox(point, extraSpace_1);
|
|
6646
6685
|
newData.push({
|
|
6647
6686
|
point: point, lat: latitude, lng: longitude
|
|
6648
6687
|
});
|
|
@@ -6651,7 +6690,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6651
6690
|
newData['type'] = type;
|
|
6652
6691
|
this.currentLayer.layerData.push(newData);
|
|
6653
6692
|
break;
|
|
6654
|
-
}
|
|
6655
6693
|
case 'path':
|
|
6656
6694
|
this.currentLayer.layerData.push({
|
|
6657
6695
|
point: data['d'], type: type, property: properties
|
|
@@ -6661,7 +6699,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6661
6699
|
};
|
|
6662
6700
|
LayerPanel.prototype.calculateBox = function (point, extraSpace) {
|
|
6663
6701
|
if (isNullOrUndefined(this.rectBounds)) {
|
|
6664
|
-
this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace,
|
|
6702
|
+
this.rectBounds = { min: { x: point.x - extraSpace, y: point.y - extraSpace }, max: { x: point.x + extraSpace,
|
|
6703
|
+
y: point.y + extraSpace } };
|
|
6665
6704
|
}
|
|
6666
6705
|
else {
|
|
6667
6706
|
this.rectBounds['min']['x'] = Math.min(this.rectBounds['min']['x'], point.x - extraSpace);
|
|
@@ -6785,6 +6824,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6785
6824
|
case 'multilinestring':
|
|
6786
6825
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6787
6826
|
coordinates.map(function (multiPoint, index) {
|
|
6827
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6788
6828
|
multiPoint.map(function (point, index) {
|
|
6789
6829
|
_this.calculateRectBox(point, 'multilinestring', index === 0 ? true : false);
|
|
6790
6830
|
});
|
|
@@ -6800,6 +6840,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6800
6840
|
_this.calculateRectBox(coordinates, 'point');
|
|
6801
6841
|
break;
|
|
6802
6842
|
case 'multipoint':
|
|
6843
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6803
6844
|
coordinates.map(function (point, index) {
|
|
6804
6845
|
_this.calculateRectBox(point, 'multipoint', index === 0 ? true : false);
|
|
6805
6846
|
});
|
|
@@ -6815,7 +6856,7 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6815
6856
|
var newData = [];
|
|
6816
6857
|
var bounds = this.mapObject.baseMapBounds;
|
|
6817
6858
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6818
|
-
coordinates.map(function (currentPoint
|
|
6859
|
+
coordinates.map(function (currentPoint) {
|
|
6819
6860
|
var latitude = currentPoint[1];
|
|
6820
6861
|
var longitude = currentPoint[0];
|
|
6821
6862
|
if ((longitude >= bounds.longitude.min && longitude <= bounds.longitude.max)
|
|
@@ -6909,8 +6950,8 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
6909
6950
|
tileI = (tileI % ycount) + ycount;
|
|
6910
6951
|
}
|
|
6911
6952
|
var tile = new Tile(tileI % ycount, j);
|
|
6912
|
-
tile.left = x;
|
|
6913
|
-
tile.top = y;
|
|
6953
|
+
tile.left = Math.round(x);
|
|
6954
|
+
tile.top = Math.round(y);
|
|
6914
6955
|
if (baseLayer.layerType === 'Bing' || (bing && !isNullOrUndefined(baseLayer.urlTemplate) && baseLayer.urlTemplate !== '')) {
|
|
6915
6956
|
var key = baseLayer.key;
|
|
6916
6957
|
tile.src = bing.getBingMap(tile, key, baseLayer.bingMapType, userLang, bing.imageUrl, bing.subDomains);
|
|
@@ -7004,18 +7045,45 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
7004
7045
|
animateElement = element ? element.children[0] : null;
|
|
7005
7046
|
}
|
|
7006
7047
|
}
|
|
7007
|
-
var id = 0;
|
|
7008
|
-
|
|
7009
|
-
var imgElement =
|
|
7010
|
-
imgElement.setAttribute('height', '256px');
|
|
7011
|
-
imgElement.setAttribute('width', '256px');
|
|
7012
|
-
imgElement.setAttribute('src', tile.src);
|
|
7013
|
-
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7048
|
+
for (var id = 0; id < _this.tiles.length; id++) {
|
|
7049
|
+
var tile = _this.tiles[id];
|
|
7050
|
+
var imgElement = null;
|
|
7014
7051
|
var mapId = _this.mapObject.element.id;
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7052
|
+
if (type === 'Pan') {
|
|
7053
|
+
var child = document.getElementById(mapId + '_tile_' + id);
|
|
7054
|
+
var isNewTile = false;
|
|
7055
|
+
if (isNullOrUndefined(child)) {
|
|
7056
|
+
isNewTile = true;
|
|
7057
|
+
child = createElement('div', { id: mapId + '_tile_' + id });
|
|
7058
|
+
imgElement = createElement('img');
|
|
7059
|
+
}
|
|
7060
|
+
else {
|
|
7061
|
+
child.style.removeProperty('display');
|
|
7062
|
+
imgElement = child.children[0];
|
|
7018
7063
|
}
|
|
7064
|
+
if (!isNewTile && imgElement && imgElement.src !== tile.src) {
|
|
7065
|
+
imgElement.src = tile.src;
|
|
7066
|
+
}
|
|
7067
|
+
child.style.position = 'absolute';
|
|
7068
|
+
child.style.left = tile.left + 'px';
|
|
7069
|
+
child.style.top = tile.top + 'px';
|
|
7070
|
+
child.style.height = tile.height + 'px';
|
|
7071
|
+
child.style.width = tile.width + 'px';
|
|
7072
|
+
if (isNewTile) {
|
|
7073
|
+
imgElement.setAttribute('height', '256px');
|
|
7074
|
+
imgElement.setAttribute('width', '256px');
|
|
7075
|
+
imgElement.setAttribute('src', tile.src);
|
|
7076
|
+
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7077
|
+
child.appendChild(imgElement);
|
|
7078
|
+
animateElement.appendChild(child);
|
|
7079
|
+
}
|
|
7080
|
+
}
|
|
7081
|
+
else {
|
|
7082
|
+
imgElement = createElement('img');
|
|
7083
|
+
imgElement.setAttribute('height', '256px');
|
|
7084
|
+
imgElement.setAttribute('width', '256px');
|
|
7085
|
+
imgElement.setAttribute('src', tile.src);
|
|
7086
|
+
imgElement.setAttribute('alt', _this.mapObject.getLocalizedLabel('ImageNotFound'));
|
|
7019
7087
|
var child = createElement('div', { id: mapId + '_tile_' + id });
|
|
7020
7088
|
child.style.position = 'absolute';
|
|
7021
7089
|
child.style.left = tile.left + 'px';
|
|
@@ -7026,15 +7094,27 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
7026
7094
|
if (animateElement) {
|
|
7027
7095
|
animateElement.appendChild(child);
|
|
7028
7096
|
}
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7097
|
+
}
|
|
7098
|
+
if (id === (_this.tiles.length - 1) && document.getElementById(_this.mapObject.element.id + '_animated_tiles_old')) {
|
|
7099
|
+
removeElement(_this.mapObject.element.id + '_animated_tiles_old');
|
|
7100
|
+
}
|
|
7101
|
+
}
|
|
7102
|
+
if (!isNullOrUndefined(_this.mapObject.currentTiles)) {
|
|
7103
|
+
for (var l = _this.tiles.length; l < animateElement.childElementCount; l++) {
|
|
7104
|
+
var isExistingElement = false;
|
|
7105
|
+
for (var a = 0; a < _this.mapObject.currentTiles.childElementCount; a++) {
|
|
7106
|
+
if (!isExistingElement &&
|
|
7107
|
+
_this.mapObject.currentTiles.children[a].id === animateElement.children[l].id) {
|
|
7108
|
+
isExistingElement = true;
|
|
7109
|
+
}
|
|
7032
7110
|
}
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7111
|
+
if (isExistingElement) {
|
|
7112
|
+
animateElement.children[l].style.display = 'none';
|
|
7113
|
+
}
|
|
7114
|
+
else {
|
|
7115
|
+
animateElement.removeChild(animateElement.children[l]);
|
|
7116
|
+
}
|
|
7117
|
+
}
|
|
7038
7118
|
}
|
|
7039
7119
|
}, timeOut);
|
|
7040
7120
|
}
|
|
@@ -7204,8 +7284,6 @@ var LayerPanel = /** @__PURE__ @class */ (function () {
|
|
|
7204
7284
|
return LayerPanel;
|
|
7205
7285
|
}());
|
|
7206
7286
|
|
|
7207
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7208
|
-
/* eslint-disable jsdoc/require-param */
|
|
7209
7287
|
/**
|
|
7210
7288
|
* Represents the annotation elements for map.
|
|
7211
7289
|
*/
|
|
@@ -7345,11 +7423,6 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
|
|
|
7345
7423
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7346
7424
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7347
7425
|
};
|
|
7348
|
-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
7349
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7350
|
-
/* eslint-disable radix */
|
|
7351
|
-
/* eslint-disable max-len */
|
|
7352
|
-
/* eslint-disable valid-jsdoc */
|
|
7353
7426
|
/**
|
|
7354
7427
|
* Maps Component file
|
|
7355
7428
|
*/
|
|
@@ -7533,18 +7606,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7533
7606
|
this.setCulture();
|
|
7534
7607
|
};
|
|
7535
7608
|
Maps.prototype.renderElements = function () {
|
|
7536
|
-
this.
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7609
|
+
if (!this.isDestroyed) {
|
|
7610
|
+
this.trigger(load, { maps: this });
|
|
7611
|
+
this.createSVG();
|
|
7612
|
+
this.findBaseAndSubLayers();
|
|
7613
|
+
this.createSecondaryElement();
|
|
7614
|
+
this.addTabIndex();
|
|
7615
|
+
this.themeStyle = getThemeStyle(this.theme);
|
|
7616
|
+
this.renderBorder();
|
|
7617
|
+
this.renderTitle(this.titleSettings, 'title', null, null);
|
|
7618
|
+
this.renderArea();
|
|
7619
|
+
this.processRequestJsonData();
|
|
7620
|
+
this.renderComplete();
|
|
7621
|
+
this.isAddLayer = !this.isTileMap ? false : this.isAddLayer;
|
|
7622
|
+
}
|
|
7548
7623
|
};
|
|
7549
7624
|
/**
|
|
7550
7625
|
* To Initialize the control rendering.
|
|
@@ -7594,7 +7669,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7594
7669
|
if (layer.markerSettings[i].dataSource instanceof DataManager) {
|
|
7595
7670
|
_this.serverProcess['request']++;
|
|
7596
7671
|
dataModule = layer.markerSettings[i].dataSource;
|
|
7597
|
-
queryModule = layer.markerSettings[i].query instanceof Query ?
|
|
7672
|
+
queryModule = layer.markerSettings[i].query instanceof Query ?
|
|
7673
|
+
layer.markerSettings[i].query : new Query();
|
|
7598
7674
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7599
7675
|
var dataManager = dataModule.executeQuery(queryModule);
|
|
7600
7676
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -7613,7 +7689,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7613
7689
|
if (layer.bubbleSettings[i].dataSource instanceof DataManager) {
|
|
7614
7690
|
_this.serverProcess['request']++;
|
|
7615
7691
|
dataModule = layer.bubbleSettings[i].dataSource;
|
|
7616
|
-
queryModule = layer.bubbleSettings[i].query instanceof Query ?
|
|
7692
|
+
queryModule = layer.bubbleSettings[i].query instanceof Query ?
|
|
7693
|
+
layer.bubbleSettings[i].query : new Query();
|
|
7617
7694
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7618
7695
|
var dataManager = dataModule.executeQuery(queryModule);
|
|
7619
7696
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -7723,6 +7800,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7723
7800
|
}
|
|
7724
7801
|
if (!this.isResize) {
|
|
7725
7802
|
for (var k = 0; k < this.layers[i].markerSettings.length; k++) {
|
|
7803
|
+
// eslint-disable-next-line max-len
|
|
7726
7804
|
if (this.layers[i].markerSettings[k].selectionSettings && this.layers[i].markerSettings[k].selectionSettings.enable
|
|
7727
7805
|
&& this.layers[i].markerSettings[k].initialMarkerSelection.length > 0) {
|
|
7728
7806
|
var markerSelectionValues = this.layers[i].markerSettings[k].initialMarkerSelection;
|
|
@@ -7918,8 +7996,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7918
7996
|
tileSvgParentElement.style.left = left + 'px';
|
|
7919
7997
|
tileSvgParentElement.style.top = top + 'px';
|
|
7920
7998
|
if (!isNullOrUndefined(this.legendModule) && this.legendModule.totalPages.length > 0) {
|
|
7921
|
-
tileElement.style.width = tileSvgElement.style.width =
|
|
7922
|
-
|
|
7999
|
+
tileElement.style.width = tileSvgElement.style.width =
|
|
8000
|
+
this.legendModule.legendTotalRect.width.toString();
|
|
8001
|
+
tileElement.style.height = tileSvgElement.style.height =
|
|
8002
|
+
this.legendModule.legendTotalRect.height.toString();
|
|
7923
8003
|
tileSvgParentElement.style.width = this.legendModule.legendTotalRect.width + 'px';
|
|
7924
8004
|
tileSvgParentElement.style.height = this.legendModule.legendTotalRect.height + 'px';
|
|
7925
8005
|
}
|
|
@@ -7940,7 +8020,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
7940
8020
|
if (!isNullOrUndefined(elements) && elements.childElementCount > 0) {
|
|
7941
8021
|
for (var i = 0; i < elements.childNodes.length; i++) {
|
|
7942
8022
|
var childElement = elements.childNodes[i];
|
|
7943
|
-
if (childElement.tagName === 'g' && childElement.id.indexOf('_Legend_Group')
|
|
8023
|
+
if (childElement.tagName === 'g' && childElement.id.indexOf('_Legend_Group') === -1) {
|
|
7944
8024
|
var layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
|
|
7945
8025
|
for (var j = 0; j < childElement.childNodes.length; j++) {
|
|
7946
8026
|
var childNode = childElement.childNodes[j];
|
|
@@ -8071,7 +8151,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8071
8151
|
break;
|
|
8072
8152
|
}
|
|
8073
8153
|
}
|
|
8074
|
-
subLayers.map(function (subLayer
|
|
8154
|
+
subLayers.map(function (subLayer) {
|
|
8075
8155
|
if (subLayer.visible) {
|
|
8076
8156
|
_this.layersCollection.push(subLayer);
|
|
8077
8157
|
}
|
|
@@ -8231,6 +8311,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8231
8311
|
};
|
|
8232
8312
|
Maps.prototype.keyUpHandler = function (event) {
|
|
8233
8313
|
var id = event.target['id'];
|
|
8314
|
+
if (this.isTileMap) {
|
|
8315
|
+
this.removeTileMap();
|
|
8316
|
+
}
|
|
8234
8317
|
if (event.code === 'Tab' && id.indexOf('_LayerIndex_') > -1 && id.indexOf('shapeIndex') > -1) {
|
|
8235
8318
|
this.keyboardHighlightSelection(id, event.type);
|
|
8236
8319
|
}
|
|
@@ -8264,6 +8347,13 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8264
8347
|
};
|
|
8265
8348
|
Maps.prototype.keyDownHandler = function (event) {
|
|
8266
8349
|
var zoom = this.zoomModule;
|
|
8350
|
+
if ((event.code === 'ArrowUp' || event.code === 'ArrowDown' || event.code === 'ArrowLeft'
|
|
8351
|
+
|| event.code === 'ArrowRight') && zoom) {
|
|
8352
|
+
var animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
|
|
8353
|
+
if (this.isTileMap && !isNullOrUndefined(animatedTiles)) {
|
|
8354
|
+
this.currentTiles = animatedTiles.cloneNode(true);
|
|
8355
|
+
}
|
|
8356
|
+
}
|
|
8267
8357
|
if ((event.key === '+' || event.code === 'Equal') && zoom) {
|
|
8268
8358
|
zoom.performZoomingByToolBar('zoomin');
|
|
8269
8359
|
}
|
|
@@ -8338,6 +8428,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8338
8428
|
* This method is used to perform the operations when a click operation is performed on maps.
|
|
8339
8429
|
*
|
|
8340
8430
|
* @param {PointerEvent} e - Specifies the pointer event on maps.
|
|
8431
|
+
* @returns {void}
|
|
8341
8432
|
*/
|
|
8342
8433
|
Maps.prototype.mapsOnClick = function (e) {
|
|
8343
8434
|
var _this = this;
|
|
@@ -8403,8 +8494,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8403
8494
|
Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y) {
|
|
8404
8495
|
var layerIndex = 0;
|
|
8405
8496
|
var latLongValue;
|
|
8406
|
-
if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap &&
|
|
8407
|
-
|
|
8497
|
+
if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap &&
|
|
8498
|
+
(parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
|
|
8499
|
+
(parseInt(this.mouseDownEvent['y'], 10) === parseInt(this.mouseClickEvent['y'], 10))) {
|
|
8408
8500
|
layerIndex = parseFloat(targetId.split('_LayerIndex_')[1].split('_')[0]);
|
|
8409
8501
|
if (this.layers[layerIndex].geometryType === 'Normal') {
|
|
8410
8502
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
@@ -8441,12 +8533,21 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8441
8533
|
latLongValue = this.getGeoLocation(layerIndex, x, y);
|
|
8442
8534
|
}
|
|
8443
8535
|
}
|
|
8444
|
-
else if (this.isTileMap && (parseInt(this.mouseDownEvent['x']) === parseInt(this.mouseClickEvent['x']))
|
|
8445
|
-
|
|
8536
|
+
else if (this.isTileMap && (parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
|
|
8537
|
+
(parseInt(this.mouseDownEvent['y'], 10) === parseInt(this.mouseClickEvent['y'], 10))) {
|
|
8446
8538
|
latLongValue = this.getTileGeoLocation(x, y);
|
|
8447
8539
|
}
|
|
8448
8540
|
return latLongValue;
|
|
8449
8541
|
};
|
|
8542
|
+
Maps.prototype.removeTileMap = function () {
|
|
8543
|
+
var animateElement = document.getElementById(this.element.id + '_animated_tiles');
|
|
8544
|
+
if (!isNullOrUndefined(this.currentTiles) && animateElement.childElementCount !== this.currentTiles.childElementCount) {
|
|
8545
|
+
for (var l = animateElement.childElementCount - 1; l >= this.currentTiles.childElementCount; l--) {
|
|
8546
|
+
animateElement.removeChild(animateElement.children[l]);
|
|
8547
|
+
}
|
|
8548
|
+
}
|
|
8549
|
+
this.currentTiles = null;
|
|
8550
|
+
};
|
|
8450
8551
|
/**
|
|
8451
8552
|
* This method is used to perform operations when mouse click on maps.
|
|
8452
8553
|
*
|
|
@@ -8478,6 +8579,9 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8478
8579
|
pageY = e.pageY;
|
|
8479
8580
|
target = e.target;
|
|
8480
8581
|
}
|
|
8582
|
+
if (this.isTileMap) {
|
|
8583
|
+
this.removeTileMap();
|
|
8584
|
+
}
|
|
8481
8585
|
if (this.isTouch) {
|
|
8482
8586
|
if (targetEle.id.indexOf('_ToolBar') === -1) {
|
|
8483
8587
|
var latLongValue = this.getClickLocation(targetId, pageX, pageY, targetEle, pageX, pageY);
|
|
@@ -8510,6 +8614,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8510
8614
|
}
|
|
8511
8615
|
var rect = this.element.getBoundingClientRect();
|
|
8512
8616
|
var element = e.target;
|
|
8617
|
+
var animatedTiles = document.getElementById(this.element.id + '_animated_tiles');
|
|
8618
|
+
if (this.isTileMap && !isNullOrUndefined(animatedTiles)) {
|
|
8619
|
+
this.currentTiles = animatedTiles.cloneNode(true);
|
|
8620
|
+
}
|
|
8513
8621
|
if (element.id.indexOf('_ToolBar') === -1) {
|
|
8514
8622
|
var markerModule = this.markerModule;
|
|
8515
8623
|
if (element.id.indexOf('shapeIndex') > -1 || element.id.indexOf('Tile') > -1) {
|
|
@@ -8542,6 +8650,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8542
8650
|
* This method is used to perform operations when performing the double click operation on maps.
|
|
8543
8651
|
*
|
|
8544
8652
|
* @param {PointerEvent} e - Specifies the pointer event.
|
|
8653
|
+
* @returns {void}
|
|
8545
8654
|
*/
|
|
8546
8655
|
Maps.prototype.mapsOnDoubleClick = function (e) {
|
|
8547
8656
|
this.notify('dblclick', e);
|
|
@@ -8565,8 +8674,10 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8565
8674
|
latitude = latLongValue['latitude'];
|
|
8566
8675
|
longitude = latLongValue['longitude'];
|
|
8567
8676
|
}
|
|
8568
|
-
var doubleClickArgs = {
|
|
8569
|
-
|
|
8677
|
+
var doubleClickArgs = {
|
|
8678
|
+
cancel: false, name: doubleClick, x: e.clientX, y: e.clientY,
|
|
8679
|
+
target: targetId, latitude: latitude, longitude: longitude, isShapeSelected: null
|
|
8680
|
+
};
|
|
8570
8681
|
this.trigger('doubleClick', doubleClickArgs);
|
|
8571
8682
|
}
|
|
8572
8683
|
};
|
|
@@ -8658,28 +8769,30 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8658
8769
|
*/
|
|
8659
8770
|
Maps.prototype.mapsOnResize = function (e) {
|
|
8660
8771
|
var _this = this;
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
if (
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
this.
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8772
|
+
if (!this.isDestroyed) {
|
|
8773
|
+
this.isResize = this.isReset = true;
|
|
8774
|
+
var args = {
|
|
8775
|
+
cancel: false,
|
|
8776
|
+
name: resize,
|
|
8777
|
+
previousSize: this.availableSize,
|
|
8778
|
+
currentSize: calculateSize(this),
|
|
8779
|
+
maps: this
|
|
8780
|
+
};
|
|
8781
|
+
this.trigger(resize, args);
|
|
8782
|
+
if (!args.cancel) {
|
|
8783
|
+
if (this.resizeTo) {
|
|
8784
|
+
clearTimeout(this.resizeTo);
|
|
8785
|
+
}
|
|
8786
|
+
if (!isNullOrUndefined(this.element) && this.element.classList.contains('e-maps')) {
|
|
8787
|
+
this.resizeTo = setTimeout(function () {
|
|
8788
|
+
_this.unWireEVents();
|
|
8789
|
+
_this.createSVG();
|
|
8790
|
+
_this.refreshing = true;
|
|
8791
|
+
_this.wireEVents();
|
|
8792
|
+
_this.render();
|
|
8793
|
+
_this.refreshing = false;
|
|
8794
|
+
}, 500);
|
|
8795
|
+
}
|
|
8683
8796
|
}
|
|
8684
8797
|
}
|
|
8685
8798
|
return false;
|
|
@@ -8694,69 +8807,79 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8694
8807
|
* @returns {void}
|
|
8695
8808
|
*/
|
|
8696
8809
|
Maps.prototype.zoomByPosition = function (centerPosition, zoomFactor) {
|
|
8697
|
-
this.
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
if (!
|
|
8701
|
-
|
|
8702
|
-
|
|
8810
|
+
if (!this.isDestroyed) {
|
|
8811
|
+
this.zoomNotApplied = false;
|
|
8812
|
+
var isRefresh = this.zoomSettings.zoomFactor === zoomFactor;
|
|
8813
|
+
if (!this.isTileMap && this.zoomModule) {
|
|
8814
|
+
if (!isNullOrUndefined(centerPosition)) {
|
|
8815
|
+
this.zoomSettings.zoomFactor = zoomFactor;
|
|
8816
|
+
isRefresh = this.centerPosition.latitude === centerPosition.latitude &&
|
|
8817
|
+
this.centerPosition.longitude === centerPosition.longitude ? true : isRefresh;
|
|
8818
|
+
this.centerPosition = centerPosition;
|
|
8819
|
+
this.isZoomByPosition = true;
|
|
8820
|
+
this.mapScaleValue = null;
|
|
8821
|
+
}
|
|
8822
|
+
else {
|
|
8823
|
+
this.zoomSettings.zoomFactor = zoomFactor;
|
|
8824
|
+
this.isZoomByPosition = true;
|
|
8825
|
+
this.mapScaleValue = null;
|
|
8826
|
+
}
|
|
8827
|
+
}
|
|
8828
|
+
else if (this.zoomModule) {
|
|
8829
|
+
this.tileZoomLevel = this.zoomSettings.zoomFactor = zoomFactor;
|
|
8830
|
+
isRefresh = this.centerPosition.latitude === centerPosition.latitude &&
|
|
8831
|
+
this.centerPosition.longitude === centerPosition.longitude ? true : isRefresh;
|
|
8703
8832
|
this.centerPosition = centerPosition;
|
|
8704
8833
|
this.isZoomByPosition = true;
|
|
8705
|
-
this.mapScaleValue = null;
|
|
8706
8834
|
}
|
|
8707
|
-
|
|
8708
|
-
this.
|
|
8709
|
-
this.isZoomByPosition = true;
|
|
8710
|
-
this.mapScaleValue = null;
|
|
8835
|
+
if (isRefresh) {
|
|
8836
|
+
this.refresh();
|
|
8711
8837
|
}
|
|
8712
8838
|
}
|
|
8713
|
-
else if (this.zoomModule) {
|
|
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();
|
|
8721
|
-
}
|
|
8722
8839
|
};
|
|
8723
8840
|
/**
|
|
8724
8841
|
* This method is used to perform panning by specifying the direction.
|
|
8725
8842
|
*
|
|
8726
8843
|
* @param {PanDirection} direction - Specifies the direction in which the panning is performed.
|
|
8727
8844
|
* @param {PointerEvent | TouchEvent} mouseLocation - Specifies the location of the mouse pointer in maps.
|
|
8845
|
+
* @returns {void}
|
|
8728
8846
|
*/
|
|
8729
8847
|
Maps.prototype.panByDirection = function (direction, mouseLocation) {
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
this.zoomModule
|
|
8848
|
+
if (!this.isDestroyed) {
|
|
8849
|
+
var xDiff = 0;
|
|
8850
|
+
var yDiff = 0;
|
|
8851
|
+
switch (direction) {
|
|
8852
|
+
case 'Left':
|
|
8853
|
+
xDiff = -(this.mapAreaRect.width / 7);
|
|
8854
|
+
break;
|
|
8855
|
+
case 'Right':
|
|
8856
|
+
xDiff = (this.mapAreaRect.width / 7);
|
|
8857
|
+
break;
|
|
8858
|
+
case 'Top':
|
|
8859
|
+
yDiff = -(this.mapAreaRect.height / 7);
|
|
8860
|
+
break;
|
|
8861
|
+
case 'Bottom':
|
|
8862
|
+
yDiff = (this.mapAreaRect.height / 7);
|
|
8863
|
+
break;
|
|
8864
|
+
}
|
|
8865
|
+
if (this.zoomModule) {
|
|
8866
|
+
this.zoomModule.panning(direction, xDiff, yDiff, mouseLocation);
|
|
8867
|
+
}
|
|
8748
8868
|
}
|
|
8749
8869
|
};
|
|
8750
8870
|
/**
|
|
8751
8871
|
* This method is used to add the layers dynamically to the maps.
|
|
8752
8872
|
*
|
|
8753
8873
|
* @param {Object} layer - Specifies the layer for the maps.
|
|
8874
|
+
* @returns {void}
|
|
8754
8875
|
*/
|
|
8755
8876
|
Maps.prototype.addLayer = function (layer) {
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8877
|
+
if (!this.isDestroyed) {
|
|
8878
|
+
var mapsLayer = this.layers;
|
|
8879
|
+
mapsLayer.push(layer);
|
|
8880
|
+
this.isAddLayer = true;
|
|
8881
|
+
this.layers = mapsLayer;
|
|
8882
|
+
}
|
|
8760
8883
|
};
|
|
8761
8884
|
/**
|
|
8762
8885
|
* This method is used to remove a layer from map.
|
|
@@ -8765,9 +8888,11 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8765
8888
|
* @returns {void}
|
|
8766
8889
|
*/
|
|
8767
8890
|
Maps.prototype.removeLayer = function (index) {
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8891
|
+
if (!this.isDestroyed) {
|
|
8892
|
+
var mapsLayer = this.layers;
|
|
8893
|
+
mapsLayer.splice(index, 1);
|
|
8894
|
+
this.layers = mapsLayer;
|
|
8895
|
+
}
|
|
8771
8896
|
};
|
|
8772
8897
|
/**
|
|
8773
8898
|
* This method is used to add markers dynamically in the maps.
|
|
@@ -8779,15 +8904,17 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8779
8904
|
* @returns {void}
|
|
8780
8905
|
*/
|
|
8781
8906
|
Maps.prototype.addMarker = function (layerIndex, markerCollection) {
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
var
|
|
8786
|
-
|
|
8907
|
+
if (!this.isDestroyed) {
|
|
8908
|
+
var layerEle = document.getElementById(this.element.id + '_LayerIndex_' + layerIndex);
|
|
8909
|
+
if (markerCollection.length > 0 && layerEle) {
|
|
8910
|
+
for (var _i = 0, markerCollection_1 = markerCollection; _i < markerCollection_1.length; _i++) {
|
|
8911
|
+
var newMarker = markerCollection_1[_i];
|
|
8912
|
+
this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
|
|
8913
|
+
}
|
|
8914
|
+
var markerModule = new Marker(this);
|
|
8915
|
+
markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
|
|
8916
|
+
this.arrangeTemplate();
|
|
8787
8917
|
}
|
|
8788
|
-
var markerModule = new Marker(this);
|
|
8789
|
-
markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
|
|
8790
|
-
this.arrangeTemplate();
|
|
8791
8918
|
}
|
|
8792
8919
|
};
|
|
8793
8920
|
/**
|
|
@@ -8800,93 +8927,96 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8800
8927
|
* @returns {void}
|
|
8801
8928
|
*/
|
|
8802
8929
|
Maps.prototype.shapeSelection = function (layerIndex, propertyName, name, enable) {
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
enable
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
this.
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8930
|
+
if (!this.isDestroyed) {
|
|
8931
|
+
var targetEle = void 0;
|
|
8932
|
+
var subLayerIndex = void 0;
|
|
8933
|
+
var popertyNameArray = Array.isArray(propertyName) ? propertyName : Array(propertyName);
|
|
8934
|
+
if (isNullOrUndefined(enable)) {
|
|
8935
|
+
enable = true;
|
|
8936
|
+
}
|
|
8937
|
+
var selectionsettings = this.layers[layerIndex].selectionSettings;
|
|
8938
|
+
if (!selectionsettings.enableMultiSelect && this.legendSelection && enable) {
|
|
8939
|
+
this.removeShapeSelection();
|
|
8940
|
+
}
|
|
8941
|
+
if (this.layers[layerIndex].type === 'SubLayer') {
|
|
8942
|
+
for (var i = 0; i < this.layersCollection.length; i++) {
|
|
8943
|
+
if ((this.layersCollection[i].shapeData === this.layers[layerIndex].shapeData)) {
|
|
8944
|
+
subLayerIndex = i;
|
|
8945
|
+
break;
|
|
8946
|
+
}
|
|
8818
8947
|
}
|
|
8819
8948
|
}
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
targetId = this.element.id + '_' + 'LayerIndex_' + indexValue + '_shapeIndex_' + i + '_dataIndex_' + k;
|
|
8848
|
-
targetEle = getElement(targetId);
|
|
8849
|
-
if (isNullOrUndefined(k) && isNullOrUndefined(targetEle)) {
|
|
8850
|
-
targetId = this.element.id + '_' + 'LayerIndex_' + layerIndex + '_shapeIndex_' + i + '_dataIndex_null';
|
|
8949
|
+
if (selectionsettings.enable) {
|
|
8950
|
+
var targetId = void 0;
|
|
8951
|
+
var dataIndex = void 0;
|
|
8952
|
+
var shapeIndex = void 0;
|
|
8953
|
+
var indexValue = void 0;
|
|
8954
|
+
var shapeDataValue = void 0;
|
|
8955
|
+
var data = void 0;
|
|
8956
|
+
var shapeData = this.layers[layerIndex].shapeData['features'];
|
|
8957
|
+
for (var i = 0; i < shapeData.length; i++) {
|
|
8958
|
+
for (var j = 0; j < popertyNameArray.length; j++) {
|
|
8959
|
+
var propertyName_1 = !isNullOrUndefined(shapeData[i]['properties'][popertyNameArray[j]])
|
|
8960
|
+
&& isNaN(shapeData[i]['properties'][popertyNameArray[j]]) ?
|
|
8961
|
+
shapeData[i]['properties'][popertyNameArray[j]].toLowerCase() : shapeData[i]['properties'][popertyNameArray[j]];
|
|
8962
|
+
var shapeName = !isNullOrUndefined(name) && typeof name === 'string' ? name.toLowerCase() : name;
|
|
8963
|
+
var k = void 0;
|
|
8964
|
+
if (propertyName_1 === shapeName) {
|
|
8965
|
+
if (!isNullOrUndefined(this.layers[layerIndex].shapeSettings.colorValuePath)) {
|
|
8966
|
+
k = checkShapeDataFields(this.layers[layerIndex].dataSource, shapeData[i]['properties'], this.layers[layerIndex].shapeDataPath, this.layers[layerIndex].shapePropertyPath, this.layers[layerIndex]);
|
|
8967
|
+
}
|
|
8968
|
+
var baseLayer = this.layers[layerIndex];
|
|
8969
|
+
if (this.baseLayerIndex >= 0 && baseLayer.isBaseLayer) {
|
|
8970
|
+
indexValue = 0;
|
|
8971
|
+
}
|
|
8972
|
+
else if (this.layers[layerIndex].type === 'SubLayer') {
|
|
8973
|
+
indexValue = subLayerIndex;
|
|
8974
|
+
}
|
|
8975
|
+
targetId = this.element.id + '_' + 'LayerIndex_' + indexValue + '_shapeIndex_' + i + '_dataIndex_' + k;
|
|
8851
8976
|
targetEle = getElement(targetId);
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
|
|
8856
|
-
dataIndex = parseInt(targetEle.id.split('_dataIndex_')[1].split('_')[0], 10);
|
|
8857
|
-
data = isNullOrUndefined(dataIndex) ? null : this.layers[layerIndex].dataSource[dataIndex];
|
|
8858
|
-
if (enable) {
|
|
8859
|
-
triggerItemSelectionEvent(selectionsettings, this, targetEle, shapeDataValue, data);
|
|
8860
|
-
this.shapeSelectionClass = getElement('ShapeselectionMap');
|
|
8861
|
-
if (this.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1) {
|
|
8862
|
-
this.legendModule.shapeHighLightAndSelection(targetEle, data, selectionsettings, 'selection', layerIndex);
|
|
8977
|
+
if (isNullOrUndefined(k) && isNullOrUndefined(targetEle)) {
|
|
8978
|
+
targetId = this.element.id + '_' + 'LayerIndex_' + layerIndex + '_shapeIndex_' + i + '_dataIndex_null';
|
|
8979
|
+
targetEle = getElement(targetId);
|
|
8863
8980
|
}
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8981
|
+
shapeIndex = parseInt(targetEle.id.split('_shapeIndex_')[1].split('_')[0], 10);
|
|
8982
|
+
shapeDataValue = this.layers[layerIndex].shapeData['features']['length'] > shapeIndex ?
|
|
8983
|
+
this.layers[layerIndex].shapeData['features'][shapeIndex]['properties'] : null;
|
|
8984
|
+
dataIndex = parseInt(targetEle.id.split('_dataIndex_')[1].split('_')[0], 10);
|
|
8985
|
+
data = isNullOrUndefined(dataIndex) ? null : this.layers[layerIndex].dataSource[dataIndex];
|
|
8986
|
+
if (enable) {
|
|
8987
|
+
triggerItemSelectionEvent(selectionsettings, this, targetEle, shapeDataValue, data);
|
|
8988
|
+
this.shapeSelectionClass = getElement('ShapeselectionMap');
|
|
8989
|
+
if (this.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1) {
|
|
8990
|
+
this.legendModule.shapeHighLightAndSelection(targetEle, data, selectionsettings, 'selection', layerIndex);
|
|
8869
8991
|
}
|
|
8870
|
-
|
|
8871
|
-
|
|
8992
|
+
var shapeToggled = this.legendSettings.visible ? this.legendModule.shapeToggled : true;
|
|
8993
|
+
if (shapeToggled) {
|
|
8994
|
+
targetEle.setAttribute('class', 'ShapeselectionMapStyle');
|
|
8995
|
+
if (this.selectedElementId.indexOf(targetEle.getAttribute('id')) === -1) {
|
|
8996
|
+
this.selectedElementId.push(targetEle.getAttribute('id'));
|
|
8997
|
+
}
|
|
8998
|
+
if (!selectionsettings.enableMultiSelect) {
|
|
8999
|
+
return;
|
|
9000
|
+
}
|
|
8872
9001
|
}
|
|
8873
9002
|
}
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
9003
|
+
else {
|
|
9004
|
+
this.legendSelection = (!selectionsettings.enableMultiSelect && !this.legendSelection) ?
|
|
9005
|
+
true : this.legendSelection;
|
|
9006
|
+
if (this.legendSettings.visible && targetEle.id.indexOf('_MarkerIndex_') === -1 &&
|
|
9007
|
+
targetEle.getAttribute('class') === 'ShapeselectionMapStyle') {
|
|
9008
|
+
this.legendModule.shapeHighLightAndSelection(targetEle, data, selectionsettings, 'selection', layerIndex);
|
|
9009
|
+
}
|
|
9010
|
+
var shapeToggled = this.legendSettings.visible ? this.legendModule.shapeToggled : true;
|
|
9011
|
+
if (shapeToggled) {
|
|
9012
|
+
removeClass(targetEle);
|
|
9013
|
+
var selectedElementIdIndex = this.selectedElementId.indexOf(targetEle.getAttribute('id'));
|
|
9014
|
+
if (selectedElementIdIndex !== -1) {
|
|
9015
|
+
this.selectedElementId.splice(selectedElementIdIndex, 1);
|
|
9016
|
+
if (!selectionsettings.enableMultiSelect && this.legendSelection
|
|
9017
|
+
&& this.selectedElementId.length > 0) {
|
|
9018
|
+
this.removeShapeSelection();
|
|
9019
|
+
}
|
|
8890
9020
|
}
|
|
8891
9021
|
}
|
|
8892
9022
|
}
|
|
@@ -8907,53 +9037,55 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
8907
9037
|
*/
|
|
8908
9038
|
Maps.prototype.zoomToCoordinates = function (minLatitude, minLongitude, maxLatitude, maxLongitude) {
|
|
8909
9039
|
var _a, _b;
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
9040
|
+
if (!this.isDestroyed) {
|
|
9041
|
+
var centerLatitude = void 0;
|
|
9042
|
+
var centerLongtitude = void 0;
|
|
9043
|
+
var isTwoCoordinates = false;
|
|
9044
|
+
this.centerPosition = {
|
|
9045
|
+
latitude: null,
|
|
9046
|
+
longitude: null
|
|
9047
|
+
};
|
|
9048
|
+
this.isZoomByPosition = false;
|
|
9049
|
+
if (isNullOrUndefined(maxLatitude) && isNullOrUndefined(maxLongitude)
|
|
9050
|
+
|| isNullOrUndefined(minLatitude) && isNullOrUndefined(minLongitude)) {
|
|
9051
|
+
minLatitude = isNullOrUndefined(minLatitude) ? 0 : minLatitude;
|
|
9052
|
+
minLongitude = isNullOrUndefined(minLatitude) ? 0 : minLongitude;
|
|
9053
|
+
maxLatitude = isNullOrUndefined(maxLatitude) ? minLatitude : maxLatitude;
|
|
9054
|
+
maxLongitude = isNullOrUndefined(maxLongitude) ? minLongitude : maxLongitude;
|
|
9055
|
+
isTwoCoordinates = true;
|
|
9056
|
+
}
|
|
9057
|
+
if (minLatitude > maxLatitude) {
|
|
9058
|
+
_a = [maxLatitude, minLatitude], minLatitude = _a[0], maxLatitude = _a[1];
|
|
9059
|
+
}
|
|
9060
|
+
if (minLongitude > maxLongitude) {
|
|
9061
|
+
_b = [maxLongitude, minLongitude], minLongitude = _b[0], maxLongitude = _b[1];
|
|
9062
|
+
}
|
|
9063
|
+
if (!isTwoCoordinates) {
|
|
9064
|
+
centerLatitude = (minLatitude + maxLatitude) / 2;
|
|
9065
|
+
centerLongtitude = (minLongitude + maxLongitude) / 2;
|
|
9066
|
+
}
|
|
9067
|
+
else {
|
|
9068
|
+
centerLatitude = (minLatitude + maxLatitude);
|
|
9069
|
+
centerLongtitude = (minLongitude + maxLongitude);
|
|
9070
|
+
}
|
|
9071
|
+
this.centerLatOfGivenLocation = centerLatitude;
|
|
9072
|
+
this.centerLongOfGivenLocation = centerLongtitude;
|
|
9073
|
+
this.minLatOfGivenLocation = minLatitude;
|
|
9074
|
+
this.minLongOfGivenLocation = minLongitude;
|
|
9075
|
+
this.maxLatOfGivenLocation = maxLatitude;
|
|
9076
|
+
this.maxLongOfGivenLocation = maxLongitude;
|
|
9077
|
+
this.zoomNotApplied = true;
|
|
9078
|
+
this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this);
|
|
9079
|
+
var zoomArgs = {
|
|
9080
|
+
cancel: false, name: 'zoom', type: zoomIn, maps: this,
|
|
9081
|
+
tileTranslatePoint: {}, translatePoint: {},
|
|
9082
|
+
tileZoomLevel: this.isTileMap ? { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation } : {},
|
|
9083
|
+
scale: !this.isTileMap ? { previous: this.scale, current: this.scaleOfGivenLocation } :
|
|
9084
|
+
{ previous: this.tileZoomLevel, current: this.scaleOfGivenLocation }
|
|
9085
|
+
};
|
|
9086
|
+
this.trigger('zoom', zoomArgs);
|
|
9087
|
+
this.refresh();
|
|
8935
9088
|
}
|
|
8936
|
-
else {
|
|
8937
|
-
centerLatitude = (minLatitude + maxLatitude);
|
|
8938
|
-
centerLongtitude = (minLongitude + maxLongitude);
|
|
8939
|
-
}
|
|
8940
|
-
this.centerLatOfGivenLocation = centerLatitude;
|
|
8941
|
-
this.centerLongOfGivenLocation = centerLongtitude;
|
|
8942
|
-
this.minLatOfGivenLocation = minLatitude;
|
|
8943
|
-
this.minLongOfGivenLocation = minLongitude;
|
|
8944
|
-
this.maxLatOfGivenLocation = maxLatitude;
|
|
8945
|
-
this.maxLongOfGivenLocation = maxLongitude;
|
|
8946
|
-
this.zoomNotApplied = true;
|
|
8947
|
-
this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this);
|
|
8948
|
-
var zoomArgs = {
|
|
8949
|
-
cancel: false, name: 'zoom', type: zoomIn, maps: this,
|
|
8950
|
-
tileTranslatePoint: {}, translatePoint: {},
|
|
8951
|
-
tileZoomLevel: this.isTileMap ? { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation } : {},
|
|
8952
|
-
scale: !this.isTileMap ? { previous: this.scale, current: this.scaleOfGivenLocation } :
|
|
8953
|
-
{ previous: this.tileZoomLevel, current: this.scaleOfGivenLocation }
|
|
8954
|
-
};
|
|
8955
|
-
this.trigger('zoom', zoomArgs);
|
|
8956
|
-
this.refresh();
|
|
8957
9089
|
};
|
|
8958
9090
|
/**
|
|
8959
9091
|
* This method is used to remove multiple selected shapes in the maps.
|
|
@@ -9004,6 +9136,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9004
9136
|
};
|
|
9005
9137
|
/**
|
|
9006
9138
|
* This method disposes the maps component.
|
|
9139
|
+
*
|
|
9140
|
+
* @returns {void}
|
|
9007
9141
|
*/
|
|
9008
9142
|
Maps.prototype.destroy = function () {
|
|
9009
9143
|
this.unWireEVents();
|
|
@@ -9060,93 +9194,96 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9060
9194
|
* @private
|
|
9061
9195
|
*/
|
|
9062
9196
|
Maps.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
var
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
var
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9197
|
+
if (!this.isDestroyed) {
|
|
9198
|
+
var render = false;
|
|
9199
|
+
var isMarker = false;
|
|
9200
|
+
var isLayer = false;
|
|
9201
|
+
var isStaticMapType = false;
|
|
9202
|
+
var layerEle = void 0;
|
|
9203
|
+
if (newProp['layers']) {
|
|
9204
|
+
var newLayerLength = Object.keys(newProp['layers']).length;
|
|
9205
|
+
layerEle = document.getElementById(this.element.id + '_LayerIndex_' + (newLayerLength - 1));
|
|
9206
|
+
}
|
|
9207
|
+
for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
|
|
9208
|
+
var prop = _a[_i];
|
|
9209
|
+
switch (prop) {
|
|
9210
|
+
case 'background':
|
|
9211
|
+
this.renderBorder();
|
|
9212
|
+
break;
|
|
9213
|
+
case 'height':
|
|
9214
|
+
case 'width':
|
|
9215
|
+
case 'layers':
|
|
9216
|
+
case 'projectionType':
|
|
9217
|
+
case 'centerPosition':
|
|
9218
|
+
case 'legendSettings':
|
|
9219
|
+
case 'baseLayerIndex':
|
|
9220
|
+
if (prop === 'layers') {
|
|
9221
|
+
isLayer = true;
|
|
9222
|
+
var layerPropLength = Object.keys(newProp.layers).length;
|
|
9223
|
+
for (var x = 0; x < layerPropLength; x++) {
|
|
9224
|
+
if (!isNullOrUndefined(newProp.layers[x])) {
|
|
9225
|
+
var collection = Object.keys(newProp.layers[x]);
|
|
9226
|
+
for (var _b = 0, collection_1 = collection; _b < collection_1.length; _b++) {
|
|
9227
|
+
var collectionProp = collection_1[_b];
|
|
9228
|
+
if ((collectionProp === 'layerType' && newProp.layers[x].layerType !== 'Geometry') ||
|
|
9229
|
+
(isNullOrUndefined(this.layers[x].shapeData)
|
|
9230
|
+
&& !isNullOrUndefined(this.layers[x].urlTemplate) && this.layers[x].urlTemplate !== '')) {
|
|
9231
|
+
this.isReset = true;
|
|
9232
|
+
}
|
|
9233
|
+
else if (collectionProp === 'markerSettings') {
|
|
9234
|
+
isMarker = true;
|
|
9235
|
+
}
|
|
9236
|
+
else if (collectionProp === 'staticMapType') {
|
|
9237
|
+
isStaticMapType = true;
|
|
9238
|
+
}
|
|
9102
9239
|
}
|
|
9103
9240
|
}
|
|
9104
9241
|
}
|
|
9105
9242
|
}
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9243
|
+
render = true;
|
|
9244
|
+
break;
|
|
9245
|
+
case 'zoomSettings':
|
|
9246
|
+
if (!isNullOrUndefined(oldProp.zoomSettings)) {
|
|
9247
|
+
if (newProp.zoomSettings.zoomFactor !== oldProp.zoomSettings.zoomFactor && !isLayer) {
|
|
9248
|
+
render = false;
|
|
9249
|
+
}
|
|
9250
|
+
else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
|
|
9251
|
+
this.zoomSettings.zoomFactor = 1;
|
|
9252
|
+
render = true;
|
|
9253
|
+
}
|
|
9254
|
+
else if (newProp.zoomSettings.enable !== oldProp.zoomSettings.enable) {
|
|
9255
|
+
this.zoomSettings.zoomFactor = 1;
|
|
9256
|
+
render = true;
|
|
9257
|
+
}
|
|
9258
|
+
else {
|
|
9259
|
+
render = true;
|
|
9260
|
+
}
|
|
9124
9261
|
}
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9262
|
+
break;
|
|
9263
|
+
case 'locale':
|
|
9264
|
+
case 'currencyCode':
|
|
9265
|
+
_super.prototype.refresh.call(this);
|
|
9266
|
+
break;
|
|
9267
|
+
}
|
|
9131
9268
|
}
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9269
|
+
if (render) {
|
|
9270
|
+
if (newProp.layers && isMarker) {
|
|
9271
|
+
removeElement(this.element.id + '_Markers_Group');
|
|
9272
|
+
if (this.isTileMap) {
|
|
9273
|
+
this.mapLayerPanel.renderTileLayer(this.mapLayerPanel, this.layers['currentFactor'], (this.layers.length - 1));
|
|
9274
|
+
}
|
|
9275
|
+
else {
|
|
9276
|
+
this.render();
|
|
9277
|
+
}
|
|
9278
|
+
}
|
|
9279
|
+
else if (newProp.layers && isStaticMapType) {
|
|
9280
|
+
this.mapLayerPanel.renderGoogleMap(this.layers[this.layers.length - 1].key, this.staticMapZoom);
|
|
9138
9281
|
}
|
|
9139
9282
|
else {
|
|
9140
|
-
this.
|
|
9283
|
+
this.createSVG();
|
|
9284
|
+
this.renderElements();
|
|
9141
9285
|
}
|
|
9142
9286
|
}
|
|
9143
|
-
else if (newProp.layers && isStaticMapType) {
|
|
9144
|
-
this.mapLayerPanel.renderGoogleMap(this.layers[this.layers.length - 1].key, this.staticMapZoom);
|
|
9145
|
-
}
|
|
9146
|
-
else {
|
|
9147
|
-
this.createSVG();
|
|
9148
|
-
this.renderElements();
|
|
9149
|
-
}
|
|
9150
9287
|
}
|
|
9151
9288
|
};
|
|
9152
9289
|
/**
|
|
@@ -9159,7 +9296,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9159
9296
|
var modules = [];
|
|
9160
9297
|
var isVisible = this.findVisibleLayers(this.layers);
|
|
9161
9298
|
var annotationEnable = false;
|
|
9162
|
-
this.annotations.map(function (annotation
|
|
9299
|
+
this.annotations.map(function (annotation) {
|
|
9163
9300
|
annotationEnable = annotation.content != null;
|
|
9164
9301
|
});
|
|
9165
9302
|
if (this.isBubbleVisible()) {
|
|
@@ -9244,10 +9381,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9244
9381
|
};
|
|
9245
9382
|
/**
|
|
9246
9383
|
* To find marker visibility
|
|
9384
|
+
*
|
|
9385
|
+
* @returns {boolean} - Returns whether the markers are visible or not.
|
|
9247
9386
|
*/
|
|
9248
9387
|
Maps.prototype.isMarkersVisible = function () {
|
|
9249
9388
|
var isVisible = false;
|
|
9250
|
-
Array.prototype.forEach.call(this.layers, function (layer
|
|
9389
|
+
Array.prototype.forEach.call(this.layers, function (layer) {
|
|
9251
9390
|
for (var i = 0; i < layer.markerSettings.length; i++) {
|
|
9252
9391
|
if (layer.markerSettings[i].visible) {
|
|
9253
9392
|
isVisible = true;
|
|
@@ -9259,6 +9398,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9259
9398
|
};
|
|
9260
9399
|
/**
|
|
9261
9400
|
* To find DataLabel visibility
|
|
9401
|
+
*
|
|
9402
|
+
* @returns {boolean} - Returns whether the data labels are visible or not.
|
|
9262
9403
|
*/
|
|
9263
9404
|
Maps.prototype.isDataLabelVisible = function () {
|
|
9264
9405
|
var isVisible = false;
|
|
@@ -9272,10 +9413,12 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9272
9413
|
};
|
|
9273
9414
|
/**
|
|
9274
9415
|
* To find navigation line visibility
|
|
9416
|
+
*
|
|
9417
|
+
* @returns {boolean} - Returns whether the navigation lines are visible or not.
|
|
9275
9418
|
*/
|
|
9276
9419
|
Maps.prototype.isNavigationVisible = function () {
|
|
9277
9420
|
var isVisible = false;
|
|
9278
|
-
Array.prototype.forEach.call(this.layers, function (layer
|
|
9421
|
+
Array.prototype.forEach.call(this.layers, function (layer) {
|
|
9279
9422
|
for (var i = 0; i < layer.navigationLineSettings.length; i++) {
|
|
9280
9423
|
if (layer.navigationLineSettings[i].visible) {
|
|
9281
9424
|
isVisible = true;
|
|
@@ -9287,6 +9430,8 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9287
9430
|
};
|
|
9288
9431
|
/**
|
|
9289
9432
|
* To find space between the secondary element and svg element.
|
|
9433
|
+
*
|
|
9434
|
+
* @returns {Point} - Returns the left and top value of the secondary element of Maps.
|
|
9290
9435
|
* @private
|
|
9291
9436
|
*/
|
|
9292
9437
|
Maps.prototype.getExtraPosition = function () {
|
|
@@ -9344,7 +9489,7 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9344
9489
|
* @returns {void}
|
|
9345
9490
|
*/
|
|
9346
9491
|
Maps.prototype.print = function (id) {
|
|
9347
|
-
if ((this.allowPrint) && (this.printModule)) {
|
|
9492
|
+
if ((this.allowPrint) && (this.printModule) && !this.isDestroyed) {
|
|
9348
9493
|
this.printModule.print(this, id);
|
|
9349
9494
|
}
|
|
9350
9495
|
};
|
|
@@ -9359,18 +9504,20 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9359
9504
|
*/
|
|
9360
9505
|
Maps.prototype.export = function (type, fileName, orientation, allowDownload) {
|
|
9361
9506
|
var _this = this;
|
|
9362
|
-
if (
|
|
9363
|
-
allowDownload
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9507
|
+
if (!this.isDestroyed) {
|
|
9508
|
+
if (isNullOrUndefined(allowDownload)) {
|
|
9509
|
+
allowDownload = true;
|
|
9510
|
+
}
|
|
9511
|
+
if ((type !== 'PDF') && (this.allowImageExport) && (this.imageExportModule)) {
|
|
9512
|
+
return new Promise(function (resolve, reject) {
|
|
9513
|
+
resolve(_this.imageExportModule.export(_this, type, fileName, allowDownload));
|
|
9514
|
+
});
|
|
9515
|
+
}
|
|
9516
|
+
else if ((this.allowPdfExport) && (this.pdfExportModule)) {
|
|
9517
|
+
return new Promise(function (resolve, reject) {
|
|
9518
|
+
resolve(_this.pdfExportModule.export(_this, type, fileName, allowDownload, orientation));
|
|
9519
|
+
});
|
|
9520
|
+
}
|
|
9374
9521
|
}
|
|
9375
9522
|
return null;
|
|
9376
9523
|
};
|
|
@@ -9381,19 +9528,22 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9381
9528
|
* @returns {Promise<string>} - Returns the processed Bing URL as Promise.
|
|
9382
9529
|
*/
|
|
9383
9530
|
Maps.prototype.getBingUrlTemplate = function (url) {
|
|
9384
|
-
var promise
|
|
9385
|
-
|
|
9386
|
-
|
|
9531
|
+
var promise;
|
|
9532
|
+
if (!this.isDestroyed) {
|
|
9533
|
+
promise = new Promise(function (resolve, reject) {
|
|
9534
|
+
var ajax = new Ajax({
|
|
9535
|
+
url: url
|
|
9536
|
+
});
|
|
9537
|
+
ajax.onSuccess = function (json) {
|
|
9538
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9539
|
+
var jsonObject = JSON.parse(json);
|
|
9540
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9541
|
+
var resource = jsonObject['resourceSets'][0]['resources'][0];
|
|
9542
|
+
resolve(resource['imageUrl']);
|
|
9543
|
+
};
|
|
9544
|
+
ajax.send();
|
|
9387
9545
|
});
|
|
9388
|
-
|
|
9389
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9390
|
-
var jsonObject = JSON.parse(json);
|
|
9391
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9392
|
-
var resource = jsonObject['resourceSets'][0]['resources'][0];
|
|
9393
|
-
resolve(resource['imageUrl']);
|
|
9394
|
-
};
|
|
9395
|
-
ajax.send();
|
|
9396
|
-
});
|
|
9546
|
+
}
|
|
9397
9547
|
return promise;
|
|
9398
9548
|
};
|
|
9399
9549
|
/**
|
|
@@ -9474,21 +9624,25 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9474
9624
|
* @returns {GeoPosition}- Returns the geo position
|
|
9475
9625
|
*/
|
|
9476
9626
|
Maps.prototype.getGeoLocation = function (layerIndex, x, y) {
|
|
9477
|
-
var
|
|
9478
|
-
var
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9627
|
+
var latitude = 0;
|
|
9628
|
+
var longitude = 0;
|
|
9629
|
+
if (!this.isDestroyed) {
|
|
9630
|
+
var container = document.getElementById(this.element.id);
|
|
9631
|
+
var pageX = x - container.offsetLeft;
|
|
9632
|
+
var pageY = y - container.offsetTop;
|
|
9633
|
+
var currentLayer = this.layersCollection[layerIndex];
|
|
9634
|
+
var translate = getTranslate(this, currentLayer, false);
|
|
9635
|
+
var translatePoint = translate['location'];
|
|
9636
|
+
var translatePointX = translatePoint.x * this.scale;
|
|
9637
|
+
var translatePointY = translatePoint.y * this.scale;
|
|
9638
|
+
var mapSize = (Math.min(this.mapAreaRect.height, this.mapAreaRect.width)
|
|
9639
|
+
* this.mapLayerPanel['currentFactor']) * this.scale;
|
|
9640
|
+
var xx = (this.clip(pageX - translatePointX, 0, mapSize - 1) / mapSize) - 0.5;
|
|
9641
|
+
var yy = 0.5 - (this.clip(pageY - translatePointY, 0, mapSize - 1) / mapSize);
|
|
9642
|
+
latitude = 90 - 360 * Math.atan(Math.exp(-yy * 2 * Math.PI)) / Math.PI;
|
|
9643
|
+
longitude = 360 * xx;
|
|
9644
|
+
}
|
|
9645
|
+
return { latitude: latitude, longitude: longitude };
|
|
9492
9646
|
};
|
|
9493
9647
|
Maps.prototype.clip = function (value, minVal, maxVal) {
|
|
9494
9648
|
return Math.min(Math.max(value, minVal), maxVal);
|
|
@@ -9501,10 +9655,16 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9501
9655
|
* @returns {GeoPosition} - Returns the position
|
|
9502
9656
|
*/
|
|
9503
9657
|
Maps.prototype.getTileGeoLocation = function (x, y) {
|
|
9504
|
-
var
|
|
9505
|
-
var
|
|
9506
|
-
|
|
9507
|
-
|
|
9658
|
+
var latitude = 0;
|
|
9659
|
+
var longitude = 0;
|
|
9660
|
+
if (!this.isDestroyed) {
|
|
9661
|
+
var container = document.getElementById(this.element.id);
|
|
9662
|
+
var ele = document.getElementById(this.element.id + '_tile_parent');
|
|
9663
|
+
var latLong = this.pointToLatLong(x + this.mapAreaRect.x - (ele.offsetLeft - container.offsetLeft), y + this.mapAreaRect.y - (ele.offsetTop - container.offsetTop));
|
|
9664
|
+
latitude = latLong['latitude'];
|
|
9665
|
+
longitude = latLong['longitude'];
|
|
9666
|
+
}
|
|
9667
|
+
return { latitude: latitude, longitude: longitude };
|
|
9508
9668
|
};
|
|
9509
9669
|
/**
|
|
9510
9670
|
* This method is used to convert the point to latitude and longitude in maps.
|
|
@@ -9514,14 +9674,18 @@ var Maps = /** @__PURE__ @class */ (function (_super) {
|
|
|
9514
9674
|
* @returns {Object} - Returns the object.
|
|
9515
9675
|
*/
|
|
9516
9676
|
Maps.prototype.pointToLatLong = function (pageX, pageY) {
|
|
9517
|
-
var
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9677
|
+
var latitude = 0;
|
|
9678
|
+
var longitude = 0;
|
|
9679
|
+
if (!this.isDestroyed) {
|
|
9680
|
+
var padding = this.layers[this.layers.length - 1].layerType === 'GoogleStaticMap' ? 0 : 10;
|
|
9681
|
+
pageY = (this.zoomSettings.enable) ? pageY + padding : pageY;
|
|
9682
|
+
var mapSize = 256 * Math.pow(2, this.tileZoomLevel);
|
|
9683
|
+
var x1 = (this.clip(pageX - (this.translatePoint.x * this.scale), 0, mapSize - 1) / mapSize) - 0.5;
|
|
9684
|
+
var y1 = 0.5 - (this.clip(pageY - (this.translatePoint.y * this.scale), 0, mapSize - 1) / mapSize);
|
|
9685
|
+
latitude = 90 - 360 * Math.atan(Math.exp(-y1 * 2 * Math.PI)) / Math.PI;
|
|
9686
|
+
longitude = 360 * x1;
|
|
9687
|
+
}
|
|
9688
|
+
return { latitude: latitude, longitude: longitude };
|
|
9525
9689
|
};
|
|
9526
9690
|
__decorate([
|
|
9527
9691
|
Property(null)
|
|
@@ -9717,7 +9881,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9717
9881
|
var layerData = layer.layerData;
|
|
9718
9882
|
var colorValuePath = bubbleSettings.colorValuePath;
|
|
9719
9883
|
var equalValue = (!isNullOrUndefined(colorValuePath)) ? ((colorValuePath.indexOf('.') > -1) ?
|
|
9720
|
-
(getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : shapeData[colorValuePath]) :
|
|
9884
|
+
(getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : shapeData[colorValuePath]) :
|
|
9885
|
+
shapeData[colorValuePath];
|
|
9721
9886
|
var colorValue = (!isNullOrUndefined(colorValuePath)) ? ((colorValuePath.indexOf('.') > -1) ?
|
|
9722
9887
|
Number(getValueFromObject(shapeData, bubbleSettings.colorValuePath)) : Number(shapeData[colorValuePath])) :
|
|
9723
9888
|
Number(shapeData[colorValuePath]);
|
|
@@ -9871,16 +10036,17 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9871
10036
|
}
|
|
9872
10037
|
else {
|
|
9873
10038
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9874
|
-
shape.map(function (current
|
|
10039
|
+
shape.map(function (current) {
|
|
9875
10040
|
points.push(new Point(current['point']['x'], current['point']['y']));
|
|
9876
10041
|
});
|
|
9877
10042
|
}
|
|
9878
10043
|
return points;
|
|
9879
10044
|
};
|
|
9880
|
-
// eslint-disable-next-line valid-jsdoc
|
|
9881
10045
|
/**
|
|
9882
10046
|
* To check and trigger bubble click event
|
|
9883
10047
|
*
|
|
10048
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
10049
|
+
* @returns {void}
|
|
9884
10050
|
* @private
|
|
9885
10051
|
*/
|
|
9886
10052
|
Bubble.prototype.bubbleClick = function (e) {
|
|
@@ -9926,6 +10092,8 @@ var Bubble = /** @__PURE__ @class */ (function () {
|
|
|
9926
10092
|
/**
|
|
9927
10093
|
* To check and trigger bubble move event
|
|
9928
10094
|
*
|
|
10095
|
+
* @param {PointerEvent} e - Specifies the pointer event argument.
|
|
10096
|
+
* @retruns {void}
|
|
9929
10097
|
* @private
|
|
9930
10098
|
*/
|
|
9931
10099
|
Bubble.prototype.bubbleMove = function (e) {
|
|
@@ -10016,6 +10184,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10016
10184
|
var _this = this;
|
|
10017
10185
|
var dataLabel = layer.dataLabelSettings;
|
|
10018
10186
|
var style = layer.dataLabelSettings.textStyle;
|
|
10187
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10019
10188
|
var templateFn;
|
|
10020
10189
|
var options;
|
|
10021
10190
|
var dataLabelSettings = layer.dataLabelSettings;
|
|
@@ -10026,7 +10195,6 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10026
10195
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10027
10196
|
var shapeData = shape;
|
|
10028
10197
|
var element;
|
|
10029
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10030
10198
|
var text = '';
|
|
10031
10199
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10032
10200
|
var datasrcObj;
|
|
@@ -10165,7 +10333,6 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10165
10333
|
if (eventargs_1.cancel) {
|
|
10166
10334
|
return;
|
|
10167
10335
|
}
|
|
10168
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10169
10336
|
var position = [];
|
|
10170
10337
|
var width = zoomLabelsPosition && scaleZoomValue > 1 && !_this.maps.zoomNotApplied
|
|
10171
10338
|
&& _this.maps.zoomShapeCollection.length > index ? _this.maps.zoomShapeCollection[index]['width'] :
|
|
@@ -10286,8 +10453,8 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10286
10453
|
}
|
|
10287
10454
|
if (trimmedLable.length > 1) {
|
|
10288
10455
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10289
|
-
var
|
|
10290
|
-
if (
|
|
10456
|
+
var border = eventargs_1.border;
|
|
10457
|
+
if (border['width'] > 1) {
|
|
10291
10458
|
var fill = eventargs_1.fill;
|
|
10292
10459
|
var opacity = dataLabelSettings.opacity;
|
|
10293
10460
|
var rx = dataLabelSettings.rx;
|
|
@@ -10303,8 +10470,8 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10303
10470
|
x = ((location['x'] + transPoint['x']) * scale) - textSize['width'] / 2;
|
|
10304
10471
|
y = ((location['y'] + transPoint['y']) * scale) - textSize['height'] / 2;
|
|
10305
10472
|
}
|
|
10306
|
-
|
|
10307
|
-
var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill,
|
|
10473
|
+
border.opacity = isNullOrUndefined(border.opacity) ? opacity : border.opacity;
|
|
10474
|
+
var rectOptions = new RectOption(_this.maps.element.id + '_LayerIndex_' + layerIndex + '_shapeIndex_' + index + '_rectIndex_' + index, fill, border, opacity, new Rect((x + labelArgs.offsetX), (y + labelArgs.offsetY), textSize['width'], textSize['height']), rx, ry);
|
|
10308
10475
|
var rect = _this.maps.renderer.drawRectangle(rectOptions);
|
|
10309
10476
|
group.appendChild(rect);
|
|
10310
10477
|
}
|
|
@@ -10351,7 +10518,7 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10351
10518
|
}
|
|
10352
10519
|
else {
|
|
10353
10520
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10354
|
-
shapes.map(function (current
|
|
10521
|
+
shapes.map(function (current) {
|
|
10355
10522
|
points.push(new Point(current['point']['x'], current['point']['y']));
|
|
10356
10523
|
});
|
|
10357
10524
|
}
|
|
@@ -10366,7 +10533,6 @@ var DataLabel = /** @__PURE__ @class */ (function () {
|
|
|
10366
10533
|
return 'DataLabel';
|
|
10367
10534
|
};
|
|
10368
10535
|
/**
|
|
10369
|
-
*
|
|
10370
10536
|
* @returns {void}
|
|
10371
10537
|
* @private
|
|
10372
10538
|
*/
|
|
@@ -10385,123 +10551,130 @@ var NavigationLine = /** @__PURE__ @class */ (function () {
|
|
|
10385
10551
|
function NavigationLine(maps) {
|
|
10386
10552
|
this.maps = maps;
|
|
10387
10553
|
}
|
|
10388
|
-
// eslint-disable-next-line valid-jsdoc
|
|
10389
10554
|
/**
|
|
10390
10555
|
* To render navigation line for maps
|
|
10556
|
+
*
|
|
10557
|
+
* @param {LayerSettings} layer - Specifies the layer instance to which the navigation line is to be rendered.
|
|
10558
|
+
* @param {number} factor - Specifies the current zoom factor of the Maps.
|
|
10559
|
+
* @param {number} layerIndex -Specifies the index of current layer.
|
|
10560
|
+
* @returns {Element} - Returns the navigation line element.
|
|
10391
10561
|
*/
|
|
10392
10562
|
NavigationLine.prototype.renderNavigation = function (layer, factor, layerIndex) {
|
|
10393
|
-
var
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
latitude = navigation[i]['properties']['latitude'];
|
|
10426
|
-
longitude = navigation[i]['properties']['longitude'];
|
|
10427
|
-
visible = navigation[i]['properties']['visible'];
|
|
10428
|
-
angle = navigation[i]['angle'];
|
|
10429
|
-
width = navigation[i]['width'] || 1;
|
|
10430
|
-
color = navigation[i]['color'];
|
|
10431
|
-
dashArray = navigation[i]['properties']['dashArray'];
|
|
10432
|
-
arrowSettings = navigation[i]['properties']['arrowSettings'];
|
|
10433
|
-
showArrow = (isNullOrUndefined(arrowSettings)) ? false : arrowSettings['properties']['showArrow'];
|
|
10434
|
-
if (longitude['length'] === latitude['length'] && visible) {
|
|
10435
|
-
for (var i_1 = 0; i_1 < longitude['length']; i_1++) {
|
|
10436
|
-
var location_1 = (this.maps.isTileMap) ? convertTileLatLongToPoint(new Point(longitude[i_1], latitude[i_1]), factor, this.maps.tileTranslatePoint, true) : convertGeoToPoint(latitude[i_1], longitude[i_1], factor, layer, this.maps);
|
|
10437
|
-
point.push(location_1);
|
|
10438
|
-
}
|
|
10439
|
-
}
|
|
10440
|
-
navigationGroup = (this.maps.renderer.createGroup({
|
|
10441
|
-
id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationGroup' + i + ''
|
|
10563
|
+
var group;
|
|
10564
|
+
if (!isNullOrUndefined(this.maps)) {
|
|
10565
|
+
var navigationEle = void 0;
|
|
10566
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10567
|
+
var navigation = layer.navigationLineSettings;
|
|
10568
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10569
|
+
var longitude = void 0;
|
|
10570
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10571
|
+
var point = [];
|
|
10572
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10573
|
+
var latitude = void 0;
|
|
10574
|
+
var visible = void 0;
|
|
10575
|
+
var angle = void 0;
|
|
10576
|
+
var width = void 0;
|
|
10577
|
+
var color = void 0;
|
|
10578
|
+
var dashArray = void 0;
|
|
10579
|
+
var pathOption = void 0;
|
|
10580
|
+
var direction = void 0;
|
|
10581
|
+
var showArrow = void 0;
|
|
10582
|
+
var arrowColor = void 0;
|
|
10583
|
+
var arrowSize = void 0;
|
|
10584
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10585
|
+
var arrowSettings = void 0;
|
|
10586
|
+
var arrowPosition = void 0;
|
|
10587
|
+
var startArrow = void 0;
|
|
10588
|
+
var endArrow = void 0;
|
|
10589
|
+
var offSet = void 0;
|
|
10590
|
+
var offSetValue = void 0;
|
|
10591
|
+
var navigationGroup = void 0;
|
|
10592
|
+
var d = void 0;
|
|
10593
|
+
group = (this.maps.renderer.createGroup({
|
|
10594
|
+
id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_line_Group'
|
|
10442
10595
|
}));
|
|
10443
|
-
for (var
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10596
|
+
for (var i = 0; i < navigation.length; i++) {
|
|
10597
|
+
latitude = navigation[i]['properties']['latitude'];
|
|
10598
|
+
longitude = navigation[i]['properties']['longitude'];
|
|
10599
|
+
visible = navigation[i]['properties']['visible'];
|
|
10600
|
+
angle = navigation[i]['angle'];
|
|
10601
|
+
width = navigation[i]['width'] || 1;
|
|
10602
|
+
color = navigation[i]['color'];
|
|
10603
|
+
dashArray = navigation[i]['properties']['dashArray'];
|
|
10604
|
+
arrowSettings = navigation[i]['properties']['arrowSettings'];
|
|
10605
|
+
showArrow = (isNullOrUndefined(arrowSettings)) ? false : arrowSettings['properties']['showArrow'];
|
|
10606
|
+
if (longitude['length'] === latitude['length'] && visible) {
|
|
10607
|
+
for (var i_1 = 0; i_1 < longitude['length']; i_1++) {
|
|
10608
|
+
var location_1 = (this.maps.isTileMap) ? convertTileLatLongToPoint(new Point(longitude[i_1], latitude[i_1]), factor, this.maps.tileTranslatePoint, true) : convertGeoToPoint(latitude[i_1], longitude[i_1], factor, layer, this.maps);
|
|
10609
|
+
point.push(location_1);
|
|
10610
|
+
}
|
|
10611
|
+
}
|
|
10612
|
+
navigationGroup = (this.maps.renderer.createGroup({
|
|
10613
|
+
id: this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationGroup' + i + ''
|
|
10614
|
+
}));
|
|
10615
|
+
for (var j = 0; j < point['length'] - 1; j++) {
|
|
10616
|
+
angle = (-1 > angle) ? -1 : angle;
|
|
10617
|
+
angle = (1 < angle) ? 1 : angle;
|
|
10618
|
+
var arcId = this.maps.element.id + '_LayerIndex_' + layerIndex + '_NavigationIndex_' + i + '_Line' + j + '';
|
|
10619
|
+
var radius = this.convertRadius(point[j], point[j + 1]);
|
|
10620
|
+
if (angle <= 1 && angle > 0) {
|
|
10457
10621
|
direction = 0;
|
|
10622
|
+
if (point[j]['x'] > point[j + 1]['x']) {
|
|
10623
|
+
direction = 1;
|
|
10624
|
+
}
|
|
10458
10625
|
}
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10626
|
+
if (angle >= -1 && angle < 0) {
|
|
10627
|
+
direction = 1;
|
|
10628
|
+
if (point[j]['x'] > point[j + 1]['x']) {
|
|
10629
|
+
direction = 0;
|
|
10630
|
+
}
|
|
10631
|
+
}
|
|
10632
|
+
if (showArrow) {
|
|
10633
|
+
arrowColor = arrowSettings['properties']['color'];
|
|
10634
|
+
arrowSize = arrowSettings['properties']['size'];
|
|
10635
|
+
offSetValue = (arrowSettings['properties']['offSet'] === undefined) ? 0 : arrowSettings['properties']['offSet'];
|
|
10636
|
+
var divide = (Math.round(arrowSize / 2));
|
|
10637
|
+
arrowPosition = arrowSettings['properties']['position'];
|
|
10638
|
+
startArrow = (arrowPosition === 'Start') ? 'url(#triangle' + i + ')' : null;
|
|
10639
|
+
endArrow = (arrowPosition === 'End') ? 'url(#triangle' + i + ')' : null;
|
|
10640
|
+
if (offSet !== 0 && angle === 0) {
|
|
10641
|
+
offSet = (arrowPosition === 'Start') ? offSetValue : -(offSetValue);
|
|
10642
|
+
}
|
|
10643
|
+
offSet = (isNullOrUndefined(offSet)) ? 0 : offSet;
|
|
10644
|
+
var triId = this.maps.element.id + '_triangle';
|
|
10645
|
+
var defElement = this.maps.renderer.createDefs();
|
|
10646
|
+
defElement.innerHTML += '<marker id="' + 'triangle' + i + '"></marker>';
|
|
10647
|
+
var markerEle = defElement.querySelector('#' + 'triangle' + i);
|
|
10648
|
+
markerEle.setAttribute('markerWidth', (arrowSize.toString()));
|
|
10649
|
+
markerEle.setAttribute('markerHeight', (arrowSize.toString()));
|
|
10650
|
+
markerEle.setAttribute('refX', (divide - offSet).toString());
|
|
10651
|
+
markerEle.setAttribute('refY', divide.toString());
|
|
10652
|
+
markerEle.setAttribute('orient', 'auto');
|
|
10653
|
+
var d2 = 'M 0,0 L 0,' + arrowSize + ' L ' + divide + ', ' + divide + ' Z';
|
|
10654
|
+
pathOption = new PathOption(triId, arrowColor, width, color, 1, 1, dashArray, d2);
|
|
10655
|
+
navigationEle = this.maps.renderer.drawPath(pathOption);
|
|
10656
|
+
markerEle.appendChild(navigationEle);
|
|
10657
|
+
defElement.appendChild(markerEle);
|
|
10658
|
+
navigationGroup.appendChild(defElement);
|
|
10659
|
+
}
|
|
10660
|
+
angle = Math.abs(angle);
|
|
10661
|
+
d = (angle === 0) ? 'M ' + point[j]['x'] + ',' + point[j]['y'] + 'L ' + point[j + 1]['x']
|
|
10662
|
+
+ ',' + point[j + 1]['y'] + ' ' :
|
|
10663
|
+
'M ' + point[j]['x'] + ',' + point[j]['y'] + ' A ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) +
|
|
10664
|
+
' ' + (radius / 2 + (1 - angle) * radius / (angle * 10)) + ' ' + 0 + ',' + 0 + ','
|
|
10665
|
+
+ direction + ' , ' + point[j + 1]['x'] + ',' + point[j + 1]['y'] + ' ';
|
|
10666
|
+
pathOption = new PathOption(arcId, 'none', width, color, 1, 1, dashArray, d);
|
|
10483
10667
|
navigationEle = this.maps.renderer.drawPath(pathOption);
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
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);
|
|
10503
|
-
}
|
|
10504
|
-
point = [];
|
|
10668
|
+
if (!isNullOrUndefined(arrowPosition)) {
|
|
10669
|
+
var position = (arrowPosition === 'Start') ? navigationEle.setAttribute('marker-start', startArrow)
|
|
10670
|
+
: navigationEle.setAttribute('marker-end', endArrow);
|
|
10671
|
+
}
|
|
10672
|
+
maintainSelection(this.maps.selectedNavigationElementId, this.maps.navigationSelectionClass, navigationEle, 'navigationlineselectionMapStyle');
|
|
10673
|
+
navigationGroup.appendChild(navigationEle);
|
|
10674
|
+
group.appendChild(navigationGroup);
|
|
10675
|
+
}
|
|
10676
|
+
point = [];
|
|
10677
|
+
}
|
|
10505
10678
|
}
|
|
10506
10679
|
return group;
|
|
10507
10680
|
};
|
|
@@ -11011,15 +11184,16 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11011
11184
|
var textId = map.element.id + '_Legend_Text_Index_' + collection['idIndex'];
|
|
11012
11185
|
var shapeLocation = new Point(collection['Shape']['x'], (collection['Shape']['y'] - pagingArrowPadding));
|
|
11013
11186
|
var textLocation = new Point(collection['Text']['x'], (collection['Text']['y'] - pagingArrowPadding));
|
|
11014
|
-
var
|
|
11015
|
-
var renderOptions_1 = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
11187
|
+
var renderOptions = new PathOption(shapeId, collection['Fill'], strokeWidth, strokeColor, legend.opacity, isNullOrUndefined(shapeBorder.opacity) ? legend.opacity : shapeBorder.opacity, '');
|
|
11016
11188
|
var legendTextStyle = {
|
|
11017
11189
|
fontFamily: legend.textStyle.fontFamily, fontStyle: legend.textStyle.fontStyle,
|
|
11018
|
-
fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color,
|
|
11190
|
+
fontWeight: legend.textStyle.fontWeight, size: legend.textStyle.size, color: legend.textStyle.color,
|
|
11191
|
+
opacity: legend.textStyle.opacity
|
|
11019
11192
|
};
|
|
11020
11193
|
legendTextStyle.color = (legendTextStyle.color !== null) ? legendTextStyle.color :
|
|
11021
11194
|
this.maps.themeStyle.legendTextColor;
|
|
11022
|
-
legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
|
|
11195
|
+
legendTextStyle.fontFamily = !isNullOrUndefined(legendTextStyle.fontFamily) ? legendTextStyle.fontFamily :
|
|
11196
|
+
this.maps.themeStyle.fontFamily;
|
|
11023
11197
|
legendTextStyle.size = map.themeStyle.legendFontSize || legendTextStyle.size;
|
|
11024
11198
|
if (i === 0) {
|
|
11025
11199
|
this.renderLegendBorder();
|
|
@@ -11029,11 +11203,11 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11029
11203
|
var marker$$1 = map.layers[legendShapeData['layerIndex']].markerSettings[legendShapeData['markerIndex']];
|
|
11030
11204
|
legendShape = !isNullOrUndefined(marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']]) && marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']] !== '' ? marker$$1.dataSource[legendShapeData['dataIndex']][marker$$1['shapeValuePath']] : marker$$1.shape;
|
|
11031
11205
|
}
|
|
11032
|
-
if (legendShape ===
|
|
11033
|
-
legendElement.appendChild(drawBalloon(map,
|
|
11206
|
+
if (legendShape === 'Balloon') {
|
|
11207
|
+
legendElement.appendChild(drawBalloon(map, renderOptions, shapeSize, { x: shapeLocation.x, y: (shapeLocation.y + 5) }, 'Legend'));
|
|
11034
11208
|
}
|
|
11035
11209
|
else {
|
|
11036
|
-
legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'],
|
|
11210
|
+
legendElement.appendChild(drawSymbol(shapeLocation, legendShape, shapeSize, collection['ImageSrc'], renderOptions));
|
|
11037
11211
|
}
|
|
11038
11212
|
var legendRectSize = collection['Rect']['x'] + collection['Rect']['width'];
|
|
11039
11213
|
if (legendRectSize > this.legendBorderRect.width) {
|
|
@@ -11507,8 +11681,6 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11507
11681
|
}
|
|
11508
11682
|
if (selectionEle && (selectionEle['IsSelected'] && (targetElement.getAttribute('class') === 'ShapeselectionMapStyle'
|
|
11509
11683
|
|| targetElement.getAttribute('class') === 'LineselectionMapStyle'))) {
|
|
11510
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11511
|
-
var element = this.maps.legendSelectionCollection[selectionEle['SelectionIndex']];
|
|
11512
11684
|
var multiSelection = 0;
|
|
11513
11685
|
if (module.enableMultiSelect) {
|
|
11514
11686
|
for (var i = 0; i < shapeElement['Elements'].length; i++) {
|
|
@@ -11767,7 +11939,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11767
11939
|
var legendTitle = legend.title.text;
|
|
11768
11940
|
var textStyle = {
|
|
11769
11941
|
fontFamily: legend.titleStyle.fontFamily, fontStyle: legend.titleStyle.fontStyle,
|
|
11770
|
-
fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color,
|
|
11942
|
+
fontWeight: legend.titleStyle.fontWeight, size: legend.titleStyle.size, color: legend.titleStyle.color,
|
|
11943
|
+
opacity: legend.titleStyle.opacity
|
|
11771
11944
|
};
|
|
11772
11945
|
var textOptions;
|
|
11773
11946
|
var spacing = 10;
|
|
@@ -11828,7 +12001,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11828
12001
|
var locationX = !isNullOrUndefined(legend.location.x) ? legend.location.x : 0;
|
|
11829
12002
|
var locationY = !isNullOrUndefined(legend.location.y) ? legend.location.y : 0;
|
|
11830
12003
|
if (legend.position === 'Float') {
|
|
11831
|
-
this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) :
|
|
12004
|
+
this.translate = map.isTileMap ? new Point(locationX, locationY + (spacing / 4)) :
|
|
12005
|
+
new Point(locationX + map.mapAreaRect.x, locationY + map.mapAreaRect.y);
|
|
11832
12006
|
this.legendTotalRect = map.mapAreaRect;
|
|
11833
12007
|
}
|
|
11834
12008
|
else {
|
|
@@ -11911,7 +12085,8 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
11911
12085
|
_this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
|
|
11912
12086
|
}
|
|
11913
12087
|
else {
|
|
11914
|
-
newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill,
|
|
12088
|
+
newData.push({ layerIndex: layerIndex, markerIndex: markerIndex, dataIndex: dataIndex, value: legendFill,
|
|
12089
|
+
name: text,
|
|
11915
12090
|
shape: (!isNullOrUndefined(marker$$1.shapeValuePath) && !isNullOrUndefined(data[marker$$1.shapeValuePath]) && data[marker$$1.shapeValuePath] !== '') ? data[marker$$1.shapeValuePath] : (_this.maps.legendSettings.useMarkerShape ? marker$$1.shape : _this.maps.legendSettings.shape) });
|
|
11916
12091
|
_this.getOverallLegendItemsCollection(text, legendFill, newData, showLegend);
|
|
11917
12092
|
}
|
|
@@ -12098,6 +12273,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12098
12273
|
if (outOfRangeValues.length === 0) {
|
|
12099
12274
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12100
12275
|
var range_1 = false;
|
|
12276
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12101
12277
|
Array.prototype.forEach.call(dataSource, function (data, dataIndex) {
|
|
12102
12278
|
range_1 = false;
|
|
12103
12279
|
var rangeValue = data[colorValuePath];
|
|
@@ -12551,10 +12727,12 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12551
12727
|
this.maps.toggledShapeElementId.splice(toggledShapeIdIndex, 1);
|
|
12552
12728
|
}
|
|
12553
12729
|
mapLegendElement.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
12554
|
-
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 :
|
|
12730
|
+
mapLegendElement.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 :
|
|
12731
|
+
this.maps.layers[k].shapeSettings.border.width).toString());
|
|
12555
12732
|
mapLegendElement.setAttribute('stroke', this.maps.layers[0].shapeSettings.border.color);
|
|
12556
12733
|
mapLegendElement.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
12557
|
-
this.maps.layers[k].shapeSettings.opacity :
|
|
12734
|
+
this.maps.layers[k].shapeSettings.opacity :
|
|
12735
|
+
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
12558
12736
|
mapLegendElement.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
12559
12737
|
if (targetEle !== null) {
|
|
12560
12738
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
@@ -12618,7 +12796,7 @@ var Legend = /** @__PURE__ @class */ (function () {
|
|
|
12618
12796
|
&& isNaN(shapeData['properties'][shapePath]) ?
|
|
12619
12797
|
shapeData['properties'][shapePath].toLowerCase() : shapeData['properties'][shapePath];
|
|
12620
12798
|
if (shapeDataValueCase === dataPathValueCase) {
|
|
12621
|
-
if (shapeData['geometry']['type']
|
|
12799
|
+
if (shapeData['geometry']['type'] !== 'MultiPoint') {
|
|
12622
12800
|
legendData.push({
|
|
12623
12801
|
layerIndex: layerIndex, shapeIndex: i, dataIndex: dataIndex,
|
|
12624
12802
|
name: data[dataPath], value: value, pointIndex: -1
|
|
@@ -12864,7 +13042,9 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12864
13042
|
}
|
|
12865
13043
|
var borderColor = (targetEle.parentElement.id.indexOf('LineString') === -1) ? this.highlightSettings.border.color : (this.highlightSettings.fill || this.highlightSettings.border.color);
|
|
12866
13044
|
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 :
|
|
13045
|
+
var borderOpacity = isNullOrUndefined(this.highlightSettings.border.opacity) ? this.highlightSettings.opacity :
|
|
13046
|
+
this.highlightSettings.border.opacity;
|
|
13047
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12868
13048
|
var eventArgs = {
|
|
12869
13049
|
opacity: this.highlightSettings.opacity,
|
|
12870
13050
|
fill: (targetEle.parentElement.id.indexOf('LineString') === -1) ? (targetEle.id.indexOf('NavigationIndex') === -1 ? !isNullOrUndefined(this.highlightSettings.fill)
|
|
@@ -12884,6 +13064,7 @@ var Highlight = /** @__PURE__ @class */ (function () {
|
|
|
12884
13064
|
maps: this.maps
|
|
12885
13065
|
};
|
|
12886
13066
|
if (targetEle.id.indexOf('shapeIndex') > -1) {
|
|
13067
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
12887
13068
|
this.maps.trigger(shapeHighlight, shapeEventArgs, function () { });
|
|
12888
13069
|
}
|
|
12889
13070
|
var itemEventArgs = {
|
|
@@ -13087,7 +13268,8 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
13087
13268
|
var isLineStringShape = targetElement.parentElement.id.indexOf('LineString') > -1;
|
|
13088
13269
|
var selectionsettings = this.selectionsettings;
|
|
13089
13270
|
var border = {
|
|
13090
|
-
color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) :
|
|
13271
|
+
color: isLineStringShape ? (this.selectionsettings.fill || this.selectionsettings.border.color) :
|
|
13272
|
+
this.selectionsettings.border.color,
|
|
13091
13273
|
width: isLineStringShape ? (this.selectionsettings.border.width / this.maps.scale) :
|
|
13092
13274
|
(this.selectionsettings.border.width / (this.selectionType === 'Marker' ? 1 : this.maps.scale)),
|
|
13093
13275
|
opacity: this.selectionsettings.border.opacity
|
|
@@ -13104,7 +13286,8 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
13104
13286
|
maps: this.maps
|
|
13105
13287
|
};
|
|
13106
13288
|
this.maps.trigger('itemSelection', eventArgs, function (observedArgs) {
|
|
13107
|
-
eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ?
|
|
13289
|
+
eventArgs.border.opacity = isNullOrUndefined(_this.selectionsettings.border.opacity) ?
|
|
13290
|
+
_this.selectionsettings.opacity : _this.selectionsettings.border.opacity;
|
|
13108
13291
|
if (!eventArgs.cancel) {
|
|
13109
13292
|
if (targetElement.getAttribute('class') === _this.selectionType + 'selectionMapStyle'
|
|
13110
13293
|
|| targetElement.getAttribute('class') === 'LineselectionMapStyle') {
|
|
@@ -13257,7 +13440,6 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
13257
13440
|
return Selection;
|
|
13258
13441
|
}());
|
|
13259
13442
|
|
|
13260
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
13261
13443
|
/**
|
|
13262
13444
|
* Map Tooltip
|
|
13263
13445
|
*/
|
|
@@ -13290,7 +13472,6 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13290
13472
|
}
|
|
13291
13473
|
var option;
|
|
13292
13474
|
var currentData = '';
|
|
13293
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13294
13475
|
var targetId = target.id;
|
|
13295
13476
|
var tooltipEle;
|
|
13296
13477
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -13439,6 +13620,7 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13439
13620
|
maps: this.maps,
|
|
13440
13621
|
element: target, eventArgs: e, content: !isNullOrUndefined(currentData) ? currentData.toString() : ''
|
|
13441
13622
|
};
|
|
13623
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
13442
13624
|
this.maps.trigger(tooltipRender, tooltipArgs, function (args) {
|
|
13443
13625
|
if (!tooltipArgs.cancel && option.visible && !isNullOrUndefined(currentData) &&
|
|
13444
13626
|
(targetId.indexOf('_cluster_') === -1 && targetId.indexOf('_dataLabel_') === -1)) {
|
|
@@ -13455,7 +13637,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13455
13637
|
header: '',
|
|
13456
13638
|
data: option['data'],
|
|
13457
13639
|
template: option['template'],
|
|
13458
|
-
content: tooltipArgs.content.toString()
|
|
13640
|
+
content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
|
|
13641
|
+
[currentData.toString()],
|
|
13459
13642
|
shapes: [],
|
|
13460
13643
|
location: option['location'],
|
|
13461
13644
|
palette: [markerFill],
|
|
@@ -13471,7 +13654,8 @@ var MapsTooltip = /** @__PURE__ @class */ (function () {
|
|
|
13471
13654
|
header: '',
|
|
13472
13655
|
data: tooltipArgs.options['data'],
|
|
13473
13656
|
template: tooltipArgs.options['template'],
|
|
13474
|
-
content: tooltipArgs.content.toString()
|
|
13657
|
+
content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
|
|
13658
|
+
[currentData.toString()],
|
|
13475
13659
|
shapes: [],
|
|
13476
13660
|
location: tooltipArgs.options['location'],
|
|
13477
13661
|
palette: [markerFill],
|
|
@@ -13787,6 +13971,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
13787
13971
|
}
|
|
13788
13972
|
this.maps.zoomNotApplied = false;
|
|
13789
13973
|
};
|
|
13974
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13790
13975
|
Zoom.prototype.calculateInitalZoomTranslatePoint = function (newZoomFactor, mapTotalWidth, mapTotalHeight, availSize, minBounds, map) {
|
|
13791
13976
|
mapTotalWidth *= newZoomFactor;
|
|
13792
13977
|
mapTotalHeight *= newZoomFactor;
|
|
@@ -14048,7 +14233,7 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14048
14233
|
layerElement.appendChild(maps.navigationLineModule.renderNavigation(this.currentLayer, maps.tileZoomLevel, this.index));
|
|
14049
14234
|
}
|
|
14050
14235
|
}
|
|
14051
|
-
else if (currentEle.id.indexOf('Legend')
|
|
14236
|
+
else if (currentEle.id.indexOf('Legend') === -1) {
|
|
14052
14237
|
changeBorderWidth(currentEle, this.index, scale, maps);
|
|
14053
14238
|
maps.zoomTranslatePoint = maps.translatePoint;
|
|
14054
14239
|
this.animateTransform(currentEle, animate$$1, x, y, scale);
|
|
@@ -14126,7 +14311,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14126
14311
|
var childElement = void 0;
|
|
14127
14312
|
for (var k = 0; k < currentEle.childElementCount; k++) {
|
|
14128
14313
|
childElement = currentEle.childNodes[k];
|
|
14129
|
-
var bubbleTransform = childElement.getAttribute('transform');
|
|
14130
14314
|
layerIndex = parseFloat(childElement.id.split('_LayerIndex_')[1].split('_')[0]);
|
|
14131
14315
|
var bubleIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[0]);
|
|
14132
14316
|
var dataIndex = parseFloat(childElement.id.split('_BubbleIndex_')[1].split('_')[2]);
|
|
@@ -14257,7 +14441,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14257
14441
|
var markerID = _this.maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_'
|
|
14258
14442
|
+ markerIndex + '_dataIndex_' + dataIndex;
|
|
14259
14443
|
var location_1 = (_this.maps.isTileMap) ? convertTileLatLongToPoint(new MapLocation(long, lati), _this.maps.tileZoomLevel, _this.maps.tileTranslatePoint, true) : convertGeoToPoint(lati, long, factor, currentLayers, _this.maps);
|
|
14260
|
-
var animate_1 = currentLayers.animationDuration !== 0 || isNullOrUndefined(_this.maps.zoomModule);
|
|
14261
14444
|
var transPoint = { x: x, y: y };
|
|
14262
14445
|
if (eventArgs.template && (!isNaN(location_1.x) && !isNaN(location_1.y))) {
|
|
14263
14446
|
markerTemplateCounts++;
|
|
@@ -14327,15 +14510,12 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14327
14510
|
if (animate$$1 === void 0) { animate$$1 = false; }
|
|
14328
14511
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14329
14512
|
var labelCollection = this.maps.dataLabelModule.dataLabelCollections;
|
|
14330
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14331
|
-
var zoomelement = element.getBoundingClientRect();
|
|
14332
14513
|
var text;
|
|
14333
14514
|
var trimmedLable;
|
|
14334
14515
|
var style = this.maps.layers[this.index].dataLabelSettings.textStyle;
|
|
14335
14516
|
var zoomtext;
|
|
14336
14517
|
var zoomtextSize;
|
|
14337
14518
|
var zoomtrimLabel;
|
|
14338
|
-
var labelPath = this.maps.layers[this.index].dataLabelSettings.labelPath;
|
|
14339
14519
|
var layerIndex = parseFloat(element.id.split('_LayerIndex_')[1].split('_')[0]);
|
|
14340
14520
|
var shapeIndex = parseFloat(element.id.split('_shapeIndex_')[1].split('_')[0]);
|
|
14341
14521
|
var labelIndex;
|
|
@@ -14363,7 +14543,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14363
14543
|
var layerEle = getElementByID(this.maps.element.id + '_Layer_Collections');
|
|
14364
14544
|
labelX = ((Math.abs(this.maps.baseMapRectBounds['min']['x'] - labelX)) * scale);
|
|
14365
14545
|
labelY = ((Math.abs(this.maps.baseMapRectBounds['min']['y'] - labelY)) * scale);
|
|
14366
|
-
var templateOffset = element.getBoundingClientRect();
|
|
14367
14546
|
var layerOffset = layerEle.getBoundingClientRect();
|
|
14368
14547
|
var elementOffset = element.parentElement.getBoundingClientRect();
|
|
14369
14548
|
locationX = ((labelX) + (layerOffset.left - elementOffset.left));
|
|
@@ -14561,6 +14740,11 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
14561
14740
|
}
|
|
14562
14741
|
};
|
|
14563
14742
|
/**
|
|
14743
|
+
* @param {PanDirection} direction - Specifies the direction of the panning.
|
|
14744
|
+
* @param {number} xDifference - Specifies the distance moved in the horizontal direction.
|
|
14745
|
+
* @param {number} yDifference - Specifies the distance moved in the vertical direction.
|
|
14746
|
+
* @param {PointerEvent | TouchEvent | KeyboardEvent} mouseLocation - Specifies the pointer event argument.
|
|
14747
|
+
* @returns {void}
|
|
14564
14748
|
* @private
|
|
14565
14749
|
*/
|
|
14566
14750
|
Zoom.prototype.panning = function (direction, xDifference, yDifference, mouseLocation) {
|
|
@@ -15357,7 +15541,6 @@ var Zoom = /** @__PURE__ @class */ (function () {
|
|
|
15357
15541
|
return Zoom;
|
|
15358
15542
|
}());
|
|
15359
15543
|
|
|
15360
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
15361
15544
|
/**
|
|
15362
15545
|
* This module enables the print functionality in maps.
|
|
15363
15546
|
*
|
|
@@ -15367,14 +15550,16 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
15367
15550
|
/**
|
|
15368
15551
|
* Constructor for Maps
|
|
15369
15552
|
*
|
|
15370
|
-
* @param {Maps} control - Specifies the instance of the
|
|
15553
|
+
* @param {Maps} control - Specifies the instance of the Maps
|
|
15371
15554
|
*/
|
|
15555
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
15372
15556
|
function Print(control) {
|
|
15373
15557
|
}
|
|
15374
15558
|
/**
|
|
15375
15559
|
* To print the Maps
|
|
15376
15560
|
*
|
|
15377
|
-
* @param {
|
|
15561
|
+
* @param {Maps} maps -Specifies the Maps instance.
|
|
15562
|
+
* @param {string[] | string | Element} elements - Specifies the element of the Maps
|
|
15378
15563
|
* @returns {void}
|
|
15379
15564
|
* @private
|
|
15380
15565
|
*/
|
|
@@ -15394,6 +15579,7 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
15394
15579
|
/**
|
|
15395
15580
|
* To get the html string of the Maps
|
|
15396
15581
|
*
|
|
15582
|
+
* @param {Maps} maps -Specifies the Maps instance.
|
|
15397
15583
|
* @param {string[] | string | Element} elements - Specifies the html element
|
|
15398
15584
|
* @returns {Element} - Returns the div element
|
|
15399
15585
|
* @private
|
|
@@ -15453,11 +15639,11 @@ var Print = /** @__PURE__ @class */ (function () {
|
|
|
15453
15639
|
* @returns {void}
|
|
15454
15640
|
* @private
|
|
15455
15641
|
*/
|
|
15642
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
15456
15643
|
Print.prototype.destroy = function () { };
|
|
15457
15644
|
return Print;
|
|
15458
15645
|
}());
|
|
15459
15646
|
|
|
15460
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
15461
15647
|
/**
|
|
15462
15648
|
* This module enables the export to Image functionality in Maps control.
|
|
15463
15649
|
*
|
|
@@ -15469,19 +15655,21 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
15469
15655
|
*
|
|
15470
15656
|
* @param {Maps} control - Specifies the instance of the map
|
|
15471
15657
|
*/
|
|
15658
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
15472
15659
|
function ImageExport(control) {
|
|
15473
15660
|
}
|
|
15474
15661
|
/**
|
|
15475
15662
|
* To export the file as image/svg format
|
|
15476
15663
|
*
|
|
15477
|
-
* @param {
|
|
15478
|
-
* @param {
|
|
15664
|
+
* @param {Maps} maps - Specifies the Maps instance.
|
|
15665
|
+
* @param {ExportType} type - Specifies the type of the image file for exporting.
|
|
15666
|
+
* @param {string} fileName - Specifies the file name of the image file for exporting.
|
|
15479
15667
|
* @param {boolean} allowDownload - Specifies whether to download image as a file or not.
|
|
15480
|
-
* @returns {Promise<string>} -
|
|
15668
|
+
* @returns {Promise<string>} - Specifies the base64 string of the exported image which is returned when the allowDownload is set to false.
|
|
15481
15669
|
* @private
|
|
15482
15670
|
*/
|
|
15483
15671
|
ImageExport.prototype.export = function (maps, type, fileName, allowDownload) {
|
|
15484
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15672
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
|
|
15485
15673
|
var promise = new Promise(function (resolve, reject) {
|
|
15486
15674
|
var imageCanvasElement = createElement('canvas', {
|
|
15487
15675
|
id: 'ej2-canvas',
|
|
@@ -15491,7 +15679,6 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
15491
15679
|
}
|
|
15492
15680
|
});
|
|
15493
15681
|
var isDownload = !(Browser.userAgent.toString().indexOf('HeadlessChrome') > -1);
|
|
15494
|
-
var toolbarEle = document.getElementById(maps.element.id + '_ToolBar');
|
|
15495
15682
|
var svgParent = document.getElementById(maps.element.id + '_Tile_SVG_Parent');
|
|
15496
15683
|
var svgDataElement;
|
|
15497
15684
|
var tileSvg;
|
|
@@ -15625,11 +15812,11 @@ var ImageExport = /** @__PURE__ @class */ (function () {
|
|
|
15625
15812
|
* @returns {void}
|
|
15626
15813
|
* @private
|
|
15627
15814
|
*/
|
|
15815
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
15628
15816
|
ImageExport.prototype.destroy = function () { };
|
|
15629
15817
|
return ImageExport;
|
|
15630
15818
|
}());
|
|
15631
15819
|
|
|
15632
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
15633
15820
|
/**
|
|
15634
15821
|
* This module enables the export to PDF functionality in Maps control.
|
|
15635
15822
|
*
|
|
@@ -15639,18 +15826,19 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15639
15826
|
/**
|
|
15640
15827
|
* Constructor for Maps
|
|
15641
15828
|
*
|
|
15642
|
-
* @param {Maps} control Specifies the instance of the map
|
|
15643
15829
|
*/
|
|
15830
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
15644
15831
|
function PdfExport() {
|
|
15645
15832
|
}
|
|
15646
15833
|
/**
|
|
15647
15834
|
* To export the file as image/svg format
|
|
15648
15835
|
*
|
|
15649
|
-
* @param {
|
|
15650
|
-
* @param {
|
|
15651
|
-
* @param {
|
|
15652
|
-
* @param {
|
|
15653
|
-
* @
|
|
15836
|
+
* @param {Maps} maps - Specifies the Maps instance.
|
|
15837
|
+
* @param {ExportType} type - Specifies the type of the document.
|
|
15838
|
+
* @param {string} fileName - Specifies the name of the PDF document.
|
|
15839
|
+
* @param {boolean} allowDownload - Specifies whether to download the document or not.
|
|
15840
|
+
* @param {PdfPageOrientation} orientation - Specifies the orientation of the PDF document to export the component.
|
|
15841
|
+
* @returns {Promise<string>} - Returns "null" value when the allowDownload is set to false.
|
|
15654
15842
|
* @private
|
|
15655
15843
|
*/
|
|
15656
15844
|
PdfExport.prototype.export = function (maps, type, fileName, allowDownload, orientation) {
|
|
@@ -15786,6 +15974,7 @@ var PdfExport = /** @__PURE__ @class */ (function () {
|
|
|
15786
15974
|
* @returns {void}
|
|
15787
15975
|
* @private
|
|
15788
15976
|
*/
|
|
15977
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-function
|
|
15789
15978
|
PdfExport.prototype.destroy = function () { };
|
|
15790
15979
|
return PdfExport;
|
|
15791
15980
|
}());
|