Adds hashlink to url after running prediction, gets hashlink from url on page load. Doesn't populate form yet
rodzic
9e9169e295
commit
7c80b0aa05
|
@ -42,6 +42,10 @@ var clickListener;
|
|||
var clickMarker;
|
||||
|
||||
function initialize() {
|
||||
if(window.location.hash != "") {
|
||||
var ln = window.location.hash.split("=");
|
||||
current_uuid = ln[1];
|
||||
}
|
||||
// make the map and set center
|
||||
var latlng = new google.maps.LatLng(52, 0);
|
||||
var myOptions = {
|
||||
|
|
|
@ -33,6 +33,11 @@ function populateFormByUUID(pred_uuid) {
|
|||
}, 'json');
|
||||
}
|
||||
|
||||
function addHashLink(link) {
|
||||
var ln = "#!/" + link;
|
||||
window.location = ln;
|
||||
}
|
||||
|
||||
function showMousePos(GLatLng) {
|
||||
var curr_lat = GLatLng.lat().toFixed(4);
|
||||
var curr_lon = GLatLng.lng().toFixed(4);
|
||||
|
@ -122,6 +127,7 @@ function processProgress(progress) {
|
|||
clearInterval(ajaxEventHandle);
|
||||
// parse the data
|
||||
getCSV(current_uuid);
|
||||
addHashLink("uuid="+current_uuid);
|
||||
} else if ( progress['pred_running'] != true ) {
|
||||
$("#prediction_status").html("Waiting for predictor to run...");
|
||||
appendDebug("Server says: predictor not yet running...");
|
||||
|
|
Ładowanie…
Reference in New Issue