Skip to content

Commit

Permalink
feat(GoogleMapsAPILoader): change default API version (#1577)
Browse files Browse the repository at this point in the history
This changes the default version of the Google Maps API to `quarterly`
because the Google Maps team changed the version strategy.

closes #1573

BREAKING CHANGES

This could change the Google Maps API version - so please check if you
need to change the setting of the `apiVersion` attribute in the
`AgmCodeModule.forRoot()` call.
  • Loading branch information
sebholstein authored Jan 20, 2019
1 parent 1e6395d commit 2fc1a21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('Service: LazyMapsAPILoader', () => {
expect(scriptElem.src).toBeDefined();
expect(scriptElem.id).toEqual('agmGoogleMapsApiScript');
expect(scriptElem.src).toContain('https://maps.googleapis.com/maps/api/js');
expect(scriptElem.src).toContain('v=3');
expect(scriptElem.src).toContain('v=quarterly');
expect(scriptElem.src).toContain('callback=agmLazyMapsAPILoader');
expect(doc.body.appendChild).toHaveBeenCalledWith(scriptElem);
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class LazyMapsAPILoader extends MapsAPILoader {

const hostAndPath: string = this._config.hostAndPath || 'maps.googleapis.com/maps/api/js';
const queryParams: {[key: string]: string | Array<string>} = {
v: this._config.apiVersion || '3',
v: this._config.apiVersion || 'quarterly',
callback: callbackName,
key: this._config.apiKey,
client: this._config.clientId,
Expand Down

2 comments on commit 2fc1a21

@newprogrammer1991
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

picturemessage_2wcauaht 1j4

@newprogrammer1991
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry but with quarterly I am getting error with script

Please sign in to comment.