Permalink
Browse files

Rule is filter and symbolizer, style is collection of rules

  • Loading branch information...
1 parent 184e1e7 commit 360e37146cf29b6eacb1ed3a3df10c1005d27f36 @tschaub tschaub committed Feb 20, 2013
Showing with 76 additions and 0 deletions.
  1. +34 −0 src/ol/style/rule.js
  2. +25 −0 src/ol/style/style.js
  3. +17 −0 src/ol/style/symbolizer.js
View
@@ -0,0 +1,34 @@
+goog.provide('ol.style.Rule');
+
+goog.require('ol.filter.Filter');
+goog.require('ol.style.Symbolizer');
+
+
+/**
+ * @typedef {{filter: (ol.filter.Filter),
+ * symbolizers: (Array.<ol.style.Symbolizer>)}}
+ */
+ol.style.RuleOptions;
+
+
+
+/**
+ * @constructor
+ * @param {ol.style.RuleOptions} options Rule options.
+ */
+ol.style.Rule = function(options) {
+
+ /**
+ * @type {ol.filter.Filter}
+ * @private
+ */
+ this.filter_ = goog.isDef(options.filter) ? options.filter : null;
+
+ /**
+ * @type {Array.<ol.style.Symbolizer>}
+ * @private
+ */
+ this.symbolizers_ = goog.isDef(options.symbolizers) ?
+ options.symbolizers : [];
+
+};
View
@@ -0,0 +1,25 @@
+goog.provide('ol.style.Style');
+
+goog.require('ol.style.Rule');
+
+
+/**
+ * @typedef {{rules: (Array.<ol.style.Rule>)}}
+ */
+ol.style.StyleOptions;
+
+
+
+/**
+ * @constructor
+ * @param {ol.style.StyleOptions} options Style options.
+ */
+ol.style.Style = function(options) {
+
+ /**
+ * @type {Array.<ol.style.Rule>}
+ * @private
+ */
+ this.rules_ = goog.isDef(options.rules) ? options.rules : [];
+
+};
View
@@ -1,8 +1,25 @@
goog.provide('ol.style.LiteralSymbolizer');
+goog.provide('ol.style.Symbolizer');
+
+goog.require('ol.Feature');
/**
* @interface
*/
ol.style.LiteralSymbolizer = function() {};
+
+
+
+/**
+ * @interface
+ */
+ol.style.Symbolizer = function() {};
+
+
+/**
+ * @param {ol.Feature} feature Feature for evaluating expressions.
+ * @return {ol.style.LiteralSymbolizer} Literal symbolizer.
+ */
+ol.style.Symbolizer.prototype.createLiteral = function(feature) {};

0 comments on commit 360e371

Please sign in to comment.