Add more content for the API doc

Involves additions to (there will be subsequent pull requests for other
classes):
- ol.Attribution
- ol.Collection
- ol.Expression
- ol.Feature
- ol.Geolocation
- ol.Map
- ol.Object
- ol.Overlay
- ol.Projection
- ol.View2D
- ol.control.Attribution
- ol.control.Control
- ol.control.FullScreen
- ol.control.Logo
- ol.control.MousePosition
- ol.control.ScaleLine
- ol.control.Zoom
- ol.control.ZoomSlider
- ol.dom.Input
- ol.filter.Filter
- ol.filter.Geometry
- ol.filter.Logical
This commit is contained in:
Bart van den Eijnden
2013-06-11 11:09:39 +02:00
parent 9647567704
commit 8dc97790bc
23 changed files with 264 additions and 14 deletions

View File

@@ -6,6 +6,14 @@ goog.require('ol.geom.Geometry');
/**
* Create a new feature. A feature is the base entity for vectors and has
* attributes, including normally a geometry attribute.
*
* Example:
*
* var feature = new ol.Feature({'foo': 'bar'});
* feature.setGeometry(new ol.geom.Point([100, 500]));
*
* @constructor
* @extends {ol.Object}
* @param {Object.<string, *>=} opt_values Attributes.
@@ -37,6 +45,7 @@ goog.inherits(ol.Feature, ol.Object);
/**
* Gets a copy of the attributes of this feature.
* @return {Object.<string, *>} Attributes object.
*/
ol.Feature.prototype.getAttributes = function() {
@@ -64,6 +73,7 @@ ol.Feature.prototype.getFeatureId = function() {
/**
* Get the geometry associated with this feature.
* @return {ol.geom.Geometry} The geometry (or null if none).
*/
ol.Feature.prototype.getGeometry = function() {
@@ -114,6 +124,7 @@ ol.Feature.prototype.setFeatureId = function(featureId) {
/**
* Set the geometry to be associated with this feature after its creation.
* @param {ol.geom.Geometry} geometry The geometry.
*/
ol.Feature.prototype.setGeometry = function(geometry) {
@@ -125,8 +136,9 @@ ol.Feature.prototype.setGeometry = function(geometry) {
/**
* Set the symbolizers to be used for this feature.
* @param {Array.<ol.style.Symbolizer>} symbolizers Symbolizers for this
* features. If set, these take precedence over layer style.
* feature. If set, these take precedence over layer style.
*/
ol.Feature.prototype.setSymbolizers = function(symbolizers) {
this.symbolizers_ = symbolizers;