@syncfusion/ej2-maps 19.4.56 → 19.4.57-105067
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 +18 -3
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +72 -72
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +49 -49
- package/CHANGELOG.md +441 -439
- package/README.md +73 -73
- package/dist/ej2-maps.umd.min.js +1 -10
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +1161 -638
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +1200 -678
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +1 -10
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/dist/ts/maps/layers/bing-map.ts +50 -0
- package/dist/ts/maps/layers/bubble.ts +290 -0
- package/dist/ts/maps/layers/color-mapping.ts +226 -0
- package/dist/ts/maps/layers/data-label.ts +418 -0
- package/dist/ts/maps/layers/layer-panel.ts +1480 -0
- package/dist/ts/maps/layers/legend.ts +2236 -0
- package/dist/ts/maps/layers/marker.ts +453 -0
- package/dist/ts/maps/layers/navigation-selected-line.ts +167 -0
- package/dist/ts/maps/maps.ts +2886 -0
- package/dist/ts/maps/model/base.ts +1843 -0
- package/dist/ts/maps/model/constants.ts +200 -0
- package/dist/ts/maps/model/export-image.ts +178 -0
- package/dist/ts/maps/model/export-pdf.ts +170 -0
- package/dist/ts/maps/model/interface.ts +823 -0
- package/dist/ts/maps/model/print.ts +104 -0
- package/dist/ts/maps/model/theme.ts +554 -0
- package/dist/ts/maps/user-interaction/annotation.ts +127 -0
- package/dist/ts/maps/user-interaction/highlight.ts +233 -0
- package/dist/ts/maps/user-interaction/selection.ts +321 -0
- package/dist/ts/maps/user-interaction/tooltip.ts +387 -0
- package/dist/ts/maps/user-interaction/zoom.ts +1767 -0
- package/dist/ts/maps/utils/enum.ts +368 -0
- package/dist/ts/maps/utils/helper.ts +3421 -0
- package/helper/e2e/index.js +3 -3
- package/helper/e2e/maps-helper.js +13 -13
- package/license +9 -9
- package/package.json +85 -85
- package/src/maps/layers/bing-map.d.ts +4 -0
- package/src/maps/layers/bing-map.js +16 -3
- package/src/maps/layers/bubble.d.ts +1 -2
- package/src/maps/layers/bubble.js +7 -12
- package/src/maps/layers/data-label.d.ts +1 -4
- package/src/maps/layers/data-label.js +32 -35
- package/src/maps/layers/layer-panel.d.ts +18 -1
- package/src/maps/layers/layer-panel.js +226 -72
- package/src/maps/layers/legend.d.ts +5 -2
- package/src/maps/layers/legend.js +170 -61
- package/src/maps/layers/marker.d.ts +2 -4
- package/src/maps/layers/marker.js +49 -48
- package/src/maps/layers/navigation-selected-line.d.ts +1 -2
- package/src/maps/layers/navigation-selected-line.js +7 -13
- package/src/maps/maps-model.d.ts +259 -251
- package/src/maps/maps.d.ts +24 -3
- package/src/maps/maps.js +152 -90
- package/src/maps/model/base-model.d.ts +1025 -1021
- package/src/maps/model/base.d.ts +5 -1
- package/src/maps/model/base.js +24 -24
- package/src/maps/model/constants.d.ts +6 -0
- package/src/maps/model/constants.js +6 -0
- package/src/maps/model/export-image.d.ts +2 -4
- package/src/maps/model/export-image.js +26 -32
- package/src/maps/model/export-pdf.d.ts +4 -6
- package/src/maps/model/export-pdf.js +27 -35
- package/src/maps/model/interface.d.ts +34 -26
- package/src/maps/model/print.d.ts +2 -5
- package/src/maps/model/print.js +33 -21
- package/src/maps/model/theme.js +7 -4
- package/src/maps/user-interaction/annotation.d.ts +1 -2
- package/src/maps/user-interaction/annotation.js +3 -4
- package/src/maps/user-interaction/highlight.d.ts +1 -2
- package/src/maps/user-interaction/highlight.js +11 -10
- package/src/maps/user-interaction/selection.d.ts +1 -2
- package/src/maps/user-interaction/selection.js +42 -19
- package/src/maps/user-interaction/tooltip.d.ts +3 -5
- package/src/maps/user-interaction/tooltip.js +27 -14
- package/src/maps/user-interaction/zoom.d.ts +3 -8
- package/src/maps/user-interaction/zoom.js +282 -162
- package/src/maps/utils/enum.d.ts +5 -1
- package/src/maps/utils/helper.d.ts +1 -1
- package/src/maps/utils/helper.js +62 -31
package/src/maps/utils/enum.d.ts
CHANGED
|
@@ -40,7 +40,11 @@ export declare type MapsTheme =
|
|
|
40
40
|
/** Renders a map with Bootstrap5 theme. */
|
|
41
41
|
'Bootstrap5' |
|
|
42
42
|
/** Render a map with Bootstrap5 dark theme. */
|
|
43
|
-
'Bootstrap5Dark'
|
|
43
|
+
'Bootstrap5Dark' |
|
|
44
|
+
/** Renders a map with Fluent theme. */
|
|
45
|
+
'Fluent' |
|
|
46
|
+
/** Render a map with Fluent dark theme. */
|
|
47
|
+
'FluentDark';
|
|
44
48
|
/**
|
|
45
49
|
* Defines the position of the legend.
|
|
46
50
|
*/
|
|
@@ -841,7 +841,7 @@ export declare function Internalize(maps: Maps, value: number): string;
|
|
|
841
841
|
* @returns {Function} - Returns the function
|
|
842
842
|
* @private
|
|
843
843
|
*/
|
|
844
|
-
export declare function getTemplateFunction(template: string): any;
|
|
844
|
+
export declare function getTemplateFunction(template: string, maps: Maps): any;
|
|
845
845
|
/**
|
|
846
846
|
* Function to get element from id.
|
|
847
847
|
*
|
package/src/maps/utils/helper.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
14
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
15
15
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
16
16
|
/* eslint-disable max-len */
|
|
@@ -807,6 +807,8 @@ export function drawSymbols(shape, imageUrl, location, markerID, shapeCustom, ma
|
|
|
807
807
|
var padding = 5;
|
|
808
808
|
var rectOptions;
|
|
809
809
|
var pathOptions = new PathOption(markerID, fill, borderWidth, borderColor, opacity, borderOpacity, dashArray, '');
|
|
810
|
+
size.width = typeof (size.width) === 'string' ? parseInt(size.width, 10) : size.width;
|
|
811
|
+
size.height = typeof (size.height) === 'string' ? parseInt(size.height, 10) : size.height;
|
|
810
812
|
if (shape === 'Circle') {
|
|
811
813
|
var radius = (size.width + size.height) / 4;
|
|
812
814
|
var circleOptions = new CircleOption(markerID, fill, border, opacity, location.x, location.y, radius, dashArray);
|
|
@@ -1024,8 +1026,8 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
|
|
|
1024
1026
|
shapeCustom['borderWidth'] = eventArg.border.width;
|
|
1025
1027
|
shapeCustom['borderOpacity'] = isNullOrUndefined(eventArg.border.opacity) ? clusters_1.opacity : eventArg.border.opacity;
|
|
1026
1028
|
}
|
|
1027
|
-
tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX :
|
|
1028
|
-
tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY :
|
|
1029
|
+
tempX = (maps.isTileMap) ? tempX : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempX : tempX + postionY - (eventArg.width / 2);
|
|
1030
|
+
tempY = (maps.isTileMap) ? tempY : (markerTemplate.id.indexOf('_Markers_Group') > -1) ? tempY : tempY - (eventArg.height / 2);
|
|
1029
1031
|
if (maps.isTileMap && !maps.zoomSettings.enable) {
|
|
1030
1032
|
tempX = location_1.x;
|
|
1031
1033
|
tempY = location_1.y;
|
|
@@ -1104,12 +1106,15 @@ export function clusterTemplate(currentLayer, markerTemplate, maps, layerIndex,
|
|
|
1104
1106
|
getElementByID(maps.element.id + '_Secondary_Element').appendChild(markerCollection);
|
|
1105
1107
|
layerElement.appendChild(markerCollection);
|
|
1106
1108
|
}
|
|
1107
|
-
var markerCluster = document.getElementById(maps.element.id + '
|
|
1109
|
+
var markerCluster = document.getElementById(maps.element.id + '_LayerIndex_' + layerIndex + '_markerCluster');
|
|
1108
1110
|
if (!isNullOrUndefined(markerCluster)) {
|
|
1109
1111
|
markerCluster.remove();
|
|
1110
1112
|
}
|
|
1111
1113
|
if (zoomCheck) {
|
|
1112
|
-
document.getElementById(maps.element.id + '_Layer_Collections')
|
|
1114
|
+
var layerGroupElement = document.getElementById(maps.element.id + '_Layer_Collections');
|
|
1115
|
+
if (!isNullOrUndefined(layerGroupElement)) {
|
|
1116
|
+
layerGroupElement.appendChild(layerElement);
|
|
1117
|
+
}
|
|
1113
1118
|
}
|
|
1114
1119
|
});
|
|
1115
1120
|
}
|
|
@@ -1126,15 +1131,16 @@ export function mergeSeparateCluster(sameMarkerData, maps, markerElement) {
|
|
|
1126
1131
|
var markerIndex = sameMarkerData[0].markerIndex;
|
|
1127
1132
|
var dataIndex = sameMarkerData[0].dataIndex;
|
|
1128
1133
|
var markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
|
|
1134
|
+
var marker = maps.layers[layerIndex].markerSettings[markerIndex];
|
|
1129
1135
|
var clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
|
|
1130
|
-
var clusterEle = getElement(clusterId);
|
|
1136
|
+
var clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElement(clusterId + '_Group') : getElement(clusterId);
|
|
1131
1137
|
var clusterEleLabel = getElement(clusterId + '_datalabel_' + clusterIndex);
|
|
1132
1138
|
clusterEle.setAttribute('visibility', 'visible');
|
|
1133
1139
|
clusterEleLabel.setAttribute('visibility', 'visible');
|
|
1134
1140
|
var markerEle;
|
|
1135
1141
|
var markerDataLength = sameMarkerData[0].data.length;
|
|
1136
1142
|
for (var i = 0; i < markerDataLength; i++) {
|
|
1137
|
-
markerEle = getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
|
|
1143
|
+
markerEle = marker.shape === 'Balloon' ? getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElement(markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
|
|
1138
1144
|
markerEle['style']['visibility'] = 'hidden';
|
|
1139
1145
|
}
|
|
1140
1146
|
removeElement(maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine');
|
|
@@ -1156,13 +1162,13 @@ export function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
|
|
|
1156
1162
|
var getElementFunction = isDom ? getElement : markerElement.querySelector.bind(markerElement);
|
|
1157
1163
|
var getQueryConnect = isDom ? '' : '#';
|
|
1158
1164
|
var markerId = maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex;
|
|
1165
|
+
var marker = maps.layers[layerIndex].markerSettings[markerIndex];
|
|
1159
1166
|
var clusterId = markerId + '_dataIndex_' + dataIndex + '_cluster_' + clusterIndex;
|
|
1160
|
-
var clusterEle = getElementFunction(getQueryConnect + '' + clusterId);
|
|
1167
|
+
var clusterEle = maps.layers[layerIndex].markerClusterSettings.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + clusterId + '_Group') : getElementFunction(getQueryConnect + '' + clusterId);
|
|
1161
1168
|
var clusterEleLabel = getElementFunction(getQueryConnect + '' + clusterId + '_datalabel_' + clusterIndex);
|
|
1162
1169
|
clusterEle.setAttribute('visibility', 'hidden');
|
|
1163
1170
|
clusterEleLabel.setAttribute('visibility', 'hidden');
|
|
1164
|
-
var
|
|
1165
|
-
var markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
|
|
1171
|
+
var markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + dataIndex);
|
|
1166
1172
|
var height = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().height : marker.height;
|
|
1167
1173
|
var width = markerEle.parentElement.id.indexOf('Template_Group') > -1 ? markerEle.getBoundingClientRect().width : marker.width;
|
|
1168
1174
|
var centerX = +clusterEle.getAttribute('transform').split('translate(')[1].trim().split(' ')[0];
|
|
@@ -1198,7 +1204,7 @@ export function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
|
|
|
1198
1204
|
var x1 = centerX + radius * Math.sin((Math.PI * 2 * newAngle) / 360);
|
|
1199
1205
|
var y1 = centerY + radius * Math.cos((Math.PI * 2 * newAngle) / 360);
|
|
1200
1206
|
path += start + 'L ' + (x1) + ' ' + y1 + ' ';
|
|
1201
|
-
markerEle = getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
|
|
1207
|
+
markerEle = marker.shape === 'Balloon' ? getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index'] + '_Group') : getElementFunction(getQueryConnect + '' + markerId + '_dataIndex_' + sameMarkerData[0].data[i]['index']);
|
|
1202
1208
|
if (markerEle.parentElement.id.indexOf('Template_Group') > -1) {
|
|
1203
1209
|
markerEle['style']['transform'] = '';
|
|
1204
1210
|
markerEle['style']['left'] = maps.isTileMap ? x1 - (width / 2) + 'px' : (x1 - (width / 2) - 10) + 'px';
|
|
@@ -1219,7 +1225,12 @@ export function clusterSeparate(sameMarkerData, maps, markerElement, isDom) {
|
|
|
1219
1225
|
markerElement = isDom ? getElementFunction(maps.element.id + '_Markers_Group') : markerElement;
|
|
1220
1226
|
var groupEle = maps.renderer.createGroup({ id: maps.element.id + '_LayerIndex_' + layerIndex + '_MarkerIndex_' + markerIndex + '_markerClusterConnectorLine' });
|
|
1221
1227
|
groupEle.appendChild(maps.renderer.drawPath(options));
|
|
1222
|
-
|
|
1228
|
+
if (marker.shape === 'Balloon') {
|
|
1229
|
+
markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0_Group'));
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
markerElement.insertBefore(groupEle, markerElement.querySelector('#' + markerId + '_dataIndex_0'));
|
|
1233
|
+
}
|
|
1223
1234
|
}
|
|
1224
1235
|
/**
|
|
1225
1236
|
*
|
|
@@ -1246,6 +1257,7 @@ export function marker(eventArgs, markerSettings, markerData, dataIndex, locatio
|
|
|
1246
1257
|
dashArray: markerSettings.dashArray, borderOpacity: isNullOrUndefined(eventArgs.border.opacity) ? markerSettings.opacity :
|
|
1247
1258
|
eventArgs.border.opacity
|
|
1248
1259
|
};
|
|
1260
|
+
removeElement(markerID);
|
|
1249
1261
|
var ele = drawSymbols(eventArgs.shape, eventArgs.imageUrl, { x: 0, y: 0 }, markerID, shapeCustom, markerCollection, maps);
|
|
1250
1262
|
var x = (maps.isTileMap ? location.x : (location.x + transPoint.x) * scale) + offset.x;
|
|
1251
1263
|
var y = (maps.isTileMap ? location.y : (location.y + transPoint.y) * scale) + offset.y;
|
|
@@ -1276,7 +1288,7 @@ export function marker(eventArgs, markerSettings, markerData, dataIndex, locatio
|
|
|
1276
1288
|
*/
|
|
1277
1289
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1278
1290
|
export function markerTemplate(eventArgs, templateFn, markerID, data, markerIndex, markerTemplate, location, transPoint, scale, offset, maps) {
|
|
1279
|
-
templateFn = getTemplateFunction(eventArgs.template);
|
|
1291
|
+
templateFn = getTemplateFunction(eventArgs.template, maps);
|
|
1280
1292
|
if (templateFn && (templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false).length)) {
|
|
1281
1293
|
var templateElement = templateFn(data, maps, eventArgs.template, maps.element.id + '_MarkerTemplate' + markerIndex, false);
|
|
1282
1294
|
var markerElement = convertElement(templateElement, markerID, data, markerIndex, maps);
|
|
@@ -1623,7 +1635,7 @@ export function drawBalloon(maps, options, size, location, type, element) {
|
|
|
1623
1635
|
var y = size.height / 30;
|
|
1624
1636
|
balloon.setAttribute('transform', 'translate(' + location.x + ', ' + location.y + ') scale(' + x + ', ' + y + ')');
|
|
1625
1637
|
if (type === 'Marker') {
|
|
1626
|
-
var g = maps.renderer.createGroup({ id: options.id });
|
|
1638
|
+
var g = maps.renderer.createGroup({ id: options.id + '_Group' });
|
|
1627
1639
|
appendShape(balloon, g);
|
|
1628
1640
|
pathElement = appendShape(g, element);
|
|
1629
1641
|
}
|
|
@@ -2042,7 +2054,12 @@ export function getTranslate(mapObject, layer, animate) {
|
|
|
2042
2054
|
}
|
|
2043
2055
|
else {
|
|
2044
2056
|
if (isNullOrUndefined(mapObject.previousProjection) || mapObject.previousProjection !== mapObject.projectionType) {
|
|
2057
|
+
if (mapHeight === 0 || mapWidth === 0 || mapHeight === mapWidth) {
|
|
2058
|
+
mapWidth = size.width / 2;
|
|
2059
|
+
mapHeight = size.height;
|
|
2060
|
+
}
|
|
2045
2061
|
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2062
|
+
scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
|
|
2046
2063
|
mapWidth *= scaleFactor;
|
|
2047
2064
|
mapHeight *= scaleFactor;
|
|
2048
2065
|
var widthDiff = min['x'] !== 0 && mapObject.translateType === 'layers' ? availSize.width - size.width : 0;
|
|
@@ -2091,8 +2108,9 @@ export function getTranslate(mapObject, layer, animate) {
|
|
|
2091
2108
|
mapObject.zoomTranslatePoint.y = y;
|
|
2092
2109
|
}
|
|
2093
2110
|
else {
|
|
2094
|
-
if (!isNullOrUndefined(mapObject.previousProjection) && mapObject.mapScaleValue === 1 && !mapObject.zoomModule.isDragZoom) {
|
|
2111
|
+
if (!isNullOrUndefined(mapObject.previousProjection) && (mapObject.mapScaleValue === 1 || mapObject.mapScaleValue <= 1.05) && !mapObject.zoomModule.isDragZoom) {
|
|
2095
2112
|
scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2));
|
|
2113
|
+
scaleFactor = scaleFactor > 1.05 ? 1 : scaleFactor;
|
|
2096
2114
|
mapWidth *= scaleFactor;
|
|
2097
2115
|
x = size.x + ((-(min['x'])) + ((size.width / 2) - (mapWidth / 2)));
|
|
2098
2116
|
mapHeight *= scaleFactor;
|
|
@@ -2249,6 +2267,8 @@ export function getZoomTranslate(mapObject, layer, animate) {
|
|
|
2249
2267
|
}
|
|
2250
2268
|
}
|
|
2251
2269
|
scaleFactor = (mapObject.enablePersistence) ? (mapObject.mapScaleValue === 0 ? 1 : mapObject.mapScaleValue) : scaleFactor;
|
|
2270
|
+
mapObject.widthBeforeRefresh = mapObject.availableSize.width;
|
|
2271
|
+
mapObject.heightBeforeRefresh = mapObject.availableSize.height;
|
|
2252
2272
|
return { scale: animate ? 1 : scaleFactor, location: new Point(x, y) };
|
|
2253
2273
|
}
|
|
2254
2274
|
/**
|
|
@@ -2312,7 +2332,7 @@ export function Internalize(maps, value) {
|
|
|
2312
2332
|
* @private
|
|
2313
2333
|
*/
|
|
2314
2334
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2315
|
-
export function getTemplateFunction(template) {
|
|
2335
|
+
export function getTemplateFunction(template, maps) {
|
|
2316
2336
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2317
2337
|
var templateFn = null;
|
|
2318
2338
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2321,6 +2341,9 @@ export function getTemplateFunction(template) {
|
|
|
2321
2341
|
if (document.querySelectorAll(template).length) {
|
|
2322
2342
|
templateFn = templateComplier(document.querySelector(template).innerHTML.trim());
|
|
2323
2343
|
}
|
|
2344
|
+
else if (maps.isVue || maps.isVue3) {
|
|
2345
|
+
templateFn = templateComplier(template);
|
|
2346
|
+
}
|
|
2324
2347
|
}
|
|
2325
2348
|
catch (e) {
|
|
2326
2349
|
templateFn = templateComplier(template);
|
|
@@ -2725,6 +2748,7 @@ export function createTooltip(id, text, top, left, fontSize) {
|
|
|
2725
2748
|
'left:' + left.toString() + 'px;' +
|
|
2726
2749
|
'color: #000000; ' +
|
|
2727
2750
|
'background:' + '#FFFFFF' + ';' +
|
|
2751
|
+
'z-index: 2;' +
|
|
2728
2752
|
'position:absolute;border:1px solid #707070;font-size:' + fontSize + ';border-radius:2px;';
|
|
2729
2753
|
if (!tooltip) {
|
|
2730
2754
|
tooltip = createElement('div', {
|
|
@@ -2914,6 +2938,7 @@ export function changeBorderWidth(element, index, scale, maps) {
|
|
|
2914
2938
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2915
2939
|
var borderWidthValue = maps.layersCollection[index].shapeSettings.borderWidthValuePath;
|
|
2916
2940
|
var borderWidth = maps.layersCollection[index].shapeSettings.border.width;
|
|
2941
|
+
var circleRadius = maps.layersCollection[index].shapeSettings.circleRadius;
|
|
2917
2942
|
if (maps.layersCollection[index].shapeSettings.borderWidthValuePath) {
|
|
2918
2943
|
value = checkShapeDataFields(
|
|
2919
2944
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -2926,13 +2951,16 @@ export function changeBorderWidth(element, index, scale, maps) {
|
|
|
2926
2951
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2927
2952
|
}
|
|
2928
2953
|
}
|
|
2954
|
+
else {
|
|
2955
|
+
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2956
|
+
}
|
|
2929
2957
|
}
|
|
2930
2958
|
else {
|
|
2931
2959
|
currentStroke = (isNullOrUndefined(borderWidth) ? 0 : borderWidth);
|
|
2932
2960
|
}
|
|
2933
2961
|
childNode.setAttribute('stroke-width', (currentStroke / scale).toString());
|
|
2934
|
-
if (element.id.indexOf('
|
|
2935
|
-
childNode.setAttribute('
|
|
2962
|
+
if (element.id.indexOf('_Point') > -1 || element.id.indexOf('_MultiPoint') > -1) {
|
|
2963
|
+
childNode.setAttribute('r', (circleRadius / scale).toString());
|
|
2936
2964
|
}
|
|
2937
2965
|
}
|
|
2938
2966
|
}
|
|
@@ -3126,7 +3154,10 @@ export function animate(element, delay, duration, process, end) {
|
|
|
3126
3154
|
else {
|
|
3127
3155
|
window.cancelAnimationFrame(clearAnimation);
|
|
3128
3156
|
end.call(_this, { element: element });
|
|
3129
|
-
element.
|
|
3157
|
+
if (element.id.indexOf('Marker') > -1) {
|
|
3158
|
+
var markerElement = getElementByID(element.id.split('_Layer')[0] + '_Markers_Group');
|
|
3159
|
+
markerElement.setAttribute('style', markerStyle);
|
|
3160
|
+
}
|
|
3130
3161
|
}
|
|
3131
3162
|
};
|
|
3132
3163
|
clearAnimation = window.requestAnimationFrame(startAnimation);
|