Symbolizer and SymbolizerLiteral as base class, not interface
This commit is contained in:
@@ -18,10 +18,11 @@ ol.style.LineLiteralOptions;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {ol.style.SymbolizerLiteral}
|
* @extends {ol.style.SymbolizerLiteral}
|
||||||
* @param {ol.style.LineLiteralOptions} config Symbolizer properties.
|
* @param {ol.style.LineLiteralOptions} config Symbolizer properties.
|
||||||
*/
|
*/
|
||||||
ol.style.LineLiteral = function(config) {
|
ol.style.LineLiteral = function(config) {
|
||||||
|
goog.base(this);
|
||||||
|
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.strokeStyle = config.strokeStyle;
|
this.strokeStyle = config.strokeStyle;
|
||||||
@@ -33,6 +34,7 @@ ol.style.LineLiteral = function(config) {
|
|||||||
this.opacity = config.opacity;
|
this.opacity = config.opacity;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
goog.inherits(ol.style.LineLiteral, ol.style.SymbolizerLiteral);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -46,10 +48,11 @@ ol.style.LineOptions;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {ol.style.Symbolizer}
|
* @extends {ol.style.Symbolizer}
|
||||||
* @param {ol.style.LineOptions} options Symbolizer properties.
|
* @param {ol.style.LineOptions} options Symbolizer properties.
|
||||||
*/
|
*/
|
||||||
ol.style.Line = function(options) {
|
ol.style.Line = function(options) {
|
||||||
|
goog.base(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {ol.Expression}
|
* @type {ol.Expression}
|
||||||
@@ -79,6 +82,7 @@ ol.style.Line = function(options) {
|
|||||||
options.opacity : new ol.ExpressionLiteral(options.opacity);
|
options.opacity : new ol.ExpressionLiteral(options.opacity);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
goog.inherits(ol.style.Line, ol.style.Symbolizer);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,17 +8,23 @@ goog.require('ol.style.SymbolizerLiteral');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @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
|
* @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);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -19,10 +19,11 @@ ol.style.PolygonLiteralOptions;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {ol.style.SymbolizerLiteral}
|
* @extends {ol.style.SymbolizerLiteral}
|
||||||
* @param {ol.style.PolygonLiteralOptions} config Symbolizer properties.
|
* @param {ol.style.PolygonLiteralOptions} config Symbolizer properties.
|
||||||
*/
|
*/
|
||||||
ol.style.PolygonLiteral = function(config) {
|
ol.style.PolygonLiteral = function(config) {
|
||||||
|
goog.base(this);
|
||||||
|
|
||||||
/** @type {string} */
|
/** @type {string} */
|
||||||
this.fillStyle = config.fillStyle;
|
this.fillStyle = config.fillStyle;
|
||||||
@@ -37,6 +38,7 @@ ol.style.PolygonLiteral = function(config) {
|
|||||||
this.opacity = config.opacity;
|
this.opacity = config.opacity;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
goog.inherits(ol.style.PolygonLiteral, ol.style.SymbolizerLiteral);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,10 +53,11 @@ ol.style.PolygonOptions;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @implements {ol.style.Symbolizer}
|
* @extends {ol.style.Symbolizer}
|
||||||
* @param {ol.style.PolygonOptions} options Symbolizer properties.
|
* @param {ol.style.PolygonOptions} options Symbolizer properties.
|
||||||
*/
|
*/
|
||||||
ol.style.Polygon = function(options) {
|
ol.style.Polygon = function(options) {
|
||||||
|
goog.base(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {ol.Expression}
|
* @type {ol.Expression}
|
||||||
@@ -93,6 +96,7 @@ ol.style.Polygon = function(options) {
|
|||||||
options.opacity : new ol.ExpressionLiteral(options.opacity);
|
options.opacity : new ol.ExpressionLiteral(options.opacity);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
goog.inherits(ol.style.Polygon, ol.style.Symbolizer);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,14 +6,14 @@ goog.require('ol.Feature');
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @interface
|
* @constructor
|
||||||
*/
|
*/
|
||||||
ol.style.SymbolizerLiteral = function() {};
|
ol.style.SymbolizerLiteral = function() {};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @interface
|
* @constructor
|
||||||
*/
|
*/
|
||||||
ol.style.Symbolizer = function() {};
|
ol.style.Symbolizer = function() {};
|
||||||
|
|
||||||
@@ -22,4 +22,4 @@ ol.style.Symbolizer = function() {};
|
|||||||
* @param {ol.Feature} feature Feature for evaluating expressions.
|
* @param {ol.Feature} feature Feature for evaluating expressions.
|
||||||
* @return {ol.style.SymbolizerLiteral} Literal symbolizer.
|
* @return {ol.style.SymbolizerLiteral} Literal symbolizer.
|
||||||
*/
|
*/
|
||||||
ol.style.Symbolizer.prototype.createLiteral = function(feature) {};
|
ol.style.Symbolizer.prototype.createLiteral = goog.abstractMethod;
|
||||||
|
|||||||
Reference in New Issue
Block a user