update calculated map properties on layer change
only update layers if they are present
Merge branch 'update-on-ready' into v1

Conflicts:
	src/map.js