Merge branch 'master' of https://github.com/openlayers/ol3
This commit is contained in:
@@ -58,6 +58,7 @@ ol.feature = function(opt_arg){
|
||||
};
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @param {!string} attr The name of the attribute to be set.
|
||||
* @param {string|number|boolean} value The value of the attribute to be set.
|
||||
* @returns {ol.Feature} The feature so calls can be chained
|
||||
@@ -68,6 +69,7 @@ ol.Feature.prototype.set = function(attr, value) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @param {!string} attr The name of the attribute to be set.
|
||||
* @returns {string|number|boolean|undefined} The attribute value requested.
|
||||
*/
|
||||
@@ -76,6 +78,7 @@ ol.Feature.prototype.get = function(attr) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @param {ol.geom.Geometry=} opt_arg
|
||||
* @returns {ol.Feature|ol.geom.Geometry|undefined} get or set the geometry on a feature
|
||||
*/
|
||||
@@ -87,5 +90,3 @@ ol.Feature.prototype.geometry = function(opt_arg) {
|
||||
return this.getGeometry();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -45,3 +45,18 @@ goog.exportProperty( ol.Bounds.prototype, 'minX', ol.Bounds.prototype.minX );
|
||||
goog.exportProperty( ol.Bounds.prototype, 'minY', ol.Bounds.prototype.minY );
|
||||
goog.exportProperty( ol.Bounds.prototype, 'maxX', ol.Bounds.prototype.maxX );
|
||||
goog.exportProperty( ol.Bounds.prototype, 'maxY', ol.Bounds.prototype.maxY );
|
||||
|
||||
// ol.feature
|
||||
goog.exportSymbol('ol.feature', ol.feature);
|
||||
goog.exportSymbol('ol.Feature', ol.Feature);
|
||||
goog.exportProperty(ol.Feature.prototype, 'set', ol.Feature.prototype.set);
|
||||
goog.exportProperty(ol.Feature.prototype, 'get', ol.Feature.prototype.get);
|
||||
goog.exportProperty(ol.Feature.prototype, 'geometry', ol.Feature.prototype.geometry);
|
||||
|
||||
// ol.geom.point
|
||||
goog.exportSymbol('ol.geom.point', ol.geom.point);
|
||||
goog.exportSymbol('ol.geom.Point', ol.geom.Point);
|
||||
goog.exportProperty(ol.geom.Point.prototype, 'x', ol.geom.Point.prototype.x);
|
||||
goog.exportProperty(ol.geom.Point.prototype, 'y', ol.geom.Point.prototype.y);
|
||||
goog.exportPropertz(ol.geom.Point.prototzpe, 'z', ol.geom.Point.prototzpe.z);
|
||||
goog.exportProperty(ol.geom.Point.prototype, 'projection', ol.geom.Point.prototype.projection);
|
||||
|
||||
@@ -5,6 +5,7 @@ goog.require('ol.geom.Geometry');
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @constructor
|
||||
*/
|
||||
ol.Feature = function() {
|
||||
|
||||
@@ -31,8 +31,8 @@ describe("ol.feature", function() {
|
||||
|
||||
var geom = feat.geometry();
|
||||
expect(feat).toBeA(ol.Feature);
|
||||
expect(geom.getX()).toBe(21);
|
||||
expect(geom.getY()).toBe(4);
|
||||
expect(geom.x()).toBe(21);
|
||||
expect(geom.y()).toBe(4);
|
||||
});
|
||||
|
||||
it("should be easy to create a feature from object literals", function() {
|
||||
@@ -49,8 +49,8 @@ describe("ol.feature", function() {
|
||||
|
||||
var geom = feat.geometry();
|
||||
expect(feat).toBeA(ol.Feature);
|
||||
expect(geom.getX()).toBe(56);
|
||||
expect(geom.getY()).toBe(22);
|
||||
expect(geom.x()).toBe(56);
|
||||
expect(geom.y()).toBe(22);
|
||||
expect(feat.get('foo')).toBe('bar');
|
||||
expect(feat.get('two')).toBe('deux');
|
||||
expect(feat.get('size')).toBe(3);
|
||||
@@ -69,8 +69,8 @@ describe("ol.feature", function() {
|
||||
|
||||
var geom = feat.geometry();
|
||||
expect(feat).toBeA(ol.Feature);
|
||||
expect(geom.getX()).toBe(102.0);
|
||||
expect(geom.getY()).toBe(0.5);
|
||||
expect(geom.x()).toBe(102.0);
|
||||
expect(geom.y()).toBe(0.5);
|
||||
expect(feat.get('prop0')).toBe('value0');
|
||||
});
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user