Vector related exports

This commit is contained in:
Tim Schaub
2013-03-05 18:13:10 +01:00
parent 12bee3178e
commit e1c3faa53e
19 changed files with 116 additions and 70 deletions

View File

@@ -24,12 +24,15 @@ ol.style.LineLiteralOptions;
ol.style.LineLiteral = function(config) {
goog.base(this);
goog.asserts.assertString(config.strokeStyle, 'strokeStyle must be a string');
/** @type {string} */
this.strokeStyle = config.strokeStyle;
goog.asserts.assertNumber(config.strokeWidth, 'strokeWidth must be a number');
/** @type {number} */
this.strokeWidth = config.strokeWidth;
goog.asserts.assertNumber(config.opacity, 'opacity must be a number');
/** @type {number} */
this.opacity = config.opacity;
@@ -47,14 +50,6 @@ ol.style.LineLiteral.prototype.equals = function(lineLiteral) {
};
/**
* @typedef {{strokeStyle: (string|ol.Expression|undefined),
* strokeWidth: (number|ol.Expression|undefined),
* opacity: (number|ol.Expression|undefined)}}
*/
ol.style.LineOptions;
/**
* @constructor

View File

@@ -25,15 +25,19 @@ ol.style.PolygonLiteralOptions;
ol.style.PolygonLiteral = function(config) {
goog.base(this);
goog.asserts.assertString(config.fillStyle, 'fillStyle must be a string');
/** @type {string} */
this.fillStyle = config.fillStyle;
goog.asserts.assertString(config.strokeStyle, 'strokeStyle must be a string');
/** @type {string} */
this.strokeStyle = config.strokeStyle;
goog.asserts.assertNumber(config.strokeWidth, 'strokeWidth must be a number');
/** @type {number} */
this.strokeWidth = config.strokeWidth;
goog.asserts.assertNumber(config.opacity, 'opacity must be a number');
/** @type {number} */
this.opacity = config.opacity;
@@ -52,15 +56,6 @@ ol.style.PolygonLiteral.prototype.equals = function(polygonLiteral) {
};
/**
* @typedef {{fillStyle: (string|ol.Expression|undefined),
* strokeStyle: (string|ol.Expression|undefined),
* strokeWidth: (number|ol.Expression|undefined),
* opacity: (number|ol.Expression|undefined)}}
*/
ol.style.PolygonOptions;
/**
* @constructor

View File

@@ -5,13 +5,6 @@ goog.require('ol.filter.Filter');
goog.require('ol.style.Symbolizer');
/**
* @typedef {{filter: (ol.filter.Filter),
* symbolizers: (Array.<ol.style.Symbolizer>)}}
*/
ol.style.RuleOptions;
/**
* @constructor

View File

@@ -35,21 +35,27 @@ ol.style.ShapeLiteralOptions;
*/
ol.style.ShapeLiteral = function(config) {
/** @type {string} */
goog.asserts.assertString(config.type, 'type must be a string');
/** @type {ol.style.ShapeType} */
this.type = config.type;
goog.asserts.assertNumber(config.size, 'size must be a number');
/** @type {number} */
this.size = config.size;
goog.asserts.assertString(config.fillStyle, 'fillStyle must be a string');
/** @type {string} */
this.fillStyle = config.fillStyle;
goog.asserts.assertString(config.strokeStyle, 'strokeStyle must be a string');
/** @type {string} */
this.strokeStyle = config.strokeStyle;
goog.asserts.assertNumber(config.strokeWidth, 'strokeWidth must be a number');
/** @type {number} */
this.strokeWidth = config.strokeWidth;
goog.asserts.assertNumber(config.opacity, 'opacity must be a number');
/** @type {number} */
this.opacity = config.opacity;
@@ -70,17 +76,6 @@ ol.style.ShapeLiteral.prototype.equals = function(shapeLiteral) {
};
/**
* @typedef {{type: (ol.style.ShapeType|undefined),
* size: (number|ol.Expression|undefined),
* fillStyle: (string|ol.Expression|undefined),
* strokeStyle: (string|ol.Expression|undefined),
* strokeWidth: (number|ol.Expression|undefined),
* opacity: (number|ol.Expression|undefined)}}
*/
ol.style.ShapeOptions;
/**
* @constructor

View File

@@ -6,12 +6,6 @@ goog.require('ol.style.Rule');
goog.require('ol.style.SymbolizerLiteral');
/**
* @typedef {{rules: (Array.<ol.style.Rule>)}}
*/
ol.style.StyleOptions;
/**
* @constructor