refactor(map): create controller to handle map events.

#220