Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Skeleton canvas renderer for vector layer

  • Loading branch information...
commit 0f33561af2e15a67a0ea55bdf4b420e2d5f98090 1 parent 1a63bf0
@tschaub tschaub authored
Showing with 75 additions and 0 deletions.
  1. +75 −0 src/ol/renderer/canvas/canvasvectorlayerrenderer.js
View
75 src/ol/renderer/canvas/canvasvectorlayerrenderer.js
@@ -0,0 +1,75 @@
+goog.provide('ol.renderer.canvas.VectorLayer');
+
+goog.require('goog.vec.Mat4');
+goog.require('ol.layer.Vector');
+
+
+
+/**
+ * @constructor
+ * @extends {ol.renderer.canvas.Layer}
+ * @param {ol.renderer.Map} mapRenderer Map renderer.
+ * @param {ol.layer.Vector} layer Vector layer.
+ */
+ol.renderer.canvas.VectorLayer = function(mapRenderer, layer) {
+
+ goog.base(this, mapRenderer, layer);
+
+ /**
+ * @private
+ * @type {HTMLCanvasElement}
+ */
+ this.canvas_ = null;
+
+ /**
+ * @private
+ * @type {ol.Size}
+ */
+ this.canvasSize_ = null;
+
+ /**
+ * @private
+ * @type {CanvasRenderingContext2D}
+ */
+ this.context_ = null;
+
+ /**
+ * @private
+ * @type {!goog.vec.Mat4.Number}
+ */
+ this.transform_ = goog.vec.Mat4.createNumber();
+
+};
+goog.inherits(ol.renderer.canvas.VectorLayer, ol.renderer.canvas.Layer);
+
+
+/**
+ * @inheritDoc
+ */
+ol.renderer.canvas.VectorLayer.prototype.getImage = function() {
+ return this.canvas_;
+};
+
+
+/**
+ * @return {ol.layer.Vector} Vector layer.
+ */
+ol.renderer.canvas.VectorLayer.prototype.getVectorLayer = function() {
+ return /** @type {ol.layer.Vector} */ (this.getLayer());
+};
+
+
+/**
+ * @inheritDoc
+ */
+ol.renderer.canvas.VectorLayer.prototype.getTransform = function() {
+ return this.transform_;
+};
+
+
+/**
+ * @inheritDoc
+ */
+ol.renderer.canvas.VectorLayer.prototype.renderFrame =
+ function(frameState, layerState) {
+};

0 comments on commit 0f33561

Please sign in to comment.
Something went wrong with that request. Please try again.