Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Dynamically loading along with Gmaps #557

Open
jarodium opened this issue Jul 14, 2017 · 1 comment
Open

Dynamically loading along with Gmaps #557

jarodium opened this issue Jul 14, 2017 · 1 comment

Comments

@jarodium
Copy link

Hello.

I was looking at this code

`

document.addEventListener('DOMContentLoaded', function () {
var element = document.createElement('script');
element.src =
'http://maps.google.com/maps/api/js?sensor=true&callback=Initialize';
element.type = 'text/javascript';
var scripts = document.getElementsByTagName('script')[0];
scripts.parentNode.insertBefore(element, scripts);
}, false);
`
And was wondering how to link Gmaps after it. The "Initialize" callback should load Gmaps and after Gmaps another "Init..." function should be there. That's what I infer from this snippet.

Is there any way to load Google Maps and Gmaps and use only one callback for init?

Best regards

@wrabit
Copy link

wrabit commented Jun 13, 2018

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants