Bundling an application with OpenLayers 3

Now, as we know how to build custom libraries, let's take a step forward and learn how to compile our application with OpenLayers 3. This process has two steps. First, we have to edit our application as it has to be compatible with the Closure Compiler. Next, we have to create a custom configuration file, which can create a library with just the features that our application needs.

Editing the application

To make our application Closure-compatible, we have to make two modifications to it. You can either make these modifications in the JavaScript file of the previous example, called ch10_geocaching.js, or open the provided modified file to check the result. The modified version is called ch10_geocaching_reworked.js ...

Get Mastering OpenLayers 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.