From 8a08ab646341586e1a8eb6ea50de038fa19219a0 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Tue, 15 Aug 2017 15:30:10 -0400 Subject: [PATCH] Correct types --- doc/tutorials/closure.md | 2 +- examples/zoomslider.js | 2 +- externs/oli.js | 4 ++-- externs/olx.js | 24 ++++++++++++------------ externs/readme.md | 4 ++-- src/ol/control/control.js | 6 +++--- src/ol/control/overviewmap.js | 8 ++++---- src/ol/graticule.js | 6 +++--- src/ol/interaction/extent.js | 2 +- src/ol/interaction/interaction.js | 6 +++--- src/ol/interaction/modify.js | 2 +- src/ol/interaction/mousewheelzoom.js | 2 +- src/ol/interaction/select.js | 2 +- src/ol/interaction/snap.js | 2 +- src/ol/interaction/translate.js | 4 ++-- src/ol/layer/layer.js | 2 +- src/ol/mapbrowserevent.js | 2 +- src/ol/mapbrowsereventhandler.js | 4 ++-- src/ol/mapbrowserpointerevent.js | 2 +- src/ol/mapevent.js | 4 ++-- src/ol/overlay.js | 6 +++--- src/ol/pluggablemap.js | 4 ++-- src/ol/render/box.js | 4 ++-- src/ol/renderer/canvas/map.js | 4 ++-- src/ol/renderer/layer.js | 2 +- src/ol/renderer/map.js | 10 +++++----- src/ol/renderer/webgl/map.js | 8 ++++---- src/ol/typedefs.js | 4 ++-- test/test-extensions.js | 2 +- 29 files changed, 67 insertions(+), 67 deletions(-) diff --git a/doc/tutorials/closure.md b/doc/tutorials/closure.md index f9c6a51aa5..f1c56d62ac 100644 --- a/doc/tutorials/closure.md +++ b/doc/tutorials/closure.md @@ -124,7 +124,7 @@ goog.require('ol.source.OSM'); /** - * @type {ol.Map} + * @type {ol.PluggableMap} */ app.map = new ol.Map({ target: 'map', diff --git a/examples/zoomslider.js b/examples/zoomslider.js index ca3f1e7df2..6d81a37e40 100644 --- a/examples/zoomslider.js +++ b/examples/zoomslider.js @@ -9,7 +9,7 @@ goog.require('ol.source.OSM'); * Helper method for map-creation. * * @param {string} divId The id of the div for the map. - * @return {ol.Map} The ol.Map instance. + * @return {ol.PluggableMap} The ol.Map instance. */ var createMap = function(divId) { var source, layer, map, zoomslider; diff --git a/externs/oli.js b/externs/oli.js index c39b57d96d..dfaf33c7dd 100644 --- a/externs/oli.js +++ b/externs/oli.js @@ -181,7 +181,7 @@ oli.MapEvent = function() {}; /** - * @type {ol.Map} + * @type {ol.PluggableMap} */ oli.MapEvent.prototype.map; @@ -229,7 +229,7 @@ oli.control.Control = function() {}; /** - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @return {undefined} Undefined. */ oli.control.Control.prototype.setMap = function(map) {}; diff --git a/externs/olx.js b/externs/olx.js index 6ac4cbb718..a010c68160 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -109,7 +109,7 @@ olx.LogoOptions.prototype.src; /** - * @typedef {{map: (ol.Map|undefined), + * @typedef {{map: (ol.PluggableMap|undefined), * maxLines: (number|undefined), * strokeStyle: (ol.style.Stroke|undefined), * targetSize: (number|undefined), @@ -126,7 +126,7 @@ olx.GraticuleOptions; /** * Reference to an `ol.Map` object. - * @type {ol.Map|undefined} + * @type {ol.PluggableMap|undefined} * @api */ olx.GraticuleOptions.prototype.map; @@ -4011,7 +4011,7 @@ olx.layer.HeatmapOptions.prototype.zIndex; /** * @typedef {{opacity: (number|undefined), - * map: (ol.Map|undefined), + * map: (ol.PluggableMap|undefined), * source: (ol.source.Image|undefined), * visible: (boolean|undefined), * extent: (ol.Extent|undefined), @@ -4043,7 +4043,7 @@ olx.layer.ImageOptions.prototype.source; * layers collection, and the layer will be rendered on top. This is useful for * temporary layers. The standard way to add a layer to a map and have it * managed by the map is to use {@link ol.Map#addLayer}. - * @type {ol.Map|undefined} + * @type {ol.PluggableMap|undefined} * @api */ olx.layer.ImageOptions.prototype.map; @@ -4095,7 +4095,7 @@ olx.layer.ImageOptions.prototype.zIndex; * @typedef {{opacity: (number|undefined), * preload: (number|undefined), * source: (ol.source.Tile|undefined), - * map: (ol.Map|undefined), + * map: (ol.PluggableMap|undefined), * visible: (boolean|undefined), * extent: (ol.Extent|undefined), * minResolution: (number|undefined), @@ -4136,7 +4136,7 @@ olx.layer.TileOptions.prototype.source; * layers collection, and the layer will be rendered on top. This is useful for * temporary layers. The standard way to add a layer to a map and have it * managed by the map is to use {@link ol.Map#addLayer}. - * @type {ol.Map|undefined} + * @type {ol.PluggableMap|undefined} * @api */ olx.layer.TileOptions.prototype.map; @@ -4199,7 +4199,7 @@ olx.layer.TileOptions.prototype.zIndex; * opacity: (number|undefined), * renderBuffer: (number|undefined), * source: (ol.source.Vector|undefined), - * map: (ol.Map|undefined), + * map: (ol.PluggableMap|undefined), * style: (ol.style.Style|Array.|ol.StyleFunction|undefined), * updateWhileAnimating: (boolean|undefined), * updateWhileInteracting: (boolean|undefined), @@ -4224,7 +4224,7 @@ olx.layer.VectorOptions.prototype.renderOrder; * layers collection, and the layer will be rendered on top. This is useful for * temporary layers. The standard way to add a layer to a map and have it * managed by the map is to use {@link ol.Map#addLayer}. - * @type {ol.Map|undefined} + * @type {ol.PluggableMap|undefined} * @api */ olx.layer.VectorOptions.prototype.map; @@ -4330,7 +4330,7 @@ olx.layer.VectorOptions.prototype.zIndex; /** * @typedef {{extent: (ol.Extent|undefined), - * map: (ol.Map|undefined), + * map: (ol.PluggableMap|undefined), * minResolution: (number|undefined), * maxResolution: (number|undefined), * opacity: (number|undefined), @@ -4392,7 +4392,7 @@ olx.layer.VectorTileOptions.prototype.renderOrder; * layers collection, and the layer will be rendered on top. This is useful for * temporary layers. The standard way to add a layer to a map and have it * managed by the map is to use {@link ol.Map#addLayer}. - * @type {ol.Map|undefined} + * @type {ol.PluggableMap|undefined} * @api */ olx.layer.VectorTileOptions.prototype.map; @@ -8294,7 +8294,7 @@ olx.style.AtlasManagerOptions.prototype.space; /** * @typedef {{handles: function(ol.renderer.Type):boolean, - * create: function(Element, ol.Map):ol.renderer.Map}} + * create: function(Element, ol.PluggableMap):ol.renderer.Map}} */ olx.MapRendererPlugin; @@ -8309,7 +8309,7 @@ olx.MapRendererPlugin.prototype.handles; /** * Create the map renderer. - * @type {function(Element, ol.Map):ol.renderer.Map} + * @type {function(Element, ol.PluggableMap):ol.renderer.Map} * @api */ olx.MapRendererPlugin.prototype.create; diff --git a/externs/readme.md b/externs/readme.md index 72bf6d5556..a05104ef2e 100644 --- a/externs/readme.md +++ b/externs/readme.md @@ -53,7 +53,7 @@ For custom subclasses in applications, which can be created using `ol.inherits`, oli.control.Control = function() {}; /** - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @return {undefined} Undefined. */ oli.control.Control.prototype.setMap = function(map) {}; @@ -74,7 +74,7 @@ ol.control.Control = function(options) { /** * Application subclasses may override this. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @api */ ol.control.Control.prototype.setMap = function(map) { diff --git a/src/ol/control/control.js b/src/ol/control/control.js index e3330e76ae..79922655a3 100644 --- a/src/ol/control/control.js +++ b/src/ol/control/control.js @@ -54,7 +54,7 @@ ol.control.Control = function(options) { /** * @private - * @type {ol.Map} + * @type {ol.PluggableMap} */ this.map_ = null; @@ -88,7 +88,7 @@ ol.control.Control.prototype.disposeInternal = function() { /** * Get the map associated with this control. - * @return {ol.Map} Map. + * @return {ol.PluggableMap} Map. * @api */ ol.control.Control.prototype.getMap = function() { @@ -100,7 +100,7 @@ ol.control.Control.prototype.getMap = function() { * Remove the control from its current map and attach it to the new map. * Subclasses may set up event handlers to get notified about changes to * the map here. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @override * @api */ diff --git a/src/ol/control/overviewmap.js b/src/ol/control/overviewmap.js index 1244f16de8..a692e53463 100644 --- a/src/ol/control/overviewmap.js +++ b/src/ol/control/overviewmap.js @@ -2,7 +2,7 @@ goog.provide('ol.control.OverviewMap'); goog.require('ol'); goog.require('ol.Collection'); -goog.require('ol.Map'); +goog.require('ol.PluggableMap'); goog.require('ol.MapEventType'); goog.require('ol.MapProperty'); goog.require('ol.Object'); @@ -97,10 +97,10 @@ ol.control.OverviewMap = function(opt_options) { this.ovmapDiv_.className = 'ol-overviewmap-map'; /** - * @type {ol.Map} + * @type {ol.PluggableMap} * @private */ - this.ovmap_ = new ol.Map({ + this.ovmap_ = new ol.PluggableMap({ controls: new ol.Collection(), interactions: new ol.Collection(), view: options.view @@ -551,7 +551,7 @@ ol.control.OverviewMap.prototype.getCollapsed = function() { /** * Return the overview map. - * @return {ol.Map} Overview map. + * @return {ol.PluggableMap} Overview map. * @api */ ol.control.OverviewMap.prototype.getOverviewMap = function() { diff --git a/src/ol/graticule.js b/src/ol/graticule.js index 38bc387a3b..a35eb51b41 100644 --- a/src/ol/graticule.js +++ b/src/ol/graticule.js @@ -24,7 +24,7 @@ ol.Graticule = function(opt_options) { var options = opt_options || {}; /** - * @type {ol.Map} + * @type {ol.PluggableMap} * @private */ this.map_ = null; @@ -469,7 +469,7 @@ ol.Graticule.prototype.getInterval_ = function(resolution) { /** * Get the map associated with this graticule. - * @return {ol.Map} The map. + * @return {ol.PluggableMap} The map. * @api */ ol.Graticule.prototype.getMap = function() { @@ -642,7 +642,7 @@ ol.Graticule.prototype.updateProjectionInfo_ = function(projection) { /** * Set the map for this graticule. The graticule will be rendered on the * provided map. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @api */ ol.Graticule.prototype.setMap = function(map) { diff --git a/src/ol/interaction/extent.js b/src/ol/interaction/extent.js index 9a905d44b9..66f7dc9897 100644 --- a/src/ol/interaction/extent.js +++ b/src/ol/interaction/extent.js @@ -306,7 +306,7 @@ ol.interaction.Extent.getSegments_ = function(extent) { /** * @param {ol.Pixel} pixel cursor location - * @param {ol.Map} map map + * @param {ol.PluggableMap} map map * @returns {ol.Coordinate|null} snapped vertex on extent * @private */ diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index ace0c1307d..3fdb640b2f 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -31,7 +31,7 @@ ol.interaction.Interaction = function(options) { /** * @private - * @type {ol.Map} + * @type {ol.PluggableMap} */ this.map_ = null; @@ -60,7 +60,7 @@ ol.interaction.Interaction.prototype.getActive = function() { /** * Get the map associated with this interaction. - * @return {ol.Map} Map. + * @return {ol.PluggableMap} Map. * @api */ ol.interaction.Interaction.prototype.getMap = function() { @@ -83,7 +83,7 @@ ol.interaction.Interaction.prototype.setActive = function(active) { * Remove the interaction from its current map and attach it to the new map. * Subclasses may set up event handlers to get notified about changes to * the map here. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. */ ol.interaction.Interaction.prototype.setMap = function(map) { this.map_ = map; diff --git a/src/ol/interaction/modify.js b/src/ol/interaction/modify.js index 92024e86f0..73856fbd93 100644 --- a/src/ol/interaction/modify.js +++ b/src/ol/interaction/modify.js @@ -839,7 +839,7 @@ ol.interaction.Modify.prototype.handlePointerMove_ = function(evt) { /** * @param {ol.Pixel} pixel Pixel - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @private */ ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) { diff --git a/src/ol/interaction/mousewheelzoom.js b/src/ol/interaction/mousewheelzoom.js index ca3d7930a8..213b7a0ae8 100644 --- a/src/ol/interaction/mousewheelzoom.js +++ b/src/ol/interaction/mousewheelzoom.js @@ -244,7 +244,7 @@ ol.interaction.MouseWheelZoom.prototype.decrementInteractingHint_ = function() { /** * @private - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. */ ol.interaction.MouseWheelZoom.prototype.handleWheelZoom_ = function(map) { var view = map.getView(); diff --git a/src/ol/interaction/select.js b/src/ol/interaction/select.js index 483884c811..a72e70ca55 100644 --- a/src/ol/interaction/select.js +++ b/src/ol/interaction/select.js @@ -304,7 +304,7 @@ ol.interaction.Select.prototype.setHitTolerance = function(hitTolerance) { /** * Remove the interaction from its current map, if any, and attach it to a new * map, if any. Pass `null` to just remove the interaction from the current map. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @override * @api */ diff --git a/src/ol/interaction/snap.js b/src/ol/interaction/snap.js index f4756c8b3a..6f5fc75c41 100644 --- a/src/ol/interaction/snap.js +++ b/src/ol/interaction/snap.js @@ -336,7 +336,7 @@ ol.interaction.Snap.prototype.shouldStopEvent = ol.functions.FALSE; /** * @param {ol.Pixel} pixel Pixel * @param {ol.Coordinate} pixelCoordinate Coordinate - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @return {ol.SnapResultType} Snap result */ ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) { diff --git a/src/ol/interaction/translate.js b/src/ol/interaction/translate.js index 9e54d5a013..dc13926510 100644 --- a/src/ol/interaction/translate.js +++ b/src/ol/interaction/translate.js @@ -185,7 +185,7 @@ ol.interaction.Translate.handleMoveEvent_ = function(event) { * Tests to see if the given coordinates intersects any of our selected * features. * @param {ol.Pixel} pixel Pixel coordinate to test for intersection. - * @param {ol.Map} map Map to test the intersection on. + * @param {ol.PluggableMap} map Map to test the intersection on. * @return {ol.Feature} Returns the feature found at the specified pixel * coordinates. * @private @@ -245,7 +245,7 @@ ol.interaction.Translate.prototype.handleActiveChanged_ = function() { /** - * @param {ol.Map} oldMap Old map. + * @param {ol.PluggableMap} oldMap Old map. * @private */ ol.interaction.Translate.prototype.updateState_ = function(oldMap) { diff --git a/src/ol/layer/layer.js b/src/ol/layer/layer.js index b2118abbf2..2e3089012b 100644 --- a/src/ol/layer/layer.js +++ b/src/ol/layer/layer.js @@ -161,7 +161,7 @@ ol.layer.Layer.prototype.handleSourcePropertyChange_ = function() { * * To add the layer to a map and have it managed by the map, use * {@link ol.Map#addLayer} instead. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @api */ ol.layer.Layer.prototype.setMap = function(map) { diff --git a/src/ol/mapbrowserevent.js b/src/ol/mapbrowserevent.js index 80aec04f34..2c705569ab 100644 --- a/src/ol/mapbrowserevent.js +++ b/src/ol/mapbrowserevent.js @@ -13,7 +13,7 @@ goog.require('ol.MapEvent'); * @extends {ol.MapEvent} * @implements {oli.MapBrowserEvent} * @param {string} type Event type. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @param {Event} browserEvent Browser event. * @param {boolean=} opt_dragging Is the map currently being dragged? * @param {?olx.FrameState=} opt_frameState Frame state. diff --git a/src/ol/mapbrowsereventhandler.js b/src/ol/mapbrowsereventhandler.js index 72394f6329..ea06f1bc39 100644 --- a/src/ol/mapbrowsereventhandler.js +++ b/src/ol/mapbrowsereventhandler.js @@ -11,7 +11,7 @@ goog.require('ol.pointer.PointerEventHandler'); /** - * @param {ol.Map} map The map with the viewport to listen to events on. + * @param {ol.PluggableMap} map The map with the viewport to listen to events on. * @param {number|undefined} moveTolerance The minimal distance the pointer must travel to trigger a move. * @constructor * @extends {ol.events.EventTarget} @@ -22,7 +22,7 @@ ol.MapBrowserEventHandler = function(map, moveTolerance) { /** * This is the element that we will listen to the real events on. - * @type {ol.Map} + * @type {ol.PluggableMap} * @private */ this.map_ = map; diff --git a/src/ol/mapbrowserpointerevent.js b/src/ol/mapbrowserpointerevent.js index 83b73fe8f7..1f95493a4f 100644 --- a/src/ol/mapbrowserpointerevent.js +++ b/src/ol/mapbrowserpointerevent.js @@ -8,7 +8,7 @@ goog.require('ol.MapBrowserEvent'); * @constructor * @extends {ol.MapBrowserEvent} * @param {string} type Event type. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @param {ol.pointer.PointerEvent} pointerEvent Pointer event. * @param {boolean=} opt_dragging Is the map currently being dragged? * @param {?olx.FrameState=} opt_frameState Frame state. diff --git a/src/ol/mapevent.js b/src/ol/mapevent.js index aeae5ae663..f0c66d9fb0 100644 --- a/src/ol/mapevent.js +++ b/src/ol/mapevent.js @@ -13,7 +13,7 @@ goog.require('ol.events.Event'); * @extends {ol.events.Event} * @implements {oli.MapEvent} * @param {string} type Event type. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @param {?olx.FrameState=} opt_frameState Frame state. */ ol.MapEvent = function(type, map, opt_frameState) { @@ -22,7 +22,7 @@ ol.MapEvent = function(type, map, opt_frameState) { /** * The map where the event occurred. - * @type {ol.Map} + * @type {ol.PluggableMap} * @api */ this.map = map; diff --git a/src/ol/overlay.js b/src/ol/overlay.js index 51e99df3c3..96a76bb3f4 100644 --- a/src/ol/overlay.js +++ b/src/ol/overlay.js @@ -166,12 +166,12 @@ ol.Overlay.prototype.getId = function() { /** * Get the map associated with this overlay. - * @return {ol.Map|undefined} The map that the overlay is part of. + * @return {ol.PluggableMap|undefined} The map that the overlay is part of. * @observable * @api */ ol.Overlay.prototype.getMap = function() { - return /** @type {ol.Map|undefined} */ ( + return /** @type {ol.PluggableMap|undefined} */ ( this.get(ol.Overlay.Property_.MAP)); }; @@ -299,7 +299,7 @@ ol.Overlay.prototype.setElement = function(element) { /** * Set the map to be associated with this overlay. - * @param {ol.Map|undefined} map The map that the overlay is part of. + * @param {ol.PluggableMap|undefined} map The map that the overlay is part of. * @observable * @api */ diff --git a/src/ol/pluggablemap.js b/src/ol/pluggablemap.js index 74a93b75af..0b667ccb25 100644 --- a/src/ol/pluggablemap.js +++ b/src/ol/pluggablemap.js @@ -291,7 +291,7 @@ ol.PluggableMap = function(options) { this.controls.forEach( /** * @param {ol.control.Control} control Control. - * @this {ol.Map} + * @this {ol.PluggableMap} */ function(control) { control.setMap(this); @@ -316,7 +316,7 @@ ol.PluggableMap = function(options) { this.interactions.forEach( /** * @param {ol.interaction.Interaction} interaction Interaction. - * @this {ol.Map} + * @this {ol.PluggableMap} */ function(interaction) { interaction.setMap(this); diff --git a/src/ol/render/box.js b/src/ol/render/box.js index 6e44032ec2..cd289c9281 100644 --- a/src/ol/render/box.js +++ b/src/ol/render/box.js @@ -30,7 +30,7 @@ ol.render.Box = function(className) { /** * @private - * @type {ol.Map} + * @type {ol.PluggableMap} */ this.map_ = null; @@ -74,7 +74,7 @@ ol.render.Box.prototype.render_ = function() { /** - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. */ ol.render.Box.prototype.setMap = function(map) { if (this.map_) { diff --git a/src/ol/renderer/canvas/map.js b/src/ol/renderer/canvas/map.js index 3e44f2cc7a..65f9b8c643 100644 --- a/src/ol/renderer/canvas/map.js +++ b/src/ol/renderer/canvas/map.js @@ -21,7 +21,7 @@ goog.require('ol.source.State'); * @constructor * @extends {ol.renderer.Map} * @param {Element} container Container. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @api */ ol.renderer.canvas.Map = function(container, map) { @@ -75,7 +75,7 @@ ol.renderer.canvas.Map['handles'] = function(type) { /** * Create the map renderer. * @param {Element} container Container. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @return {ol.renderer.canvas.Map} The map renderer. */ ol.renderer.canvas.Map['create'] = function(container, map) { diff --git a/src/ol/renderer/layer.js b/src/ol/renderer/layer.js index 413e3f25bc..f966d5c978 100644 --- a/src/ol/renderer/layer.js +++ b/src/ol/renderer/layer.js @@ -147,7 +147,7 @@ ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSourc if (tileSource.canExpireCache()) { /** * @param {ol.source.Tile} tileSource Tile source. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @param {olx.FrameState} frameState Frame state. */ var postRenderFunction = function(tileSource, map, frameState) { diff --git a/src/ol/renderer/map.js b/src/ol/renderer/map.js index 8283a4f959..4fa5386c79 100644 --- a/src/ol/renderer/map.js +++ b/src/ol/renderer/map.js @@ -17,7 +17,7 @@ goog.require('ol.transform'); * @abstract * @extends {ol.Disposable} * @param {Element} container Container. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @struct */ ol.renderer.Map = function(container, map) { @@ -27,7 +27,7 @@ ol.renderer.Map = function(container, map) { /** * @private - * @type {ol.Map} + * @type {ol.PluggableMap} */ this.map_ = map; @@ -78,7 +78,7 @@ ol.renderer.Map.prototype.disposeInternal = function() { /** - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @param {olx.FrameState} frameState Frame state. * @private */ @@ -249,7 +249,7 @@ ol.renderer.Map.prototype.getLayerRenderers = function() { /** - * @return {ol.Map} Map. + * @return {ol.PluggableMap} Map. */ ol.renderer.Map.prototype.getMap = function() { return this.map_; @@ -296,7 +296,7 @@ ol.renderer.Map.prototype.renderFrame = ol.nullFunction; /** - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @param {olx.FrameState} frameState Frame state. * @private */ diff --git a/src/ol/renderer/webgl/map.js b/src/ol/renderer/webgl/map.js index 606997ffe7..517f53f340 100644 --- a/src/ol/renderer/webgl/map.js +++ b/src/ol/renderer/webgl/map.js @@ -28,7 +28,7 @@ if (ol.ENABLE_WEBGL) { * @constructor * @extends {ol.renderer.Map} * @param {Element} container Container. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @api */ ol.renderer.webgl.Map = function(container, map) { @@ -133,7 +133,7 @@ if (ol.ENABLE_WEBGL) { /** - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @param {?olx.FrameState} frameState Frame state. * @return {boolean} false. * @this {ol.renderer.webgl.Map} @@ -177,7 +177,7 @@ if (ol.ENABLE_WEBGL) { /** * Create the map renderer. * @param {Element} container Container. - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @return {ol.renderer.webgl.Map} The map renderer. */ ol.renderer.webgl.Map['create'] = function(container, map) { @@ -301,7 +301,7 @@ if (ol.ENABLE_WEBGL) { /** - * @param {ol.Map} map Map. + * @param {ol.PluggableMap} map Map. * @param {olx.FrameState} frameState Frame state. * @private */ diff --git a/src/ol/typedefs.js b/src/ol/typedefs.js index 7300bbd210..098c7f410e 100644 --- a/src/ol/typedefs.js +++ b/src/ol/typedefs.js @@ -404,7 +404,7 @@ ol.Pixel; /** - * @typedef {function(ol.Map, ?olx.FrameState): boolean} + * @typedef {function(ol.PluggableMap, ?olx.FrameState): boolean} */ ol.PostRenderFunction; @@ -414,7 +414,7 @@ ol.PostRenderFunction; * with the {@link ol.Map} as first and an optional {@link olx.FrameState} as * second argument. Return `true` to keep this function for the next frame, * `false` to remove it. - * @typedef {function(ol.Map, ?olx.FrameState): boolean} + * @typedef {function(ol.PluggableMap, ?olx.FrameState): boolean} */ ol.PreRenderFunction; diff --git a/test/test-extensions.js b/test/test-extensions.js index a5245eaddd..03122b1a51 100644 --- a/test/test-extensions.js +++ b/test/test-extensions.js @@ -445,7 +445,7 @@ /** * Assert that the given map resembles a reference image. * - * @param {ol.Map} map A map using the canvas renderer. + * @param {ol.PluggableMap} map A map using the canvas renderer. * @param {string} referenceImage Path to the reference image. * @param {number} tolerance The accepted mismatch tolerance. * @param {function} done A callback to indicate that the test is done.