setSize method

void setSize(
  1. double width,
  2. double height
)

Implementation

void setSize(double width, double height) {
  if (_nonrotatedSize.x != width || _nonrotatedSize.y != height) {
    final previousNonRotatedSize = _nonrotatedSize;

    _nonrotatedSize = CustomPoint<double>(width, height);
    _updateSizeByOriginalSizeAndRotation();

    if (previousNonRotatedSize != invalidSize) {
      emitMapEvent(
        MapEventNonRotatedSizeChange(
          source: MapEventSource.nonRotatedSizeChange,
          previousNonRotatedSize: previousNonRotatedSize,
          nonRotatedSize: _nonrotatedSize,
          center: center,
          zoom: zoom,
        ),
      );
    }
  }
}