Skip to main content

flywave-mapview.lookatparams.bounds

Home > @flywave/flywave-mapview > LookAtParams > bounds

LookAtParams.bounds property

Fit MapView to these boundaries.

If specified, zoomLevel and distance parameters are ignored and lookAt calculates best zoomLevel to fit given bounds.

* if bounds is , then lookAt use LookAtParams.target or bounds.target and ensure whole box is visible

* if bounds is , then lookAt use bounds.getCentroid() and ensure whole polygon is visible

* if bounds is , then lookAt will use LookAtParams.target or current MapView.target and ensure whole extents are visible

* if bounds is [[GeoCoordLike]][], then lookAt will use LookAtParams.target or calculated target as center of world box covering given points and ensure all points are visible

Note in sphere projection some points are not visible if you specify bounds that span more than 180 degrees in any direction.

Signature:

bounds: GeoBox | GeoBoxExtentLike | GeoCoordLike[] | GeoPolygon;