Change projection property in sources options to optional
The `projection` property is not mandatory, the view's projection is used if not provided.
This commit is contained in:
@@ -40,7 +40,7 @@ const GETFEATUREINFO_IMAGE_SIZE = [101, 101];
|
|||||||
* At least a `LAYERS` param is required. `STYLES` is
|
* At least a `LAYERS` param is required. `STYLES` is
|
||||||
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`
|
* `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`
|
||||||
* and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.
|
* and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.
|
||||||
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
||||||
* @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means
|
* @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means
|
||||||
* twice the width and height of the map viewport, and so on. Must be `1` or
|
* twice the width and height of the map viewport, and so on. Must be `1` or
|
||||||
* higher.
|
* higher.
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import SourceState from './State.js';
|
|||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {AttributionLike} [attributions]
|
* @property {AttributionLike} [attributions]
|
||||||
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
|
||||||
* @property {import("../proj.js").ProjectionLike} projection
|
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
||||||
* @property {SourceState} [state='ready']
|
* @property {SourceState} [state='ready']
|
||||||
* @property {boolean} [wrapX=false]
|
* @property {boolean} [wrapX=false]
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import {appendParams} from '../uri.js';
|
|||||||
* If this is not defined, a default grid will be used: if there is a projection
|
* If this is not defined, a default grid will be used: if there is a projection
|
||||||
* extent, the grid will be based on that; if not, a grid based on a global
|
* extent, the grid will be based on that; if not, a grid based on a global
|
||||||
* extent with origin at 0,0 will be used.
|
* extent with origin at 0,0 will be used.
|
||||||
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
||||||
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
||||||
* Higher values can increase reprojection performance, but decrease precision.
|
* Higher values can increase reprojection performance, but decrease precision.
|
||||||
* @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.
|
* @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
|
|||||||
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
||||||
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
||||||
* @property {boolean} [opaque=true] Whether the layer is opaque.
|
* @property {boolean} [opaque=true] Whether the layer is opaque.
|
||||||
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
||||||
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
||||||
* Higher values can increase reprojection performance, but decrease precision.
|
* Higher values can increase reprojection performance, but decrease precision.
|
||||||
* @property {import("./State.js").default} [state] Source state.
|
* @property {import("./State.js").default} [state] Source state.
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ import {appendParams} from '../uri.js';
|
|||||||
* this. See http://mapserver.org/output/tile_mode.html.
|
* this. See http://mapserver.org/output/tile_mode.html.
|
||||||
* @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting
|
* @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting
|
||||||
* the image from the remote server.
|
* the image from the remote server.
|
||||||
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
||||||
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
||||||
* Higher values can increase reprojection performance, but decrease precision.
|
* Higher values can increase reprojection performance, but decrease precision.
|
||||||
* @property {typeof import("../ImageTile.js").default} [tileClass] Class used to instantiate image tiles.
|
* @property {typeof import("../ImageTile.js").default} [tileClass] Class used to instantiate image tiles.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
|||||||
* to `false` (e.g. for sources with polygons that represent administrative
|
* to `false` (e.g. for sources with polygons that represent administrative
|
||||||
* boundaries or TopoJSON sources) allows the renderer to optimise fill and
|
* boundaries or TopoJSON sources) allows the renderer to optimise fill and
|
||||||
* stroke operations.
|
* stroke operations.
|
||||||
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
||||||
* @property {import("./State.js").default} [state] Source state.
|
* @property {import("./State.js").default} [state] Source state.
|
||||||
* @property {typeof import("../VectorTile.js").default} [tileClass] Class used to instantiate image tiles.
|
* @property {typeof import("../VectorTile.js").default} [tileClass] Class used to instantiate image tiles.
|
||||||
* Default is {@link module:ol/VectorTile}.
|
* Default is {@link module:ol/VectorTile}.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {appendParams} from '../uri.js';
|
|||||||
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
* you must provide a `crossOrigin` value if you want to access pixel data with the Canvas renderer.
|
||||||
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.
|
||||||
* @property {import("../tilegrid/WMTS.js").default} tileGrid Tile grid.
|
* @property {import("../tilegrid/WMTS.js").default} tileGrid Tile grid.
|
||||||
* @property {import("../proj.js").ProjectionLike} projection Projection.
|
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
|
||||||
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
||||||
* Higher values can increase reprojection performance, but decrease precision.
|
* Higher values can increase reprojection performance, but decrease precision.
|
||||||
* @property {import("./WMTSRequestEncoding.js").default|string} [requestEncoding='KVP'] Request encoding.
|
* @property {import("./WMTSRequestEncoding.js").default|string} [requestEncoding='KVP'] Request encoding.
|
||||||
|
|||||||
Reference in New Issue
Block a user