Optimized some map drawing.