跳到主要内容

flywave-mapview.fovcalculation.type

Home > @flywave/flywave-mapview > FovCalculation > type

FovCalculation.type property

How to interpret the [[fov]], can be either fixed or dynamic.

fixed means that the FOV is fixed regardless of the [[viewportHeight]], such that shrinking the height causes the map to shrink to keep the content in view. The benefit is that, regardless of any resizes, the field of view is constant, which means there is no change in the distortion of buildings near the edges. However the trade off is that the zoom level changes, which means that the map will pull in new tiles, hence causing some flickering.

dynamic means that the focal length is calculated based on the supplied [[fov]] and [[viewportHeight]], this means that the map doesn't scale (the image is essentially cropped but not shrunk) when the [[viewportHeight]] or [[viewportWidth]] is changed. The benefit is that the zoom level is (currently) stable during resize, because the focal length is used, however the tradeoff is that changing from a small to a big height will cause the fov to change a lot, and thus introduce distortion.

Signature:

type: "fixed" | "dynamic";