BBox bounds can not be bigger then the entire world anymore, fixes performance issues
This commit is contained in:
parent
24f0089e57
commit
c31a50b139
1 changed files with 11 additions and 4 deletions
|
@ -22,6 +22,13 @@ export class BBox {
|
|||
this.minLon = Math.min(this.minLon, coordinate[0]);
|
||||
this.minLat = Math.min(this.minLat, coordinate[1]);
|
||||
}
|
||||
|
||||
this.maxLon = Math.min(this.maxLon, 180)
|
||||
this.maxLat = Math.min(this.maxLat, 90)
|
||||
this.minLon = Math.max(this.minLon, -180)
|
||||
this.minLat = Math.max(this.minLat, -90)
|
||||
|
||||
|
||||
this.check();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue