Fix type annotations
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/**
|
||||
* @namespace ol
|
||||
*/
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ import Units from './proj/Units.js';
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} Default min zoom level for the map view.
|
||||
* Default min zoom level for the map view.
|
||||
* @type {number}
|
||||
*/
|
||||
const DEFAULT_MIN_ZOOM = 0;
|
||||
|
||||
|
||||
@@ -21,15 +21,17 @@ import {containsExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight,
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} Maximum width and/or height extent ratio that determines
|
||||
* when the overview map should be zoomed out.
|
||||
* Maximum width and/or height extent ratio that determines when the overview
|
||||
* map should be zoomed out.
|
||||
* @type {number}
|
||||
*/
|
||||
const MAX_RATIO = 0.75;
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} Minimum width and/or height extent ratio that determines
|
||||
* when the overview map should be zoomed in.
|
||||
* Minimum width and/or height extent ratio that determines when the overview
|
||||
* map should be zoomed in.
|
||||
* @type {number}
|
||||
*/
|
||||
const MIN_RATIO = 0.1;
|
||||
|
||||
|
||||
@@ -6,9 +6,10 @@ import webgl from './webgl.js';
|
||||
|
||||
|
||||
/**
|
||||
* Include debuggable shader sources. Default is `true`. This should be set to
|
||||
* `false` for production builds.
|
||||
* TODO: move to a separate ol-webgl package
|
||||
* @type {boolean} Include debuggable shader sources. Default is `true`.
|
||||
* This should be set to `false` for production builds.
|
||||
* @type {boolean}
|
||||
*/
|
||||
export const DEBUG_WEBGL = true;
|
||||
|
||||
@@ -60,7 +61,8 @@ export {HAS_WEBGL, WEBGL_MAX_TEXTURE_SIZE, WEBGL_EXTENSIONS};
|
||||
|
||||
|
||||
/**
|
||||
* @type {string} OpenLayers version.
|
||||
* OpenLayers version.
|
||||
* @type {string}
|
||||
*/
|
||||
export const VERSION = 'v4.6.4';
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ import {clamp} from '../math.js';
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} Maximum mouse wheel delta.
|
||||
* Maximum mouse wheel delta.
|
||||
* @type {number}
|
||||
*/
|
||||
const MAX_DELTA = 1;
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ const _ol_renderer_vector_ = {};
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} Tolerance for geometry simplification in device pixels.
|
||||
* Tolerance for geometry simplification in device pixels.
|
||||
* @type {number}
|
||||
*/
|
||||
const SIMPLIFY_TOLERANCE = 0.5;
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ import ContextEventType from '../../webgl/ContextEventType.js';
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} Texture cache high water mark.
|
||||
* Texture cache high water mark.
|
||||
* @type {number}
|
||||
*/
|
||||
const WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;
|
||||
|
||||
|
||||
@@ -8,23 +8,22 @@ import {getTransform} from '../proj.js';
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} Maximum number of subdivision steps during raster
|
||||
* reprojection triangulation. Prevents high memory usage and large
|
||||
* number of proj4 calls (for certain transformations and areas).
|
||||
* At most `2*(2^this)` triangles are created for each triangulated
|
||||
* extent (tile/image).
|
||||
* Maximum number of subdivision steps during raster reprojection triangulation.
|
||||
* Prevents high memory usage and large number of proj4 calls (for certain
|
||||
* transformations and areas). At most `2*(2^this)` triangles are created for
|
||||
* each triangulated extent (tile/image).
|
||||
* @type {number}
|
||||
*/
|
||||
const MAX_SUBDIVISION = 10;
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} Maximum allowed size of triangle relative to world width.
|
||||
* When transforming corners of world extent between certain projections,
|
||||
* the resulting triangulation seems to have zero error and no subdivision
|
||||
* is performed.
|
||||
* If the triangle width is more than this (relative to world width; 0-1),
|
||||
* subdivison is forced (up to `MAX_SUBDIVISION`).
|
||||
* Default is `0.25`.
|
||||
* Maximum allowed size of triangle relative to world width. When transforming
|
||||
* corners of world extent between certain projections, the resulting
|
||||
* triangulation seems to have zero error and no subdivision is performed. If
|
||||
* the triangle width is more than this (relative to world width; 0-1),
|
||||
* subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.
|
||||
* @type {number}
|
||||
*/
|
||||
const MAX_TRIANGLE_WIDTH = 0.25;
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
/**
|
||||
* @type {number} Default maximum allowed threshold (in pixels) for
|
||||
* reprojection triangulation.
|
||||
* Default maximum allowed threshold (in pixels) for reprojection
|
||||
* triangulation.
|
||||
* @type {number}
|
||||
*/
|
||||
export const ERROR_THRESHOLD = 0.5;
|
||||
|
||||
/**
|
||||
* Enable automatic reprojection of raster sources. Default is `true`.
|
||||
* TODO: decide if we want to expose this as a build flag or remove it
|
||||
* @type {boolean} Enable automatic reprojection of raster sources. Default is
|
||||
* `true`.
|
||||
* @type {boolean}
|
||||
*/
|
||||
export const ENABLE_RASTER_REPROJECTION = true;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @type {string} Default WMS version.
|
||||
* Default WMS version.
|
||||
* @type {string}
|
||||
*/
|
||||
export const DEFAULT_WMS_VERSION = '1.3.0';
|
||||
|
||||
@@ -6,12 +6,14 @@ import Atlas from '../style/Atlas.js';
|
||||
|
||||
|
||||
/**
|
||||
* @type {number} The size in pixels of the first atlas image.
|
||||
* The size in pixels of the first atlas image.
|
||||
* @type {number}
|
||||
*/
|
||||
const INITIAL_ATLAS_SIZE = 256;
|
||||
|
||||
/**
|
||||
* @type {number} The maximum size in pixels of atlas images.
|
||||
* The maximum size in pixels of atlas images.
|
||||
* @type {number}
|
||||
*/
|
||||
const MAX_ATLAS_SIZE = -1;
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
/**
|
||||
* @type {number} Default maximum zoom for default tile grids.
|
||||
* Default maximum zoom for default tile grids.
|
||||
* @type {number}
|
||||
*/
|
||||
export const DEFAULT_MAX_ZOOM = 42;
|
||||
|
||||
/**
|
||||
* @type {number} Default tile size.
|
||||
* Default tile size.
|
||||
* @type {number}
|
||||
*/
|
||||
export const DEFAULT_TILE_SIZE = 256;
|
||||
|
||||
Reference in New Issue
Block a user