mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-05-07 02:42:56 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(elementId: string, options?: any) {
|
constructor(element: string|HTMLElement, options?: any) {
|
||||||
this._objectInstance = plugin.google.maps.Map.getMap(document.getElementById(elementId), options);
|
if (typeof element === 'string') element = document.getElementById(<string>element);
|
||||||
|
this._objectInstance = plugin.google.maps.Map.getMap(element, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user