code: function(type, style) {
          if (type === "fill") {     
              this.canvas.globalAlpha = style['fillOpacity'];
              this.canvas.fillStyle = style['fillColor'];
          } else if (type === "stroke") {  
              this.canvas.globalAlpha = style['strokeOpacity'];
              this.canvas.strokeStyle = style['strokeColor'];
              this.canvas.lineWidth = style['strokeWidth'];
          } else {
              this.canvas.globalAlpha = 0;
              this.canvas.lineWidth = 1;
          }
      }
docs: Method: setCanvasStyle
  Prepare the canvas for drawing by setting various global settings.
  
  Parameters:
  type - {String} one of 'stroke', 'fill', or 'reset'
  style - {Object} Symbolizer hash