In the following example posted on
http://code.google.com/apis/ajax/documentation/
I am using the code below, so that the map won't hold up display of
the page.
And it is working great! However....
function mapsLoaded() {
var map = new google.maps.Map2(document.getElementById("map"));
map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13);
}
function loadMaps() {
google.load("maps", "2", {"callback" : mapsLoaded});
}
function initLoader() {
var script = document.createElement("script");
script.src = "http://www.google.com/jsapi?
key=ABCDEFG&callback=loadMaps";
script.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(script);
}
Now I want to display two maps on the same page using this technique.
However, I'll need a way to pass in the "id" of the element as an
argument in the initLoader() but I'll be stuck here:
script.src = "http://www.google.com/jsapi?
key=ABCDEFG&callback=loadMaps";
does jsapi support arguments passing into thte callback? If so, what
would the name value pairs be in this url?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-AJAX-Search-API?hl=en
-~----------~----~----~----~------~----~------~--~---