Only add listeners and render when map is defined. Closes #6