Fix createLayer error message and use getMapLayer.

D'oh. [1303]