Automatic map size recognition