@@ -26,55 +26,54 @@ export type Icon = {
26
26
type : typeof IconTypes . Svg ;
27
27
html : string ;
28
28
} ) ;
29
- export type MarkerDefinition < MarkerOptions , InfoWindowOptions > = WithIdentifier < {
29
+ export type MarkerDefinition < BridgeMarkerOptions , BridgeInfoWindowOptions > = WithIdentifier < {
30
30
position : Point ;
31
31
title : string | null ;
32
- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
32
+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
33
33
icon ?: Icon ;
34
- rawOptions ?: MarkerOptions ;
34
+ rawOptions ?: BridgeMarkerOptions ;
35
35
extra : Record < string , unknown > ;
36
36
} > ;
37
- export type PolygonDefinition < PolygonOptions , InfoWindowOptions > = WithIdentifier < {
38
- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
37
+ export type PolygonDefinition < PolygonOptions , BridgeInfoWindowOptions > = WithIdentifier < {
38
+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
39
39
points : Array < Point > | Array < Array < Point > > ;
40
40
title : string | null ;
41
41
rawOptions ?: PolygonOptions ;
42
42
extra : Record < string , unknown > ;
43
43
} > ;
44
- export type PolylineDefinition < PolylineOptions , InfoWindowOptions > = WithIdentifier < {
45
- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
44
+ export type PolylineDefinition < PolylineOptions , BridgeInfoWindowOptions > = WithIdentifier < {
45
+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
46
46
points : Array < Point > ;
47
47
title : string | null ;
48
48
rawOptions ?: PolylineOptions ;
49
49
extra : Record < string , unknown > ;
50
50
} > ;
51
- export type CircleDefinition < CircleOptions , InfoWindowOptions > = WithIdentifier < {
52
- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
51
+ export type CircleDefinition < CircleOptions , BridgeInfoWindowOptions > = WithIdentifier < {
52
+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
53
53
center : Point ;
54
54
radius : number ;
55
55
title : string | null ;
56
56
rawOptions ?: CircleOptions ;
57
57
extra : Record < string , unknown > ;
58
58
} > ;
59
- export type RectangleDefinition < RectangleOptions , InfoWindowOptions > = WithIdentifier < {
60
- infoWindow ?: InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
59
+ export type RectangleDefinition < RectangleOptions , BridgeInfoWindowOptions > = WithIdentifier < {
60
+ infoWindow ?: Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
61
61
southWest : Point ;
62
62
northEast : Point ;
63
63
title : string | null ;
64
64
rawOptions ?: RectangleOptions ;
65
65
extra : Record < string , unknown > ;
66
66
} > ;
67
- export type InfoWindowDefinition < InfoWindowOptions > = {
67
+ export type InfoWindowDefinition < BridgeInfoWindowOptions > = {
68
68
headerContent : string | null ;
69
69
content : string | null ;
70
70
position : Point ;
71
71
opened : boolean ;
72
72
autoClose : boolean ;
73
- rawOptions ?: InfoWindowOptions ;
73
+ rawOptions ?: BridgeInfoWindowOptions ;
74
74
extra : Record < string , unknown > ;
75
75
} ;
76
- export type InfoWindowWithoutPositionDefinition < InfoWindowOptions > = Omit < InfoWindowDefinition < InfoWindowOptions > , 'position' > ;
77
- export default abstract class < MapOptions , Map , MarkerOptions , Marker , InfoWindowOptions , InfoWindow , PolygonOptions , Polygon , PolylineOptions , Polyline , CircleOptions , Circle , RectangleOptions , Rectangle > extends Controller < HTMLElement > {
76
+ export default abstract class < MapOptions , BridgeMap , BridgeMarkerOptions , BridgeMarker , BridgeInfoWindowOptions , BridgeInfoWindow , BridgePolygonOptions , BridgePolygon , BridgePolylineOptions , BridgePolyline , BridgeCircleOptions , BridgeCircle , BridgeRectangleOptions , BridgeRectangle > extends Controller < HTMLElement > {
78
77
static values : {
79
78
providerOptions : ObjectConstructor ;
80
79
center: ObjectConstructor ;
@@ -90,11 +89,11 @@ export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindow
90
89
centerValue: Point | null ;
91
90
zoomValue: number | null ;
92
91
fitBoundsToMarkersValue: boolean ;
93
- markersValue: Array < MarkerDefinition < MarkerOptions , InfoWindowOptions > > ;
94
- polygonsValue: Array < PolygonDefinition < PolygonOptions , InfoWindowOptions > > ;
95
- polylinesValue: Array < PolylineDefinition < PolylineOptions , InfoWindowOptions > > ;
96
- circlesValue: Array < CircleDefinition < CircleOptions , InfoWindowOptions > > ;
97
- rectanglesValue: Array < RectangleDefinition < RectangleOptions , InfoWindowOptions > > ;
92
+ markersValue: Array < MarkerDefinition < BridgeMarkerOptions , BridgeInfoWindowOptions > > ;
93
+ polygonsValue: Array < PolygonDefinition < BridgePolygonOptions , BridgeInfoWindowOptions > > ;
94
+ polylinesValue: Array < PolylineDefinition < BridgePolylineOptions , BridgeInfoWindowOptions > > ;
95
+ circlesValue: Array < CircleDefinition < BridgeCircleOptions , BridgeInfoWindowOptions > > ;
96
+ rectanglesValue: Array < RectangleDefinition < BridgeRectangleOptions , BridgeInfoWindowOptions > > ;
98
97
optionsValue: MapOptions ;
99
98
hasCenterValue: boolean ;
100
99
hasZoomValue: boolean ;
@@ -105,13 +104,13 @@ export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindow
105
104
hasCirclesValue: boolean ;
106
105
hasRectanglesValue: boolean ;
107
106
hasOptionsValue: boolean ;
108
- protected map : Map ;
109
- protected markers : globalThis . Map < string , Marker > ;
110
- protected polygons : globalThis . Map < string , Polygon > ;
111
- protected polylines: globalThis . Map < string , Polyline > ;
112
- protected circles : globalThis . Map < string , Circle > ;
113
- protected rectangles: globalThis . Map < string , Rectangle > ;
114
- protected infoWindows: Array < InfoWindow > ;
107
+ protected map : BridgeMap ;
108
+ protected markers : Map < string , BridgeMarker > ;
109
+ protected polygons : Map < string , BridgePolygon > ;
110
+ protected polylines: Map < string , BridgePolyline > ;
111
+ protected circles : Map < string , BridgeCircle > ;
112
+ protected rectangles: Map < string , BridgeRectangle > ;
113
+ protected infoWindows: Array < BridgeInfoWindow > ;
115
114
private isConnected ;
116
115
private createMarker ;
117
116
private createPolygon ;
@@ -121,9 +120,9 @@ export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindow
121
120
protected abstract dispatchEvent ( name : string , payload : Record < string , unknown > ) : void ;
122
121
connect ( ) : void ;
123
122
createInfoWindow ( { definition, element, } : {
124
- definition : InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
125
- element: Marker | Polygon | Polyline | Circle | Rectangle ;
126
- } ) : InfoWindow ;
123
+ definition : Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
124
+ element: BridgeMarker | BridgePolygon | BridgePolyline | BridgeCircle | BridgeRectangle ;
125
+ } ) : BridgeInfoWindow ;
127
126
abstract centerValueChanged ( ) : void ;
128
127
abstract zoomValueChanged ( ) : void ;
129
128
markersValueChanged ( ) : void ;
@@ -135,35 +134,35 @@ export default abstract class<MapOptions, Map, MarkerOptions, Marker, InfoWindow
135
134
center : Point | null ;
136
135
zoom: number | null ;
137
136
options: MapOptions ;
138
- } ) : Map ;
137
+ } ) : BridgeMap ;
139
138
protected abstract doFitBoundsToMarkers ( ) : void ;
140
139
protected abstract doCreateMarker ( { definition } : {
141
- definition : MarkerDefinition < MarkerOptions , InfoWindowOptions > ;
142
- } ) : Marker ;
143
- protected abstract doRemoveMarker ( marker : Marker ) : void ;
140
+ definition : MarkerDefinition < BridgeMarkerOptions , BridgeInfoWindowOptions > ;
141
+ } ) : BridgeMarker ;
142
+ protected abstract doRemoveMarker ( marker : BridgeMarker ) : void ;
144
143
protected abstract doCreatePolygon ( { definition } : {
145
- definition : PolygonDefinition < PolygonOptions , InfoWindowOptions > ;
146
- } ) : Polygon ;
147
- protected abstract doRemovePolygon ( polygon : Polygon ) : void ;
144
+ definition : PolygonDefinition < BridgePolygonOptions , BridgeInfoWindowOptions > ;
145
+ } ) : BridgePolygon ;
146
+ protected abstract doRemovePolygon ( polygon : BridgePolygon ) : void ;
148
147
protected abstract doCreatePolyline ( { definition } : {
149
- definition : PolylineDefinition < PolylineOptions , InfoWindowOptions > ;
150
- } ) : Polyline ;
151
- protected abstract doRemovePolyline ( polyline : Polyline ) : void ;
148
+ definition : PolylineDefinition < BridgePolylineOptions , BridgeInfoWindowOptions > ;
149
+ } ) : BridgePolyline ;
150
+ protected abstract doRemovePolyline ( polyline : BridgePolyline ) : void ;
152
151
protected abstract doCreateCircle ( { definition } : {
153
- definition : CircleDefinition < CircleOptions , InfoWindowOptions > ;
154
- } ) : Circle ;
155
- protected abstract doRemoveCircle ( circle : Circle ) : void ;
152
+ definition : CircleDefinition < BridgeCircleOptions , BridgeInfoWindowOptions > ;
153
+ } ) : BridgeCircle ;
154
+ protected abstract doRemoveCircle ( circle : BridgeCircle ) : void ;
156
155
protected abstract doCreateRectangle ( { definition } : {
157
- definition : RectangleDefinition < RectangleOptions , InfoWindowOptions > ;
158
- } ) : Rectangle ;
159
- protected abstract doRemoveRectangle ( rectangle : Rectangle ) : void ;
156
+ definition : RectangleDefinition < BridgeRectangleOptions , BridgeInfoWindowOptions > ;
157
+ } ) : BridgeRectangle ;
158
+ protected abstract doRemoveRectangle ( rectangle : BridgeRectangle ) : void ;
160
159
protected abstract doCreateInfoWindow ( { definition, element, } : {
161
- definition : InfoWindowWithoutPositionDefinition < InfoWindowOptions > ;
162
- element: Marker | Polygon | Polyline | Circle | Rectangle ;
163
- } ) : InfoWindow ;
160
+ definition : Omit < InfoWindowDefinition < BridgeInfoWindowOptions > , 'position' > ;
161
+ element: BridgeMarker | BridgePolygon | BridgePolyline | BridgeCircle | BridgeRectangle ;
162
+ } ) : BridgeInfoWindow ;
164
163
protected abstract doCreateIcon ( { definition, element } : {
165
164
definition : Icon ;
166
- element: Marker ;
165
+ element: BridgeMarker ;
167
166
} ) : void ;
168
167
private createDrawingFactory ;
169
168
private onDrawChanged ;
0 commit comments