code: function(){
      this.width = this.container.width();
      this.height = this.container.height();
      this.resize();
      this.canvas.setSize(this.width, this.height);
      this.applyTransform();
    }
docs: Synchronize the size of the map with the size of the container. Suitable in situations where the size of the container is changed programmatically or container is shown after it became visible.