@syncfusion/ej2-maps 24.2.4 → 25.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -2
- 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 +646 -331
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +660 -346
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/maps/layers/bubble.js +2 -3
- package/src/maps/layers/color-mapping.d.ts +0 -1
- package/src/maps/layers/color-mapping.js +0 -1
- package/src/maps/layers/data-label.js +19 -17
- package/src/maps/layers/layer-panel.js +13 -7
- package/src/maps/layers/legend.js +11 -3
- package/src/maps/layers/marker.d.ts +4 -0
- package/src/maps/layers/marker.js +16 -13
- package/src/maps/layers/polygon.d.ts +0 -1
- package/src/maps/layers/polygon.js +1 -4
- package/src/maps/maps-model.d.ts +14 -0
- package/src/maps/maps.d.ts +14 -2
- package/src/maps/maps.js +118 -46
- package/src/maps/model/base-model.d.ts +51 -0
- package/src/maps/model/base.d.ts +43 -1
- package/src/maps/model/base.js +32 -0
- package/src/maps/model/constants.d.ts +12 -0
- package/src/maps/model/constants.js +12 -0
- package/src/maps/model/interface.d.ts +8 -0
- package/src/maps/user-interaction/tooltip.js +151 -110
- package/src/maps/user-interaction/zoom.d.ts +3 -5
- package/src/maps/user-interaction/zoom.js +198 -106
- package/src/maps/utils/helper.d.ts +7 -1
- package/src/maps/utils/helper.js +89 -37
- package/.github/PULL_REQUEST_TEMPLATE/Bug.md +0 -72
- package/.github/PULL_REQUEST_TEMPLATE/Feature.md +0 -49
package/src/maps/maps.js
CHANGED
|
@@ -235,6 +235,9 @@ var Maps = /** @class */ (function (_super) {
|
|
|
235
235
|
this.trigger(load, { maps: this });
|
|
236
236
|
this.createSVG();
|
|
237
237
|
this.findBaseAndSubLayers();
|
|
238
|
+
if (!isNullOrUndefined(this.markerModule)) {
|
|
239
|
+
this.markerModule.initializeMarkerClusterList();
|
|
240
|
+
}
|
|
238
241
|
this.createSecondaryElement();
|
|
239
242
|
this.addTabIndex();
|
|
240
243
|
this.themeStyle = getThemeStyle(this.theme);
|
|
@@ -695,55 +698,63 @@ var Maps = /** @class */ (function (_super) {
|
|
|
695
698
|
* @returns {void}
|
|
696
699
|
*/
|
|
697
700
|
Maps.prototype.getMinMaxLatitudeLongitude = function () {
|
|
698
|
-
var
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
this.
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
701
|
+
var mapsElement = document.getElementById(this.element.id);
|
|
702
|
+
if (!isNullOrUndefined(mapsElement)) {
|
|
703
|
+
var element = mapsElement.getBoundingClientRect();
|
|
704
|
+
var minPosition = this.isTileMap ? this.pointToLatLong((this.mapAreaRect.x - this.margin.left), -this.mapAreaRect.y) : this.getGeoLocation(0, (this.mapAreaRect.x + element.left), this.mapAreaRect.y);
|
|
705
|
+
var maxPosition = this.isTileMap ? this.pointToLatLong(this.mapAreaRect.width, (this.mapAreaRect.height - this.mapAreaRect.y)) :
|
|
706
|
+
this.getGeoLocation(0, (this.mapAreaRect.x + element.left + this.mapAreaRect.width), (this.mapAreaRect.y + this.mapAreaRect.height));
|
|
707
|
+
var MinMaxLatitudeLongitude = {
|
|
708
|
+
minLatitude: minPosition.latitude, maxLatitude: maxPosition.latitude, minLongitude: minPosition.longitude,
|
|
709
|
+
maxLongitude: maxPosition.longitude
|
|
710
|
+
};
|
|
711
|
+
return MinMaxLatitudeLongitude;
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
return { minLatitude: 0, maxLatitude: 0, minLongitude: 0,
|
|
715
|
+
maxLongitude: 0 };
|
|
716
|
+
}
|
|
707
717
|
};
|
|
708
718
|
/**
|
|
709
719
|
* @returns {void}
|
|
710
720
|
* @private
|
|
711
721
|
*/
|
|
712
722
|
Maps.prototype.arrangeTemplate = function () {
|
|
723
|
+
var _this = this;
|
|
713
724
|
if (document.getElementById(this.element.id + '_Legend_Border')) {
|
|
714
725
|
document.getElementById(this.element.id + '_Legend_Border').style.pointerEvents = 'none';
|
|
715
726
|
}
|
|
716
727
|
var templateElements = document.getElementsByClassName(this.element.id + '_template');
|
|
717
728
|
if (!isNullOrUndefined(templateElements) && templateElements.length > 0 &&
|
|
718
729
|
getElementByID(this.element.id + '_Layer_Collections') && !this.isTileMap) {
|
|
719
|
-
|
|
730
|
+
Array.prototype.forEach.call(templateElements, function (templateGroupEle, i) {
|
|
720
731
|
var offSetLetValue = 0;
|
|
721
732
|
var offSetTopValue = 0;
|
|
722
|
-
var templateGroupEle = templateElements[i];
|
|
723
733
|
if (!isNullOrUndefined(templateGroupEle) && templateGroupEle.childElementCount > 0) {
|
|
724
|
-
var layerOffset = getElementByID(
|
|
734
|
+
var layerOffset = getElementByID(_this.element.id + '_Layer_Collections').getBoundingClientRect();
|
|
725
735
|
var elementOffset = getElementByID(templateGroupEle.id).getBoundingClientRect();
|
|
726
736
|
if (templateGroupEle.id.indexOf('Marker') === -1) {
|
|
727
|
-
offSetLetValue =
|
|
737
|
+
offSetLetValue = _this.isTileMap ? 0 : (layerOffset.left < elementOffset.left) ?
|
|
728
738
|
-(Math.abs(elementOffset.left - layerOffset.left)) : (Math.abs(elementOffset.left - layerOffset.left));
|
|
729
|
-
offSetTopValue =
|
|
739
|
+
offSetTopValue = _this.isTileMap ? 0 : (layerOffset.top < elementOffset.top) ?
|
|
730
740
|
-(Math.abs(elementOffset.top - layerOffset.top)) : Math.abs(elementOffset.top - layerOffset.top);
|
|
731
741
|
}
|
|
732
|
-
|
|
733
|
-
var currentTemplate = templateGroupEle.childNodes[j];
|
|
742
|
+
Array.prototype.forEach.call(templateGroupEle.childNodes, function (currentTemplate, j) {
|
|
734
743
|
if (currentTemplate.id.indexOf('Marker') !== -1) {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
744
|
+
if (currentTemplate.style.visibility != "hidden") {
|
|
745
|
+
var elementOffset_1 = getElementByID(currentTemplate.id).getBoundingClientRect();
|
|
746
|
+
currentTemplate.style.left = parseFloat(currentTemplate.style.left) - (_this.isTileMap ? 0 : elementOffset_1.width / 2) + 'px';
|
|
747
|
+
currentTemplate.style.top = parseFloat(currentTemplate.style.top) - (_this.isTileMap ? 0 : elementOffset_1.height / 2) + 'px';
|
|
748
|
+
}
|
|
738
749
|
}
|
|
739
750
|
else {
|
|
740
751
|
currentTemplate.style.left = parseFloat(currentTemplate.style.left) + offSetLetValue + 'px';
|
|
741
752
|
currentTemplate.style.top = parseFloat(currentTemplate.style.top) + offSetTopValue + 'px';
|
|
742
753
|
currentTemplate.style.transform = 'translate(-50%, -50%)';
|
|
743
754
|
}
|
|
744
|
-
}
|
|
755
|
+
});
|
|
745
756
|
}
|
|
746
|
-
}
|
|
757
|
+
});
|
|
747
758
|
}
|
|
748
759
|
};
|
|
749
760
|
Maps.prototype.createTile = function () {
|
|
@@ -871,7 +882,8 @@ var Maps = /** @class */ (function (_super) {
|
|
|
871
882
|
var options = new TextOption(this.element.id + '_Map_' + type, location_1.x, location_1.y, 'start', trimmedTitle);
|
|
872
883
|
var titleBounds = new Rect(location_1.x, location_1.y, elementSize.width, elementSize.height);
|
|
873
884
|
var element = renderTextElement(options, style, style.color || (type === 'title' ? this.themeStyle.titleFontColor : this.themeStyle.subTitleFontColor), groupEle);
|
|
874
|
-
element.setAttribute('aria-label',
|
|
885
|
+
element.setAttribute('aria-label', title.text);
|
|
886
|
+
element.setAttribute('role', 'region');
|
|
875
887
|
if ((type === 'title' && !title.subtitleSettings.text) || (type === 'subtitle')) {
|
|
876
888
|
height = Math.abs((titleBounds.y + this.margin.bottom) - this.availableSize.height);
|
|
877
889
|
this.mapAreaRect = new Rect(this.margin.left, titleBounds.y + 10, width, height - 10);
|
|
@@ -1022,7 +1034,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1022
1034
|
}
|
|
1023
1035
|
else if (this.zoomSettings.enable && zoom && event['keyCode'] === 82) {
|
|
1024
1036
|
zoom.performZoomingByToolBar('reset');
|
|
1025
|
-
zoom.
|
|
1037
|
+
zoom.isPanModeEnabled = false;
|
|
1026
1038
|
}
|
|
1027
1039
|
else if (this.zoomSettings.enable && this.zoomSettings.enablePanning && zoom
|
|
1028
1040
|
&& (event.code === 'ArrowUp' || event.code === 'ArrowDown')) {
|
|
@@ -1186,12 +1198,12 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1186
1198
|
return latLongValue;
|
|
1187
1199
|
};
|
|
1188
1200
|
/** @private */
|
|
1189
|
-
Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y) {
|
|
1201
|
+
Maps.prototype.getClickLocation = function (targetId, pageX, pageY, targetElement, x, y, type) {
|
|
1190
1202
|
var layerIndex = 0;
|
|
1191
1203
|
var latLongValue;
|
|
1192
|
-
if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap &&
|
|
1193
|
-
(parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
|
|
1194
|
-
|
|
1204
|
+
if (targetId.indexOf('_LayerIndex_') !== -1 && !this.isTileMap && (!isNullOrUndefined(type) ||
|
|
1205
|
+
((parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
|
|
1206
|
+
(parseInt(this.mouseDownEvent['y'], 10) === parseInt(this.mouseClickEvent['y'], 10))))) {
|
|
1195
1207
|
layerIndex = parseFloat(targetId.split('_LayerIndex_')[1].split('_')[0]);
|
|
1196
1208
|
if (this.layers[layerIndex].geometryType === 'Normal') {
|
|
1197
1209
|
if (targetId.indexOf('_shapeIndex_') > -1) {
|
|
@@ -1250,8 +1262,9 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1250
1262
|
latLongValue = this.getGeoLocation(layerIndex, x, y);
|
|
1251
1263
|
}
|
|
1252
1264
|
}
|
|
1253
|
-
else if (this.isTileMap && (
|
|
1254
|
-
(parseInt(this.mouseDownEvent['
|
|
1265
|
+
else if (this.isTileMap && (!isNullOrUndefined(type) ||
|
|
1266
|
+
((parseInt(this.mouseDownEvent['x'], 10) === parseInt(this.mouseClickEvent['x'], 10)) &&
|
|
1267
|
+
(parseInt(this.mouseDownEvent['y'], 10) === parseInt(this.mouseClickEvent['y'], 10))))) {
|
|
1255
1268
|
latLongValue = this.getTileGeoLocation(x, y);
|
|
1256
1269
|
}
|
|
1257
1270
|
return latLongValue;
|
|
@@ -1994,13 +2007,51 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1994
2007
|
this.mouseDownEvent = { x: null, y: null };
|
|
1995
2008
|
this.mouseClickEvent = { x: null, y: null };
|
|
1996
2009
|
this.formatFunction = null;
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
this.
|
|
2010
|
+
this.localeObject = null;
|
|
2011
|
+
this.defaultLocalConstants = null;
|
|
2012
|
+
this.intl = null;
|
|
2013
|
+
this.mapAreaRect = null;
|
|
2014
|
+
this.layersCollection = null;
|
|
2015
|
+
this.themeStyle = null;
|
|
2016
|
+
this.totalRect = null;
|
|
2017
|
+
this.baseSize = null;
|
|
2018
|
+
this.baseMapBounds = null;
|
|
2019
|
+
this.baseMapRectBounds = null;
|
|
2020
|
+
this.baseTranslatePoint = null;
|
|
2021
|
+
this.baseTileTranslatePoint = null;
|
|
2022
|
+
this.markerZoomCenterPoint = null;
|
|
2023
|
+
this.currentTiles = null;
|
|
2024
|
+
this.serverProcess = null;
|
|
2025
|
+
this.toolbarProperties = null;
|
|
2026
|
+
this.zoomLabelPositions = null;
|
|
2027
|
+
this.resizeEvent = null;
|
|
2028
|
+
this.availableSize = null;
|
|
2000
2029
|
if (document.getElementById('mapsmeasuretext')) {
|
|
2001
2030
|
document.getElementById('mapsmeasuretext').remove();
|
|
2002
2031
|
}
|
|
2003
2032
|
this.removeSvg();
|
|
2033
|
+
this.svgObject = null;
|
|
2034
|
+
this.mapLayerPanel = null;
|
|
2035
|
+
this.renderer = null;
|
|
2036
|
+
this.translatePoint = null;
|
|
2037
|
+
this.tileTranslatePoint = null;
|
|
2038
|
+
this.previousPoint = null;
|
|
2039
|
+
this.dataLabelShape = [];
|
|
2040
|
+
this.zoomShapeCollection = [];
|
|
2041
|
+
this.selectedElementId = [];
|
|
2042
|
+
this.selectedMarkerElementId = [];
|
|
2043
|
+
this.selectedBubbleElementId = [];
|
|
2044
|
+
this.shapeSelectionClass = null;
|
|
2045
|
+
this.markerSelectionClass = null;
|
|
2046
|
+
this.bubbleSelectionClass = null;
|
|
2047
|
+
this.navigationSelectionClass = null;
|
|
2048
|
+
this.selectedNavigationElementId = [];
|
|
2049
|
+
this.polygonSelectionClass = null;
|
|
2050
|
+
this.selectedPolygonElementId = [];
|
|
2051
|
+
this.legendSelectionClass = null;
|
|
2052
|
+
this.previousTranslate = null;
|
|
2053
|
+
this.initialTileTranslate = null;
|
|
2054
|
+
this.markerDragArgument = null;
|
|
2004
2055
|
};
|
|
2005
2056
|
/**
|
|
2006
2057
|
* Gets component name
|
|
@@ -2143,85 +2194,99 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2143
2194
|
if (this.isBubbleVisible()) {
|
|
2144
2195
|
modules.push({
|
|
2145
2196
|
member: 'Bubble',
|
|
2146
|
-
args: [this]
|
|
2197
|
+
args: [this],
|
|
2198
|
+
name: 'Bubble'
|
|
2147
2199
|
});
|
|
2148
2200
|
}
|
|
2149
2201
|
if (isVisible.highlight) {
|
|
2150
2202
|
modules.push({
|
|
2151
2203
|
member: 'Highlight',
|
|
2152
|
-
args: [this]
|
|
2204
|
+
args: [this],
|
|
2205
|
+
name: 'Highlight'
|
|
2153
2206
|
});
|
|
2154
2207
|
}
|
|
2155
2208
|
if (isVisible.selection) {
|
|
2156
2209
|
modules.push({
|
|
2157
2210
|
member: 'Selection',
|
|
2158
|
-
args: [this]
|
|
2211
|
+
args: [this],
|
|
2212
|
+
name: 'Selection'
|
|
2159
2213
|
});
|
|
2160
2214
|
}
|
|
2161
2215
|
if (this.legendSettings.visible) {
|
|
2162
2216
|
modules.push({
|
|
2163
2217
|
member: 'Legend',
|
|
2164
|
-
args: [this]
|
|
2218
|
+
args: [this],
|
|
2219
|
+
name: 'Legend'
|
|
2165
2220
|
});
|
|
2166
2221
|
}
|
|
2167
2222
|
if (this.zoomSettings.enable || this.zoomSettings.zoomFactor > this.zoomSettings.minZoom) {
|
|
2168
2223
|
modules.push({
|
|
2169
2224
|
member: 'Zoom',
|
|
2170
|
-
args: [this]
|
|
2225
|
+
args: [this],
|
|
2226
|
+
name: 'Zoom'
|
|
2171
2227
|
});
|
|
2172
2228
|
}
|
|
2173
2229
|
if (this.isMarkersVisible()) {
|
|
2174
2230
|
modules.push({
|
|
2175
2231
|
member: 'Marker',
|
|
2176
|
-
args: [this]
|
|
2232
|
+
args: [this],
|
|
2233
|
+
name: 'Marker'
|
|
2177
2234
|
});
|
|
2178
2235
|
}
|
|
2179
2236
|
if (this.isDataLabelVisible()) {
|
|
2180
2237
|
modules.push({
|
|
2181
2238
|
member: 'DataLabel',
|
|
2182
|
-
args: [this]
|
|
2239
|
+
args: [this],
|
|
2240
|
+
name: 'DataLabel'
|
|
2183
2241
|
});
|
|
2184
2242
|
}
|
|
2185
2243
|
if (this.isNavigationVisible()) {
|
|
2186
2244
|
modules.push({
|
|
2187
2245
|
member: 'NavigationLine',
|
|
2188
|
-
args: [this]
|
|
2246
|
+
args: [this],
|
|
2247
|
+
name: 'NavigationLine'
|
|
2189
2248
|
});
|
|
2190
2249
|
}
|
|
2191
2250
|
if (this.isPolygonVisible()) {
|
|
2192
2251
|
modules.push({
|
|
2193
2252
|
member: 'Polygon',
|
|
2194
|
-
args: [this]
|
|
2253
|
+
args: [this],
|
|
2254
|
+
name: 'Polygon'
|
|
2195
2255
|
});
|
|
2196
2256
|
}
|
|
2197
2257
|
if (isVisible.tooltip) {
|
|
2198
2258
|
modules.push({
|
|
2199
2259
|
member: 'MapsTooltip',
|
|
2200
|
-
args: [this]
|
|
2260
|
+
args: [this],
|
|
2261
|
+
name: 'MapsTooltip'
|
|
2201
2262
|
});
|
|
2202
2263
|
}
|
|
2203
2264
|
if (annotationEnable) {
|
|
2204
2265
|
modules.push({
|
|
2205
2266
|
member: 'Annotations',
|
|
2206
|
-
args: [this, Annotations]
|
|
2267
|
+
args: [this, Annotations],
|
|
2268
|
+
name: 'Annotations'
|
|
2207
2269
|
});
|
|
2208
2270
|
}
|
|
2209
2271
|
if (this.allowPrint) {
|
|
2210
2272
|
modules.push({
|
|
2211
2273
|
member: 'Print',
|
|
2212
|
-
args: [this]
|
|
2274
|
+
args: [this],
|
|
2275
|
+
name: 'Print'
|
|
2213
2276
|
});
|
|
2214
2277
|
}
|
|
2215
2278
|
if (this.allowImageExport) {
|
|
2216
2279
|
modules.push({
|
|
2217
2280
|
member: 'ImageExport',
|
|
2218
|
-
args: [this]
|
|
2281
|
+
args: [this],
|
|
2282
|
+
name: 'ImageExport'
|
|
2219
2283
|
});
|
|
2220
2284
|
}
|
|
2221
2285
|
if (this.allowPdfExport) {
|
|
2222
2286
|
modules.push({
|
|
2223
2287
|
member: 'PdfExport',
|
|
2224
|
-
args: [this]
|
|
2288
|
+
args: [this],
|
|
2289
|
+
name: 'PdfExport'
|
|
2225
2290
|
});
|
|
2226
2291
|
}
|
|
2227
2292
|
return modules;
|
|
@@ -2426,6 +2491,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2426
2491
|
if (polygon.points.length > 0) {
|
|
2427
2492
|
isSelection = layer.polygonSettings.highlightSettings.enable || isSelection;
|
|
2428
2493
|
isHighlight = layer.polygonSettings.selectionSettings.enable || isHighlight;
|
|
2494
|
+
istooltipVisible = layer.polygonSettings.tooltipSettings.visible || istooltipVisible;
|
|
2429
2495
|
}
|
|
2430
2496
|
}
|
|
2431
2497
|
for (var _d = 0, markers_1 = markers; _d < markers_1.length; _d++) {
|
|
@@ -2703,6 +2769,12 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2703
2769
|
__decorate([
|
|
2704
2770
|
Event()
|
|
2705
2771
|
], Maps.prototype, "pan", void 0);
|
|
2772
|
+
__decorate([
|
|
2773
|
+
Event()
|
|
2774
|
+
], Maps.prototype, "panComplete", void 0);
|
|
2775
|
+
__decorate([
|
|
2776
|
+
Event()
|
|
2777
|
+
], Maps.prototype, "zoomComplete", void 0);
|
|
2706
2778
|
Maps = __decorate([
|
|
2707
2779
|
NotifyPropertyChanges
|
|
2708
2780
|
], Maps);
|
|
@@ -464,6 +464,37 @@ export interface TooltipSettingsModel {
|
|
|
464
464
|
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
+
/**
|
|
468
|
+
* Interface for a class PolygonTooltipSettings
|
|
469
|
+
*/
|
|
470
|
+
export interface PolygonTooltipSettingsModel {
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Shows or hides the tooltip of the polygon shapes. When this property is set as false, the tooltip for all the polygon shapes in a layer will not be visible.
|
|
474
|
+
*
|
|
475
|
+
* @default false
|
|
476
|
+
*/
|
|
477
|
+
visible?: boolean;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Gets or sets the fill color for the tooltip of the polygon shape.
|
|
481
|
+
*
|
|
482
|
+
* @default ''
|
|
483
|
+
*/
|
|
484
|
+
fill?: string;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* Gets or sets the attributes such as width, color and opacity of the border of the tooltip element of the polygon shape.
|
|
488
|
+
*/
|
|
489
|
+
border?: BorderModel;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Gets or sets the font properties of the text content of the tooltip element of the polygon shape.
|
|
493
|
+
*/
|
|
494
|
+
textStyle?: FontModel;
|
|
495
|
+
|
|
496
|
+
}
|
|
497
|
+
|
|
467
498
|
/**
|
|
468
499
|
* Interface for a class Margin
|
|
469
500
|
*/
|
|
@@ -861,6 +892,21 @@ export interface PolygonSettingModel {
|
|
|
861
892
|
*/
|
|
862
893
|
points?: Coordinate[];
|
|
863
894
|
|
|
895
|
+
/**
|
|
896
|
+
* Specifies the tooltip text to be displayed for the polygon shape. If it is not set, the tooltip will not be displayed.
|
|
897
|
+
*
|
|
898
|
+
* @default ''
|
|
899
|
+
*/
|
|
900
|
+
tooltipText?: string;
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Specifies any HTML content as a tooltip on the polygon shape. If it is not set, the tooltip will not be displayed.
|
|
904
|
+
*
|
|
905
|
+
* @default ''
|
|
906
|
+
* @aspType string
|
|
907
|
+
*/
|
|
908
|
+
tooltipTemplate?: string | Function;
|
|
909
|
+
|
|
864
910
|
}
|
|
865
911
|
|
|
866
912
|
/**
|
|
@@ -883,6 +929,11 @@ export interface PolygonSettingsModel {
|
|
|
883
929
|
*/
|
|
884
930
|
highlightSettings?: HighlightSettingsModel;
|
|
885
931
|
|
|
932
|
+
/**
|
|
933
|
+
* Specifies the properties such as visibility, fill, border and text style to customize the tooltip.
|
|
934
|
+
*/
|
|
935
|
+
tooltipSettings?: PolygonTooltipSettingsModel;
|
|
936
|
+
|
|
886
937
|
}
|
|
887
938
|
|
|
888
939
|
/**
|
package/src/maps/model/base.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { SmartLabelMode, IntersectAction } from '../../index';
|
|
|
8
8
|
import { BorderModel, ColorMappingSettingsModel, FontModel, CommonTitleSettingsModel, NavigationLineSettingsModel, PolygonSettingsModel, ZoomToolbarTooltipSettingsModel } from './base-model';
|
|
9
9
|
import { MarkerSettingsModel, MarkerClusterSettingsModel, ShapeSettingsModel, BubbleSettingsModel, ArrowModel } from './base-model';
|
|
10
10
|
import { DataLabelSettingsModel, TooltipSettingsModel, SubTitleSettingsModel, SelectionSettingsModel, PolygonSettingModel } from './base-model';
|
|
11
|
-
import { HighlightSettingsModel, ToggleLegendSettingsModel, ConnectorLineSettingsModel } from './base-model';
|
|
11
|
+
import { HighlightSettingsModel, ToggleLegendSettingsModel, ConnectorLineSettingsModel, PolygonTooltipSettingsModel } from './base-model';
|
|
12
12
|
import { InitialShapeSelectionSettingsModel, InitialMarkerSelectionSettingsModel, ZoomToolbarSettingsModel, ZoomToolbarButtonSettingsModel } from './base-model';
|
|
13
13
|
import { Point, GeoLocation, Coordinate } from '../utils/helper';
|
|
14
14
|
import { BingMapType, LegendArrangement, LegendShape, BubbleType, StaticMapType, ToolbarItem } from '../utils/enum';
|
|
@@ -399,6 +399,31 @@ export declare class TooltipSettings extends ChildProperty<TooltipSettings> {
|
|
|
399
399
|
*/
|
|
400
400
|
valuePath: string;
|
|
401
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* Specifies the properties such as visibility, fill, border and text style to customize the tooltip.
|
|
404
|
+
*/
|
|
405
|
+
export declare class PolygonTooltipSettings extends ChildProperty<PolygonTooltipSettings> {
|
|
406
|
+
/**
|
|
407
|
+
* Shows or hides the tooltip of the polygon shapes. When this property is set as false, the tooltip for all the polygon shapes in a layer will not be visible.
|
|
408
|
+
*
|
|
409
|
+
* @default false
|
|
410
|
+
*/
|
|
411
|
+
visible: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* Gets or sets the fill color for the tooltip of the polygon shape.
|
|
414
|
+
*
|
|
415
|
+
* @default ''
|
|
416
|
+
*/
|
|
417
|
+
fill: string;
|
|
418
|
+
/**
|
|
419
|
+
* Gets or sets the attributes such as width, color and opacity of the border of the tooltip element of the polygon shape.
|
|
420
|
+
*/
|
|
421
|
+
border: BorderModel;
|
|
422
|
+
/**
|
|
423
|
+
* Gets or sets the font properties of the text content of the tooltip element of the polygon shape.
|
|
424
|
+
*/
|
|
425
|
+
textStyle: FontModel;
|
|
426
|
+
}
|
|
402
427
|
/**
|
|
403
428
|
* Gets or sets the options to customize the margin of the maps.
|
|
404
429
|
*/
|
|
@@ -767,6 +792,19 @@ export declare class PolygonSetting extends ChildProperty<PolygonSettings> {
|
|
|
767
792
|
* @default []
|
|
768
793
|
*/
|
|
769
794
|
points: Coordinate[];
|
|
795
|
+
/**
|
|
796
|
+
* Specifies the tooltip text to be displayed for the polygon shape. If it is not set, the tooltip will not be displayed.
|
|
797
|
+
*
|
|
798
|
+
* @default ''
|
|
799
|
+
*/
|
|
800
|
+
tooltipText: string;
|
|
801
|
+
/**
|
|
802
|
+
* Specifies any HTML content as a tooltip on the polygon shape. If it is not set, the tooltip will not be displayed.
|
|
803
|
+
*
|
|
804
|
+
* @default ''
|
|
805
|
+
* @aspType string
|
|
806
|
+
*/
|
|
807
|
+
tooltipTemplate: string | Function;
|
|
770
808
|
}
|
|
771
809
|
/**
|
|
772
810
|
* Defines the properties of the polygon shapes that will be rendered on a map layer.
|
|
@@ -785,6 +823,10 @@ export declare class PolygonSettings extends ChildProperty<PolygonSettings> {
|
|
|
785
823
|
* Gets or sets the properties for highlighting polygon shapes in a map layer.
|
|
786
824
|
*/
|
|
787
825
|
highlightSettings: HighlightSettingsModel;
|
|
826
|
+
/**
|
|
827
|
+
* Specifies the properties such as visibility, fill, border and text style to customize the tooltip.
|
|
828
|
+
*/
|
|
829
|
+
tooltipSettings: PolygonTooltipSettingsModel;
|
|
788
830
|
}
|
|
789
831
|
/**
|
|
790
832
|
* Gets or sets the options to customize the navigation lines in maps which is used to connect different locations.
|
package/src/maps/model/base.js
CHANGED
|
@@ -303,6 +303,29 @@ var TooltipSettings = /** @class */ (function (_super) {
|
|
|
303
303
|
return TooltipSettings;
|
|
304
304
|
}(ChildProperty));
|
|
305
305
|
export { TooltipSettings };
|
|
306
|
+
/**
|
|
307
|
+
* Specifies the properties such as visibility, fill, border and text style to customize the tooltip.
|
|
308
|
+
*/
|
|
309
|
+
var PolygonTooltipSettings = /** @class */ (function (_super) {
|
|
310
|
+
__extends(PolygonTooltipSettings, _super);
|
|
311
|
+
function PolygonTooltipSettings() {
|
|
312
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
313
|
+
}
|
|
314
|
+
__decorate([
|
|
315
|
+
Property(false)
|
|
316
|
+
], PolygonTooltipSettings.prototype, "visible", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
Property('')
|
|
319
|
+
], PolygonTooltipSettings.prototype, "fill", void 0);
|
|
320
|
+
__decorate([
|
|
321
|
+
Complex({ color: 'transparent', width: 1 }, Border)
|
|
322
|
+
], PolygonTooltipSettings.prototype, "border", void 0);
|
|
323
|
+
__decorate([
|
|
324
|
+
Complex({ fontFamily: null, size: null, fontWeight: null }, Font)
|
|
325
|
+
], PolygonTooltipSettings.prototype, "textStyle", void 0);
|
|
326
|
+
return PolygonTooltipSettings;
|
|
327
|
+
}(ChildProperty));
|
|
328
|
+
export { PolygonTooltipSettings };
|
|
306
329
|
/**
|
|
307
330
|
* Gets or sets the options to customize the margin of the maps.
|
|
308
331
|
*/
|
|
@@ -556,6 +579,12 @@ var PolygonSetting = /** @class */ (function (_super) {
|
|
|
556
579
|
__decorate([
|
|
557
580
|
Property([])
|
|
558
581
|
], PolygonSetting.prototype, "points", void 0);
|
|
582
|
+
__decorate([
|
|
583
|
+
Property('')
|
|
584
|
+
], PolygonSetting.prototype, "tooltipText", void 0);
|
|
585
|
+
__decorate([
|
|
586
|
+
Property('')
|
|
587
|
+
], PolygonSetting.prototype, "tooltipTemplate", void 0);
|
|
559
588
|
return PolygonSetting;
|
|
560
589
|
}(ChildProperty));
|
|
561
590
|
export { PolygonSetting };
|
|
@@ -577,6 +606,9 @@ var PolygonSettings = /** @class */ (function (_super) {
|
|
|
577
606
|
__decorate([
|
|
578
607
|
Complex({}, HighlightSettings)
|
|
579
608
|
], PolygonSettings.prototype, "highlightSettings", void 0);
|
|
609
|
+
__decorate([
|
|
610
|
+
Complex({}, PolygonTooltipSettings)
|
|
611
|
+
], PolygonSettings.prototype, "tooltipSettings", void 0);
|
|
580
612
|
return PolygonSettings;
|
|
581
613
|
}(ChildProperty));
|
|
582
614
|
export { PolygonSettings };
|
|
@@ -184,6 +184,18 @@ export declare const annotationRendering: string;
|
|
|
184
184
|
* @private
|
|
185
185
|
*/
|
|
186
186
|
export declare const itemSelection: string;
|
|
187
|
+
/**
|
|
188
|
+
* Specifies the maps pan complete event name.
|
|
189
|
+
*
|
|
190
|
+
* @private
|
|
191
|
+
*/
|
|
192
|
+
export declare const panComplete: string;
|
|
193
|
+
/**
|
|
194
|
+
* Specifies the maps zoom complete event name.
|
|
195
|
+
*
|
|
196
|
+
* @private
|
|
197
|
+
*/
|
|
198
|
+
export declare const zoomComplete: string;
|
|
187
199
|
/**
|
|
188
200
|
* Specifies the maps item highlight event name.
|
|
189
201
|
*
|
|
@@ -184,6 +184,18 @@ export var annotationRendering = 'annotationRendering';
|
|
|
184
184
|
* @private
|
|
185
185
|
*/
|
|
186
186
|
export var itemSelection = 'itemSelection';
|
|
187
|
+
/**
|
|
188
|
+
* Specifies the maps pan complete event name.
|
|
189
|
+
*
|
|
190
|
+
* @private
|
|
191
|
+
*/
|
|
192
|
+
export var panComplete = 'panComplete';
|
|
193
|
+
/**
|
|
194
|
+
* Specifies the maps zoom complete event name.
|
|
195
|
+
*
|
|
196
|
+
* @private
|
|
197
|
+
*/
|
|
198
|
+
export var zoomComplete = 'zoomComplete';
|
|
187
199
|
/**
|
|
188
200
|
* Specifies the maps item highlight event name.
|
|
189
201
|
*
|
|
@@ -204,6 +204,14 @@ export interface ITooltipRenderEventArgs extends IMapsEventArgs {
|
|
|
204
204
|
* Defines the original mouse event arguments.
|
|
205
205
|
*/
|
|
206
206
|
eventArgs?: PointerEvent;
|
|
207
|
+
/**
|
|
208
|
+
* Defines the latitude value of the position of the mouse pointer.
|
|
209
|
+
*/
|
|
210
|
+
latitude?: number;
|
|
211
|
+
/**
|
|
212
|
+
* Defines the longitude value of the position of the mouse pointer.
|
|
213
|
+
*/
|
|
214
|
+
longitude?: number;
|
|
207
215
|
}
|
|
208
216
|
/**
|
|
209
217
|
* Specifies the event arguments for item selection event in maps.
|