Merge pull request #1941 from elemoine/stable

Mark ol.Map and ol.Collection as stable
This commit is contained in:
Éric Lemoine
2014-06-19 15:53:23 +02:00
2 changed files with 45 additions and 45 deletions

View File

@@ -19,13 +19,13 @@ ol.CollectionEventType = {
/**
* Triggered when an item is added to the collection.
* @event ol.CollectionEvent#add
* @todo api
* @todo api stable
*/
ADD: 'add',
/**
* Triggered when an item is removed from the collection.
* @event ol.CollectionEvent#remove
* @todo api
* @todo api stable
*/
REMOVE: 'remove'
};
@@ -47,7 +47,7 @@ ol.CollectionEvent = function(type, opt_element, opt_target) {
/**
* The element that is added to or removed from the collection.
* @type {*}
* @todo api
* @todo api stable
*/
this.element = opt_element;
@@ -75,7 +75,7 @@ ol.CollectionProperty = {
* @extends {ol.Object}
* @fires ol.CollectionEvent
* @param {Array=} opt_array Array.
* @todo api
* @todo api stable
*/
ol.Collection = function(opt_array) {
@@ -95,7 +95,7 @@ goog.inherits(ol.Collection, ol.Object);
/**
* Remove all elements from the collection.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.clear = function() {
while (this.getLength() > 0) {
@@ -107,7 +107,7 @@ ol.Collection.prototype.clear = function() {
/**
* @param {Array} arr Array.
* @return {ol.Collection} This collection.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.extend = function(arr) {
var i, ii;
@@ -125,7 +125,7 @@ ol.Collection.prototype.extend = function(arr) {
* index and the array). The return value is ignored.
* @param {S=} opt_this The object to use as `this` in `f`.
* @template T,S
* @todo api
* @todo api stable
*/
ol.Collection.prototype.forEach = function(f, opt_this) {
goog.array.forEach(this.array_, f, opt_this);
@@ -138,7 +138,7 @@ ol.Collection.prototype.forEach = function(f, opt_this) {
* collection's "length" property won't be in sync with the actual length
* of the array.
* @return {Array} Array.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.getArray = function() {
return this.array_;
@@ -160,7 +160,7 @@ ol.Collection.prototype.item = function(index) {
* Get the length of this collection.
* @return {number} The length of the array.
* @todo observable
* @todo api
* @todo api stable
*/
ol.Collection.prototype.getLength = function() {
return /** @type {number} */ (this.get(ol.CollectionProperty.LENGTH));
@@ -171,7 +171,7 @@ ol.Collection.prototype.getLength = function() {
* Insert an element at the provided index.
* @param {number} index Index.
* @param {*} elem Element.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.insertAt = function(index, elem) {
goog.array.insertAt(this.array_, elem, index);
@@ -184,7 +184,7 @@ ol.Collection.prototype.insertAt = function(index, elem) {
/**
* Remove the last element of the collection.
* @return {*} Element.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.pop = function() {
return this.removeAt(this.getLength() - 1);
@@ -195,7 +195,7 @@ ol.Collection.prototype.pop = function() {
* Insert the provided element at the end of the collection.
* @param {*} elem Element.
* @return {number} Length.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.push = function(elem) {
var n = this.array_.length;
@@ -208,7 +208,7 @@ ol.Collection.prototype.push = function(elem) {
* Removes the first occurence of elem from the collection.
* @param {*} elem Element.
* @return {*} The removed element or undefined if elem was not found.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.remove = function(elem) {
var arr = this.array_;
@@ -226,7 +226,7 @@ ol.Collection.prototype.remove = function(elem) {
* Remove the element at the provided index.
* @param {number} index Index.
* @return {*} Value.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.removeAt = function(index) {
var prev = this.array_[index];
@@ -242,7 +242,7 @@ ol.Collection.prototype.removeAt = function(index) {
* Set the element at the provided index.
* @param {number} index Index.
* @param {*} elem Element.
* @todo api
* @todo api stable
*/
ol.Collection.prototype.setAt = function(index, elem) {
var n = this.getLength();

View File

@@ -149,7 +149,7 @@ ol.MapProperty = {
* @fires ol.MapEvent
* @fires ol.render.Event#postcompose
* @fires ol.render.Event#precompose
* @todo api
* @todo api stable
*/
ol.Map = function(options) {
@@ -457,7 +457,7 @@ goog.inherits(ol.Map, ol.Object);
/**
* Add the given control to the map.
* @param {ol.control.Control} control Control.
* @todo api
* @todo api stable
*/
ol.Map.prototype.addControl = function(control) {
var controls = this.getControls();
@@ -469,7 +469,7 @@ ol.Map.prototype.addControl = function(control) {
/**
* Add the given interaction to the map.
* @param {ol.interaction.Interaction} interaction Interaction to add.
* @todo api
* @todo api stable
*/
ol.Map.prototype.addInteraction = function(interaction) {
var interactions = this.getInteractions();
@@ -481,7 +481,7 @@ ol.Map.prototype.addInteraction = function(interaction) {
/**
* Adds the given layer to the top of this map.
* @param {ol.layer.Base} layer Layer.
* @todo api
* @todo api stable
*/
ol.Map.prototype.addLayer = function(layer) {
var layers = this.getLayerGroup().getLayers();
@@ -493,7 +493,7 @@ ol.Map.prototype.addLayer = function(layer) {
/**
* Add the given overlay to the map.
* @param {ol.Overlay} overlay Overlay.
* @todo api
* @todo api stable
*/
ol.Map.prototype.addOverlay = function(overlay) {
var overlays = this.getOverlays();
@@ -507,7 +507,7 @@ ol.Map.prototype.addOverlay = function(overlay) {
* animations before updating the map's view. The {@link ol.animation}
* namespace provides several static methods for creating prerender functions.
* @param {...ol.PreRenderFunction} var_args Any number of pre-render functions.
* @todo api
* @todo api stable
*/
ol.Map.prototype.beforeRender = function(var_args) {
this.render();
@@ -546,7 +546,7 @@ ol.Map.prototype.disposeInternal = function() {
* @param {U=} opt_this2 Value to use as `this` when executing `layerFilter`.
* @return {T|undefined} Callback result.
* @template S,T,U
* @todo api
* @todo api stable
*/
ol.Map.prototype.forEachFeatureAtPixel =
function(pixel, callback, opt_this, opt_layerFilter, opt_this2) {
@@ -568,7 +568,7 @@ ol.Map.prototype.forEachFeatureAtPixel =
* Returns the geographical coordinate for a browser event.
* @param {Event} event Event.
* @return {ol.Coordinate} Coordinate.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getEventCoordinate = function(event) {
return this.getCoordinateFromPixel(this.getEventPixel(event));
@@ -579,7 +579,7 @@ ol.Map.prototype.getEventCoordinate = function(event) {
* Returns the map pixel position for a browser event.
* @param {Event} event Event.
* @return {ol.Pixel} Pixel.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getEventPixel = function(event) {
// goog.style.getRelativePosition is based on event.targetTouches,
@@ -608,7 +608,7 @@ ol.Map.prototype.getEventPixel = function(event) {
* @return {Element|string|undefined} The Element or id of the Element that the
* map is rendered in.
* @todo observable
* @todo api
* @todo api stable
*/
ol.Map.prototype.getTarget = function() {
return /** @type {Element|string|undefined} */ (
@@ -623,7 +623,7 @@ goog.exportProperty(
/**
* @param {ol.Pixel} pixel Pixel.
* @return {ol.Coordinate} Coordinate.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getCoordinateFromPixel = function(pixel) {
var frameState = this.frameState_;
@@ -638,7 +638,7 @@ ol.Map.prototype.getCoordinateFromPixel = function(pixel) {
/**
* @return {ol.Collection} Controls.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getControls = function() {
return this.controls_;
@@ -647,7 +647,7 @@ ol.Map.prototype.getControls = function() {
/**
* @return {ol.Collection} Overlays.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getOverlays = function() {
return this.overlays_;
@@ -661,7 +661,7 @@ ol.Map.prototype.getOverlays = function() {
*
* Interactions are used for e.g. pan, zoom and rotate.
* @return {ol.Collection} {@link ol.interaction.Interaction Interactions}.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getInteractions = function() {
return this.interactions_;
@@ -672,7 +672,7 @@ ol.Map.prototype.getInteractions = function() {
* Get the layergroup associated with this map.
* @return {ol.layer.Group} A layer group containing the layers in this map.
* @todo observable
* @todo api
* @todo api stable
*/
ol.Map.prototype.getLayerGroup = function() {
return /** @type {ol.layer.Group} */ (
@@ -687,7 +687,7 @@ goog.exportProperty(
/**
* Get the collection of layers associated with this map.
* @return {ol.Collection|undefined} Layers.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getLayers = function() {
var layerGroup = this.getLayerGroup();
@@ -702,7 +702,7 @@ ol.Map.prototype.getLayers = function() {
/**
* @param {ol.Coordinate} coordinate Coordinate.
* @return {ol.Pixel} Pixel.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getPixelFromCoordinate = function(coordinate) {
var frameState = this.frameState_;
@@ -728,7 +728,7 @@ ol.Map.prototype.getRenderer = function() {
* Get the size of this map.
* @return {ol.Size|undefined} The size in pixels of the map in the DOM.
* @todo observable
* @todo api
* @todo api stable
*/
ol.Map.prototype.getSize = function() {
return /** @type {ol.Size|undefined} */ (this.get(ol.MapProperty.SIZE));
@@ -744,7 +744,7 @@ goog.exportProperty(
* view manages properties such as center and resolution.
* @return {ol.IView|undefined} The view that controls this map.
* @todo observable
* @todo api
* @todo api stable
*/
ol.Map.prototype.getView = function() {
return /** @type {ol.IView} */ (this.get(ol.MapProperty.VIEW));
@@ -757,7 +757,7 @@ goog.exportProperty(
/**
* @return {Element} Viewport.
* @todo api
* @todo api stable
*/
ol.Map.prototype.getViewport = function() {
return this.viewport_;
@@ -1067,7 +1067,7 @@ ol.Map.prototype.isRendered = function() {
/**
* Requests an immediate render in a synchronous manner.
* @todo api
* @todo api stable
*/
ol.Map.prototype.renderSync = function() {
this.animationDelay_.fire();
@@ -1077,7 +1077,7 @@ ol.Map.prototype.renderSync = function() {
/**
* Requests a render frame; rendering will effectively occur at the next browser
* animation frame.
* @todo api
* @todo api stable
*/
ol.Map.prototype.render = function() {
if (!this.animationDelay_.isActive()) {
@@ -1091,7 +1091,7 @@ ol.Map.prototype.render = function() {
* @param {ol.control.Control} control Control.
* @return {ol.control.Control|undefined} The removed control of undefined
* if the control was not found.
* @todo api
* @todo api stable
*/
ol.Map.prototype.removeControl = function(control) {
var controls = this.getControls();
@@ -1108,7 +1108,7 @@ ol.Map.prototype.removeControl = function(control) {
* @param {ol.interaction.Interaction} interaction Interaction to remove.
* @return {ol.interaction.Interaction|undefined} The removed interaction (or
* undefined if the interaction was not found).
* @todo api
* @todo api stable
*/
ol.Map.prototype.removeInteraction = function(interaction) {
var removed;
@@ -1126,7 +1126,7 @@ ol.Map.prototype.removeInteraction = function(interaction) {
* @param {ol.layer.Base} layer Layer.
* @return {ol.layer.Base|undefined} The removed layer or undefined if the
* layer was not found.
* @todo api
* @todo api stable
*/
ol.Map.prototype.removeLayer = function(layer) {
var layers = this.getLayerGroup().getLayers();
@@ -1140,7 +1140,7 @@ ol.Map.prototype.removeLayer = function(layer) {
* @param {ol.Overlay} overlay Overlay.
* @return {ol.Overlay|undefined} The removed overlay of undefined
* if the overlay was not found.
* @todo api
* @todo api stable
*/
ol.Map.prototype.removeOverlay = function(overlay) {
var overlays = this.getOverlays();
@@ -1267,7 +1267,7 @@ ol.Map.prototype.renderFrame_ = function(time) {
* @param {ol.layer.Group} layerGroup A layer group containing the layers in
* this map.
* @todo observable
* @todo api
* @todo api stable
*/
ol.Map.prototype.setLayerGroup = function(layerGroup) {
this.set(ol.MapProperty.LAYERGROUP, layerGroup);
@@ -1298,7 +1298,7 @@ goog.exportProperty(
* @param {Element|string|undefined} target The Element or id of the Element
* that the map is rendered in.
* @todo observable
* @todo api
* @todo api stable
*/
ol.Map.prototype.setTarget = function(target) {
this.set(ol.MapProperty.TARGET, target);
@@ -1313,7 +1313,7 @@ goog.exportProperty(
* Set the view for this map.
* @param {ol.IView} view The view that controls this map.
* @todo observable
* @todo api
* @todo api stable
*/
ol.Map.prototype.setView = function(view) {
this.set(ol.MapProperty.VIEW, view);
@@ -1337,7 +1337,7 @@ ol.Map.prototype.skipFeature = function(feature) {
/**
* Force a recalculation of the map viewport size. This should be called when
* third-party code changes the size of the map viewport.
* @todo api
* @todo api stable
*/
ol.Map.prototype.updateSize = function() {
var target = this.getTarget();