This solution for the map drawing in the preview is the best, fixed the issues like spurious lines and missing map.