there is a lot of controller logic here. We might want to create a service object to encapsulate this idea of a map rendering