Skip to content

Commit

Permalink
fixing a bug with geojson convert
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbarela committed Nov 10, 2018
1 parent 6f5b865 commit af83a43
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/common.js
Expand Up @@ -132,14 +132,17 @@ function handleGeoJSONByteArray(array, geoJsonDoneCallback) {
var json = JSON.parse(jsonString);
GeoJSONToGeoPackage.convert({
geojson:json
}, function(status, callback) {
}, function(status) {
var text = status.status;
if (status.completed) {
text += ' - ' + ((status.completed / status.total) * 100).toFixed(2) + ' (' + status.completed + ' of ' + status.total + ')';
}
$('#status').text(text);
setTimeout(callback, 0);
}, function(err, gp) {
return new Promise(function(resolve, reject) {
setTimeout(function() {resolve();}, 0);
})
})
.then(function(gp) {
geoPackage = gp;
clearInfo();
readGeoPackage();
Expand Down

0 comments on commit af83a43

Please sign in to comment.