Add new Javascript observer
Output render progress onto the rendered map using Javascript A minimum period between updates can be specified
This commit is contained in:
@@ -108,7 +108,26 @@ overviewer.views.CoordboxView = Backbone.View.extend({
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
overviewer.views.ProgressView = Backbone.View.extend({
|
||||
initialize: function() {
|
||||
this.el.id = 'progressDiv';
|
||||
this.el.innerHTML = 'Current Render Progress';
|
||||
overviewer.map.controls[google.maps.ControlPosition.BOTTOM_RIGHT].push(this.el);
|
||||
this.hidden = true;
|
||||
},
|
||||
updateProgress: function() {
|
||||
e = this;
|
||||
$.getJSON('progress.js', null, function(d){
|
||||
e.el.hidden = false;
|
||||
e.el.innerHTML = d['message'];
|
||||
if (d.update > 0) {
|
||||
setTimeout("e.updateProgress()", d.update);
|
||||
} else {
|
||||
e.el.hidden = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/* GoogleMapView is responsible for dealing with the GoogleMaps API to create the
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user