Combines the center and zoom and the other map options into a single object
()
| 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} { |
no outgoing calls
no test coverage detected