diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index f7766cb38d..355102a6c6 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -103,7 +103,7 @@ inherits(MVT, FeatureFormat); * Reader callback for parsing layers. * @param {number} tag The tag. * @param {Object} layers The layers object. - * @param {ol.ext.PBF} pbf The PBF. + * @param {Object} pbf The PBF. */ function layersPBFReader(tag, layers, pbf) { if (tag === 3) { @@ -125,7 +125,7 @@ function layersPBFReader(tag, layers, pbf) { * Reader callback for parsing layer. * @param {number} tag The tag. * @param {Object} layer The layer object. - * @param {ol.ext.PBF} pbf The PBF. + * @param {Object} pbf The PBF. */ function layerPBFReader(tag, layer, pbf) { if (tag === 15) { @@ -159,7 +159,7 @@ function layerPBFReader(tag, layer, pbf) { * Reader callback for parsing feature. * @param {number} tag The tag. * @param {Object} feature The feature object. - * @param {ol.ext.PBF} pbf The PBF. + * @param {Object} pbf The PBF. */ function featurePBFReader(tag, feature, pbf) { if (tag == 1) { @@ -182,7 +182,7 @@ function featurePBFReader(tag, feature, pbf) { /** * Read a raw feature from the pbf offset stored at index `i` in the raw layer. * @suppress {missingProperties} - * @param {ol.ext.PBF} pbf PBF. + * @param {Object} pbf PBF. * @param {Object} layer Raw layer. * @param {number} i Index of the feature in the raw layer's `features` array. * @return {Object} Raw feature. @@ -205,7 +205,7 @@ function readRawFeature(pbf, layer, i) { * Read the raw geometry from the pbf offset stored in a raw feature's geometry * property. * @suppress {missingProperties} - * @param {ol.ext.PBF} pbf PBF. + * @param {Object} pbf PBF. * @param {Object} feature Raw feature. * @param {Array.} flatCoordinates Array to store flat coordinates in. * @param {Array.} ends Array to store ends in. @@ -294,7 +294,7 @@ function getGeometryType(type, numEnds) { /** * @private - * @param {ol.ext.PBF} pbf PBF + * @param {Object} pbf PBF * @param {Object} rawFeature Raw Mapbox feature. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @return {module:ol/Feature|module:ol/render/Feature} Feature. diff --git a/src/ol/format/readme.md b/src/ol/format/readme.md index c8edd91d00..7bba8e2155 100644 --- a/src/ol/format/readme.md +++ b/src/ol/format/readme.md @@ -1,13 +1,13 @@ -# Implementing formats with ol.format.Feature -`ol.format.Feature` defines a number of abstract methods including: +# Implementing formats with ol/format/Feature +`ol/format/Feature` defines a number of abstract methods including: -* `readFeatures` returning an `Array.` -* `readFeature` returning an `ol.Feature` +* `readFeatures` returning an `Array.
    ` +* `readFeature` returning an `ol/Feature` * `readGeometry` returning an `module:ol/geom/Geometry~Geometry` Having different functions for multiple return types allows both the user to specify what type of data they want and for the compiler to properly type check the code. Depending on the format, it is entirely reasonable to leave one or more of these methods unimplemented, or provide sensible default implementations. -For example, `ol.format.GPX` only supports reading multiple features. Therefore `readFeature` and `readGeometry` are unimplemented and will raise an exception if called. +For example, `ol/format/GPX` only supports reading multiple features. Therefore `readFeature` and `readGeometry` are unimplemented and will raise an exception if called. The IGC format contains only one feature per file, so `readFeature` returns that feature, `readFeatures` returns an array containing a single feature which is the feature in the file, and `readGeometry` is unimplemented. @@ -18,10 +18,10 @@ If a file cannot be parsed, then the return value should be `null` for all three # Implementing XML formats -This is an introduction for people looking to contribute an XML format reader to OpenLayers. After having read this document, you should read the code of and make sure that you understand the simpler XML format readers like `ol.format.GPX` before embarking on writing your own format reader. +This is an introduction for people looking to contribute an XML format reader to OpenLayers. After having read this document, you should read the code of and make sure that you understand the simpler XML format readers like `ol/format/GPX` before embarking on writing your own format reader. The document ends with guidelines for implementing a new format. -The `ol.xml` namespace contains a number of useful functions for parsing XML documents. All code in OpenLayers that reads data from XML documents should use it. It has several features: +The `ol/xml` namespace contains a number of useful functions for parsing XML documents. All code in OpenLayers that reads data from XML documents should use it. It has several features: * Browser support back to IE9 * Correct treatment of XML namespaces @@ -30,34 +30,34 @@ The `ol.xml` namespace contains a number of useful functions for parsing XML doc * Decoupling of the XML document structure from the output data structure * Good compatibility with the Closure Compiler, including good type checking -The `ol.format.XML` class includes a number of methods for reading arrays of features, single features, geometries, and projections from XML documents. `ol.format.XML` should only be used for formats containing features and geometries. If your format does not contain features or geometries (e.g. WMS GetCapabilities) then you should not use `ol.format.XML`. +The `ol/format/XML` class includes a number of methods for reading arrays of features, single features, geometries, and projections from XML documents. `ol/format/XML` should only be used for formats containing features and geometries. If your format does not contain features or geometries (e.g. WMS GetCapabilities) then you should not use `ol/format/XML`. -## `ol.format.XML` +## `ol/format/XML` -`ol.format.XML` is for formats that contain features and geometries. If your XML file contains something else then you should not inherit from `ol.format.XML` and can skip ahead to the `ol.xml` section. +`ol/format/XML` is for formats that contain features and geometries. If your XML file contains something else then you should not inherit from `ol/format/XML` and can skip ahead to the `ol/xml` section. -`ol.format.XML` is perhaps easiest to explain first, since it is higher level than `ol.xml`. +`ol/format/XML` is perhaps easiest to explain first, since it is higher level than `ol/xml`. -`ol.format.XML` defines a number of abstract type-checked methods with names including: +`ol/format/XML` defines a number of abstract type-checked methods with names including: read{Features,Feature,Geometry}From{Document,Node} `Document`s are top-level XML document objects, `Node`s are children of the top-level XML document object. In modern browsers `Document` is a subclass of `Node`, and inherits all of `Node`'s methods. In IE, this is not the case: `Document` is not a subclass of `Node`, and `Document` only has some of `Node`'s functionality. The distinction between the two is therefore necessary. -## `ol.xml` +## `ol/xml` -There are two key concepts to master to understand how `ol.xml` works: +There are two key concepts to master to understand how `ol/xml` works: -* How `ol.xml.parse` traverses the XML document (or node) and calls back to your code -* How `ol.xml` decouples the structure of the XML document (which is always a tree) from the structure of the output data (which could be a single object, an array of objects, or anything else) using an object stack. +* How `ol/xml~parse` traverses the XML document (or node) and calls back to your code +* How `ol/xml` decouples the structure of the XML document (which is always a tree) from the structure of the output data (which could be a single object, an array of objects, or anything else) using an object stack. It's handy to have the [`src/ol/xml.js` source code](https://github.com/openlayers/openlayers/blob/master/src/ol/xml.js) to hand while you read the following. -## How `ol.xml.parse` traverses the XML document +## How `ol/xml~parse` traverses the XML document -`ol.xml.parse` is the core of the XML parser. Given a `Node`, it loops over all that `Node`'s child `Elements` (ignoring text, CDATA sections, comments, etc.). For each child element, it looks up to see if there is a function to call that matches the child element's namespace and local (unqualified) name. If there is a function to call, then that function is called with the child element. +`ol/xml~parse` is the core of the XML parser. Given a `Node`, it loops over all that `Node`'s child `Elements` (ignoring text, CDATA sections, comments, etc.). For each child element, it looks up to see if there is a function to call that matches the child element's namespace and local (unqualified) name. If there is a function to call, then that function is called with the child element. -The `parserNS` argument to `ol.xml.parse` is an `Object` whose keys are XML namespaces and whose values are `Objects` whose keys are local element names and whose values are functions. A simple example might look like this: +The `parserNS` argument to `parse` is an `Object` whose keys are XML namespaces and whose values are `Objects` whose keys are local element names and whose values are functions. A simple example might look like this: ```js var parserNS = { @@ -74,11 +74,11 @@ var parserNS = { }; ``` -Many XML formats use different namespaces for different versions, but the code for handling the elements in different versions is the same. `ol.xml.makeParserNS` is an helper function that creates the above structure given a single array of namespaces and a single object mapping element names onto functions. +Many XML formats use different namespaces for different versions, but the code for handling the elements in different versions is the same. `ol/xml~makeParserNS` is an helper function that creates the above structure given a single array of namespaces and a single object mapping element names onto functions. ## How the object stack works -`ol.xml.parse` also takes an argument called `objectStack` which is an `Array` of arbitrary values. This stack is key to the decoupling of the XML tree structure from the structure of the parsed output. +`ol/xml~parse` also takes an argument called `objectStack` which is an `Array` of arbitrary values. This stack is key to the decoupling of the XML tree structure from the structure of the parsed output. Generally speaking, each callback function will modify the object at the top of the object stack. This is perhaps best demonstrated with a couple of examples. @@ -93,9 +93,9 @@ First consider the case of constructing a feature. Consider the following (imag ``` -When we parse find the `` tag, we construct a new `ol.Feature` and push it on to the object stack. We will then call a `ol.xml.parse` to parse the child elements of the `Feature` tag. When we find the `` element, we'll set the id of the object that is on top of the object stack (the `ol.Feature`). When find the `` element we set the geometry of the object on the top of the object stack (still the `ol.Feature`). Finally, at the end of the `` tag, our fully-configured `ol.Feature` is on the top of the stack, so we pop it off the top of the stack and return it. +When we parse find the `` tag, we construct a new `ol/Feature` and push it on to the object stack. We will then call a `ol/xml~parse` to parse the child elements of the `Feature` tag. When we find the `` element, we'll set the id of the object that is on top of the object stack (the `ol/Feature`). When find the `` element we set the geometry of the object on the top of the object stack (still the `ol/Feature`). Finally, at the end of the `` tag, our fully-configured `ol/Feature` is on the top of the stack, so we pop it off the top of the stack and return it. -This pattern is so common that there is a function, `ol.xml.pushParseAndPop` that implements it. +This pattern is so common that there is a function, `ol/xml~pushParseAndPop` that implements it. Now consider the case of parsing multiple features: @@ -112,23 +112,23 @@ Now consider the case of parsing multiple features: ``` -In this case, we want to extract an `Array` of `ol.Feature`s. Here's how it works. When we encounter the `` tag we push an empty `Array` on to the stack. On each `` tag, we invoke our feature parser above, which will return a populated `ol.Feature`. We append this `ol.Feature` to the object on the top of the object stack (our `Array` of `ol.Feature`s). At the final closing `` tag we pop the object off the top of the stack - now an `Array` containing two features - and return it. +In this case, we want to extract an `Array` of `ol/Feature`s. Here's how it works. When we encounter the `` tag we push an empty `Array` on to the stack. On each `` tag, we invoke our feature parser above, which will return a populated `ol/Feature`. We append this `ol/Feature` to the object on the top of the object stack (our `Array` of `ol/Feature`s). At the final closing `` tag we pop the object off the top of the stack - now an `Array` containing two features - and return it. ### Common operations In the above there are many common operations, like setting the property of the object on the top of the stack, or reading an object and appending that to an array on the top of the stack. There are many helper functions here, for example: -* `ol.xml.makeObjectPropertySetter` reads a value from the child element and sets a property on the object on the top of the stack. -* `ol.xml.makeArrayPusher` reads a value from the child element and appends it to the array on the top of the stack. -* `ol.xml.makeReplacer` reads a value from the child element and *replaces* whatever is on top of the stack with it. +* `ol/xml~makeObjectPropertySetter` reads a value from the child element and sets a property on the object on the top of the stack. +* `ol/xml~makeArrayPusher` reads a value from the child element and appends it to the array on the top of the stack. +* `ol/xml~makeReplacer` reads a value from the child element and *replaces* whatever is on top of the stack with it. ### Putting it all together -With the above, you should be able to read through the [source code to `ol.format.GPX`](https://github.com/openlayers/openlayers/blob/master/src/ol/format/gpxformat.js) and get a feel for how it works. Start from the bottom of the file and work upwards. It's also useful to have [an example GPX file](http://www.topografix.com/fells_loop.gpx) and [the GPX specification](http://www.topografix.com/GPX/1/1/) to hand. +With the above, you should be able to read through the [source code to `ol/format/GPX`](https://github.com/openlayers/openlayers/blob/master/src/ol/format/gpxformat.js) and get a feel for how it works. Start from the bottom of the file and work upwards. It's also useful to have [an example GPX file](http://www.topografix.com/fells_loop.gpx) and [the GPX specification](http://www.topografix.com/GPX/1/1/) to hand. ### Handling errors -If, when reading a value from a child element, you find an invalid value, you should return `undefined`. The helper functions above (like `ol.xml.makeObjectPropertySetter`) will then skip this value. If the structure is incomplete or incorrect (e.g. a child element is missing a mandatory tag) then you should also return `undefined` from your reader, which will in turn cause the value to be skipped. -An `ol.format.Format` should read as many features as it can, skipping features with any errors. +If, when reading a value from a child element, you find an invalid value, you should return `undefined`. The helper functions above (like `ol/xml~makeObjectPropertySetter`) will then skip this value. If the structure is incomplete or incorrect (e.g. a child element is missing a mandatory tag) then you should also return `undefined` from your reader, which will in turn cause the value to be skipped. +An `ol/format/Format` should read as many features as it can, skipping features with any errors. diff --git a/src/ol/render/webgl/CircleReplay.js b/src/ol/render/webgl/CircleReplay.js index 0f65f75c03..e9a708b153 100644 --- a/src/ol/render/webgl/CircleReplay.js +++ b/src/ol/render/webgl/CircleReplay.js @@ -27,7 +27,7 @@ const WebGLCircleReplay = function(tolerance, maxExtent) { /** * @private - * @type {ol.render.webgl.circlereplay.defaultshader.Locations} + * @type {module:ol/render/webgl/circlereplay/defaultshader/Locations} */ this.defaultLocations_ = null; diff --git a/src/ol/render/webgl/ImageReplay.js b/src/ol/render/webgl/ImageReplay.js index 59e34a5c03..91e26a94ea 100644 --- a/src/ol/render/webgl/ImageReplay.js +++ b/src/ol/render/webgl/ImageReplay.js @@ -7,7 +7,7 @@ import WebGLBuffer from '../../webgl/Buffer.js'; /** * @constructor - * @extends {ol.render.webgl.TextureReplay} + * @extends {module:ol/render/webgl/TextureReplay} * @param {number} tolerance Tolerance. * @param {module:ol/extent~Extent} maxExtent Max extent. * @struct diff --git a/src/ol/render/webgl/Immediate.js b/src/ol/render/webgl/Immediate.js index 85bf4edda4..24cf41c001 100644 --- a/src/ol/render/webgl/Immediate.js +++ b/src/ol/render/webgl/Immediate.js @@ -94,7 +94,7 @@ inherits(WebGLImmediateRenderer, VectorContext); */ WebGLImmediateRenderer.prototype.drawText_ = function(replayGroup, geometry) { const context = this.context_; - const replay = /** @type {ol.render.webgl.TextReplay} */ ( + const replay = /** @type {module:ol/render/webgl/TextReplay} */ ( replayGroup.getReplay(0, ReplayType.TEXT)); replay.setTextStyle(this.textStyle_); replay.drawText(geometry, null); @@ -128,7 +128,7 @@ WebGLImmediateRenderer.prototype.setStyle = function(style) { /** * Render a geometry into the canvas. Call - * {@link ol.render.webgl.Immediate#setStyle} first to set the rendering style. + * {@link ol/render/webgl/Immediate#setStyle} first to set the rendering style. * * @param {module:ol/geom/Geometry|module:ol/render/Feature} geometry The geometry to render. * @override @@ -199,7 +199,7 @@ WebGLImmediateRenderer.prototype.drawGeometryCollection = function(geometry, dat WebGLImmediateRenderer.prototype.drawPoint = function(geometry, data) { const context = this.context_; const replayGroup = new WebGLReplayGroup(1, this.extent_); - const replay = /** @type {ol.render.webgl.ImageReplay} */ ( + const replay = /** @type {module:ol/render/webgl/ImageReplay} */ ( replayGroup.getReplay(0, ReplayType.IMAGE)); replay.setImageStyle(this.imageStyle_); replay.drawPoint(geometry, data); @@ -226,7 +226,7 @@ WebGLImmediateRenderer.prototype.drawPoint = function(geometry, data) { WebGLImmediateRenderer.prototype.drawMultiPoint = function(geometry, data) { const context = this.context_; const replayGroup = new WebGLReplayGroup(1, this.extent_); - const replay = /** @type {ol.render.webgl.ImageReplay} */ ( + const replay = /** @type {module:ol/render/webgl/ImageReplay} */ ( replayGroup.getReplay(0, ReplayType.IMAGE)); replay.setImageStyle(this.imageStyle_); replay.drawMultiPoint(geometry, data); @@ -252,7 +252,7 @@ WebGLImmediateRenderer.prototype.drawMultiPoint = function(geometry, data) { WebGLImmediateRenderer.prototype.drawLineString = function(geometry, data) { const context = this.context_; const replayGroup = new WebGLReplayGroup(1, this.extent_); - const replay = /** @type {ol.render.webgl.LineStringReplay} */ ( + const replay = /** @type {module:ol/render/webgl/LineStringReplay} */ ( replayGroup.getReplay(0, ReplayType.LINE_STRING)); replay.setFillStrokeStyle(null, this.strokeStyle_); replay.drawLineString(geometry, data); @@ -278,7 +278,7 @@ WebGLImmediateRenderer.prototype.drawLineString = function(geometry, data) { WebGLImmediateRenderer.prototype.drawMultiLineString = function(geometry, data) { const context = this.context_; const replayGroup = new WebGLReplayGroup(1, this.extent_); - const replay = /** @type {ol.render.webgl.LineStringReplay} */ ( + const replay = /** @type {module:ol/render/webgl/LineStringReplay} */ ( replayGroup.getReplay(0, ReplayType.LINE_STRING)); replay.setFillStrokeStyle(null, this.strokeStyle_); replay.drawMultiLineString(geometry, data); @@ -304,7 +304,7 @@ WebGLImmediateRenderer.prototype.drawMultiLineString = function(geometry, data) WebGLImmediateRenderer.prototype.drawPolygon = function(geometry, data) { const context = this.context_; const replayGroup = new WebGLReplayGroup(1, this.extent_); - const replay = /** @type {ol.render.webgl.PolygonReplay} */ ( + const replay = /** @type {module:ol/render/webgl/PolygonReplay} */ ( replayGroup.getReplay(0, ReplayType.POLYGON)); replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_); replay.drawPolygon(geometry, data); @@ -330,7 +330,7 @@ WebGLImmediateRenderer.prototype.drawPolygon = function(geometry, data) { WebGLImmediateRenderer.prototype.drawMultiPolygon = function(geometry, data) { const context = this.context_; const replayGroup = new WebGLReplayGroup(1, this.extent_); - const replay = /** @type {ol.render.webgl.PolygonReplay} */ ( + const replay = /** @type {module:ol/render/webgl/PolygonReplay} */ ( replayGroup.getReplay(0, ReplayType.POLYGON)); replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_); replay.drawMultiPolygon(geometry, data); @@ -356,7 +356,7 @@ WebGLImmediateRenderer.prototype.drawMultiPolygon = function(geometry, data) { WebGLImmediateRenderer.prototype.drawCircle = function(geometry, data) { const context = this.context_; const replayGroup = new WebGLReplayGroup(1, this.extent_); - const replay = /** @type {ol.render.webgl.CircleReplay} */ ( + const replay = /** @type {module:ol/render/webgl/CircleReplay} */ ( replayGroup.getReplay(0, ReplayType.CIRCLE)); replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_); replay.drawCircle(geometry, data); diff --git a/src/ol/render/webgl/LineStringReplay.js b/src/ol/render/webgl/LineStringReplay.js index be16dc0daa..139af5d95b 100644 --- a/src/ol/render/webgl/LineStringReplay.js +++ b/src/ol/render/webgl/LineStringReplay.js @@ -47,7 +47,7 @@ const WebGLLineStringReplay = function(tolerance, maxExtent) { /** * @private - * @type {ol.render.webgl.linestringreplay.defaultshader.Locations} + * @type {module:ol/render/webgl/linestringreplay/defaultshader/Locations} */ this.defaultLocations_ = null; diff --git a/src/ol/render/webgl/PolygonReplay.js b/src/ol/render/webgl/PolygonReplay.js index 75113080d4..25db69a264 100644 --- a/src/ol/render/webgl/PolygonReplay.js +++ b/src/ol/render/webgl/PolygonReplay.js @@ -51,7 +51,7 @@ const WebGLPolygonReplay = function(tolerance, maxExtent) { /** * @private - * @type {ol.render.webgl.polygonreplay.defaultshader.Locations} + * @type {module:ol/render/webgl/polygonreplay/defaultshader/Locations} */ this.defaultLocations_ = null; diff --git a/src/ol/render/webgl/Replay.js b/src/ol/render/webgl/Replay.js index fbe95b3912..4a55652a31 100644 --- a/src/ol/render/webgl/Replay.js +++ b/src/ol/render/webgl/Replay.js @@ -114,7 +114,7 @@ const WebGLReplay = function(tolerance, maxExtent) { /** * Optional parameter for PolygonReplay instances. * @protected - * @type {ol.render.webgl.LineStringReplay|undefined} + * @type {module:ol/render/webgl/LineStringReplay|undefined} */ this.lineStringReplay = undefined; @@ -145,10 +145,10 @@ WebGLReplay.prototype.finish = function(context) {}; * @param {module:ol/webgl/Context} context Context. * @param {module:ol/size~Size} size Size. * @param {number} pixelRatio Pixel ratio. - * @return {ol.render.webgl.circlereplay.defaultshader.Locations| - ol.render.webgl.linestringreplay.defaultshader.Locations| - ol.render.webgl.polygonreplay.defaultshader.Locations| - ol.render.webgl.texturereplay.defaultshader.Locations} Locations. + * @return {module:ol/render/webgl/circlereplay/defaultshader/Locations| + ol/render/webgl/linestringreplay/defaultshader/Locations| + ol/render/webgl/polygonreplay/defaultshader/Locations| + ol/render/webgl/texturereplay/defaultshader/Locations} Locations. */ WebGLReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {}; @@ -157,10 +157,10 @@ WebGLReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {}; * @abstract * @protected * @param {WebGLRenderingContext} gl gl. - * @param {ol.render.webgl.circlereplay.defaultshader.Locations| - ol.render.webgl.linestringreplay.defaultshader.Locations| - ol.render.webgl.polygonreplay.defaultshader.Locations| - ol.render.webgl.texturereplay.defaultshader.Locations} locations Locations. + * @param {module:ol/render/webgl/circlereplay/defaultshader/Locations| + ol/render/webgl/linestringreplay/defaultshader/Locations| + ol/render/webgl/polygonreplay/defaultshader/Locations| + ol/render/webgl/texturereplay/defaultshader/Locations} locations Locations. */ WebGLReplay.prototype.shutDownProgram = function(gl, locations) {}; diff --git a/src/ol/render/webgl/TextReplay.js b/src/ol/render/webgl/TextReplay.js index 79f2148de6..ce9bff1378 100644 --- a/src/ol/render/webgl/TextReplay.js +++ b/src/ol/render/webgl/TextReplay.js @@ -24,7 +24,7 @@ import WebGLBuffer from '../../webgl/Buffer.js'; /** * @constructor - * @extends {ol.render.webgl.TextureReplay} + * @extends {module:ol/render/webgl/TextureReplay} * @param {number} tolerance Tolerance. * @param {module:ol/extent~Extent} maxExtent Max extent. * @struct diff --git a/src/ol/render/webgl/TextureReplay.js b/src/ol/render/webgl/TextureReplay.js index b77fee63f4..3f2b0009eb 100644 --- a/src/ol/render/webgl/TextureReplay.js +++ b/src/ol/render/webgl/TextureReplay.js @@ -65,7 +65,7 @@ const WebGLTextureReplay = function(tolerance, maxExtent) { /** * @protected - * @type {ol.render.webgl.texturereplay.defaultshader.Locations} + * @type {module:ol/render/webgl/texturereplay/defaultshader/Locations} */ this.defaultLocations = null; diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js index 365b86294c..f6abd1fc17 100644 --- a/src/ol/renderer/webgl/Map.js +++ b/src/ol/renderer/webgl/Map.js @@ -183,7 +183,7 @@ inherits(WebGLMapRenderer, MapRenderer); /** - * @param {ol.Tile} tile Tile. + * @param {module:ol/Tile} tile Tile. * @param {module:ol/size~Size} tileSize Tile size. * @param {number} tileGutter Tile gutter. * @param {number} magFilter Mag filter. diff --git a/src/ol/source/Image.js b/src/ol/source/Image.js index 5e1a29bbc8..0fc58c7df1 100644 --- a/src/ol/source/Image.js +++ b/src/ol/source/Image.js @@ -19,21 +19,21 @@ const ImageSourceEventType = { /** * Triggered when an image starts loading. - * @event ol.source.Image.Event#imageloadstart + * @event ol/source/Image~ImageSourceEvent#imageloadstart * @api */ IMAGELOADSTART: 'imageloadstart', /** * Triggered when an image finishes loading. - * @event ol.source.Image.Event#imageloadend + * @event ol/source/Image~ImageSourceEvent#imageloadend * @api */ IMAGELOADEND: 'imageloadend', /** * Triggered if image loading results in an error. - * @event ol.source.Image.Event#imageloaderror + * @event ol/source/Image~ImageSourceEvent#imageloaderror * @api */ IMAGELOADERROR: 'imageloaderror' @@ -107,7 +107,7 @@ const ImageSource = function(options) { /** * @private - * @type {ol.reproj.Image} + * @type {module:ol/reproj/Image} */ this.reprojectedImage_ = null; diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js index c29b59a714..1eb15060e4 100644 --- a/src/ol/source/ImageArcGISRest.js +++ b/src/ol/source/ImageArcGISRest.js @@ -19,7 +19,7 @@ import {appendParams} from '../uri.js'; * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to * access pixel data with the Canvas renderer. See * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail. - * @property {boolean} [hidpi=true] Use the `ol.Map#pixelRatio` value when requesting the image from + * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from * the remote server. * @property {ol.ImageLoadFunctionType} [imageLoadFunction] Optional function to load an image given * a URL. @@ -49,7 +49,7 @@ import {appendParams} from '../uri.js'; * {@link module:ol/source/TileArcGISRest} data source. * * @constructor - * @fires ol.source.Image.Event + * @fires ol/source/Image~ImageSourceEvent * @extends {module:ol/source/Image} * @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options. * @api diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js index 98ff23ec2a..804703dcee 100644 --- a/src/ol/source/ImageMapGuide.js +++ b/src/ol/source/ImageMapGuide.js @@ -33,7 +33,7 @@ import {appendParams} from '../uri.js'; * Source for images from Mapguide servers * * @constructor - * @fires ol.source.Image.Event + * @fires ol/source/Image~ImageSourceEvent * @extends {module:ol/source/Image} * @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options. * @api diff --git a/src/ol/source/ImageWMS.js b/src/ol/source/ImageWMS.js index 820a41e798..78631efba7 100644 --- a/src/ol/source/ImageWMS.js +++ b/src/ol/source/ImageWMS.js @@ -48,7 +48,7 @@ import {appendParams} from '../uri.js'; * Source for WMS servers providing single, untiled images. * * @constructor - * @fires ol.source.Image.Event + * @fires ol/source/Image~ImageSourceEvent * @extends {module:ol/source/Image} * @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options. * @api diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js index 580d873150..067cd0ed7c 100644 --- a/src/ol/source/Raster.js +++ b/src/ol/source/Raster.js @@ -46,14 +46,14 @@ import {create as createTransform} from '../transform.js'; const RasterEventType = { /** * Triggered before operations are run. - * @event ol.source.Raster.Event#beforeoperations + * @event ol/source/Raster~RasterSourceEvent#beforeoperations * @api */ BEFOREOPERATIONS: 'beforeoperations', /** * Triggered after operations are run. - * @event ol.source.Raster.Event#afteroperations + * @event ol/source/Raster~RasterSourceEvent#afteroperations * @api */ AFTEROPERATIONS: 'afteroperations' @@ -138,7 +138,7 @@ inherits(RasterSourceEvent, Event); * * @constructor * @extends {module:ol/source/Image} - * @fires ol.source.Raster.Event + * @fires ol/source/Raster~RasterSourceEvent * @param {module:ol/source/Raster~Options=} options Options. * @api */ diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index b98e07e00a..bf626fe0a2 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -151,7 +151,7 @@ inherits(VectorSourceEvent, Event); * * @constructor * @extends {module:ol/source/Source} - * @fires ol.source.Vector.Event + * @fires ol/source/Vector~VectorSourceEvent * @param {module:ol/source/Vector~Options=} opt_options Vector source options. * @api */ diff --git a/src/ol/source/VectorEventType.js b/src/ol/source/VectorEventType.js index a622ce884c..f9cd8d21b1 100644 --- a/src/ol/source/VectorEventType.js +++ b/src/ol/source/VectorEventType.js @@ -8,21 +8,21 @@ export default { /** * Triggered when a feature is added to the source. - * @event ol.source.Vector.Event#addfeature + * @event ol/source/Vector~VectorSourceEvent#addfeature * @api */ ADDFEATURE: 'addfeature', /** * Triggered when a feature is updated. - * @event ol.source.Vector.Event#changefeature + * @event ol/source/Vector~VectorSourceEvent#changefeature * @api */ CHANGEFEATURE: 'changefeature', /** * Triggered when the clear method is called on the source. - * @event ol.source.Vector.Event#clear + * @event ol/source/Vector~VectorSourceEvent#clear * @api */ CLEAR: 'clear', @@ -30,7 +30,7 @@ export default { /** * Triggered when a feature is removed from the source. * See {@link ol.source.Vector#clear source.clear()} for exceptions. - * @event ol.source.Vector.Event#removefeature + * @event ol/source/Vector~VectorSourceEvent#removefeature * @api */ REMOVEFEATURE: 'removefeature' diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js index c2f1b3aa0c..48f60ec2b4 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 `ol~DEFAULT_MAX_ZOOM`. 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.