Map cleanup

This cleans up the map code formatting a bit and drops uses the scene() hook directly
rather than tracking an extra variable.

It also fixes an issue on OSX with the map display initializing related to this bug:
https://bugreports.qt-project.org/browse/QTBUG-31451

Fixes #1347