Open GoogleCodeExporter opened 8 years ago
This is related to this issue:
http://code.google.com/p/gmaps-utility-library-dev/issues/detail?id=34
Randy has written a dynamic loader in a branch in the library that you can
check out.
The basic solution is to use dynamic script creation to load in the libraries,
after
the Maps API has loaded in, and to not use them until they've been loaded in
(using
script.onreadystate or script.onload callbacks).
Original comment by pamela.fox
on 13 Sep 2008 at 5:43
hi, thx for reply.
are you mean the dynamic loading in google map api ?
I not sure if it can load Marker manger or dragzoom control. (i think to make
this
both work if u ajax to load map api, the map api still need to load into
browser b4
this 2 library..
any idea ?
kiwi
----
happy hacking !
Original comment by kiwio...@gmail.com
on 14 Sep 2008 at 12:55
You can use a function like this to load in a extension script and know when
it's done:
function getJs() {
var script = document.createElement("script");
script.src = "http://imagine-it.org/google/slideshowcontrol.js";
// Firefox
script.onload = loadMap;
// IE
script.onreadystatechange = function() {
if (/loaded|complete/.test(this.readyState)) {
loadMap();
}
}
document.body.appendChild(script);
}
Original comment by pamela.fox
on 26 Sep 2008 at 12:54
Original issue reported on code.google.com by
kiwio...@gmail.com
on 12 Sep 2008 at 6:51