diff --git a/src/ol.jsdoc b/src/ol.jsdoc deleted file mode 100644 index 2c1bf53836..0000000000 --- a/src/ol.jsdoc +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @namespace ol - */ - diff --git a/src/ol/control/index.jsdoc b/src/ol/control/index.jsdoc deleted file mode 100644 index bd09e4c9b2..0000000000 --- a/src/ol/control/index.jsdoc +++ /dev/null @@ -1,3 +0,0 @@ -/** - * @namespace ol.control - */ diff --git a/src/ol/format/filter/index.jsdoc b/src/ol/format/filter/index.jsdoc deleted file mode 100644 index dcd136cd62..0000000000 --- a/src/ol/format/filter/index.jsdoc +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This namespace contains convenience functions to create filters for - * {@link ol.format.WFS#writeGetFeature}. - * - * For example to generate a `GetFeature` request with a `PropertyIsEqualTo` filter: - * - * var request = new ol.format.WFS().writeGetFeature({ - * srsName: 'urn:ogc:def:crs:EPSG::4326', - * featureNS: 'http://www.openplans.org/topp', - * featurePrefix: 'topp', - * featureTypes: ['states'], - * filter: ol.format.filter.equalTo('name', 'New York') - * }); - * - * Or to combine a `BBOX` filter with a `PropertyIsLike` filter: - * - * var f = ol.format.filter; - * var request = new ol.format.WFS().writeGetFeature({ - * srsName: 'urn:ogc:def:crs:EPSG::4326', - * featureNS: 'http://www.openplans.org/topp', - * featurePrefix: 'topp', - * featureTypes: ['states'], - * filter: f.and( - * f.bbox('the_geom', [1, 2, 3, 4], 'urn:ogc:def:crs:EPSG::4326'), - * f.like('name', 'New*') - * ) - * }); - * @namespace ol.format.filter - */ diff --git a/src/ol/format/index.jsdoc b/src/ol/format/index.jsdoc deleted file mode 100644 index d70dd02b50..0000000000 --- a/src/ol/format/index.jsdoc +++ /dev/null @@ -1,3 +0,0 @@ -/** - * @namespace ol.format - */ diff --git a/src/ol/geom/geom.jsdoc b/src/ol/geom/geom.jsdoc deleted file mode 100644 index 1a947e51f3..0000000000 --- a/src/ol/geom/geom.jsdoc +++ /dev/null @@ -1,3 +0,0 @@ -/** - * @namespace ol.geom - */ diff --git a/src/ol/layer/layer.jsdoc b/src/ol/layer/layer.jsdoc deleted file mode 100644 index 29e9851de5..0000000000 --- a/src/ol/layer/layer.jsdoc +++ /dev/null @@ -1,3 +0,0 @@ -/** - * @namespace ol.layer - */ diff --git a/src/ol/proj.js b/src/ol/proj.js index c910b8e93b..e2633575b0 100644 --- a/src/ol/proj.js +++ b/src/ol/proj.js @@ -1,6 +1,58 @@ /** * @module ol/proj */ + +/** + * The ol/proj module stores: + * * a list of {@link module:ol/proj/Projection} + * objects, one for each projection supported by the application + * * a list of transform functions needed to convert coordinates in one projection + * into another. + * + * The static functions are the methods used to maintain these. + * Each transform function can handle not only simple coordinate pairs, but also + * large arrays of coordinates such as vector geometries. + * + * When loaded, the library adds projection objects for EPSG:4326 (WGS84 + * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used + * for example by Bing Maps or OpenStreetMap), together with the relevant + * transform functions. + * + * Additional transforms may be added by using the {@link http://proj4js.org/} + * library (version 2.2 or later). You can use the full build supplied by + * Proj4js, or create a custom build to support those projections you need; see + * the Proj4js website for how to do this. You also need the Proj4js definitions + * for the required projections. These definitions can be obtained from + * {@link https://epsg.io/}, and are a JS function, so can be loaded in a script + * tag (as in the examples) or pasted into your application. + * + * After all required projection definitions are added to proj4's registry (by + * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4` + * package. Existing transforms are not changed by this function. See + * examples/wms-image-custom-proj for an example of this. + * + * Additional projection definitions can be registered with `proj4.defs()` any + * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't + * know in advance what projections are needed, you can initially load minimal + * support and then load whichever are requested. + * + * Note that Proj4js does not support projection extents. If you want to add + * one for creating default tile grids, you can add it after the Projection + * object has been created with `setExtent`, for example, + * `get('EPSG:1234').setExtent(extent)`. + * + * In addition to Proj4js support, any transform functions can be added with + * {@link module:ol/proj~addCoordinateTransforms}. To use this, you must first create + * a {@link module:ol/proj/Projection} object for the new projection and add it with + * {@link module:ol/proj~addProjection}. You can then add the forward and inverse + * functions with {@link module:ol/proj~addCoordinateTransforms}. See + * examples/wms-custom-proj for an example of this. + * + * Note that if no transforms are needed and you only need to define the + * projection, just add a {@link module:ol/proj/Projection} with + * {@link module:ol/proj~addProjection}. See examples/wms-no-proj for an example of + * this. + */ import {getDistance} from './sphere.js'; import {applyTransform} from './extent.js'; import {modulo} from './math.js'; diff --git a/src/ol/proj/index.jsdoc b/src/ol/proj/index.jsdoc deleted file mode 100644 index cd1a26ca72..0000000000 --- a/src/ol/proj/index.jsdoc +++ /dev/null @@ -1,53 +0,0 @@ -/** - * The ol.proj namespace stores: - * * a list of {@link ol.proj.Projection} - * objects, one for each projection supported by the application - * * a list of transform functions needed to convert coordinates in one projection - * into another. - * - * The static functions are the methods used to maintain these. - * Each transform function can handle not only simple coordinate pairs, but also - * large arrays of coordinates such as vector geometries. - * - * When loaded, the library adds projection objects for EPSG:4326 (WGS84 - * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used - * for example by Bing Maps or OpenStreetMap), together with the relevant - * transform functions. - * - * Additional transforms may be added by using the {@link http://proj4js.org/} - * library (version 2.2 or later). You can use the full build supplied by - * Proj4js, or create a custom build to support those projections you need; see - * the Proj4js website for how to do this. You also need the Proj4js definitions - * for the required projections. These definitions can be obtained from - * {@link https://epsg.io/}, and are a JS function, so can be loaded in a script - * tag (as in the examples) or pasted into your application. - * - * After all required projection definitions are added to proj4's registry (by - * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4` - * package. Existing transforms are not changed by this function. See - * examples/wms-image-custom-proj for an example of this. - * - * Additional projection definitions can be registered with `proj4.defs()` any - * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't - * know in advance what projections are needed, you can initially load minimal - * support and then load whichever are requested. - * - * Note that Proj4js does not support projection extents. If you want to add - * one for creating default tile grids, you can add it after the Projection - * object has been created with `setExtent`, for example, - * `ol.proj.get('EPSG:1234').setExtent(extent)`. - * - * In addition to Proj4js support, any transform functions can be added with - * {@link ol.proj.addCoordinateTransforms}. To use this, you must first create - * a {@link ol.proj.Projection} object for the new projection and add it with - * {@link ol.proj.addProjection}. You can then add the forward and inverse - * functions with {@link ol.proj.addCoordinateTransforms}. See - * examples/wms-custom-proj for an example of this. - * - * Note that if no transforms are needed and you only need to define the - * projection, just add a {@link ol.proj.Projection} with - * {@link ol.proj.addProjection}. See examples/wms-no-proj for an example of - * this. - * - * @namespace ol.proj - */ diff --git a/src/ol/render/canvas/index.jsdoc b/src/ol/render/canvas/index.jsdoc deleted file mode 100644 index cea6b9f9f7..0000000000 --- a/src/ol/render/canvas/index.jsdoc +++ /dev/null @@ -1,3 +0,0 @@ -/** - * @namespace ol.render.canvas - */ diff --git a/src/ol/render/webgl/index.jsdoc b/src/ol/render/webgl/index.jsdoc deleted file mode 100644 index 2ac3cda5ae..0000000000 --- a/src/ol/render/webgl/index.jsdoc +++ /dev/null @@ -1,3 +0,0 @@ -/** - * @namespace ol.render.webgl - */ diff --git a/src/ol/renderer/index.jsdoc b/src/ol/renderer/index.jsdoc deleted file mode 100644 index d46e59c1d8..0000000000 --- a/src/ol/renderer/index.jsdoc +++ /dev/null @@ -1,3 +0,0 @@ -/** - * @namespace ol.renderer - */ diff --git a/src/ol/style/Style.js b/src/ol/style/Style.js index fe1e3557f0..05d7150d11 100644 --- a/src/ol/style/Style.js +++ b/src/ol/style/Style.js @@ -1,6 +1,90 @@ /** * @module ol/style/Style */ + +/** + * Feature styles. + * + * If no style is defined, the following default style is used: + * ```js + * import {Fill, Stroke, Cirle, Style} from 'ol/style'; + * + * var fill = new Fill({ + * color: 'rgba(255,255,255,0.4)' + * }); + * var stroke = new Stroke({ + * color: '#3399CC', + * width: 1.25 + * }); + * var styles = [ + * new Style({ + * image: new Circle({ + * fill: fill, + * stroke: stroke, + * radius: 5 + * }), + * fill: fill, + * stroke: stroke + * }) + * ]; + * ``` + * + * A separate editing style has the following defaults: + * ```js + * import {Fill, Stroke, Cirle, Style} from 'ol/style'; + * import GeometryType from 'ol/geom/GeometryType'; + * + * var white = [255, 255, 255, 1]; + * var blue = [0, 153, 255, 1]; + * var width = 3; + * styles[GeometryType.POLYGON] = [ + * new Style({ + * fill: new Fill({ + * color: [255, 255, 255, 0.5] + * }) + * }) + * ]; + * styles[GeometryType.MULTI_POLYGON] = + * styles[GeometryType.POLYGON]; + * styles[GeometryType.LINE_STRING] = [ + * new Style({ + * stroke: new Stroke({ + * color: white, + * width: width + 2 + * }) + * }), + * new Style({ + * stroke: new Stroke({ + * color: blue, + * width: width + * }) + * }) + * ]; + * styles[GeometryType.MULTI_LINE_STRING] = + * styles[GeometryType.LINE_STRING]; + * styles[GeometryType.POINT] = [ + * new Style({ + * image: new Circle({ + * radius: width * 2, + * fill: new Fill({ + * color: blue + * }), + * stroke: new Stroke({ + * color: white, + * width: width / 2 + * }) + * }), + * zIndex: Infinity + * }) + * ]; + * styles[GeometryType.MULTI_POINT] = + * styles[GeometryType.POINT]; + * styles[GEOMETRY_COLLECTION] = + * styles[GeometryType.POLYGON].concat( + * styles[GeometryType.POINT] + * ); + * ``` + */ import {assert} from '../asserts.js'; import GeometryType from '../geom/GeometryType.js'; import CircleStyle from '../style/Circle.js'; diff --git a/src/ol/style/index.jsdoc b/src/ol/style/index.jsdoc deleted file mode 100644 index 39f6db8644..0000000000 --- a/src/ol/style/index.jsdoc +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Feature styles. - * - * If no style is defined, the following default style is used: - * ```js - * var fill = new ol.style.Fill({ - * color: 'rgba(255,255,255,0.4)' - * }); - * var stroke = new ol.style.Stroke({ - * color: '#3399CC', - * width: 1.25 - * }); - * var styles = [ - * new ol.style.Style({ - * image: new ol.style.Circle({ - * fill: fill, - * stroke: stroke, - * radius: 5 - * }), - * fill: fill, - * stroke: stroke - * }) - * ]; - * ``` - * - * A separate editing style has the following defaults: - * ```js - * import GeometryType from ol/geom/GeometryType - * var white = [255, 255, 255, 1]; - * var blue = [0, 153, 255, 1]; - * var width = 3; - * styles[GeometryType.POLYGON] = [ - * new ol.style.Style({ - * fill: new ol.style.Fill({ - * color: [255, 255, 255, 0.5] - * }) - * }) - * ]; - * styles[GeometryType.MULTI_POLYGON] = - * styles[GeometryType.POLYGON]; - * styles[GeometryType.LINE_STRING] = [ - * new ol.style.Style({ - * stroke: new ol.style.Stroke({ - * color: white, - * width: width + 2 - * }) - * }), - * new ol.style.Style({ - * stroke: new ol.style.Stroke({ - * color: blue, - * width: width - * }) - * }) - * ]; - * styles[GeometryType.MULTI_LINE_STRING] = - * styles[GeometryType.LINE_STRING]; - * styles[GeometryType.POINT] = [ - * new ol.style.Style({ - * image: new ol.style.Circle({ - * radius: width * 2, - * fill: new ol.style.Fill({ - * color: blue - * }), - * stroke: new ol.style.Stroke({ - * color: white, - * width: width / 2 - * }) - * }), - * zIndex: Infinity - * }) - * ]; - * styles[GeometryType.MULTI_POINT] = - * styles[GeometryType.POINT]; - * styles[GEOMETRY_COLLECTION] = - * styles[GeometryType.POLYGON].concat( - * styles[GeometryType.POINT] - * ); - *``` - * - * @namespace ol.style - */ diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js index 48f60ec2b4..4e68d586e1 100644 --- a/src/ol/tilegrid.js +++ b/src/ol/tilegrid.js @@ -75,7 +75,7 @@ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) { * @property {module:ol/extent~Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the * top-left corner of the extent. The zero level of the grid is defined by the resolution at which one tile fits in the * provided extent. If not provided, the extent of the EPSG:3857 projection is used. - * @property {number} [maxZoom] Maximum zoom. The default is `ol~DEFAULT_MAX_ZOOM`. This determines the number of levels + * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set. * @property {number} [minZoom=0] Minimum zoom. * @property {number|module:ol/size~Size} [tileSize=[256, 256]] Tile size in pixels. diff --git a/src/ol/tilegrid/common.js b/src/ol/tilegrid/common.js index 57a19b76ad..79205d3218 100644 --- a/src/ol/tilegrid/common.js +++ b/src/ol/tilegrid/common.js @@ -1,3 +1,7 @@ +/** + * @module ol/tilegrid/common + */ + /** * Default maximum zoom for default tile grids. * @type {number} diff --git a/src/ol/tilegrid/index.jsdoc b/src/ol/tilegrid/index.jsdoc deleted file mode 100644 index 5f6ed64aaa..0000000000 --- a/src/ol/tilegrid/index.jsdoc +++ /dev/null @@ -1,3 +0,0 @@ -/** - * @namespace ol.tilegrid - */