@angular/google-maps 17.2.0 → 17.3.0-next.0
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/esm2022/google-map/google-map.mjs +5 -2
- package/esm2022/google-maps-module.mjs +5 -1
- package/esm2022/map-advanced-marker/map-advanced-marker.mjs +214 -0
- package/esm2022/map-info-window/map-info-window.mjs +15 -1
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/google-maps.mjs +223 -4
- package/fesm2022/google-maps.mjs.map +1 -1
- package/index.d.ts +123 -7
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -90,6 +90,17 @@ declare const DEFAULT_MARKER_OPTIONS: {
|
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
/**
|
|
94
|
+
* Default options for the Google Maps marker component. Displays a marker
|
|
95
|
+
* at the Googleplex.
|
|
96
|
+
*/
|
|
97
|
+
declare const DEFAULT_MARKER_OPTIONS_2: {
|
|
98
|
+
position: {
|
|
99
|
+
lat: number;
|
|
100
|
+
lng: number;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
|
|
93
104
|
/** default options set to the Googleplex */
|
|
94
105
|
declare const DEFAULT_OPTIONS: google.maps.MapOptions;
|
|
95
106
|
|
|
@@ -119,6 +130,11 @@ export declare class GoogleMap implements OnChanges, OnInit, OnDestroy {
|
|
|
119
130
|
height: string | number | null;
|
|
120
131
|
/** Width of the map. Set this to `null` if you'd like to control the width through CSS. */
|
|
121
132
|
width: string | number | null;
|
|
133
|
+
/**
|
|
134
|
+
* The Map ID of the map. This parameter cannot be set or changed after a map is instantiated.
|
|
135
|
+
* See: https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions.mapId
|
|
136
|
+
*/
|
|
137
|
+
mapId: string | undefined;
|
|
122
138
|
/**
|
|
123
139
|
* Type of map that should be rendered. E.g. hybrid map, terrain map etc.
|
|
124
140
|
* See: https://developers.google.com/maps/documentation/javascript/reference/map#MapTypeId
|
|
@@ -325,12 +341,12 @@ export declare class GoogleMap implements OnChanges, OnInit, OnDestroy {
|
|
|
325
341
|
/** Asserts that the map has been initialized. */
|
|
326
342
|
private _assertInitialized;
|
|
327
343
|
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleMap, never>;
|
|
328
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GoogleMap, "google-map", ["googleMap"], { "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "mapTypeId": { "alias": "mapTypeId"; "required": false; }; "center": { "alias": "center"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "mapInitialized": "mapInitialized"; "authFailure": "authFailure"; "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, ["*"], true, never>;
|
|
344
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GoogleMap, "google-map", ["googleMap"], { "height": { "alias": "height"; "required": false; }; "width": { "alias": "width"; "required": false; }; "mapId": { "alias": "mapId"; "required": false; }; "mapTypeId": { "alias": "mapTypeId"; "required": false; }; "center": { "alias": "center"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "mapInitialized": "mapInitialized"; "authFailure": "authFailure"; "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, ["*"], true, never>;
|
|
329
345
|
}
|
|
330
346
|
|
|
331
347
|
export declare class GoogleMapsModule {
|
|
332
348
|
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleMapsModule, never>;
|
|
333
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<GoogleMapsModule, never, [typeof i1.GoogleMap, typeof i2.MapBaseLayer, typeof i3.MapBicyclingLayer, typeof i4.MapCircle, typeof i5.MapDirectionsRenderer, typeof i6.MapGroundOverlay, typeof i7.MapHeatmapLayer, typeof i8.MapInfoWindow, typeof i9.MapKmlLayer, typeof i10.MapMarker, typeof i11.
|
|
349
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<GoogleMapsModule, never, [typeof i1.GoogleMap, typeof i2.MapBaseLayer, typeof i3.MapBicyclingLayer, typeof i4.MapCircle, typeof i5.MapDirectionsRenderer, typeof i6.MapGroundOverlay, typeof i7.MapHeatmapLayer, typeof i8.MapInfoWindow, typeof i9.MapKmlLayer, typeof i10.MapMarker, typeof i11.MapAdvancedMarker, typeof i12.MapMarkerClusterer, typeof i13.MapPolygon, typeof i14.MapPolyline, typeof i15.MapRectangle, typeof i16.MapTrafficLayer, typeof i17.MapTransitLayer], [typeof i1.GoogleMap, typeof i2.MapBaseLayer, typeof i3.MapBicyclingLayer, typeof i4.MapCircle, typeof i5.MapDirectionsRenderer, typeof i6.MapGroundOverlay, typeof i7.MapHeatmapLayer, typeof i8.MapInfoWindow, typeof i9.MapKmlLayer, typeof i10.MapMarker, typeof i11.MapAdvancedMarker, typeof i12.MapMarkerClusterer, typeof i13.MapPolygon, typeof i14.MapPolyline, typeof i15.MapRectangle, typeof i16.MapTrafficLayer, typeof i17.MapTransitLayer]>;
|
|
334
350
|
static ɵinj: i0.ɵɵInjectorDeclaration<GoogleMapsModule>;
|
|
335
351
|
}
|
|
336
352
|
|
|
@@ -355,35 +371,42 @@ declare namespace i10 {
|
|
|
355
371
|
|
|
356
372
|
declare namespace i11 {
|
|
357
373
|
export {
|
|
358
|
-
|
|
374
|
+
DEFAULT_MARKER_OPTIONS_2 as DEFAULT_MARKER_OPTIONS,
|
|
375
|
+
MapAdvancedMarker
|
|
359
376
|
}
|
|
360
377
|
}
|
|
361
378
|
|
|
362
379
|
declare namespace i12 {
|
|
363
380
|
export {
|
|
364
|
-
|
|
381
|
+
MapMarkerClusterer
|
|
365
382
|
}
|
|
366
383
|
}
|
|
367
384
|
|
|
368
385
|
declare namespace i13 {
|
|
369
386
|
export {
|
|
370
|
-
|
|
387
|
+
MapPolygon
|
|
371
388
|
}
|
|
372
389
|
}
|
|
373
390
|
|
|
374
391
|
declare namespace i14 {
|
|
375
392
|
export {
|
|
376
|
-
|
|
393
|
+
MapPolyline
|
|
377
394
|
}
|
|
378
395
|
}
|
|
379
396
|
|
|
380
397
|
declare namespace i15 {
|
|
381
398
|
export {
|
|
382
|
-
|
|
399
|
+
MapRectangle
|
|
383
400
|
}
|
|
384
401
|
}
|
|
385
402
|
|
|
386
403
|
declare namespace i16 {
|
|
404
|
+
export {
|
|
405
|
+
MapTrafficLayer
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
declare namespace i17 {
|
|
387
410
|
export {
|
|
388
411
|
MapTransitLayer
|
|
389
412
|
}
|
|
@@ -438,6 +461,95 @@ declare namespace i9 {
|
|
|
438
461
|
}
|
|
439
462
|
}
|
|
440
463
|
|
|
464
|
+
/**
|
|
465
|
+
* Angular component that renders a Google Maps marker via the Google Maps JavaScript API.
|
|
466
|
+
*
|
|
467
|
+
* See developers.google.com/maps/documentation/javascript/reference/marker
|
|
468
|
+
*/
|
|
469
|
+
export declare class MapAdvancedMarker implements OnInit, OnChanges, OnDestroy {
|
|
470
|
+
private readonly _googleMap;
|
|
471
|
+
private _ngZone;
|
|
472
|
+
private _eventManager;
|
|
473
|
+
/**
|
|
474
|
+
* Rollover text. If provided, an accessibility text (e.g. for use with screen readers) will be added to the AdvancedMarkerElement with the provided value.
|
|
475
|
+
* See: https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElementOptions.title
|
|
476
|
+
*/
|
|
477
|
+
set title(title: string);
|
|
478
|
+
private _title;
|
|
479
|
+
/**
|
|
480
|
+
* Sets the AdvancedMarkerElement's position. An AdvancedMarkerElement may be constructed without a position, but will not be displayed until its position is provided - for example, by a user's actions or choices. An AdvancedMarkerElement's position can be provided by setting AdvancedMarkerElement.position if not provided at the construction.
|
|
481
|
+
* Note: AdvancedMarkerElement with altitude is only supported on vector maps.
|
|
482
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElementOptions.position
|
|
483
|
+
*/
|
|
484
|
+
set position(position: google.maps.LatLngLiteral | google.maps.LatLng | google.maps.LatLngAltitude | google.maps.LatLngAltitudeLiteral);
|
|
485
|
+
private _position;
|
|
486
|
+
/**
|
|
487
|
+
* The DOM Element backing the visual of an AdvancedMarkerElement.
|
|
488
|
+
* Note: AdvancedMarkerElement does not clone the passed-in DOM element. Once the DOM element is passed to an AdvancedMarkerElement, passing the same DOM element to another AdvancedMarkerElement will move the DOM element and cause the previous AdvancedMarkerElement to look empty.
|
|
489
|
+
* See: https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElementOptions.content
|
|
490
|
+
*/
|
|
491
|
+
set content(content: Node | google.maps.marker.PinElement);
|
|
492
|
+
private _content;
|
|
493
|
+
/**
|
|
494
|
+
* If true, the AdvancedMarkerElement can be dragged.
|
|
495
|
+
* Note: AdvancedMarkerElement with altitude is not draggable.
|
|
496
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElementOptions.gmpDraggable
|
|
497
|
+
*/
|
|
498
|
+
set gmpDraggable(draggable: boolean);
|
|
499
|
+
private _draggable;
|
|
500
|
+
/**
|
|
501
|
+
* Options for constructing an AdvancedMarkerElement.
|
|
502
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElementOptions
|
|
503
|
+
*/
|
|
504
|
+
set options(options: google.maps.marker.AdvancedMarkerElementOptions);
|
|
505
|
+
private _options;
|
|
506
|
+
/**
|
|
507
|
+
* AdvancedMarkerElements on the map are prioritized by zIndex, with higher values indicating higher display.
|
|
508
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElementOptions.zIndex
|
|
509
|
+
*/
|
|
510
|
+
set zIndex(zIndex: number);
|
|
511
|
+
private _zIndex;
|
|
512
|
+
/**
|
|
513
|
+
* This event is fired when the AdvancedMarkerElement element is clicked.
|
|
514
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElement.click
|
|
515
|
+
*/
|
|
516
|
+
readonly mapClick: Observable<google.maps.MapMouseEvent>;
|
|
517
|
+
/**
|
|
518
|
+
* This event is repeatedly fired while the user drags the AdvancedMarkerElement.
|
|
519
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElement.drag
|
|
520
|
+
*/
|
|
521
|
+
readonly mapDrag: Observable<google.maps.MapMouseEvent>;
|
|
522
|
+
/**
|
|
523
|
+
* This event is fired when the user stops dragging the AdvancedMarkerElement.
|
|
524
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElement.dragend
|
|
525
|
+
*/
|
|
526
|
+
readonly mapDragend: Observable<google.maps.MapMouseEvent>;
|
|
527
|
+
/**
|
|
528
|
+
* This event is fired when the user starts dragging the AdvancedMarkerElement.
|
|
529
|
+
* https://developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElement.dragstart
|
|
530
|
+
*/
|
|
531
|
+
readonly mapDragstart: Observable<google.maps.MapMouseEvent>;
|
|
532
|
+
/** Event emitted when the marker is initialized. */
|
|
533
|
+
readonly markerInitialized: EventEmitter<google.maps.marker.AdvancedMarkerElement>;
|
|
534
|
+
/**
|
|
535
|
+
* The underlying google.maps.marker.AdvancedMarkerElement object.
|
|
536
|
+
*
|
|
537
|
+
* See developers.google.com/maps/documentation/javascript/reference/advanced-markers#AdvancedMarkerElement
|
|
538
|
+
*/
|
|
539
|
+
advancedMarker: google.maps.marker.AdvancedMarkerElement;
|
|
540
|
+
constructor(_googleMap: GoogleMap, _ngZone: NgZone);
|
|
541
|
+
ngOnInit(): void;
|
|
542
|
+
private _initialize;
|
|
543
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
544
|
+
ngOnDestroy(): void;
|
|
545
|
+
/** Creates a combined options object using the passed-in options and the individual inputs. */
|
|
546
|
+
private _combineOptions;
|
|
547
|
+
/** Asserts that the map has been initialized. */
|
|
548
|
+
private _assertInitialized;
|
|
549
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MapAdvancedMarker, never>;
|
|
550
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MapAdvancedMarker, "map-advanced-marker", ["mapAdvancedMarker"], { "title": { "alias": "title"; "required": false; }; "position": { "alias": "position"; "required": false; }; "content": { "alias": "content"; "required": false; }; "gmpDraggable": { "alias": "gmpDraggable"; "required": false; }; "options": { "alias": "options"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; }, { "mapClick": "mapClick"; "mapDrag": "mapDrag"; "mapDragend": "mapDragend"; "mapDragstart": "mapDragstart"; "markerInitialized": "markerInitialized"; }, never, never, true, never>;
|
|
551
|
+
}
|
|
552
|
+
|
|
441
553
|
|
|
442
554
|
/// <reference types="google.maps" />
|
|
443
555
|
export declare interface MapAnchorPoint {
|
|
@@ -941,6 +1053,10 @@ export declare class MapInfoWindow implements OnInit, OnDestroy {
|
|
|
941
1053
|
* developers.google.com/maps/documentation/javascript/reference/info-window#InfoWindow.getZIndex
|
|
942
1054
|
*/
|
|
943
1055
|
getZIndex(): number;
|
|
1056
|
+
/**
|
|
1057
|
+
* Opens the MapInfoWindow using the provided AdvancedMarkerElement.
|
|
1058
|
+
*/
|
|
1059
|
+
openAdvancedMarkerElement(advancedMarkerElement: google.maps.marker.AdvancedMarkerElement, content?: string | Element | Text): void;
|
|
944
1060
|
/**
|
|
945
1061
|
* Opens the MapInfoWindow using the provided anchor. If the anchor is not set,
|
|
946
1062
|
* then the position property of the options input is used instead.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/google-maps",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.3.0-next.0",
|
|
4
4
|
"description": "Angular Google Maps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"tslib": "^2.3.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@angular/core": "^17.0.0 || ^18.0.0",
|
|
25
|
-
"@angular/common": "^17.0.0 || ^18.0.0",
|
|
24
|
+
"@angular/core": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
|
|
25
|
+
"@angular/common": "^17.0.0-0 || ^17.1.0-0 || ^17.2.0-0 || ^17.3.0-0 || ^18.0.0-0",
|
|
26
26
|
"rxjs": "^6.5.3 || ^7.4.0"
|
|
27
27
|
},
|
|
28
28
|
"sideEffects": false,
|