feat(googlemaps): can pass HTMLElement to constructor

This commit is contained in:
Ibrahim Hadeed 2016-09-06 23:23:06 -04:00
parent c407b6d4f0
commit dff034a5b6
No known key found for this signature in database
GPG Key ID: 0431793F665481A4

View File

@ -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);
}
/**