Trying to catch firemap exception
This commit is contained in:
parent
57ea015c03
commit
656cc283fe
1 changed files with 9 additions and 5 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue