Check for undefined layer.map to avoid issue #272
Merge pull request #292 from aodn/issue_272

Check for undefined layer.map to avoid issue #272