Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Basic feature implementation

  • Loading branch information...
commit d3e63bc98ab5002731472b9dcbe99883171e9961 1 parent d0d397f
@ahocevar ahocevar authored
Showing with 64 additions and 0 deletions.
  1. +64 −0 src/ol/feature/feature.js
View
64 src/ol/feature/feature.js
@@ -0,0 +1,64 @@
+goog.provide('ol.feature.Feature');
+
+
+goog.require('ol.Object');
+
+
+
+/**
+ * @constructor
+ * @extends {ol.Object}
+ * @param {ol.geom.Geometry=} opt_geometry Geometry.
+ * @param {Object=} opt_values Attributes.
+ * @param {ol.style.LiteralSymbolizer=} opt_symbolizer Symbolizer.
+ */
+ol.feature.Feature = function(opt_geometry, opt_values, opt_symbolizer) {
+
+ goog.base(this, opt_values);
+
+ /**
+ * @private
+ * @type {?ol.geom.Geometry}
+ */
+ this.geometry_ = goog.isDef(opt_geometry) ? opt_geometry : null;
+
+ /**
+ * @private
+ * @type {?ol.style.LiteralSymbolizer}
+ */
+ this.symbolizer_ = goog.isDef(opt_symbolizer) ? opt_symbolizer : null;
+
+};
+goog.inherits(ol.feature.Feature, ol.Object);
+
+
+/**
+ * @return {?ol.geom.Geometry} The geometry.
+ */
+ol.feature.Feature.prototype.getGeometry = function() {
+ return this.geometry_;
+};
+
+
+/**
+ * @param {?ol.geom.Geometry} geometry The geometry.
+ */
+ol.feature.Feature.prototype.setGeometry = function(geometry) {
+ this.geometry_ = geometry;
+};
+
+
+/**
+ * @return {?ol.style.LiteralSymbolizer} The symbolizer.
+ */
+ol.feature.Feature.prototype.getSymbolizer = function() {
+ return this.symbolizer_;
+};
+
+
+/**
+ * @param {?ol.style.LiteralSymbolizer} symbolizer The symbolizer.
+ */
+ol.feature.Feature.prototype.setGeometry = function(symbolizer) {
+ this.symbolizer_ = symbolizer_;
+};
Please sign in to comment.
Something went wrong with that request. Please try again.