Removes small redundancy

The `_mapCanvas` variable was defined in the global space, and was
queried twice. This commit removes the redundancy.