mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
feat(googlemaps): can pass HTMLElement to constructor
This commit is contained in:
parent
c407b6d4f0
commit
dff034a5b6
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user