Start of style package
These literals will be used internally only - created when evaluating non-literal symbolizers (with properties that are expressions).
This commit is contained in:
27
src/ol/style/fill.js
Normal file
27
src/ol/style/fill.js
Normal file
@@ -0,0 +1,27 @@
|
||||
goog.provide('ol.style.LiteralFill');
|
||||
|
||||
goog.require('ol.style.LiteralSymbolizer');
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{color: (string),
|
||||
* opacity: (number)}}
|
||||
*/
|
||||
ol.style.LiteralFillConfig;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {ol.style.LiteralSymbolizer}
|
||||
* @param {ol.style.LiteralFillConfig} config Symbolizer properties.
|
||||
*/
|
||||
ol.style.LiteralFill = function(config) {
|
||||
|
||||
/** @type {string} */
|
||||
this.color = config.color;
|
||||
|
||||
/** @type {number} */
|
||||
this.opacity = config.opacity;
|
||||
|
||||
};
|
||||
45
src/ol/style/shape.js
Normal file
45
src/ol/style/shape.js
Normal file
@@ -0,0 +1,45 @@
|
||||
goog.provide('ol.style.LiteralShape');
|
||||
|
||||
goog.require('ol.style.LiteralFill');
|
||||
goog.require('ol.style.LiteralStroke');
|
||||
goog.require('ol.style.LiteralSymbolizer');
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
ol.style.ShapeType = {
|
||||
CIRCLE: 'circle'
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{type: (ol.style.ShapeType),
|
||||
* size: (number),
|
||||
* fill: (ol.style.LiteralFill),
|
||||
* stroke: (ol.style.LiteralStroke)}}
|
||||
*/
|
||||
ol.style.LiteralShapeConfig;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {ol.style.LiteralSymbolizer}
|
||||
* @param {ol.style.LiteralShapeConfig} config Symbolizer properties.
|
||||
*/
|
||||
ol.style.LiteralShape = function(config) {
|
||||
|
||||
/** @type {string} */
|
||||
this.type = config.type;
|
||||
|
||||
/** @type {number} */
|
||||
this.size = config.size;
|
||||
|
||||
/** @type {ol.style.LiteralFill} */
|
||||
this.fill = config.fill;
|
||||
|
||||
/** @type {ol.style.LiteralStroke} */
|
||||
this.stroke = config.stroke;
|
||||
|
||||
};
|
||||
32
src/ol/style/stroke.js
Normal file
32
src/ol/style/stroke.js
Normal file
@@ -0,0 +1,32 @@
|
||||
goog.provide('ol.style.LiteralStroke');
|
||||
|
||||
goog.require('ol.style.LiteralSymbolizer');
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{width: (number),
|
||||
* color: (string),
|
||||
* opacity: (number)}}
|
||||
*/
|
||||
ol.style.LiteralStrokeConfig;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {ol.style.LiteralSymbolizer}
|
||||
* @param {ol.style.LiteralStrokeConfig} config Symbolizer properties.
|
||||
*/
|
||||
ol.style.LiteralStroke = function(config) {
|
||||
|
||||
/** @type {string} */
|
||||
this.color = config.color;
|
||||
|
||||
/** @type {number} */
|
||||
this.opacity = config.opacity;
|
||||
|
||||
/** @type {number} */
|
||||
this.width = config.width;
|
||||
|
||||
};
|
||||
|
||||
8
src/ol/style/symbolizer.js
Normal file
8
src/ol/style/symbolizer.js
Normal file
@@ -0,0 +1,8 @@
|
||||
goog.provide('ol.style.LiteralSymbolizer');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
ol.style.LiteralSymbolizer = function() {};
|
||||
Reference in New Issue
Block a user