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?
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