Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Symbolizer and SymbolizerLiteral as base class, not interface

  • Loading branch information...
commit fcd5804d2d08e501c584f0ad51885e37def93bf2 1 parent da78201
@ahocevar ahocevar authored
View
8 src/ol/style/line.js
@@ -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
14 src/ol/style/point.js
@@ -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
8 src/ol/style/polygon.js
@@ -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
6 src/ol/style/symbolizer.js
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.