Made mapLegend an opt for loadMap.