Finished code to generate base for map.