@syncfusion/ej2-maps 23.2.4 → 24.1.41
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 +20 -1
- package/dist/ej2-maps.min.js +2 -2
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +1059 -765
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +1084 -775
- 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/global.js +1 -1
- package/src/maps/index.d.ts +1 -0
- package/src/maps/index.js +1 -0
- package/src/maps/layers/layer-panel.js +14 -3
- package/src/maps/layers/legend.js +1 -1
- package/src/maps/layers/marker.js +21 -19
- package/src/maps/layers/navigation-selected-line.js +16 -16
- package/src/maps/layers/polygon.d.ts +31 -0
- package/src/maps/layers/polygon.js +58 -0
- package/src/maps/maps-model.d.ts +1 -1
- package/src/maps/maps.d.ts +25 -1
- package/src/maps/maps.js +81 -17
- package/src/maps/model/base-model.d.ts +103 -25
- package/src/maps/model/base.d.ts +72 -7
- package/src/maps/model/base.js +53 -0
- package/src/maps/model/interface.d.ts +24 -3
- package/src/maps/user-interaction/highlight.js +6 -0
- package/src/maps/user-interaction/selection.js +13 -0
- package/src/maps/user-interaction/tooltip.js +13 -21
- package/src/maps/user-interaction/zoom.js +78 -16
- package/src/maps/utils/helper.d.ts +18 -0
- package/src/maps/utils/helper.js +54 -4
package/src/maps/maps.js
CHANGED
|
@@ -29,8 +29,7 @@ import { getElement, removeClass, getTranslate, triggerItemSelectionEvent, merge
|
|
|
29
29
|
import { createStyle } from './utils/helper';
|
|
30
30
|
import { ZoomSettings, LegendSettings } from './model/base';
|
|
31
31
|
import { LayerSettings, TitleSettings, Border, Margin, MapsAreaSettings, Annotation, CenterPosition } from './model/base';
|
|
32
|
-
import {
|
|
33
|
-
import { load, click, onclick, rightClick, loaded, doubleClick, resize, shapeSelected, zoomIn } from './model/constants';
|
|
32
|
+
import { load, click, onclick, rightClick, doubleClick, resize, shapeSelected, zoomIn } from './model/constants';
|
|
34
33
|
import { getThemeStyle, Theme } from './model/theme';
|
|
35
34
|
import { LayerPanel } from './layers/layer-panel';
|
|
36
35
|
import { Rect, RectOption, measureText, getElementByID, MapAjax, processResult, getElementsByClassName } from '../maps/utils/helper';
|
|
@@ -120,6 +119,8 @@ var Maps = /** @class */ (function (_super) {
|
|
|
120
119
|
/** @private */
|
|
121
120
|
_this.selectedNavigationElementId = [];
|
|
122
121
|
/** @private */
|
|
122
|
+
_this.selectedPolygonElementId = [];
|
|
123
|
+
/** @private */
|
|
123
124
|
_this.selectedLegendElementId = [];
|
|
124
125
|
/** @private */
|
|
125
126
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -137,6 +138,8 @@ var Maps = /** @class */ (function (_super) {
|
|
|
137
138
|
/** @private */
|
|
138
139
|
_this.initialTileTranslate = new Point(0, 0);
|
|
139
140
|
/** @private */
|
|
141
|
+
_this.isMarkerZoomCompleted = false;
|
|
142
|
+
/** @private */
|
|
140
143
|
_this.markerDragId = '';
|
|
141
144
|
/** @private */
|
|
142
145
|
_this.initialCheck = true;
|
|
@@ -503,10 +506,20 @@ var Maps = /** @class */ (function (_super) {
|
|
|
503
506
|
this.zoomModule.removeToolbarOpacity(this.isTileMap ? Math.round(this.tileZoomLevel) : this.mapScaleValue, this.element.id + '_Zooming_');
|
|
504
507
|
}
|
|
505
508
|
if (!this.isZoomByPosition && !this.zoomNotApplied) {
|
|
506
|
-
this.
|
|
509
|
+
this.triggerZoomEvent();
|
|
507
510
|
}
|
|
508
511
|
this.isResize = false;
|
|
509
512
|
};
|
|
513
|
+
Maps.prototype.triggerZoomEvent = function () {
|
|
514
|
+
var loadedArgs;
|
|
515
|
+
var minMaxLatitudeLongitude = this.getMinMaxLatitudeLongitude();
|
|
516
|
+
loadedArgs = {
|
|
517
|
+
maps: this, isResized: this.isResize, minLatitude: minMaxLatitudeLongitude.minLatitude,
|
|
518
|
+
maxLatitude: minMaxLatitudeLongitude.maxLatitude, minLongitude: minMaxLatitudeLongitude.minLongitude,
|
|
519
|
+
maxLongitude: minMaxLatitudeLongitude.maxLongitude, cancel: false, name: 'Loaded'
|
|
520
|
+
};
|
|
521
|
+
this.trigger('loaded', loadedArgs);
|
|
522
|
+
};
|
|
510
523
|
/**
|
|
511
524
|
* To apply color to the initial selected marker
|
|
512
525
|
*
|
|
@@ -678,6 +691,20 @@ var Maps = /** @class */ (function (_super) {
|
|
|
678
691
|
this.element.appendChild(secondaryElement);
|
|
679
692
|
}
|
|
680
693
|
};
|
|
694
|
+
/**
|
|
695
|
+
* @returns {void}
|
|
696
|
+
*/
|
|
697
|
+
Maps.prototype.getMinMaxLatitudeLongitude = function () {
|
|
698
|
+
var element = document.getElementById(this.element.id).getBoundingClientRect();
|
|
699
|
+
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);
|
|
700
|
+
var maxPosition = this.isTileMap ? this.pointToLatLong(this.mapAreaRect.width, (this.mapAreaRect.height - this.mapAreaRect.y)) :
|
|
701
|
+
this.getGeoLocation(0, (this.mapAreaRect.x + element.left + this.mapAreaRect.width), (this.mapAreaRect.y + this.mapAreaRect.height));
|
|
702
|
+
var MinMaxLatitudeLongitude = {
|
|
703
|
+
minLatitude: minPosition.latitude, maxLatitude: maxPosition.latitude, minLongitude: minPosition.longitude,
|
|
704
|
+
maxLongitude: maxPosition.longitude
|
|
705
|
+
};
|
|
706
|
+
return MinMaxLatitudeLongitude;
|
|
707
|
+
};
|
|
681
708
|
/**
|
|
682
709
|
* @returns {void}
|
|
683
710
|
* @private
|
|
@@ -1605,7 +1632,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1605
1632
|
*/
|
|
1606
1633
|
Maps.prototype.zoomByPosition = function (centerPosition, zoomFactor) {
|
|
1607
1634
|
if (!this.isDestroyed) {
|
|
1608
|
-
this.zoomNotApplied = false;
|
|
1635
|
+
this.zoomNotApplied = this.isMarkerZoomCompleted = false;
|
|
1609
1636
|
var isRefresh = this.zoomSettings.zoomFactor === zoomFactor;
|
|
1610
1637
|
this.previousProjection = null;
|
|
1611
1638
|
if (!this.isTileMap && this.zoomModule) {
|
|
@@ -1702,15 +1729,14 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1702
1729
|
* @returns {void}
|
|
1703
1730
|
*/
|
|
1704
1731
|
Maps.prototype.addMarker = function (layerIndex, markerCollection) {
|
|
1705
|
-
if (!this.isDestroyed) {
|
|
1732
|
+
if (!this.isDestroyed && !isNullOrUndefined(this.markerModule)) {
|
|
1706
1733
|
var layerEle = document.getElementById(this.element.id + '_LayerIndex_' + layerIndex);
|
|
1707
1734
|
if (markerCollection.length > 0 && layerEle) {
|
|
1708
1735
|
for (var _i = 0, markerCollection_1 = markerCollection; _i < markerCollection_1.length; _i++) {
|
|
1709
1736
|
var newMarker = markerCollection_1[_i];
|
|
1710
1737
|
this.layersCollection[layerIndex].markerSettings.push(new MarkerSettings(this, 'markerSettings', newMarker));
|
|
1711
1738
|
}
|
|
1712
|
-
|
|
1713
|
-
markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
|
|
1739
|
+
this.markerModule.markerRender(this, layerEle, layerIndex, this.mapLayerPanel['currentFactor'], 'AddMarker');
|
|
1714
1740
|
this.arrangeTemplate();
|
|
1715
1741
|
}
|
|
1716
1742
|
}
|
|
@@ -1836,6 +1862,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1836
1862
|
Maps.prototype.zoomToCoordinates = function (minLatitude, minLongitude, maxLatitude, maxLongitude) {
|
|
1837
1863
|
var _a, _b;
|
|
1838
1864
|
if (!this.isDestroyed) {
|
|
1865
|
+
this.isMarkerZoomCompleted = false;
|
|
1839
1866
|
var centerLatitude = void 0;
|
|
1840
1867
|
var centerLongtitude = void 0;
|
|
1841
1868
|
var isTwoCoordinates = false;
|
|
@@ -1874,12 +1901,15 @@ var Maps = /** @class */ (function (_super) {
|
|
|
1874
1901
|
this.maxLongOfGivenLocation = maxLongitude;
|
|
1875
1902
|
this.zoomNotApplied = true;
|
|
1876
1903
|
this.scaleOfGivenLocation = calculateZoomLevel(minLatitude, maxLatitude, minLongitude, maxLongitude, this.mapAreaRect.width, this.mapAreaRect.height, this, true);
|
|
1904
|
+
var minMaxLatitudeLongitude = this.getMinMaxLatitudeLongitude();
|
|
1877
1905
|
var zoomArgs = {
|
|
1878
1906
|
cancel: false, name: 'zoom', type: zoomIn, maps: this,
|
|
1879
1907
|
tileTranslatePoint: {}, translatePoint: {},
|
|
1880
1908
|
tileZoomLevel: this.isTileMap ? { previous: this.tileZoomLevel, current: this.scaleOfGivenLocation } : {},
|
|
1881
1909
|
scale: !this.isTileMap ? { previous: this.scale, current: this.scaleOfGivenLocation } :
|
|
1882
|
-
{ previous: this.tileZoomLevel, current: this.scaleOfGivenLocation }
|
|
1910
|
+
{ previous: this.tileZoomLevel, current: this.scaleOfGivenLocation },
|
|
1911
|
+
minLatitude: minMaxLatitudeLongitude.minLatitude, maxLatitude: minMaxLatitudeLongitude.maxLatitude,
|
|
1912
|
+
minLongitude: minMaxLatitudeLongitude.minLongitude, maxLongitude: minMaxLatitudeLongitude.maxLongitude
|
|
1883
1913
|
};
|
|
1884
1914
|
this.trigger('zoom', zoomArgs);
|
|
1885
1915
|
this.refresh();
|
|
@@ -2051,6 +2081,9 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2051
2081
|
}
|
|
2052
2082
|
else if (newProp.zoomSettings.shouldZoomInitially !== oldProp.zoomSettings.shouldZoomInitially) {
|
|
2053
2083
|
this.zoomSettings.zoomFactor = 1;
|
|
2084
|
+
this.previousProjection = null;
|
|
2085
|
+
this.scale = this.isMarkerZoomCompleted ? null : this.scale;
|
|
2086
|
+
this.isMarkerZoomCompleted = !newProp.zoomSettings.shouldZoomInitially;
|
|
2054
2087
|
render = true;
|
|
2055
2088
|
}
|
|
2056
2089
|
else if (newProp.zoomSettings.enable !== oldProp.zoomSettings.enable) {
|
|
@@ -2149,6 +2182,12 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2149
2182
|
args: [this]
|
|
2150
2183
|
});
|
|
2151
2184
|
}
|
|
2185
|
+
if (this.isPolygonVisible()) {
|
|
2186
|
+
modules.push({
|
|
2187
|
+
member: 'Polygon',
|
|
2188
|
+
args: [this]
|
|
2189
|
+
});
|
|
2190
|
+
}
|
|
2152
2191
|
if (isVisible.tooltip) {
|
|
2153
2192
|
modules.push({
|
|
2154
2193
|
member: 'MapsTooltip',
|
|
@@ -2230,6 +2269,23 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2230
2269
|
});
|
|
2231
2270
|
return isVisible;
|
|
2232
2271
|
};
|
|
2272
|
+
/**
|
|
2273
|
+
* To find navigation line visibility
|
|
2274
|
+
*
|
|
2275
|
+
* @returns {boolean} - Returns whether the navigation lines are visible or not.
|
|
2276
|
+
*/
|
|
2277
|
+
Maps.prototype.isPolygonVisible = function () {
|
|
2278
|
+
var isVisible = false;
|
|
2279
|
+
Array.prototype.forEach.call(this.layers, function (layer) {
|
|
2280
|
+
for (var i = 0; i < layer.polygonSettings.polygons.length; i++) {
|
|
2281
|
+
if (layer.polygonSettings.polygons.length > 0) {
|
|
2282
|
+
isVisible = true;
|
|
2283
|
+
break;
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
});
|
|
2287
|
+
return isVisible;
|
|
2288
|
+
};
|
|
2233
2289
|
/**
|
|
2234
2290
|
* To find marker visibility
|
|
2235
2291
|
*/
|
|
@@ -2343,23 +2399,31 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2343
2399
|
if (isHighlight === void 0) { isHighlight = false; }
|
|
2344
2400
|
var bubbles;
|
|
2345
2401
|
var markers;
|
|
2346
|
-
var
|
|
2402
|
+
var polygonSetting;
|
|
2347
2403
|
for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) {
|
|
2348
2404
|
var layer = layers_1[_i];
|
|
2349
2405
|
isLayerVisible = layer.visible || isLayerVisible;
|
|
2350
2406
|
if (layer.visible) {
|
|
2351
2407
|
bubbles = layer.bubbleSettings;
|
|
2352
2408
|
markers = layer.markerSettings;
|
|
2353
|
-
|
|
2409
|
+
polygonSetting = layer.polygonSettings;
|
|
2410
|
+
var navigationLine = layer.navigationLineSettings;
|
|
2354
2411
|
for (var _a = 0, navigationLine_1 = navigationLine; _a < navigationLine_1.length; _a++) {
|
|
2355
2412
|
var navigation = navigationLine_1[_a];
|
|
2356
2413
|
if (navigation.visible) {
|
|
2357
|
-
isSelection = navigation.highlightSettings.enable || isSelection;
|
|
2358
|
-
isHighlight = navigation.selectionSettings.enable || isHighlight;
|
|
2414
|
+
isSelection = (!isNullOrUndefined(navigation.highlightSettings) && navigation.highlightSettings.enable) || isSelection;
|
|
2415
|
+
isHighlight = (!isNullOrUndefined(navigation.selectionSettings) && navigation.selectionSettings.enable) || isHighlight;
|
|
2359
2416
|
}
|
|
2360
2417
|
}
|
|
2361
|
-
for (var _b = 0,
|
|
2362
|
-
var
|
|
2418
|
+
for (var _b = 0, _c = polygonSetting.polygons; _b < _c.length; _b++) {
|
|
2419
|
+
var polygon = _c[_b];
|
|
2420
|
+
if (polygon.points.length > 0) {
|
|
2421
|
+
isSelection = layer.polygonSettings.highlightSettings.enable || isSelection;
|
|
2422
|
+
isHighlight = layer.polygonSettings.selectionSettings.enable || isHighlight;
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
for (var _d = 0, markers_1 = markers; _d < markers_1.length; _d++) {
|
|
2426
|
+
var marker = markers_1[_d];
|
|
2363
2427
|
if (marker.visible) {
|
|
2364
2428
|
istooltipVisible = marker.tooltipSettings.visible || istooltipVisible;
|
|
2365
2429
|
isSelection = marker.selectionSettings.enable || isSelection;
|
|
@@ -2369,8 +2433,8 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2369
2433
|
break;
|
|
2370
2434
|
}
|
|
2371
2435
|
}
|
|
2372
|
-
for (var
|
|
2373
|
-
var bubble = bubbles_1[
|
|
2436
|
+
for (var _e = 0, bubbles_1 = bubbles; _e < bubbles_1.length; _e++) {
|
|
2437
|
+
var bubble = bubbles_1[_e];
|
|
2374
2438
|
if (bubble.visible) {
|
|
2375
2439
|
istooltipVisible = bubble.tooltipSettings.visible || istooltipVisible;
|
|
2376
2440
|
isSelection = bubble.selectionSettings.enable || isSelection;
|
|
@@ -2454,7 +2518,7 @@ var Maps = /** @class */ (function (_super) {
|
|
|
2454
2518
|
Maps.prototype.pointToLatLong = function (pageX, pageY) {
|
|
2455
2519
|
var latitude = 0;
|
|
2456
2520
|
var longitude = 0;
|
|
2457
|
-
if (!this.isDestroyed) {
|
|
2521
|
+
if (!this.isDestroyed && !isNullOrUndefined(this.translatePoint)) {
|
|
2458
2522
|
var padding = this.layers[this.layers.length - 1].layerType === 'GoogleStaticMap' ? 0 : 10;
|
|
2459
2523
|
pageY = pageY + padding;
|
|
2460
2524
|
var mapSize = 256 * Math.pow(2, this.tileZoomLevel);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Property, ChildProperty, Complex, Collection } from '@syncfusion/ej2-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { Alignment, LegendPosition, LegendType, LegendMode, ShapeLayerType, Type, MarkerType, Orientation, MapAjax } from '../../index';import { SmartLabelMode, IntersectAction } from '../../index';import { Theme } from './theme';import { Point, GeoLocation } from '../utils/helper';import { BingMapType, LegendArrangement, LegendShape, BubbleType, StaticMapType, ToolbarItem } from '../utils/enum';import { AnnotationAlignment, GeometryType, LabelPosition, LabelIntersectAction } from '../index';
|
|
1
|
+
import { Property, ChildProperty, Complex, Collection } from '@syncfusion/ej2-base';import { DataManager, Query } from '@syncfusion/ej2-data';import { Alignment, LegendPosition, LegendType, LegendMode, ShapeLayerType, Type, MarkerType, Orientation, MapAjax } from '../../index';import { SmartLabelMode, IntersectAction } from '../../index';import { Theme } from './theme';import { Point, GeoLocation, Coordinate } from '../utils/helper';import { BingMapType, LegendArrangement, LegendShape, BubbleType, StaticMapType, ToolbarItem } from '../utils/enum';import { AnnotationAlignment, GeometryType, LabelPosition, LabelIntersectAction } from '../index';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Interface for a class Annotation
|
|
@@ -7,7 +7,7 @@ export interface AnnotationModel {
|
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Gets or sets the content for the annotation in maps.
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* @default ''
|
|
12
12
|
* @aspType string
|
|
13
13
|
*/
|
|
@@ -15,14 +15,14 @@ export interface AnnotationModel {
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Gets or sets the x position of the annotation in pixel or percentage format.
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
19
|
* @default '0px'
|
|
20
20
|
*/
|
|
21
21
|
x?: string;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Gets or sets the y position of the annotation in pixel or percentage format.
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
* @default '0px'
|
|
27
27
|
*/
|
|
28
28
|
y?: string;
|
|
@@ -57,35 +57,35 @@ export interface ArrowModel {
|
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Gets or sets the type of the position to place the arrow in navigation lines.
|
|
60
|
-
*
|
|
60
|
+
*
|
|
61
61
|
* @default 'Start'
|
|
62
62
|
*/
|
|
63
63
|
position?: string;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Enables or disables the visibility of the arrow in navigation line.
|
|
67
|
-
*
|
|
67
|
+
*
|
|
68
68
|
* @default false
|
|
69
69
|
*/
|
|
70
70
|
showArrow?: boolean;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Gets or sets the size of the arrow in navigation line in maps.
|
|
74
|
-
*
|
|
74
|
+
*
|
|
75
75
|
* @default 2
|
|
76
76
|
*/
|
|
77
77
|
size?: number;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Gets or sets the color for the arrow in navigation line.
|
|
81
|
-
*
|
|
81
|
+
*
|
|
82
82
|
* @default 'black'
|
|
83
83
|
*/
|
|
84
84
|
color?: string;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* Gets or sets the offset value to position the arrow from the navigation line.
|
|
88
|
-
*
|
|
88
|
+
*
|
|
89
89
|
* @default 0
|
|
90
90
|
*/
|
|
91
91
|
offSet?: number;
|
|
@@ -266,26 +266,26 @@ export interface ZoomToolbarTooltipSettingsModel {
|
|
|
266
266
|
* Gets or sets the font family of the text in the tooltip of the zoom toolbar.
|
|
267
267
|
*
|
|
268
268
|
* @default ''
|
|
269
|
-
|
|
269
|
+
*/
|
|
270
270
|
fontFamily?: string;
|
|
271
271
|
|
|
272
272
|
/**
|
|
273
273
|
* Gets or sets the font style of the text in the tooltip of the zoom toolbar.
|
|
274
274
|
*
|
|
275
275
|
* @default ''
|
|
276
|
-
|
|
276
|
+
*/
|
|
277
277
|
fontStyle?: string;
|
|
278
278
|
|
|
279
279
|
/**
|
|
280
280
|
* Gets or sets the font weight of the text in the tooltip of the zoom toolbar.
|
|
281
281
|
*
|
|
282
282
|
* @default ''
|
|
283
|
-
|
|
283
|
+
*/
|
|
284
284
|
fontWeight?: string;
|
|
285
285
|
|
|
286
286
|
/**
|
|
287
287
|
* Gets or sets the size of the text in the tooltip of the zoom toolbar.
|
|
288
|
-
*
|
|
288
|
+
*
|
|
289
289
|
* @default ''
|
|
290
290
|
*/
|
|
291
291
|
fontSize?: string;
|
|
@@ -294,7 +294,7 @@ export interface ZoomToolbarTooltipSettingsModel {
|
|
|
294
294
|
* Gets or sets the font opacity of the text in the tooltip of the zoom toolbar.
|
|
295
295
|
*
|
|
296
296
|
* @default 1
|
|
297
|
-
|
|
297
|
+
*/
|
|
298
298
|
fontOpacity?: number;
|
|
299
299
|
|
|
300
300
|
}
|
|
@@ -586,7 +586,7 @@ export interface MarkerClusterSettingsModel {
|
|
|
586
586
|
|
|
587
587
|
/**
|
|
588
588
|
* Gets or sets the URL path for the marker cluster when the cluster shape is set as image in maps.
|
|
589
|
-
*
|
|
589
|
+
*
|
|
590
590
|
* @default ''
|
|
591
591
|
*/
|
|
592
592
|
imageUrl?: string;
|
|
@@ -804,6 +804,78 @@ export interface HighlightSettingsModel {
|
|
|
804
804
|
|
|
805
805
|
}
|
|
806
806
|
|
|
807
|
+
/**
|
|
808
|
+
* Interface for a class PolygonSetting
|
|
809
|
+
*/
|
|
810
|
+
export interface PolygonSettingModel {
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* Gets or sets the width of the border of the polygon shape.
|
|
814
|
+
*
|
|
815
|
+
* @default 1
|
|
816
|
+
*/
|
|
817
|
+
borderWidth?: number;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Gets or sets the opacity of the border of the polygon shape.
|
|
821
|
+
*
|
|
822
|
+
* @default 1
|
|
823
|
+
*/
|
|
824
|
+
borderOpacity?: number;
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Gets or sets the opacity of the polygon shape.
|
|
828
|
+
*
|
|
829
|
+
* @default 1
|
|
830
|
+
*/
|
|
831
|
+
opacity?: number;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Gets or sets the color to be used in the border of the polygon shape.
|
|
835
|
+
*
|
|
836
|
+
* @default 'black'
|
|
837
|
+
*/
|
|
838
|
+
borderColor?: string;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Gets or sets the color to be filled in the polygon shape.
|
|
842
|
+
*
|
|
843
|
+
* @default 'black'
|
|
844
|
+
*/
|
|
845
|
+
fill?: string;
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Gets or sets the points that define the polygon shape.
|
|
849
|
+
* This property holds a collection of coordinates that define the polygon shape.
|
|
850
|
+
*
|
|
851
|
+
* @default []
|
|
852
|
+
*/
|
|
853
|
+
points?: Coordinate[];
|
|
854
|
+
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Interface for a class PolygonSettings
|
|
859
|
+
*/
|
|
860
|
+
export interface PolygonSettingsModel {
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Gets or sets the properties of all the polygon shapes that will be displayed in a layer.
|
|
864
|
+
*/
|
|
865
|
+
polygons?: PolygonSettingModel[];
|
|
866
|
+
|
|
867
|
+
/**
|
|
868
|
+
* Gets or sets the properties for selecting polygon shapes in a map layer.
|
|
869
|
+
*/
|
|
870
|
+
selectionSettings?: SelectionSettingsModel;
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* Gets or sets the properties for highlighting polygon shapes in a map layer.
|
|
874
|
+
*/
|
|
875
|
+
highlightSettings?: HighlightSettingsModel;
|
|
876
|
+
|
|
877
|
+
}
|
|
878
|
+
|
|
807
879
|
/**
|
|
808
880
|
* Interface for a class NavigationLineSettings
|
|
809
881
|
*/
|
|
@@ -1098,7 +1170,7 @@ export interface ZoomSettingsModel {
|
|
|
1098
1170
|
|
|
1099
1171
|
/**
|
|
1100
1172
|
* Gets or sets the color for the toolbar in maps.
|
|
1101
|
-
*
|
|
1173
|
+
*
|
|
1102
1174
|
* @default null
|
|
1103
1175
|
|
|
1104
1176
|
*/
|
|
@@ -1106,7 +1178,7 @@ export interface ZoomSettingsModel {
|
|
|
1106
1178
|
|
|
1107
1179
|
/**
|
|
1108
1180
|
* Gets or sets the color for the zoom toolbar when the mouse has hovered on toolbar element in maps.
|
|
1109
|
-
*
|
|
1181
|
+
*
|
|
1110
1182
|
* @default null
|
|
1111
1183
|
|
|
1112
1184
|
*/
|
|
@@ -1114,7 +1186,7 @@ export interface ZoomSettingsModel {
|
|
|
1114
1186
|
|
|
1115
1187
|
/**
|
|
1116
1188
|
* Gets or sets the color for the zooming toolbar when clicking the zooming toolbar in maps.
|
|
1117
|
-
*
|
|
1189
|
+
*
|
|
1118
1190
|
* @default null
|
|
1119
1191
|
|
|
1120
1192
|
*/
|
|
@@ -1193,14 +1265,14 @@ export interface ZoomSettingsModel {
|
|
|
1193
1265
|
|
|
1194
1266
|
/**
|
|
1195
1267
|
* Enables or disables the ability to zoom based on the marker position while rendering the maps.
|
|
1196
|
-
*
|
|
1268
|
+
*
|
|
1197
1269
|
* @default false
|
|
1198
1270
|
*/
|
|
1199
1271
|
shouldZoomInitially?: boolean;
|
|
1200
1272
|
|
|
1201
1273
|
/**
|
|
1202
1274
|
* Enables or disables the zoom to set to the initial State.
|
|
1203
|
-
*
|
|
1275
|
+
*
|
|
1204
1276
|
* @default true
|
|
1205
1277
|
*/
|
|
1206
1278
|
resetToInitial?: boolean;
|
|
@@ -1294,7 +1366,7 @@ export interface LegendSettingsModel {
|
|
|
1294
1366
|
|
|
1295
1367
|
/**
|
|
1296
1368
|
* Enables or disables the visibility of the inverted pointer in interactive legend in maps.
|
|
1297
|
-
*
|
|
1369
|
+
*
|
|
1298
1370
|
* @default false
|
|
1299
1371
|
*/
|
|
1300
1372
|
invertedPointer?: boolean;
|
|
@@ -1408,7 +1480,7 @@ export interface LegendSettingsModel {
|
|
|
1408
1480
|
|
|
1409
1481
|
/**
|
|
1410
1482
|
* Gets or sets the color of the legend in maps.
|
|
1411
|
-
*
|
|
1483
|
+
*
|
|
1412
1484
|
* @default null
|
|
1413
1485
|
*/
|
|
1414
1486
|
fill?: string;
|
|
@@ -1474,14 +1546,14 @@ export interface DataLabelSettingsModel {
|
|
|
1474
1546
|
|
|
1475
1547
|
/**
|
|
1476
1548
|
* Gets or sets the background color for the data labels in maps.
|
|
1477
|
-
*
|
|
1549
|
+
*
|
|
1478
1550
|
* @default 'black'
|
|
1479
1551
|
*/
|
|
1480
1552
|
fill?: string;
|
|
1481
1553
|
|
|
1482
1554
|
/**
|
|
1483
1555
|
* Gets or sets the opacity of the data labels in maps.
|
|
1484
|
-
*
|
|
1556
|
+
*
|
|
1485
1557
|
* @default 1
|
|
1486
1558
|
*/
|
|
1487
1559
|
opacity?: number;
|
|
@@ -1962,6 +2034,12 @@ export interface LayerSettingsModel {
|
|
|
1962
2034
|
*/
|
|
1963
2035
|
navigationLineSettings?: NavigationLineSettingsModel[];
|
|
1964
2036
|
|
|
2037
|
+
/**
|
|
2038
|
+
* Gets or sets the properties of the polygon shapes that will be rendered on a map layer.
|
|
2039
|
+
* The selection and highlight settings for polygon shapes can also be defined.
|
|
2040
|
+
*/
|
|
2041
|
+
polygonSettings?: PolygonSettingsModel;
|
|
2042
|
+
|
|
1965
2043
|
/**
|
|
1966
2044
|
* Gets or sets the options for customizing the tooltip of the layers in maps.
|
|
1967
2045
|
*/
|
|
@@ -2004,7 +2082,7 @@ export interface MapsAreaSettingsModel {
|
|
|
2004
2082
|
|
|
2005
2083
|
/**
|
|
2006
2084
|
* Gets or sets the background color for the map area.
|
|
2007
|
-
*
|
|
2085
|
+
*
|
|
2008
2086
|
* @default null
|
|
2009
2087
|
*/
|
|
2010
2088
|
background?: string;
|
package/src/maps/model/base.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ import { ChildProperty } from '@syncfusion/ej2-base';
|
|
|
5
5
|
import { DataManager, Query } from '@syncfusion/ej2-data';
|
|
6
6
|
import { Alignment, LegendPosition, LegendType, LegendMode, ShapeLayerType, Type, MarkerType, Orientation, MapAjax } from '../../index';
|
|
7
7
|
import { SmartLabelMode, IntersectAction } from '../../index';
|
|
8
|
-
import { BorderModel, ColorMappingSettingsModel, FontModel, CommonTitleSettingsModel, NavigationLineSettingsModel, ZoomToolbarTooltipSettingsModel } from './base-model';
|
|
8
|
+
import { BorderModel, ColorMappingSettingsModel, FontModel, CommonTitleSettingsModel, NavigationLineSettingsModel, PolygonSettingsModel, ZoomToolbarTooltipSettingsModel } from './base-model';
|
|
9
9
|
import { MarkerSettingsModel, MarkerClusterSettingsModel, ShapeSettingsModel, BubbleSettingsModel, ArrowModel } from './base-model';
|
|
10
|
-
import { DataLabelSettingsModel, TooltipSettingsModel, SubTitleSettingsModel, SelectionSettingsModel } from './base-model';
|
|
10
|
+
import { DataLabelSettingsModel, TooltipSettingsModel, SubTitleSettingsModel, SelectionSettingsModel, PolygonSettingModel } from './base-model';
|
|
11
11
|
import { HighlightSettingsModel, ToggleLegendSettingsModel, ConnectorLineSettingsModel } from './base-model';
|
|
12
12
|
import { InitialShapeSelectionSettingsModel, InitialMarkerSelectionSettingsModel, ZoomToolbarSettingsModel, ZoomToolbarButtonSettingsModel } from './base-model';
|
|
13
|
-
import { Point, GeoLocation } from '../utils/helper';
|
|
13
|
+
import { Point, GeoLocation, Coordinate } from '../utils/helper';
|
|
14
14
|
import { BingMapType, LegendArrangement, LegendShape, BubbleType, StaticMapType, ToolbarItem } from '../utils/enum';
|
|
15
15
|
import { AnnotationAlignment, GeometryType, LabelPosition, LabelIntersectAction } from '../index';
|
|
16
16
|
/**
|
|
@@ -236,19 +236,19 @@ export declare class ZoomToolbarTooltipSettings extends ChildProperty<ZoomToolba
|
|
|
236
236
|
* Gets or sets the font family of the text in the tooltip of the zoom toolbar.
|
|
237
237
|
*
|
|
238
238
|
* @default ''
|
|
239
|
-
|
|
239
|
+
*/
|
|
240
240
|
fontFamily: string;
|
|
241
241
|
/**
|
|
242
242
|
* Gets or sets the font style of the text in the tooltip of the zoom toolbar.
|
|
243
243
|
*
|
|
244
244
|
* @default ''
|
|
245
|
-
|
|
245
|
+
*/
|
|
246
246
|
fontStyle: string;
|
|
247
247
|
/**
|
|
248
248
|
* Gets or sets the font weight of the text in the tooltip of the zoom toolbar.
|
|
249
249
|
*
|
|
250
250
|
* @default ''
|
|
251
|
-
|
|
251
|
+
*/
|
|
252
252
|
fontWeight: string;
|
|
253
253
|
/**
|
|
254
254
|
* Gets or sets the size of the text in the tooltip of the zoom toolbar.
|
|
@@ -260,7 +260,7 @@ export declare class ZoomToolbarTooltipSettings extends ChildProperty<ZoomToolba
|
|
|
260
260
|
* Gets or sets the font opacity of the text in the tooltip of the zoom toolbar.
|
|
261
261
|
*
|
|
262
262
|
* @default 1
|
|
263
|
-
|
|
263
|
+
*/
|
|
264
264
|
fontOpacity: number;
|
|
265
265
|
}
|
|
266
266
|
/**
|
|
@@ -718,6 +718,66 @@ export declare class HighlightSettings extends ChildProperty<HighlightSettings>
|
|
|
718
718
|
*/
|
|
719
719
|
border: BorderModel;
|
|
720
720
|
}
|
|
721
|
+
/**
|
|
722
|
+
* Defines the properties for a single polygon shape to render over the Maps, such as coordinates, fill, border, and opacity.
|
|
723
|
+
*/
|
|
724
|
+
export declare class PolygonSetting extends ChildProperty<PolygonSettings> {
|
|
725
|
+
/**
|
|
726
|
+
* Gets or sets the width of the border of the polygon shape.
|
|
727
|
+
*
|
|
728
|
+
* @default 1
|
|
729
|
+
*/
|
|
730
|
+
borderWidth: number;
|
|
731
|
+
/**
|
|
732
|
+
* Gets or sets the opacity of the border of the polygon shape.
|
|
733
|
+
*
|
|
734
|
+
* @default 1
|
|
735
|
+
*/
|
|
736
|
+
borderOpacity: number;
|
|
737
|
+
/**
|
|
738
|
+
* Gets or sets the opacity of the polygon shape.
|
|
739
|
+
*
|
|
740
|
+
* @default 1
|
|
741
|
+
*/
|
|
742
|
+
opacity: number;
|
|
743
|
+
/**
|
|
744
|
+
* Gets or sets the color to be used in the border of the polygon shape.
|
|
745
|
+
*
|
|
746
|
+
* @default 'black'
|
|
747
|
+
*/
|
|
748
|
+
borderColor: string;
|
|
749
|
+
/**
|
|
750
|
+
* Gets or sets the color to be filled in the polygon shape.
|
|
751
|
+
*
|
|
752
|
+
* @default 'black'
|
|
753
|
+
*/
|
|
754
|
+
fill: string;
|
|
755
|
+
/**
|
|
756
|
+
* Gets or sets the points that define the polygon shape.
|
|
757
|
+
* This property holds a collection of coordinates that define the polygon shape.
|
|
758
|
+
*
|
|
759
|
+
* @default []
|
|
760
|
+
*/
|
|
761
|
+
points: Coordinate[];
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Defines the properties of the polygon shapes that will be rendered on a map layer.
|
|
765
|
+
* The selection and highlight settings for polygon shapes can also be defined.
|
|
766
|
+
*/
|
|
767
|
+
export declare class PolygonSettings extends ChildProperty<PolygonSettings> {
|
|
768
|
+
/**
|
|
769
|
+
* Gets or sets the properties of all the polygon shapes that will be displayed in a layer.
|
|
770
|
+
*/
|
|
771
|
+
polygons: PolygonSettingModel[];
|
|
772
|
+
/**
|
|
773
|
+
* Gets or sets the properties for selecting polygon shapes in a map layer.
|
|
774
|
+
*/
|
|
775
|
+
selectionSettings: SelectionSettingsModel;
|
|
776
|
+
/**
|
|
777
|
+
* Gets or sets the properties for highlighting polygon shapes in a map layer.
|
|
778
|
+
*/
|
|
779
|
+
highlightSettings: HighlightSettingsModel;
|
|
780
|
+
}
|
|
721
781
|
/**
|
|
722
782
|
* Gets or sets the options to customize the navigation lines in maps which is used to connect different locations.
|
|
723
783
|
*/
|
|
@@ -1693,6 +1753,11 @@ export declare class LayerSettings extends ChildProperty<LayerSettings> {
|
|
|
1693
1753
|
* Gets or sets the options for customizing the navigation lines in maps.
|
|
1694
1754
|
*/
|
|
1695
1755
|
navigationLineSettings: NavigationLineSettingsModel[];
|
|
1756
|
+
/**
|
|
1757
|
+
* Gets or sets the properties of the polygon shapes that will be rendered on a map layer.
|
|
1758
|
+
* The selection and highlight settings for polygon shapes can also be defined.
|
|
1759
|
+
*/
|
|
1760
|
+
polygonSettings: PolygonSettingsModel;
|
|
1696
1761
|
/**
|
|
1697
1762
|
* Gets or sets the options for customizing the tooltip of the layers in maps.
|
|
1698
1763
|
*/
|