From 42311a0275265594d5278a980c57604da89b4cbe Mon Sep 17 00:00:00 2001 From: roblevesque Date: Thu, 7 Jul 2016 12:17:27 -0400 Subject: [PATCH] move _callback() call --- mapview/js/mapviewgl.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mapview/js/mapviewgl.js b/mapview/js/mapviewgl.js index 0bf2272..a1b7670 100644 --- a/mapview/js/mapviewgl.js +++ b/mapview/js/mapviewgl.js @@ -23,12 +23,13 @@ function loadData(_callback) { xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { jsonEmpire = JSON.parse(xmlhttp.responseText); + _callback(); } }; xmlhttp.open("GET", url, true); xmlhttp.send(); - _callback(); + } function init() { scene = new THREE.Scene();