when a new map is created, the old canvas is destroyed and a new canvas is created.