var __loaded_scripts function require_once js_url onload if __loaded_s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var __loaded_scripts = {};
function require_once(js_url, onload) {
if (!__loaded_scripts[js_url]) {
__loaded_scripts[js_url] = 1;
$.getScript(js_url, onload);
return false;
}
return true;
}
// .........
$(function () {
if (require_once("http://maps.googleapis.com/maps/api/js?key=AIzaSyD2qdaXgeNQEJcMS4ZOJB5-rNfFC9Vn4bU&sensor=true&callback=map_init")) {
map_init();
}
});
function map_init() {
$.getScript("/static/js/vendor/markerclusterer.js", function () {
$.getScript("/static/js/vendor/infobox.js", function () {
mapInitChoice();
});
});
}