UNPKG

@here/harp-mapview

Version:

Functionality needed to render a map.

39 lines 1.99 kB
/** * Specifies how the FOV (Field of View) should be calculated. */ export interface FovCalculation { /** * 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. */ type: "fixed" | "dynamic"; /** * Vertical field of view in degrees. * If [[type]] is `fixed` then the supplied [[fov]] is fixed regardless of * [[viewportHeight]] or [[viewportWidth]]. * * If [[type]] is `dynamic` then the supplied [[fov]] is applied to the * first frame, and the focal length calculated. Changes to the viewport * height no longer shrink the content because the field of view is updated * dynamically. */ fov: number; } export declare const DEFAULT_FOV_CALCULATION: FovCalculation; export declare const MIN_FOV_DEG = 10; export declare const MAX_FOV_DEG = 140; export declare const MIN_FOV_RAD: number; export declare const MAX_FOV_RAD: number; //# sourceMappingURL=FovCalculation.d.ts.map