Search code examples
javascriptopenlayers-3google-closure

Cryptic error messages in OL3 v3.14.0


I am getting cryptic error messages in my console with OL3 v3.14.0. I just upgraded. Here is an example:

Uncaught TypeError: (0 , d.f) is not a function

I have javascript source maps enabled. Can someone let me know how I should have my environment configured so that I can see the actual error?


Solution

  • If you use ol-debug.js this will give you a more informative error, and allow you to step through the library using a browser's developer tools.

    When bug fixing, or developing, I usually have a commented out bit of html to pull in an ol-debug.js cdn as needed, and switch with ol.js:

    <!--  <script src="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.14.0/ol-debug.js"></script>-->