westdc-zf1/htdocs/js/timemap.2.0.1/tests/infoWindowTests.js

33 lines
849 B
JavaScript

// namespace for info window tests
var IWT = {};
IWT.setUpEventually = function() {
var timeoutLimit = 3000,
timeoutInterval = 100,
elapsed = 0,
timeoutId;
function look() {
IWT.success = IWT.setupTest();
if (IWT.success || elapsed > timeoutLimit) {
setUpPageStatus = "complete";
}
else {
elapsed += timeoutInterval;
timeoutId = window.setTimeout(look, timeoutInterval);
}
}
look();
}
function setUpPage() {
IWT.tm = TimeMap.init({
mapId: "map", // Id of map div element (required)
timelineId: "timeline", // Id of timeline div element (required)
datasets: [
IWT.dataset
]
});
IWT.setup();
IWT.setUpEventually();
}