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,12 +112,16 @@ class FiresMap extends React.Component {
// console.log(map); // console.log(map);
if (map) { if (map) {
console.log('Firesmap loading'); console.log('Firesmap loading');
try {
const bounds = this.getMap().getBounds(); const bounds = this.getMap().getBounds();
mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]); mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
if (!this.state.scaleAdded) { if (!this.state.scaleAdded) {
this.addScale(); this.addScale();
this.state.scaleAdded = true; 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,
subs: this.props.userSubs, subs: this.props.userSubs,