Skip to content

Commit 6544de8

Browse files
authored
fix(google-maps): add exportAs to all directives (#19522)
Currently none of the Google Maps-related directives have an `exportAs` which makes them difficult to reference inside templates. Fixes #19462.
1 parent 94571c5 commit 6544de8

File tree

9 files changed

+16
-8
lines changed

9 files changed

+16
-8
lines changed

src/google-maps/google-map/google-map.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const DEFAULT_WIDTH = '500px';
5151
*/
5252
@Component({
5353
selector: 'google-map',
54+
exportAs: 'googleMap',
5455
changeDetection: ChangeDetectionStrategy.OnPush,
5556
template: '<div class="map-container"></div><ng-content></ng-content>',
5657
encapsulation: ViewEncapsulation.None,

src/google-maps/map-circle/map-circle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {MapEventManager} from '../map-event-manager';
2222
*/
2323
@Directive({
2424
selector: 'map-circle',
25+
exportAs: 'mapCircle',
2526
})
2627
export class MapCircle implements OnInit, OnDestroy {
2728
private _eventManager = new MapEventManager(this._ngZone);

src/google-maps/map-ground-overlay/map-ground-overlay.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {MapEventManager} from '../map-event-manager';
2323
*/
2424
@Directive({
2525
selector: 'map-ground-overlay',
26+
exportAs: 'mapGroundOverlay',
2627
})
2728
export class MapGroundOverlay implements OnInit, OnDestroy {
2829
private _eventManager = new MapEventManager(this._ngZone);

src/google-maps/map-info-window/map-info-window.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {MapAnchorPoint} from '../map-anchor-point';
3232
*/
3333
@Directive({
3434
selector: 'map-info-window',
35+
exportAs: 'mapInfoWindow',
3536
host: {'style': 'display: none'},
3637
})
3738
export class MapInfoWindow implements OnInit, OnDestroy {

src/google-maps/map-marker/map-marker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const DEFAULT_MARKER_OPTIONS = {
4141
*/
4242
@Component({
4343
selector: 'map-marker',
44+
exportAs: 'mapMarker',
4445
template: '<ng-content></ng-content>',
4546
changeDetection: ChangeDetectionStrategy.OnPush,
4647
encapsulation: ViewEncapsulation.None,

src/google-maps/map-polygon/map-polygon.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {MapEventManager} from '../map-event-manager';
3030
*/
3131
@Directive({
3232
selector: 'map-polygon',
33+
exportAs: 'mapPolygon',
3334
})
3435
export class MapPolygon implements OnInit, OnDestroy {
3536
private _eventManager = new MapEventManager(this._ngZone);

src/google-maps/map-polyline/map-polyline.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {MapEventManager} from '../map-event-manager';
3030
*/
3131
@Directive({
3232
selector: 'map-polyline',
33+
exportAs: 'mapPolyline',
3334
})
3435
export class MapPolyline implements OnInit, OnDestroy {
3536
private _eventManager = new MapEventManager(this._ngZone);

src/google-maps/map-rectangle/map-rectangle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {MapEventManager} from '../map-event-manager';
2323
*/
2424
@Directive({
2525
selector: 'map-rectangle',
26+
exportAs: 'mapRectangle',
2627
})
2728
export class MapRectangle implements OnInit, OnDestroy {
2829
private _eventManager = new MapEventManager(this._ngZone);

tools/public_api_guard/google-maps/google-maps.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export declare class GoogleMap implements OnChanges, OnInit, OnDestroy {
4747
panBy(x: number, y: number): void;
4848
panTo(latLng: google.maps.LatLng | google.maps.LatLngLiteral): void;
4949
panToBounds(latLngBounds: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): void;
50-
static ɵcmp: i0.ɵɵComponentDefWithMeta<GoogleMap, "google-map", never, { "height": "height"; "width": "width"; "mapTypeId": "mapTypeId"; "center": "center"; "zoom": "zoom"; "options": "options"; }, { "boundsChanged": "boundsChanged"; "centerChanged": "centerChanged"; "mapClick": "mapClick"; "mapDblclick": "mapDblclick"; "mapDrag": "mapDrag"; "mapDragend": "mapDragend"; "mapDragstart": "mapDragstart"; "headingChanged": "headingChanged"; "idle": "idle"; "maptypeidChanged": "maptypeidChanged"; "mapMousemove": "mapMousemove"; "mapMouseout": "mapMouseout"; "mapMouseover": "mapMouseover"; "projectionChanged": "projectionChanged"; "mapRightclick": "mapRightclick"; "tilesloaded": "tilesloaded"; "tiltChanged": "tiltChanged"; "zoomChanged": "zoomChanged"; }, never, ["*"]>;
50+
static ɵcmp: i0.ɵɵComponentDefWithMeta<GoogleMap, "google-map", ["googleMap"], { "height": "height"; "width": "width"; "mapTypeId": "mapTypeId"; "center": "center"; "zoom": "zoom"; "options": "options"; }, { "boundsChanged": "boundsChanged"; "centerChanged": "centerChanged"; "mapClick": "mapClick"; "mapDblclick": "mapDblclick"; "mapDrag": "mapDrag"; "mapDragend": "mapDragend"; "mapDragstart": "mapDragstart"; "headingChanged": "headingChanged"; "idle": "idle"; "maptypeidChanged": "maptypeidChanged"; "mapMousemove": "mapMousemove"; "mapMouseout": "mapMouseout"; "mapMouseover": "mapMouseover"; "projectionChanged": "projectionChanged"; "mapRightclick": "mapRightclick"; "tilesloaded": "tilesloaded"; "tiltChanged": "tiltChanged"; "zoomChanged": "zoomChanged"; }, never, ["*"]>;
5151
static ɵfac: i0.ɵɵFactoryDef<GoogleMap, [null, null, { optional: true; }]>;
5252
}
5353

@@ -87,7 +87,7 @@ export declare class MapCircle implements OnInit, OnDestroy {
8787
getVisible(): boolean;
8888
ngOnDestroy(): void;
8989
ngOnInit(): void;
90-
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapCircle, "map-circle", never, { "options": "options"; "center": "center"; "radius": "radius"; }, { "centerChanged": "centerChanged"; "circleClick": "circleClick"; "circleDblclick": "circleDblclick"; "circleDrag": "circleDrag"; "circleDragend": "circleDragend"; "circleDragstart": "circleDragstart"; "circleMousedown": "circleMousedown"; "circleMousemove": "circleMousemove"; "circleMouseout": "circleMouseout"; "circleMouseover": "circleMouseover"; "circleMouseup": "circleMouseup"; "radiusChanged": "radiusChanged"; "circleRightclick": "circleRightclick"; }, never>;
90+
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapCircle, "map-circle", ["mapCircle"], { "options": "options"; "center": "center"; "radius": "radius"; }, { "centerChanged": "centerChanged"; "circleClick": "circleClick"; "circleDblclick": "circleDblclick"; "circleDrag": "circleDrag"; "circleDragend": "circleDragend"; "circleDragstart": "circleDragstart"; "circleMousedown": "circleMousedown"; "circleMousemove": "circleMousemove"; "circleMouseout": "circleMouseout"; "circleMouseover": "circleMouseover"; "circleMouseup": "circleMouseup"; "radiusChanged": "radiusChanged"; "circleRightclick": "circleRightclick"; }, never>;
9191
static ɵfac: i0.ɵɵFactoryDef<MapCircle, never>;
9292
}
9393

@@ -105,7 +105,7 @@ export declare class MapGroundOverlay implements OnInit, OnDestroy {
105105
getUrl(): string;
106106
ngOnDestroy(): void;
107107
ngOnInit(): void;
108-
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapGroundOverlay, "map-ground-overlay", never, { "url": "url"; "bounds": "bounds"; "clickable": "clickable"; "opacity": "opacity"; }, { "mapClick": "mapClick"; "mapDblclick": "mapDblclick"; }, never>;
108+
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapGroundOverlay, "map-ground-overlay", ["mapGroundOverlay"], { "url": "url"; "bounds": "bounds"; "clickable": "clickable"; "opacity": "opacity"; }, { "mapClick": "mapClick"; "mapDblclick": "mapDblclick"; }, never>;
109109
static ɵfac: i0.ɵɵFactoryDef<MapGroundOverlay, never>;
110110
}
111111

@@ -126,7 +126,7 @@ export declare class MapInfoWindow implements OnInit, OnDestroy {
126126
ngOnDestroy(): void;
127127
ngOnInit(): void;
128128
open(anchor?: MapAnchorPoint): void;
129-
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapInfoWindow, "map-info-window", never, { "options": "options"; "position": "position"; }, { "closeclick": "closeclick"; "contentChanged": "contentChanged"; "domready": "domready"; "positionChanged": "positionChanged"; "zindexChanged": "zindexChanged"; }, never>;
129+
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapInfoWindow, "map-info-window", ["mapInfoWindow"], { "options": "options"; "position": "position"; }, { "closeclick": "closeclick"; "contentChanged": "contentChanged"; "domready": "domready"; "positionChanged": "positionChanged"; "zindexChanged": "zindexChanged"; }, never>;
130130
static ɵfac: i0.ɵɵFactoryDef<MapInfoWindow, never>;
131131
}
132132

@@ -174,7 +174,7 @@ export declare class MapMarker implements OnInit, OnDestroy, MapAnchorPoint {
174174
getZIndex(): number | null;
175175
ngOnDestroy(): void;
176176
ngOnInit(): void;
177-
static ɵcmp: i0.ɵɵComponentDefWithMeta<MapMarker, "map-marker", never, { "options": "options"; "title": "title"; "position": "position"; "label": "label"; "clickable": "clickable"; }, { "animationChanged": "animationChanged"; "mapClick": "mapClick"; "clickableChanged": "clickableChanged"; "cursorChanged": "cursorChanged"; "mapDblclick": "mapDblclick"; "mapDrag": "mapDrag"; "mapDragend": "mapDragend"; "draggableChanged": "draggableChanged"; "mapDragstart": "mapDragstart"; "flatChanged": "flatChanged"; "iconChanged": "iconChanged"; "mapMousedown": "mapMousedown"; "mapMouseout": "mapMouseout"; "mapMouseover": "mapMouseover"; "mapMouseup": "mapMouseup"; "positionChanged": "positionChanged"; "mapRightclick": "mapRightclick"; "shapeChanged": "shapeChanged"; "titleChanged": "titleChanged"; "visibleChanged": "visibleChanged"; "zindexChanged": "zindexChanged"; }, never, ["*"]>;
177+
static ɵcmp: i0.ɵɵComponentDefWithMeta<MapMarker, "map-marker", ["mapMarker"], { "options": "options"; "title": "title"; "position": "position"; "label": "label"; "clickable": "clickable"; }, { "animationChanged": "animationChanged"; "mapClick": "mapClick"; "clickableChanged": "clickableChanged"; "cursorChanged": "cursorChanged"; "mapDblclick": "mapDblclick"; "mapDrag": "mapDrag"; "mapDragend": "mapDragend"; "draggableChanged": "draggableChanged"; "mapDragstart": "mapDragstart"; "flatChanged": "flatChanged"; "iconChanged": "iconChanged"; "mapMousedown": "mapMousedown"; "mapMouseout": "mapMouseout"; "mapMouseover": "mapMouseover"; "mapMouseup": "mapMouseup"; "positionChanged": "positionChanged"; "mapRightclick": "mapRightclick"; "shapeChanged": "shapeChanged"; "titleChanged": "titleChanged"; "visibleChanged": "visibleChanged"; "zindexChanged": "zindexChanged"; }, never, ["*"]>;
178178
static ɵfac: i0.ɵɵFactoryDef<MapMarker, never>;
179179
}
180180

@@ -201,7 +201,7 @@ export declare class MapPolygon implements OnInit, OnDestroy {
201201
getVisible(): boolean;
202202
ngOnDestroy(): void;
203203
ngOnInit(): void;
204-
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapPolygon, "map-polygon", never, { "options": "options"; "paths": "paths"; }, { "polygonClick": "polygonClick"; "polygonDblclick": "polygonDblclick"; "polygonDrag": "polygonDrag"; "polygonDragend": "polygonDragend"; "polygonDragstart": "polygonDragstart"; "polygonMousedown": "polygonMousedown"; "polygonMousemove": "polygonMousemove"; "polygonMouseout": "polygonMouseout"; "polygonMouseover": "polygonMouseover"; "polygonMouseup": "polygonMouseup"; "polygonRightclick": "polygonRightclick"; }, never>;
204+
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapPolygon, "map-polygon", ["mapPolygon"], { "options": "options"; "paths": "paths"; }, { "polygonClick": "polygonClick"; "polygonDblclick": "polygonDblclick"; "polygonDrag": "polygonDrag"; "polygonDragend": "polygonDragend"; "polygonDragstart": "polygonDragstart"; "polygonMousedown": "polygonMousedown"; "polygonMousemove": "polygonMousemove"; "polygonMouseout": "polygonMouseout"; "polygonMouseover": "polygonMouseover"; "polygonMouseup": "polygonMouseup"; "polygonRightclick": "polygonRightclick"; }, never>;
205205
static ɵfac: i0.ɵɵFactoryDef<MapPolygon, never>;
206206
}
207207

@@ -227,7 +227,7 @@ export declare class MapPolyline implements OnInit, OnDestroy {
227227
getVisible(): boolean;
228228
ngOnDestroy(): void;
229229
ngOnInit(): void;
230-
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapPolyline, "map-polyline", never, { "options": "options"; "path": "path"; }, { "polylineClick": "polylineClick"; "polylineDblclick": "polylineDblclick"; "polylineDrag": "polylineDrag"; "polylineDragend": "polylineDragend"; "polylineDragstart": "polylineDragstart"; "polylineMousedown": "polylineMousedown"; "polylineMousemove": "polylineMousemove"; "polylineMouseout": "polylineMouseout"; "polylineMouseover": "polylineMouseover"; "polylineMouseup": "polylineMouseup"; "polylineRightclick": "polylineRightclick"; }, never>;
230+
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapPolyline, "map-polyline", ["mapPolyline"], { "options": "options"; "path": "path"; }, { "polylineClick": "polylineClick"; "polylineDblclick": "polylineDblclick"; "polylineDrag": "polylineDrag"; "polylineDragend": "polylineDragend"; "polylineDragstart": "polylineDragstart"; "polylineMousedown": "polylineMousedown"; "polylineMousemove": "polylineMousemove"; "polylineMouseout": "polylineMouseout"; "polylineMouseover": "polylineMouseover"; "polylineMouseup": "polylineMouseup"; "polylineRightclick": "polylineRightclick"; }, never>;
231231
static ɵfac: i0.ɵɵFactoryDef<MapPolyline, never>;
232232
}
233233

@@ -254,6 +254,6 @@ export declare class MapRectangle implements OnInit, OnDestroy {
254254
getVisible(): boolean;
255255
ngOnDestroy(): void;
256256
ngOnInit(): void;
257-
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapRectangle, "map-rectangle", never, { "options": "options"; "bounds": "bounds"; }, { "boundsChanged": "boundsChanged"; "rectangleClick": "rectangleClick"; "rectangleDblclick": "rectangleDblclick"; "rectangleDrag": "rectangleDrag"; "rectangleDragend": "rectangleDragend"; "rectangleDragstart": "rectangleDragstart"; "rectangleMousedown": "rectangleMousedown"; "rectangleMousemove": "rectangleMousemove"; "rectangleMouseout": "rectangleMouseout"; "rectangleMouseover": "rectangleMouseover"; "rectangleMouseup": "rectangleMouseup"; "rectangleRightclick": "rectangleRightclick"; }, never>;
257+
static ɵdir: i0.ɵɵDirectiveDefWithMeta<MapRectangle, "map-rectangle", ["mapRectangle"], { "options": "options"; "bounds": "bounds"; }, { "boundsChanged": "boundsChanged"; "rectangleClick": "rectangleClick"; "rectangleDblclick": "rectangleDblclick"; "rectangleDrag": "rectangleDrag"; "rectangleDragend": "rectangleDragend"; "rectangleDragstart": "rectangleDragstart"; "rectangleMousedown": "rectangleMousedown"; "rectangleMousemove": "rectangleMousemove"; "rectangleMouseout": "rectangleMouseout"; "rectangleMouseover": "rectangleMouseover"; "rectangleMouseup": "rectangleMouseup"; "rectangleRightclick": "rectangleRightclick"; }, never>;
258258
static ɵfac: i0.ɵɵFactoryDef<MapRectangle, never>;
259259
}

0 commit comments

Comments
 (0)