Hey,
I'm sincerely sorry to behave as a noob...
That's true, I'm not a javascript coder but I really begin to understand it as well as the C2's SDK.
Enough to do 5-6 functions in my "workinprogress" plugin in a short time of learning.
I looked through the code of the facebook plugin. Read about asynchronous option for the Google Maps API.
Nevertheless, I didn't figure out.
Let me just explain you some things.
I put this in a "googleapi.js" file
function loadScript()
{
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.googleapis.com/maps/api/js?sensor=true";
document.head.appendChild(script);
}
window.onload = loadScript;
I "dependency" it in my edittime.js
It didn't work. I tried to put this function directly into instanceProto.onCreate = function() as well. But it didn't work too.
Each time, I can see the link correctly added in the <head> of my html test in FireBug.
But google is always not defined.
The API is correctly called only when I put the link manually into the index.html after I exported it.
Thanks for your help. I'm really grateful.