Correct types
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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_) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user