Skip to main content

Function: _visibleWorldBounds()

_visibleWorldBounds(viewport): [Bounds] | [Bounds, Bounds]

Defined in: packages/deck.gl-raster/src/raster-tileset/visible-world-bounds.ts:19

The parts of the world that viewport shows, as longitude/latitude boxes within [-180, 180].

Near the antimeridian viewport.getBounds() runs past ±180°. There, Web Mercator with repeat shows another copy of the world, and a globe shows the other side of the antimeridian. So the bounds are moved back within [-180, 180], and split in two at ±180° if they cross it. Web Mercator without repeat draws nothing past ±180°, so its bounds are cut off there.

Parameters​

viewport​

Pick<Viewport, "getBounds" | "subViewports">

Returns​

[Bounds] | [Bounds, Bounds]