Guys,
I have a problem when I try to load multiple HTML files using
GDownloadURL.
Im creating a test page to load 4 marker and 4 different HTML files.
If i put an alert box after the GDownloadURL, things will work
perfectly, but if I remove the alert box, it will give me an error:
__e_ is null or not an object.
Can anybody point me to a right direction.
I cant post the URL here cause the page is located in our MOSS site.
Here is the code:
for (var i=0; i < points.length; i++) {
if(opts.iCat){ // category from file contents
catName = points[i].textArray[opts.iCat];
}
var theIcon = opts.icon||CAT_ICONS[catName]||CAT_ICONS
["DEFAULT_ICON"];
if(!bar.cats[catName]&&!noCat){ // create a category if
not found
myCat = new BarCategory(bar, catName,
{icon:theIcon});
newCats.push(myCat);
}
var iLabel = opts.iLabel||2;
var label = points[i].textArray[iLabel];
var iHeader = opts.iLable||3;
// InfoWindow Header
var txtHeader = points[i].textArray[iHeader];
// InfoWindow
Header
var iBody = opts.iLable||4;
// InfoWindow Body
var txtBody = points[i].textArray[iBody];
// InfoWindow Body
var iFile = opts.iLable||5;
// HTML file
var fnFile = points[i].textArray[iFile];
// HTML file
var fileCnt = "";
var dispFile = true;
var process = function(material){
var html = material;
points[i].marker = createMarker(points[i],
label, theIcon,
txtHeader, "<b>" + txtHeader + "</b><br>" + txtBody, html);
map.addOverlay(points[i].marker);
bounds.extend(points[i]); // this must be
considered
}
GDownloadUrl("htmlfiles/" + fnFile, process);
// alert("Loading map");
if(noCat){
bar.addEntry(points[i],opts);
}else{
myCat.addEntry(points[i],opts);
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---