Skip to content

Commit

Permalink
add event error
Browse files Browse the repository at this point in the history
  • Loading branch information
arg0navt committed Dec 12, 2018
1 parent d4f3577 commit b3c309a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions leaflet.shpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ L.Shapefile = L.GeoJSON.extend({
shp(file).then(function(data) {
self.addData(data);
self.fire('data:loaded');
});
}).catch(function(err) {
self.fire('data:error', err);
})
return this;
}
var promise;
Expand All @@ -49,7 +51,9 @@ L.Shapefile = L.GeoJSON.extend({
self.addData(data);
self.fire('data:loaded');
self.worker.close();
});
}).catch(function(err) {
self.fire('data:error', err);
})
return this;
}
});
Expand Down

0 comments on commit b3c309a

Please sign in to comment.