Skip to content

Commit

Permalink
feat(googlemaps): can pass HTMLElement to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Sep 7, 2016
1 parent c407b6d commit dff034a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/googlemaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ export class GoogleMap {
return;
}

constructor(elementId: string, options?: any) {
this._objectInstance = plugin.google.maps.Map.getMap(document.getElementById(elementId), options);
constructor(element: string|HTMLElement, options?: any) {
if (typeof element === 'string') element = document.getElementById(<string>element);
this._objectInstance = plugin.google.maps.Map.getMap(element, options);
}

/**
Expand Down

0 comments on commit dff034a

Please sign in to comment.