@syncfusion/ej2-maps 23.2.7 → 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 +14 -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 +1041 -747
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +1066 -757
- 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/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 +79 -15
- 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
|
@@ -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
|
*/
|
package/src/maps/model/base.js
CHANGED
|
@@ -527,6 +527,56 @@ var HighlightSettings = /** @class */ (function (_super) {
|
|
|
527
527
|
return HighlightSettings;
|
|
528
528
|
}(ChildProperty));
|
|
529
529
|
export { HighlightSettings };
|
|
530
|
+
/**
|
|
531
|
+
* Defines the properties for a single polygon shape to render over the Maps, such as coordinates, fill, border, and opacity.
|
|
532
|
+
*/
|
|
533
|
+
var PolygonSetting = /** @class */ (function (_super) {
|
|
534
|
+
__extends(PolygonSetting, _super);
|
|
535
|
+
function PolygonSetting() {
|
|
536
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
537
|
+
}
|
|
538
|
+
__decorate([
|
|
539
|
+
Property(1)
|
|
540
|
+
], PolygonSetting.prototype, "borderWidth", void 0);
|
|
541
|
+
__decorate([
|
|
542
|
+
Property(1)
|
|
543
|
+
], PolygonSetting.prototype, "borderOpacity", void 0);
|
|
544
|
+
__decorate([
|
|
545
|
+
Property(1)
|
|
546
|
+
], PolygonSetting.prototype, "opacity", void 0);
|
|
547
|
+
__decorate([
|
|
548
|
+
Property('#FF471A')
|
|
549
|
+
], PolygonSetting.prototype, "borderColor", void 0);
|
|
550
|
+
__decorate([
|
|
551
|
+
Property('#FF471A')
|
|
552
|
+
], PolygonSetting.prototype, "fill", void 0);
|
|
553
|
+
__decorate([
|
|
554
|
+
Property([])
|
|
555
|
+
], PolygonSetting.prototype, "points", void 0);
|
|
556
|
+
return PolygonSetting;
|
|
557
|
+
}(ChildProperty));
|
|
558
|
+
export { PolygonSetting };
|
|
559
|
+
/**
|
|
560
|
+
* Defines the properties of the polygon shapes that will be rendered on a map layer.
|
|
561
|
+
* The selection and highlight settings for polygon shapes can also be defined.
|
|
562
|
+
*/
|
|
563
|
+
var PolygonSettings = /** @class */ (function (_super) {
|
|
564
|
+
__extends(PolygonSettings, _super);
|
|
565
|
+
function PolygonSettings() {
|
|
566
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
567
|
+
}
|
|
568
|
+
__decorate([
|
|
569
|
+
Collection([], PolygonSetting)
|
|
570
|
+
], PolygonSettings.prototype, "polygons", void 0);
|
|
571
|
+
__decorate([
|
|
572
|
+
Complex({}, SelectionSettings)
|
|
573
|
+
], PolygonSettings.prototype, "selectionSettings", void 0);
|
|
574
|
+
__decorate([
|
|
575
|
+
Complex({}, HighlightSettings)
|
|
576
|
+
], PolygonSettings.prototype, "highlightSettings", void 0);
|
|
577
|
+
return PolygonSettings;
|
|
578
|
+
}(ChildProperty));
|
|
579
|
+
export { PolygonSettings };
|
|
530
580
|
/**
|
|
531
581
|
* Gets or sets the options to customize the navigation lines in maps which is used to connect different locations.
|
|
532
582
|
*/
|
|
@@ -1150,6 +1200,9 @@ var LayerSettings = /** @class */ (function (_super) {
|
|
|
1150
1200
|
__decorate([
|
|
1151
1201
|
Collection([], NavigationLineSettings)
|
|
1152
1202
|
], LayerSettings.prototype, "navigationLineSettings", void 0);
|
|
1203
|
+
__decorate([
|
|
1204
|
+
Complex({}, PolygonSettings)
|
|
1205
|
+
], LayerSettings.prototype, "polygonSettings", void 0);
|
|
1153
1206
|
__decorate([
|
|
1154
1207
|
Complex({}, TooltipSettings)
|
|
1155
1208
|
], LayerSettings.prototype, "tooltipSettings", void 0);
|
|
@@ -25,10 +25,31 @@ export interface IPrintEventArgs extends IMapsEventArgs {
|
|
|
25
25
|
*/
|
|
26
26
|
htmlContent: Element;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* This class contains the minimum and maximum latitude and longitude coordinates of the map's visible area
|
|
30
|
+
*/
|
|
31
|
+
export interface IMinMaxLatitudeLongitude {
|
|
32
|
+
/**
|
|
33
|
+
* Gets the minimum latitude value from the visible map area.
|
|
34
|
+
*/
|
|
35
|
+
minLatitude: number;
|
|
36
|
+
/**
|
|
37
|
+
* Gets the maximum latitude value from the visible map area.
|
|
38
|
+
*/
|
|
39
|
+
maxLatitude: number;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the minimum longitude value from the visible map area.
|
|
42
|
+
*/
|
|
43
|
+
minLongitude: number;
|
|
44
|
+
/**
|
|
45
|
+
* Gets the maximum longitude value from the visible map area.
|
|
46
|
+
*/
|
|
47
|
+
maxLongitude: number;
|
|
48
|
+
}
|
|
28
49
|
/**
|
|
29
50
|
* Specifies the event arguments for the loaded event in maps.
|
|
30
51
|
*/
|
|
31
|
-
export interface ILoadedEventArgs extends IMapsEventArgs {
|
|
52
|
+
export interface ILoadedEventArgs extends IMinMaxLatitudeLongitude, IMapsEventArgs {
|
|
32
53
|
/**
|
|
33
54
|
* Defines the current maps instance.
|
|
34
55
|
*
|
|
@@ -692,7 +713,7 @@ export interface IAnnotationRenderingEventArgs extends IMapsEventArgs {
|
|
|
692
713
|
/**
|
|
693
714
|
* Specifies the event arguments for the pan event in maps.
|
|
694
715
|
*/
|
|
695
|
-
export interface IMapPanEventArgs extends IMapsEventArgs {
|
|
716
|
+
export interface IMapPanEventArgs extends IMinMaxLatitudeLongitude, IMapsEventArgs {
|
|
696
717
|
/**
|
|
697
718
|
* Defines the current maps instance.
|
|
698
719
|
*
|
|
@@ -727,7 +748,7 @@ export interface IMapPanEventArgs extends IMapsEventArgs {
|
|
|
727
748
|
/**
|
|
728
749
|
* Specifies the event arguments for zoom event in maps.
|
|
729
750
|
*/
|
|
730
|
-
export interface IMapZoomEventArgs extends IMapsEventArgs {
|
|
751
|
+
export interface IMapZoomEventArgs extends IMinMaxLatitudeLongitude, IMapsEventArgs {
|
|
731
752
|
/**
|
|
732
753
|
* Defines the current maps instance.
|
|
733
754
|
*
|
|
@@ -56,6 +56,7 @@ var Highlight = /** @class */ (function () {
|
|
|
56
56
|
targetEle.getAttribute('class') !== 'MarkerselectionMapStyle' &&
|
|
57
57
|
targetEle.getAttribute('class') !== 'BubbleselectionMapStyle' &&
|
|
58
58
|
targetEle.getAttribute('class') !== 'navigationlineselectionMapStyle' &&
|
|
59
|
+
targetEle.getAttribute('class') !== 'PolygonselectionMapStyle' &&
|
|
59
60
|
targetEle.getAttribute('class') !== 'LineselectionMapStyle') {
|
|
60
61
|
layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
61
62
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -85,6 +86,11 @@ var Highlight = /** @class */ (function () {
|
|
|
85
86
|
data = this.maps.layers[layerIndex].markerSettings[marker].dataSource[dataIndex];
|
|
86
87
|
this.highlightSettings = this.maps.layers[layerIndex].markerSettings[marker].highlightSettings;
|
|
87
88
|
}
|
|
89
|
+
else if (targetEle.id.indexOf('_PolygonIndex_') > -1) {
|
|
90
|
+
dataIndex = parseInt(targetEle.id.split('_PolygonIndex_')[1].split('_')[0], 10);
|
|
91
|
+
data = this.maps.layers[layerIndex].polygonSettings.polygons[dataIndex].points;
|
|
92
|
+
this.highlightSettings = this.maps.layers[layerIndex].polygonSettings.highlightSettings;
|
|
93
|
+
}
|
|
88
94
|
else {
|
|
89
95
|
var index = parseInt(targetEle.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
90
96
|
layerIndex = parseInt(targetEle.id.split('_LayerIndex_')[1].split('_')[0], 10);
|
|
@@ -71,6 +71,12 @@ var Selection = /** @class */ (function () {
|
|
|
71
71
|
this.selectionsettings = this.maps.layers[layerIndex].markerSettings[markerIndex].selectionSettings;
|
|
72
72
|
this.selectionType = 'Marker';
|
|
73
73
|
}
|
|
74
|
+
else if (targetElement.id.indexOf('_PolygonIndex_') > -1) {
|
|
75
|
+
dataIndex = parseInt(targetElement.id.split('_PolygonIndex_')[1].split('_')[0], 10);
|
|
76
|
+
data = this.maps.layers[layerIndex].polygonSettings.polygons[dataIndex].points;
|
|
77
|
+
this.selectionsettings = this.maps.layers[layerIndex].polygonSettings.selectionSettings;
|
|
78
|
+
this.selectionType = 'Polygon';
|
|
79
|
+
}
|
|
74
80
|
else if (targetElement.id.indexOf('NavigationIndex') > -1) {
|
|
75
81
|
var index = parseInt(targetElement.id.split('_NavigationIndex_')[1].split('_')[0], 10);
|
|
76
82
|
shapeData = null;
|
|
@@ -249,6 +255,10 @@ var Selection = /** @class */ (function () {
|
|
|
249
255
|
_this.maps.navigationSelectionClass = getElement(_this.selectionType + 'selectionMap');
|
|
250
256
|
_this.maps.selectedNavigationElementId.push(targetElement.getAttribute('id'));
|
|
251
257
|
}
|
|
258
|
+
if (targetElement.getAttribute('class') === 'PolygonselectionMapStyle') {
|
|
259
|
+
_this.maps.polygonSelectionClass = getElement(_this.selectionType + 'selectionMap');
|
|
260
|
+
_this.maps.selectedPolygonElementId.push(targetElement.getAttribute('id'));
|
|
261
|
+
}
|
|
252
262
|
}
|
|
253
263
|
}
|
|
254
264
|
});
|
|
@@ -288,6 +298,9 @@ var Selection = /** @class */ (function () {
|
|
|
288
298
|
if (this.selectionType === 'navigationline') {
|
|
289
299
|
this.maps.selectedBubbleElementId.splice(this.maps.selectedBubbleElementId.indexOf(targetElement.getAttribute('id')), 1);
|
|
290
300
|
}
|
|
301
|
+
if (this.selectionType === 'Polygon') {
|
|
302
|
+
this.maps.selectedPolygonElementId.splice(this.maps.selectedPolygonElementId.indexOf(targetElement.getAttribute('id')), 1);
|
|
303
|
+
}
|
|
291
304
|
};
|
|
292
305
|
/**
|
|
293
306
|
* Get module name.
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { tooltipRender } from '../index';
|
|
2
2
|
import { Tooltip } from '@syncfusion/ej2-svg-base';
|
|
3
|
-
import { createElement, Browser, isNullOrUndefined, extend, remove
|
|
3
|
+
import { createElement, Browser, isNullOrUndefined, extend, remove } from '@syncfusion/ej2-base';
|
|
4
4
|
import { getMousePosition, Internalize, checkPropertyPath, getValueFromObject, formatValue, convertStringToValue } from '../utils/helper';
|
|
5
|
-
import { click } from '../model/constants';
|
|
6
5
|
/**
|
|
7
6
|
* Map Tooltip
|
|
8
7
|
*/
|
|
@@ -22,7 +21,6 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
22
21
|
var target;
|
|
23
22
|
var touchArg;
|
|
24
23
|
var tooltipArgs;
|
|
25
|
-
var tooltipTemplateElement;
|
|
26
24
|
if (e.type.indexOf('touch') !== -1) {
|
|
27
25
|
this.isTouch = true;
|
|
28
26
|
touchArg = e;
|
|
@@ -173,7 +171,12 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
173
171
|
id: this.maps.element.id + '_mapsTooltip',
|
|
174
172
|
className: 'EJ2-maps-Tooltip'
|
|
175
173
|
});
|
|
176
|
-
|
|
174
|
+
if (isNullOrUndefined(option.template) || option.template === '' || this.maps.tooltipDisplayMode === 'MouseMove') {
|
|
175
|
+
tooltipEle.style.cssText = 'position: absolute;pointer-events:none;';
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
tooltipEle.style.position = 'absolute';
|
|
179
|
+
}
|
|
177
180
|
document.getElementById(this.maps.element.id + '_Secondary_Element').appendChild(tooltipEle);
|
|
178
181
|
}
|
|
179
182
|
if (typeof option.template !== 'function' && option.template !== null && Object.keys(typeof option.template === 'object' ? option.template : {}).length === 1) {
|
|
@@ -217,8 +220,8 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
217
220
|
header: '',
|
|
218
221
|
data: option['data'],
|
|
219
222
|
template: option['template'],
|
|
220
|
-
content: tooltipArgs.content.toString() !== currentData.toString() ? [
|
|
221
|
-
[
|
|
223
|
+
content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
|
|
224
|
+
[currentData.toString()],
|
|
222
225
|
shapes: [],
|
|
223
226
|
location: option['location'],
|
|
224
227
|
palette: [markerFill],
|
|
@@ -235,8 +238,8 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
235
238
|
header: '',
|
|
236
239
|
data: tooltipArgs.options['data'],
|
|
237
240
|
template: tooltipArgs.options['template'],
|
|
238
|
-
content: tooltipArgs.content.toString() !== currentData.toString() ? [
|
|
239
|
-
[
|
|
241
|
+
content: tooltipArgs.content.toString() !== currentData.toString() ? [tooltipArgs.content.toString()] :
|
|
242
|
+
[currentData.toString()],
|
|
240
243
|
shapes: [],
|
|
241
244
|
location: tooltipArgs.options['location'],
|
|
242
245
|
palette: [markerFill],
|
|
@@ -255,13 +258,6 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
255
258
|
_this.svgTooltip.appendTo(tooltipEle);
|
|
256
259
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
257
260
|
_this.maps.renderReactTemplates();
|
|
258
|
-
tooltipTemplateElement = document.getElementById(_this.maps.element.id + '_mapsTooltip');
|
|
259
|
-
if (tooltipTemplateElement !== null && tooltipTemplateElement.innerHTML.indexOf('href') !== -1
|
|
260
|
-
&& tooltipTemplateElement.innerHTML.indexOf('</a>') !== -1) {
|
|
261
|
-
var templateStyle = tooltipTemplateElement.getAttribute('style');
|
|
262
|
-
templateStyle = templateStyle.replace('pointer-events: none;', 'position-events:all;');
|
|
263
|
-
tooltipTemplateElement.style.cssText = templateStyle;
|
|
264
|
-
}
|
|
265
261
|
}
|
|
266
262
|
else {
|
|
267
263
|
_this.clearTooltip(e.target);
|
|
@@ -283,12 +279,8 @@ var MapsTooltip = /** @class */ (function () {
|
|
|
283
279
|
}
|
|
284
280
|
}
|
|
285
281
|
else {
|
|
286
|
-
|
|
287
|
-
if (
|
|
288
|
-
&& tooltipTemplateElement.innerHTML.indexOf('</a>') !== -1) {
|
|
289
|
-
this.maps.notify(click, this);
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
282
|
+
var tooltipElement = e.target.closest('#' + this.maps.element.id + '_mapsTooltipparent_template');
|
|
283
|
+
if (isNullOrUndefined(tooltipElement)) {
|
|
292
284
|
this.clearTooltip(e.target);
|
|
293
285
|
}
|
|
294
286
|
}
|