Symbolizer and SymbolizerLiteral as base class, not interface

This commit is contained in:
ahocevar
2013-03-02 14:08:52 +01:00
parent da7820121f
commit fcd5804d2d
4 changed files with 25 additions and 11 deletions

View File

@@ -18,10 +18,11 @@ ol.style.LineLiteralOptions;
/**
* @constructor
* @implements {ol.style.SymbolizerLiteral}
* @extends {ol.style.SymbolizerLiteral}
* @param {ol.style.LineLiteralOptions} config Symbolizer properties.
*/
ol.style.LineLiteral = function(config) {
goog.base(this);
/** @type {string} */
this.strokeStyle = config.strokeStyle;
@@ -33,6 +34,7 @@ ol.style.LineLiteral = function(config) {
this.opacity = config.opacity;
};
goog.inherits(ol.style.LineLiteral, ol.style.SymbolizerLiteral);
/**
@@ -46,10 +48,11 @@ ol.style.LineOptions;
/**
* @constructor
* @implements {ol.style.Symbolizer}
* @extends {ol.style.Symbolizer}
* @param {ol.style.LineOptions} options Symbolizer properties.
*/
ol.style.Line = function(options) {
goog.base(this);
/**
* @type {ol.Expression}
@@ -79,6 +82,7 @@ ol.style.Line = function(options) {
options.opacity : new ol.ExpressionLiteral(options.opacity);
};
goog.inherits(ol.style.Line, ol.style.Symbolizer);
/**

View File

@@ -8,17 +8,23 @@ goog.require('ol.style.SymbolizerLiteral');
/**
* @constructor
* @implements {ol.style.SymbolizerLiteral}
* @extends {ol.style.SymbolizerLiteral}
*/
ol.style.PointLiteral = function() {};
ol.style.PointLiteral = function() {
goog.base(this);
};
goog.inherits(ol.style.PointLiteral, ol.style.SymbolizerLiteral);
/**
* @constructor
* @implements {ol.style.Symbolizer}
* @extends {ol.style.Symbolizer}
*/
ol.style.Point = function() {};
ol.style.Point = function() {
goog.base(this);
};
goog.inherits(ol.style.Point, ol.style.Symbolizer);
/**

View File

@@ -19,10 +19,11 @@ ol.style.PolygonLiteralOptions;
/**
* @constructor
* @implements {ol.style.SymbolizerLiteral}
* @extends {ol.style.SymbolizerLiteral}
* @param {ol.style.PolygonLiteralOptions} config Symbolizer properties.
*/
ol.style.PolygonLiteral = function(config) {
goog.base(this);
/** @type {string} */
this.fillStyle = config.fillStyle;
@@ -37,6 +38,7 @@ ol.style.PolygonLiteral = function(config) {
this.opacity = config.opacity;
};
goog.inherits(ol.style.PolygonLiteral, ol.style.SymbolizerLiteral);
/**
@@ -51,10 +53,11 @@ ol.style.PolygonOptions;
/**
* @constructor
* @implements {ol.style.Symbolizer}
* @extends {ol.style.Symbolizer}
* @param {ol.style.PolygonOptions} options Symbolizer properties.
*/
ol.style.Polygon = function(options) {
goog.base(this);
/**
* @type {ol.Expression}
@@ -93,6 +96,7 @@ ol.style.Polygon = function(options) {
options.opacity : new ol.ExpressionLiteral(options.opacity);
};
goog.inherits(ol.style.Polygon, ol.style.Symbolizer);
/**

View File

@@ -6,14 +6,14 @@ goog.require('ol.Feature');
/**
* @interface
* @constructor
*/
ol.style.SymbolizerLiteral = function() {};
/**
* @interface
* @constructor
*/
ol.style.Symbolizer = function() {};
@@ -22,4 +22,4 @@ ol.style.Symbolizer = function() {};
* @param {ol.Feature} feature Feature for evaluating expressions.
* @return {ol.style.SymbolizerLiteral} Literal symbolizer.
*/
ol.style.Symbolizer.prototype.createLiteral = function(feature) {};
ol.style.Symbolizer.prototype.createLiteral = goog.abstractMethod;