dimensions static method

({double aspectRatio, double height, String viewBox, double width}) dimensions(
  1. MapType type
)

Get map dimensions for a given map type.

Implementation

static ({double width, double height, String viewBox, double aspectRatio})
dimensions(MapType type) {
  return switch (type) {
    MapType.world => (
      width: worldWidth,
      height: worldHeight,
      viewBox: worldViewBox,
      aspectRatio: worldAspectRatio,
    ),
    MapType.usa => (
      width: usaWidth,
      height: usaHeight,
      viewBox: usaViewBox,
      aspectRatio: usaAspectRatio,
    ),
  };
}