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);
|
||||
if (map) {
|
||||
console.log('Firesmap loading');
|
||||
const bounds = this.getMap().getBounds();
|
||||
mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
|
||||
if (!this.state.scaleAdded) {
|
||||
this.addScale();
|
||||
this.state.scaleAdded = true;
|
||||
try {
|
||||
const bounds = this.getMap().getBounds();
|
||||
mapSize.set([bounds.getNorthEast(), bounds.getSouthWest()]);
|
||||
if (!this.state.scaleAdded) {
|
||||
this.addScale();
|
||||
this.state.scaleAdded = true;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Failed to set map bounds and scale');
|
||||
}
|
||||
this.state.union = subsUnion(this.state.union, {
|
||||
map,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue