A tilemap that can be an even rectangle probably should be (e.g. 21x7), unless it's something extreme like 300x2. The question is then whether to make it tall or wide (21x7 or 7x21?), and sometimes which of multiple possible factors to choose (14x12, 21x8, or 24x7?). Maybe it could just use a basic default (width > height, minimizing the difference between them), or something more advanced (estimate the entropy of each possibility and minimize that).
A tilemap that can be an even rectangle probably should be (e.g. 21x7), unless it's something extreme like 300x2. The question is then whether to make it tall or wide (21x7 or 7x21?), and sometimes which of multiple possible factors to choose (14x12, 21x8, or 24x7?). Maybe it could just use a basic default (width > height, minimizing the difference between them), or something more advanced (estimate the entropy of each possibility and minimize that).