diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index d941a65ff5..b262e9a564 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -77,7 +77,7 @@ /** * Object literal with config options for the Proj4js projection. * @typedef {Object} ol.Proj4jsProjectionOptions - * @property {string} code The SRS identifier code, e.g. 'EPSG:31256'. + * @property {string} code The SRS identifier code, e.g. `EPSG:31256`. * @property {ol.Extent|undefined} extent The validity extent for the SRS. * @property {boolean|undefined} global Whether the projection is valid for the * whole globe. Default is false. @@ -86,11 +86,11 @@ /** * Object literal with config options for the projection. * @typedef {Object} ol.ProjectionOptions - * @property {string} code The SRS identifier code, e.g. 'EPSG:4326'. + * @property {string} code The SRS identifier code, e.g. `EPSG:4326`. * @property {ol.proj.Units} units Units. * @property {ol.Extent|undefined} extent The validity extent for the SRS. * @property {string|undefined} axisOrientation The axis orientation as - * specified in Proj4. The default is 'enu'. + * specified in Proj4. The default is `enu`. * @property {boolean|undefined} global Whether the projection is valid for the * whole globe. Default is false. */ @@ -161,7 +161,7 @@ /** * @typedef {Object} ol.control.AttributionOptions - * @property {string|undefined} className CSS class name. Default is 'ol-attribution'. + * @property {string|undefined} className CSS class name. Default is `ol-attribution`. * @property {Element|undefined} target Target. */ @@ -184,31 +184,31 @@ /** * @typedef {Object} ol.control.FullScreenOptions - * @property {string|undefined} className CSS class name. Default is 'ol-full-screen'. + * @property {string|undefined} className CSS class name. Default is `ol-full-screen`. * @property {boolean|undefined} keys Full keyboard access. * @property {Element|undefined} target Target. */ /** * @typedef {Object} ol.control.LogoOptions - * @property {string|undefined} className CSS class name. Default is 'ol-logo'. + * @property {string|undefined} className CSS class name. Default is `ol-logo`. * @property {Element|undefined} target Target. */ /** * @typedef {Object} ol.control.MousePositionOptions - * @property {string|undefined} className CSS class name. Default is 'ol-mouse-position'. + * @property {string|undefined} className CSS class name. Default is `ol-mouse-position`. * @property {ol.CoordinateFormatType|undefined} coordinateFormat Coordinate * format. * @property {ol.proj.ProjectionLike} projection Projection. * @property {Element|undefined} target Target. * @property {string|undefined} undefinedHTML Markup for undefined coordinates. - * Default is '' (empty string). + * Default is `` (empty string). */ /** * @typedef {Object} ol.control.ScaleLineOptions - * @property {string|undefined} className CSS Class name. Default is 'ol-scale-line'. + * @property {string|undefined} className CSS Class name. Default is `ol-scale-line`. * @property {number|undefined} minWidth Minimum width in pixels. * @property {Element|undefined} target Target. * @property {ol.control.ScaleLineUnits|undefined} units Units. @@ -216,7 +216,7 @@ /** * @typedef {Object} ol.control.ZoomOptions - * @property {string|undefined} className CSS class name. Default is 'ol-zoom'. + * @property {string|undefined} className CSS class name. Default is `ol-zoom`. * @property {number|undefined} delta The zoom delta applied on each click. * @property {Element|undefined} target Target. */ @@ -230,7 +230,7 @@ /** * @typedef {Object} ol.control.ZoomToExtentOptions - * @property {string|undefined} className Class name. + * @property {string|undefined} className Class name. Default is `ol-zoom-extent`. * @property {Element|undefined} target Target. * @property {ol.Extent|undefined} extent The extent to zoom to. If * undefined the validity extent of the view projection is used. @@ -466,8 +466,8 @@ * @property {string|undefined} creator The creator attribute to be added to * the written GPX files. Defaults to `OpenLayers´. * @property {string|undefined} defaultDesc Default description for the - * waypoints/tracks in the case where the feature has no 'description' - * attribute. Default is 'No description available'. + * waypoints/tracks in the case where the feature has no `description` + * attribute. Default is `No description available`. * @property {boolean|undefined} extractAttributes Should we extract attributes * from the GPX? Default is `true´. * @property {boolean|undefined} extractWaypoints Extract waypoints from GPX. @@ -518,8 +518,8 @@ * @property {ol.source.WMSGetFeatureInfoOptions|undefined} * getFeatureInfoOptions Options for GetFeatureInfo. * @property {Object.} params WMS request parameters. At least a - * `LAYERS` param is required. `STYLES` is '' by default. `VERSION` is - * '1.3.0' by default. `WIDTH`, `HEIGHT`, `BBOX` and `CRS` (`SRS` for WMS + * `LAYERS` param is required. `STYLES` is `` 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. * @property {ol.proj.ProjectionLike} projection Projection. * @property {number|undefined} ratio Ratio. 1 means image requests are the size @@ -570,8 +570,8 @@ * @typedef {Object} ol.source.TileWMSOptions * @property {Array.|undefined} attributions Attributions. * @property {Object.} params WMS request parameters. At least a - * `LAYERS` param is required. `STYLES` is '' by default. `VERSION` is - * '1.3.0' by default. `WIDTH`, `HEIGHT`, `BBOX` and `CRS` (`SRS` for WMS + * `LAYERS` param is required. `STYLES` is `` 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. * @property {null|string|undefined} crossOrigin crossOrigin setting for image * requests. @@ -634,7 +634,7 @@ * encoding. * @property {string} layer Layer. * @property {string} style Style. - * @property {string|undefined} version WMTS version. Default to '1.0.0'. + * @property {string|undefined} version WMTS version. Default to `1.0.0`. * @property {string|undefined} format Format. * @property {string} matrixSet Matrix set. * @property {Object|undefined} dimensions Dimensions. @@ -659,8 +659,8 @@ * @property {ol.TileUrlFunctionType|undefined} tileUrlFunction Optional * function to get tile URL given a tile coordinate and the projection. * Required if url or urls are not provided. - * @property {string|undefined} url URL template. Must include '{x}', '{y}', - * and '{z}' placeholders. + * @property {string|undefined} url URL template. Must include `{x}`, `{y}`, + * and `{z}` placeholders. * @property {Array.|undefined} urls An array of URL templates. */ diff --git a/src/ol/control/attributioncontrol.js b/src/ol/control/attributioncontrol.js index 650b5ee180..312c1a3e85 100644 --- a/src/ol/control/attributioncontrol.js +++ b/src/ol/control/attributioncontrol.js @@ -18,7 +18,7 @@ goog.require('ol.css'); * Create a new attribution control to show all the attributions associated * with the layer sources in the map. A default map has this control included. * By default it will show in the bottom right portion of the map, but it can - * be changed by using a css selector for .ol-attribution. + * be changed by using a css selector for `.ol-attribution`. * @constructor * @extends {ol.control.Control} * @param {ol.control.AttributionOptions=} opt_options Attribution options. diff --git a/src/ol/control/logocontrol.js b/src/ol/control/logocontrol.js index c7820f93bf..4d969c1abe 100644 --- a/src/ol/control/logocontrol.js +++ b/src/ol/control/logocontrol.js @@ -14,7 +14,7 @@ goog.require('ol.css'); * Shows a logo for all the layer sources in the map that have a logo * associated with them, such as Bing. This control is part of a default map. * By default it will show in the bottom-left portion of the map, but it can - * be styled by using a css selector for .ol-logo. + * be styled by using a css selector for `.ol-logo`. * @constructor * @extends {ol.control.Control} * @param {ol.control.LogoOptions=} opt_options Logo options. diff --git a/src/ol/control/mousepositioncontrol.js b/src/ol/control/mousepositioncontrol.js index 40289563a9..bc5f39311e 100644 --- a/src/ol/control/mousepositioncontrol.js +++ b/src/ol/control/mousepositioncontrol.js @@ -32,7 +32,7 @@ ol.control.MousePositionProperty = { * Create a new control to show the position of the mouse in the map's * projection (or any other supplied projection). By default the control is * shown in the top right corner of the map but this can be changed by using - * a css selector .ol-mouse-position. + * a css selector `.ol-mouse-position`. * * @constructor * @extends {ol.control.Control} diff --git a/src/ol/control/scalelinecontrol.js b/src/ol/control/scalelinecontrol.js index b48c37f311..e8c242bf9d 100644 --- a/src/ol/control/scalelinecontrol.js +++ b/src/ol/control/scalelinecontrol.js @@ -42,6 +42,8 @@ ol.control.ScaleLineUnits = { /** * Create a control to help users estimate distances on a map. + * By default it will show in the bottom left portion of the map, but it can + * be changed by using a css selector for `.ol-scale-line`. * * @constructor * @extends {ol.control.Control} diff --git a/src/ol/control/zoomcontrol.js b/src/ol/control/zoomcontrol.js index 1f97b321eb..4707691f67 100644 --- a/src/ol/control/zoomcontrol.js +++ b/src/ol/control/zoomcontrol.js @@ -22,7 +22,7 @@ ol.control.ZOOM_DURATION = 250; /** * Create a new control with 2 buttons, one for zoom in and one for zoom out. * This control is part of the default controls of a map. To style this control - * use css selectors .ol-zoom-in and .ol-zoom-out. + * use css selectors `.ol-zoom-in` and `.ol-zoom-out`. * @constructor * @extends {ol.control.Control} * @param {ol.control.ZoomOptions=} opt_options Zoom options. diff --git a/src/ol/control/zoomtoextentcontrol.js b/src/ol/control/zoomtoextentcontrol.js index 5da182165c..c749c06982 100644 --- a/src/ol/control/zoomtoextentcontrol.js +++ b/src/ol/control/zoomtoextentcontrol.js @@ -14,7 +14,7 @@ goog.require('ol.css'); /** * Create a control that adds a button, which, when pressed, changes * the map view to a specific extent. To style this control use the - * css selector .ol-zoom-extent. + * css selector `.ol-zoom-extent`. * @constructor * @extends {ol.control.Control} * @param {ol.control.ZoomToExtentOptions=} opt_options Options. diff --git a/src/ol/coordinate.js b/src/ol/coordinate.js index af1e49a457..baa0b42f42 100644 --- a/src/ol/coordinate.js +++ b/src/ol/coordinate.js @@ -7,13 +7,14 @@ goog.require('goog.math'); /** + * A function that formats a {@link ol.Coordinate} into a string. * @typedef {function((ol.Coordinate|undefined)): string} */ ol.CoordinateFormatType; /** - * An array representing a coordinate. + * An array of numbers representing a coordinate. * @typedef {Array.} ol.Coordinate */ ol.Coordinate; diff --git a/src/ol/dom/input.js b/src/ol/dom/input.js index 6cf01740f2..5769bfbe75 100644 --- a/src/ol/dom/input.js +++ b/src/ol/dom/input.js @@ -18,7 +18,7 @@ ol.dom.InputProperty = { /** - * Helper class for binding HTML input to an ol.Object + * Helper class for binding HTML input to an {@link ol.Object}. * * Example: * diff --git a/src/ol/extent.js b/src/ol/extent.js index 843df6a111..6fc2e940ca 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -8,6 +8,7 @@ goog.require('ol.TransformFunction'); /** + * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`. * @typedef {Array.} */ ol.Extent; diff --git a/src/ol/overlay.js b/src/ol/overlay.js index c232f1ed11..4ae6806930 100644 --- a/src/ol/overlay.js +++ b/src/ol/overlay.js @@ -45,6 +45,7 @@ ol.OverlayPositioning = { * element: document.getElementById('popup') * }); * popup.setPosition(coordinate); + * map.addOverlay(popup); * * @constructor * @extends {ol.Object} diff --git a/src/ol/proj/proj.js b/src/ol/proj/proj.js index ac8032b996..330561a19f 100644 --- a/src/ol/proj/proj.js +++ b/src/ol/proj/proj.js @@ -43,7 +43,8 @@ ol.proj.Units = { /** - * @const {Object.} Meters per unit lookup table. + * Meters per unit lookup table. + * @const {Object.} */ ol.METERS_PER_UNIT = {}; ol.METERS_PER_UNIT[ol.proj.Units.DEGREES] = diff --git a/src/ol/size.js b/src/ol/size.js index 756c225797..2b13500c36 100644 --- a/src/ol/size.js +++ b/src/ol/size.js @@ -3,7 +3,7 @@ goog.provide('ol.size'); /** - * An array representing a size: [width, height]. + * An array of numbers representing a size: `[width, height]`. * @typedef {Array.} ol.Size */ ol.Size;