optimized map generator