google.load("jquery", "1.4.2"); google.load("maps", "3.x", {"other_params":"sensor=false"}); var loadTime = 0; var loadTimeInterval = setInterval(function() { if(loadTime > 15) { $.ajax({ url: '/maps/email_error.php', type: 'GET', dataType: 'json', success: function(json) {} }); clearInterval(loadTimeInterval); } loadTime++; }, 1000); //scriptList = ["/js/clientmap"]; var clientmap; function search(q, callback) { if(clientmap) clientmap.search(q, callback); } function getData() {return (clientmap ? clientmap.getData() : null); } function currentURL() {return (clientmap ? clientmap.currentURL : null); } function showResults(results) {return (clientmap ? clientmap.showResults(results) : null); } function loadPage() { loadMVC(); clientmap = $("#map").app("Clientmap", "load", { getAllURL: '/maps/researchgroups/groups.cache', objName: 'researchlab', getName: function(item) { return item.Info.labname; }, getUniversity: function(item) { return item.University.name; }, getURL: function(item) { return item.Info.laburl; }, onload: function() { clearInterval(loadTimeInterval); }, processResults: function(data, results) { for(var i in data) { data[i].enabledSearchResult = false; } for(var k in results) { if(data[clientmap.getMarkerId(results[k])]) data[clientmap.getMarkerId(results[k])].enabledSearchResult = true; } return data; }, orderResults: function(data) { var newData = {}; for(var i in data) { var id = data[i].Info.labname + "-" + data[i].University.name; id = id.replace(/[.,?!\s,]/g, "-"); newData[id] = data[i]; newData[id]['order'] = i; } return newData; }, getMarkerId: function(item) { var id = item.Info.labname + "-" + item.University.name; id = id.replace(/[.,?!\s,]/g, "-"); //console.log(id); return id; } }); } function updateMessageLocal(msg_id, count) { }