Written some functions to generate rectangles on the map.