https://github.com/twpayne/ol3/commit/2ad5dea737d12b5649477cc29cf28ccd4f5e684e