diff --git a/src/ol/format/wktformat.js b/src/ol/format/wktformat.js index 486666eb32..7532560d30 100644 --- a/src/ol/format/wktformat.js +++ b/src/ol/format/wktformat.js @@ -366,12 +366,6 @@ ol.format.WKT.prototype.writeGeometryText = function(geometry, opt_options) { }; -/** - * @typedef {{type: number, value: (number|string|undefined), position: number}} - */ -ol.format.WKT.Token; - - /** * @const * @enum {number} @@ -451,7 +445,7 @@ ol.format.WKT.Lexer.prototype.nextChar_ = function() { /** * Fetch and return the next token. - * @return {!ol.format.WKT.Token} Next string token. + * @return {!ol.format.WKTToken} Next string token. */ ol.format.WKT.Lexer.prototype.nextToken = function() { var c = this.nextChar_(); @@ -537,7 +531,7 @@ ol.format.WKT.Parser = function(lexer) { this.lexer_ = lexer; /** - * @type {ol.format.WKT.Token} + * @type {ol.format.WKTToken} * @private */ this.token_; diff --git a/src/ol/interaction/snapinteraction.js b/src/ol/interaction/snapinteraction.js index 2aa222c5e0..dc5bf6570f 100644 --- a/src/ol/interaction/snapinteraction.js +++ b/src/ol/interaction/snapinteraction.js @@ -129,7 +129,7 @@ ol.interaction.Snap = function(opt_options) { options.pixelTolerance : 10; /** - * @type {function(ol.interaction.Snap.SegmentDataType, ol.interaction.Snap.SegmentDataType): number} + * @type {function(ol.interaction.SnapSegmentDataType, ol.interaction.SnapSegmentDataType): number} * @private */ this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this); @@ -137,7 +137,7 @@ ol.interaction.Snap = function(opt_options) { /** * Segment RTree for each layer - * @type {ol.structs.RBush.} + * @type {ol.structs.RBush.} * @private */ this.rBush_ = new ol.structs.RBush(); @@ -378,7 +378,7 @@ ol.interaction.Snap.prototype.shouldStopEvent = ol.functions.FALSE; * @param {ol.Pixel} pixel Pixel * @param {ol.Coordinate} pixelCoordinate Coordinate * @param {ol.Map} map Map. - * @return {ol.interaction.Snap.ResultType} Snap result + * @return {ol.interaction.SnapResultType} Snap result */ ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) { @@ -437,7 +437,7 @@ ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) { vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])]; } } - return /** @type {ol.interaction.Snap.ResultType} */ ({ + return /** @type {ol.interaction.SnapResultType} */ ({ snapped: snapped, vertex: vertex, vertexPixel: vertexPixel @@ -479,7 +479,7 @@ ol.interaction.Snap.prototype.writeLineStringGeometry_ = function(feature, geome var i, ii, segment, segmentData; for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { segment = coordinates.slice(i, i + 2); - segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({ + segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ feature: feature, segment: segment }); @@ -500,7 +500,7 @@ ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ = function(feature, coordinates = lines[j]; for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { segment = coordinates.slice(i, i + 2); - segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({ + segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ feature: feature, segment: segment }); @@ -520,7 +520,7 @@ ol.interaction.Snap.prototype.writeMultiPointGeometry_ = function(feature, geome var coordinates, i, ii, segmentData; for (i = 0, ii = points.length; i < ii; ++i) { coordinates = points[i]; - segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({ + segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ feature: feature, segment: [coordinates, coordinates] }); @@ -543,7 +543,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geo coordinates = rings[j]; for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { segment = coordinates.slice(i, i + 2); - segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({ + segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ feature: feature, segment: segment }); @@ -561,7 +561,7 @@ ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geo */ ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) { var coordinates = geometry.getCoordinates(); - var segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({ + var segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ feature: feature, segment: [coordinates, coordinates] }); @@ -581,7 +581,7 @@ ol.interaction.Snap.prototype.writePolygonGeometry_ = function(feature, geometry coordinates = rings[j]; for (i = 0, ii = coordinates.length - 1; i < ii; ++i) { segment = coordinates.slice(i, i + 2); - segmentData = /** @type {ol.interaction.Snap.SegmentDataType} */ ({ + segmentData = /** @type {ol.interaction.SnapSegmentDataType} */ ({ feature: feature, segment: segment }); @@ -626,8 +626,8 @@ ol.interaction.Snap.handleUpEvent_ = function(evt) { /** * Sort segments by distance, helper function - * @param {ol.interaction.Snap.SegmentDataType} a The first segment data. - * @param {ol.interaction.Snap.SegmentDataType} b The second segment data. + * @param {ol.interaction.SnapSegmentDataType} a The first segment data. + * @param {ol.interaction.SnapSegmentDataType} b The second segment data. * @return {number} The difference in distance. * @this {ol.interaction.Snap} */ diff --git a/src/ol/render/canvas/canvasimmediate.js b/src/ol/render/canvas/canvasimmediate.js index 68f2dad395..c2d8ba8899 100644 --- a/src/ol/render/canvas/canvasimmediate.js +++ b/src/ol/render/canvas/canvasimmediate.js @@ -71,31 +71,31 @@ ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, vi /** * @private - * @type {?ol.render.canvas.FillState} + * @type {?ol.render.canvasFillState} */ this.contextFillState_ = null; /** * @private - * @type {?ol.render.canvas.StrokeState} + * @type {?ol.render.canvasStrokeState} */ this.contextStrokeState_ = null; /** * @private - * @type {?ol.render.canvas.TextState} + * @type {?ol.render.canvasTextState} */ this.contextTextState_ = null; /** * @private - * @type {?ol.render.canvas.FillState} + * @type {?ol.render.canvasFillState} */ this.fillState_ = null; /** * @private - * @type {?ol.render.canvas.StrokeState} + * @type {?ol.render.canvasStrokeState} */ this.strokeState_ = null; @@ -203,19 +203,19 @@ ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, vi /** * @private - * @type {?ol.render.canvas.FillState} + * @type {?ol.render.canvasFillState} */ this.textFillState_ = null; /** * @private - * @type {?ol.render.canvas.StrokeState} + * @type {?ol.render.canvasStrokeState} */ this.textStrokeState_ = null; /** * @private - * @type {?ol.render.canvas.TextState} + * @type {?ol.render.canvasTextState} */ this.textState_ = null; @@ -700,7 +700,7 @@ ol.render.canvas.Immediate.prototype.drawMultiPolygon = function(geometry) { /** - * @param {ol.render.canvas.FillState} fillState Fill state. + * @param {ol.render.canvasFillState} fillState Fill state. * @private */ ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState) { @@ -720,7 +720,7 @@ ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState) /** - * @param {ol.render.canvas.StrokeState} strokeState Stroke state. + * @param {ol.render.canvasStrokeState} strokeState Stroke state. * @private */ ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeState) { @@ -772,7 +772,7 @@ ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeSta /** - * @param {ol.render.canvas.TextState} textState Text state. + * @param {ol.render.canvasTextState} textState Text state. * @private */ ol.render.canvas.Immediate.prototype.setContextTextState_ = function(textState) { diff --git a/src/ol/render/canvas/canvasreplay.js b/src/ol/render/canvas/canvasreplay.js index 976839a403..4ad1e193b5 100644 --- a/src/ol/render/canvas/canvasreplay.js +++ b/src/ol/render/canvas/canvasreplay.js @@ -1538,19 +1538,19 @@ ol.render.canvas.TextReplay = function(tolerance, maxExtent, resolution) { /** * @private - * @type {?ol.render.canvas.FillState} + * @type {?ol.render.canvasFillState} */ this.replayFillState_ = null; /** * @private - * @type {?ol.render.canvas.StrokeState} + * @type {?ol.render.canvasStrokeState} */ this.replayStrokeState_ = null; /** * @private - * @type {?ol.render.canvas.TextState} + * @type {?ol.render.canvasTextState} */ this.replayTextState_ = null; @@ -1586,19 +1586,19 @@ ol.render.canvas.TextReplay = function(tolerance, maxExtent, resolution) { /** * @private - * @type {?ol.render.canvas.FillState} + * @type {?ol.render.canvasFillState} */ this.textFillState_ = null; /** * @private - * @type {?ol.render.canvas.StrokeState} + * @type {?ol.render.canvasStrokeState} */ this.textStrokeState_ = null; /** * @private - * @type {?ol.render.canvas.TextState} + * @type {?ol.render.canvasTextState} */ this.textState_ = null; @@ -1638,7 +1638,7 @@ ol.render.canvas.TextReplay.prototype.drawText = function(flatCoordinates, offse /** - * @param {ol.render.canvas.FillState} fillState Fill state. + * @param {ol.render.canvasFillState} fillState Fill state. * @private */ ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState) { @@ -1662,7 +1662,7 @@ ol.render.canvas.TextReplay.prototype.setReplayFillState_ = function(fillState) /** - * @param {ol.render.canvas.StrokeState} strokeState Stroke state. + * @param {ol.render.canvasStrokeState} strokeState Stroke state. * @private */ ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeState) { @@ -1704,7 +1704,7 @@ ol.render.canvas.TextReplay.prototype.setReplayStrokeState_ = function(strokeSta /** - * @param {ol.render.canvas.TextState} textState Text state. + * @param {ol.render.canvasTextState} textState Text state. * @private */ ol.render.canvas.TextReplay.prototype.setReplayTextState_ = function(textState) { diff --git a/src/ol/renderer/webgl/webglmaprenderer.js b/src/ol/renderer/webgl/webglmaprenderer.js index 8a6b6dcc1b..550b8fb491 100644 --- a/src/ol/renderer/webgl/webglmaprenderer.js +++ b/src/ol/renderer/webgl/webglmaprenderer.js @@ -104,7 +104,7 @@ ol.renderer.webgl.Map = function(container, map) { /** * @private - * @type {ol.structs.LRUCache.} + * @type {ol.structs.LRUCache.} */ this.textureCache_ = new ol.structs.LRUCache(); @@ -294,7 +294,7 @@ ol.renderer.webgl.Map.prototype.disposeInternal = function() { if (!gl.isContextLost()) { this.textureCache_.forEach( /** - * @param {?ol.renderer.webgl.TextureCacheEntry} textureCacheEntry + * @param {?ol.renderer.webglTextureCacheEntry} textureCacheEntry * Texture cache entry. */ function(textureCacheEntry) { diff --git a/src/ol/source/rastersource.js b/src/ol/source/rastersource.js index bbae4bc9d1..5c9f0ac993 100644 --- a/src/ol/source/rastersource.js +++ b/src/ol/source/rastersource.js @@ -91,7 +91,7 @@ ol.source.Raster = function(options) { /** * The most recently rendered state. - * @type {?ol.source.Raster.RenderedState} + * @type {?ol.source.RasterRenderedState} * @private */ this.renderedState_ = null; @@ -445,14 +445,6 @@ ol.source.Raster.createTileRenderer_ = function(source) { }; -/** - * @typedef {{revision: number, - * resolution: number, - * extent: ol.Extent}} - */ -ol.source.Raster.RenderedState; - - /** * @classdesc * Events emitted by {@link ol.source.Raster} instances are instances of this diff --git a/src/ol/style/atlasmanager.js b/src/ol/style/atlasmanager.js index 35526bc6dc..0ca4bd08e8 100644 --- a/src/ol/style/atlasmanager.js +++ b/src/ol/style/atlasmanager.js @@ -5,16 +5,6 @@ goog.require('goog.asserts'); goog.require('ol'); goog.require('ol.dom'); -/** - * Provides information for an image inside an atlas manager. - * `offsetX` and `offsetY` is the position of the image inside - * the atlas image `image` and the position of the hit-detection image - * inside the hit-detection atlas image `hitImage`. - * @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement, - * hitImage: HTMLCanvasElement}} - */ -ol.style.AtlasManagerInfo; - /** * Manages the creation of image atlases. @@ -239,15 +229,6 @@ ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height, }; -/** - * Provides information for an image inside an atlas. - * `offsetX` and `offsetY` are the position of the image inside - * the atlas image `image`. - * @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement}} - */ -ol.style.AtlasInfo; - - /** * This class facilitates the creation of image atlases. * @@ -275,7 +256,7 @@ ol.style.Atlas = function(size, space) { /** * @private - * @type {Array.} + * @type {Array.} */ this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}]; @@ -351,7 +332,7 @@ ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_t /** * @private * @param {number} index The index of the block. - * @param {ol.style.Atlas.Block} block The block to split. + * @param {ol.style.AtlasBlock} block The block to split. * @param {number} width The width of the entry to insert. * @param {number} height The height of the entry to insert. */ @@ -359,9 +340,9 @@ ol.style.Atlas.prototype.split_ = function(index, block, width, height) { var deltaWidth = block.width - width; var deltaHeight = block.height - height; - /** @type {ol.style.Atlas.Block} */ + /** @type {ol.style.AtlasBlock} */ var newBlock1; - /** @type {ol.style.Atlas.Block} */ + /** @type {ol.style.AtlasBlock} */ var newBlock2; if (deltaWidth > deltaHeight) { @@ -410,8 +391,8 @@ ol.style.Atlas.prototype.split_ = function(index, block, width, height) { * blocks (that are potentially smaller) are filled first. * @private * @param {number} index The index of the block to remove. - * @param {ol.style.Atlas.Block} newBlock1 The 1st block to add. - * @param {ol.style.Atlas.Block} newBlock2 The 2nd block to add. + * @param {ol.style.AtlasBlock} newBlock1 The 1st block to add. + * @param {ol.style.AtlasBlock} newBlock2 The 2nd block to add. */ ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) { var args = [index, 1]; @@ -423,9 +404,3 @@ ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) { } this.emptyBlocks_.splice.apply(this.emptyBlocks_, args); }; - - -/** - * @typedef {{x: number, y: number, width: number, height: number}} - */ -ol.style.Atlas.Block; diff --git a/src/ol/style/circlestyle.js b/src/ol/style/circlestyle.js index a073ee8c1b..9d8c689c23 100644 --- a/src/ol/style/circlestyle.js +++ b/src/ol/style/circlestyle.js @@ -227,13 +227,6 @@ ol.style.Circle.prototype.load = ol.nullFunction; ol.style.Circle.prototype.unlistenImageChange = ol.nullFunction; -/** - * @typedef {{strokeStyle: (string|undefined), strokeWidth: number, - * size: number, lineDash: Array.}} - */ -ol.style.Circle.RenderOptions; - - /** * @private * @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager. @@ -259,7 +252,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) { var size = 2 * (this.radius_ + strokeWidth) + 1; - /** @type {ol.style.Circle.RenderOptions} */ + /** @type {ol.style.CircleRenderOptions} */ var renderOptions = { strokeStyle: strokeStyle, strokeWidth: strokeWidth, @@ -320,7 +313,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) { /** * @private - * @param {ol.style.Circle.RenderOptions} renderOptions Render options. + * @param {ol.style.CircleRenderOptions} renderOptions Render options. * @param {CanvasRenderingContext2D} context The rendering context. * @param {number} x The origin for the symbol (x). * @param {number} y The origin for the symbol (y). @@ -355,7 +348,7 @@ ol.style.Circle.prototype.draw_ = function(renderOptions, context, x, y) { /** * @private - * @param {ol.style.Circle.RenderOptions} renderOptions Render options. + * @param {ol.style.CircleRenderOptions} renderOptions Render options. */ ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) { this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size]; @@ -375,7 +368,7 @@ ol.style.Circle.prototype.createHitDetectionCanvas_ = function(renderOptions) { /** * @private - * @param {ol.style.Circle.RenderOptions} renderOptions Render options. + * @param {ol.style.CircleRenderOptions} renderOptions Render options. * @param {CanvasRenderingContext2D} context The context. * @param {number} x The origin for the symbol (x). * @param {number} y The origin for the symbol (y). diff --git a/src/ol/style/regularshapestyle.js b/src/ol/style/regularshapestyle.js index 32c9217f9c..2a6242ac35 100644 --- a/src/ol/style/regularshapestyle.js +++ b/src/ol/style/regularshapestyle.js @@ -289,20 +289,6 @@ ol.style.RegularShape.prototype.load = ol.nullFunction; ol.style.RegularShape.prototype.unlistenImageChange = ol.nullFunction; -/** - * @typedef {{ - * strokeStyle: (string|undefined), - * strokeWidth: number, - * size: number, - * lineCap: string, - * lineDash: Array., - * lineJoin: string, - * miterLimit: number - * }} - */ -ol.style.RegularShape.RenderOptions; - - /** * @private * @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager. @@ -342,7 +328,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) { var size = 2 * (this.radius_ + strokeWidth) + 1; - /** @type {ol.style.RegularShape.RenderOptions} */ + /** @type {ol.style.RegularShapeRenderOptions} */ var renderOptions = { strokeStyle: strokeStyle, strokeWidth: strokeWidth, @@ -405,7 +391,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) { /** * @private - * @param {ol.style.RegularShape.RenderOptions} renderOptions Render options. + * @param {ol.style.RegularShapeRenderOptions} renderOptions Render options. * @param {CanvasRenderingContext2D} context The rendering context. * @param {number} x The origin for the symbol (x). * @param {number} y The origin for the symbol (y). @@ -450,7 +436,7 @@ ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) { /** * @private - * @param {ol.style.RegularShape.RenderOptions} renderOptions Render options. + * @param {ol.style.RegularShapeRenderOptions} renderOptions Render options. */ ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) { this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size]; @@ -470,7 +456,7 @@ ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptio /** * @private - * @param {ol.style.RegularShape.RenderOptions} renderOptions Render options. + * @param {ol.style.RegularShapeRenderOptions} renderOptions Render options. * @param {CanvasRenderingContext2D} context The context. * @param {number} x The origin for the symbol (x). * @param {number} y The origin for the symbol (y). diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index d99285a52e..9091233f26 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -369,6 +369,12 @@ ol.format.WFS.FeatureCollectionMetadata; ol.format.WFS.TransactionResponse; +/** + * @typedef {{type: number, value: (number|string|undefined), position: number}} + */ +ol.format.WKTToken; + + /** * A function that takes a {@link ol.MapBrowserEvent} and two * {@link ol.Pixel}s and returns a `{boolean}`. If the condition is met, @@ -420,7 +426,7 @@ ol.interaction.SelectFilterFunction; * vertexPixel: (ol.Pixel|null) * }} */ -ol.interaction.Snap.ResultType; +ol.interaction.SnapResultType; /** @@ -429,7 +435,7 @@ ol.interaction.Snap.ResultType; * segment: Array. * }} */ -ol.interaction.Snap.SegmentDataType; +ol.interaction.SnapSegmentDataType; /** @@ -485,7 +491,7 @@ ol.raster.Pixel; /** * @typedef {{fillStyle: ol.ColorLike}} */ -ol.render.canvas.FillState; +ol.render.canvasFillState; /** @@ -496,7 +502,7 @@ ol.render.canvas.FillState; * miterLimit: number, * strokeStyle: string}} */ -ol.render.canvas.StrokeState; +ol.render.canvasStrokeState; /** @@ -504,13 +510,13 @@ ol.render.canvas.StrokeState; * textAlign: string, * textBaseline: string}} */ -ol.render.canvas.TextState; +ol.render.canvasTextState; /** * @typedef {{magFilter: number, minFilter: number, texture: WebGLTexture}} */ -ol.renderer.webgl.TextureCacheEntry; +ol.renderer.webglTextureCacheEntry; /** @@ -545,6 +551,14 @@ ol.reproj.Triangle; ol.source.ImageOptions; +/** + * @typedef {{revision: number, + * resolution: number, + * extent: ol.Extent}} + */ +ol.source.RasterRenderedState; + + /** * @typedef {{attributions: (ol.AttributionLike|undefined), * logo: (string|olx.LogoOptions|undefined), @@ -598,6 +612,39 @@ ol.source.UrlTileOptions; ol.structs.LRUCacheEntry; +/** + * @typedef {{x: number, y: number, width: number, height: number}} + */ +ol.style.AtlasBlock; + + +/** + * Provides information for an image inside an atlas. + * `offsetX` and `offsetY` are the position of the image inside + * the atlas image `image`. + * @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement}} + */ +ol.style.AtlasInfo; + + +/** + * Provides information for an image inside an atlas manager. + * `offsetX` and `offsetY` is the position of the image inside + * the atlas image `image` and the position of the hit-detection image + * inside the hit-detection atlas image `hitImage`. + * @typedef {{offsetX: number, offsetY: number, image: HTMLCanvasElement, + * hitImage: HTMLCanvasElement}} + */ +ol.style.AtlasManagerInfo; + + +/** + * @typedef {{strokeStyle: (string|undefined), strokeWidth: number, + * size: number, lineDash: Array.}} + */ +ol.style.CircleRenderOptions; + + /** * @typedef {{opacity: number, * rotateWithView: boolean, @@ -619,6 +666,20 @@ ol.style.ImageOptions; ol.style.GeometryFunction; +/** + * @typedef {{ + * strokeStyle: (string|undefined), + * strokeWidth: number, + * size: number, + * lineCap: string, + * lineDash: Array., + * lineJoin: string, + * miterLimit: number + * }} + */ +ol.style.RegularShapeRenderOptions; + + /** * A function that takes an {@link ol.Feature} and a `{number}` representing * the view's resolution. The function should return a {@link ol.style.Style}