canvasFunction (extent, resolution, pixelRatio, size, projection) {
    if (!this.canvasLayer.canvas) {
      this.canvasLayer.canvas = createCanvas(size[0], size[1])
    } else {
      this.canvasLayer.canvas.width = size[0];
      this.canvasLayer.canvas.height = size[1];
    }
    this.render(this.canvasLayer.canvas)
    return this.canvasLayer.canvas
  }
canvas constructor
@param extent
@param resolution
@param pixelRatio
@param size
@param projection
@returns {*}