MCPcopy Index your code
hub / github.com/angular/components / _combineOptions

Method _combineOptions

src/google-maps/google-map/google-map.ts:515–528  ·  view source on GitHub ↗

Combines the center and zoom and the other map options into a single object

()

Source from the content-addressed store, hash-verified

513
514 /** Combines the center and zoom and the other map options into a single object */
515 private _combineOptions(): google.maps.MapOptions {
516 const options = this._options || {};
517 return {
518 ...options,
519 // It's important that we set **some** kind of `center` and `zoom`, otherwise
520 // Google Maps will render a blank rectangle which looks broken.
521 center: this._center || options.center || DEFAULT_OPTIONS.center,
522 zoom: this._zoom ?? options.zoom ?? DEFAULT_OPTIONS.zoom,
523 // Passing in an undefined `mapTypeId` seems to break tile loading
524 // so make sure that we have some kind of default (see #22082).
525 mapTypeId: this.mapTypeId || options.mapTypeId || DEFAULT_OPTIONS.mapTypeId,
526 mapId: this.mapId || options.mapId,
527 };
528 }
529
530 /** Asserts that the map has been initialized. */
531 private _assertInitialized(): asserts this is {googleMap: google.maps.Map} {

Callers 2

ngOnChangesMethod · 0.95
_initializeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected