Trying to catch firemap exception

This commit is contained in:
vjrj 2018-01-31 11:53:07 +01:00
parent 57ea015c03
commit 656cc283fe

View file

@ -112,11 +112,15 @@ class FiresMap extends React.Component {
// console.log(map); // console.log(map);
if (map) { if (map) {
console.log('Firesmap loading'); console.log('Firesmap loading');
const bounds = this.getMap().getBounds(); try {
mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]); const bounds = this.getMap().getBounds();
if (!this.state.scaleAdded) { mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
this.addScale(); if (!this.state.scaleAdded) {
this.state.scaleAdded = true; this.addScale();
this.state.scaleAdded = true;
}
} catch (e) {
console.log('Failed to set map bounds and scale');
} }
this.state.union = subsUnion(this.state.union, { this.state.union = subsUnion(this.state.union, {
map, map,