O'Reilly logo

OpenLayers 2.10 by Erik Hazzard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for Action – building a Config file

Let's take a look at how to write a build config file.

  1. Copy the lite.cfg file found in the build directory and name the copied version example_1.cfg (or whatever you'd like, but that's what we'll refer to it as).
  2. Let's manually specify some files. We'll add in a couple controls. Add in the following and then save the file. The full file should look like this:
    # Config File
    
    [first] 
    OpenLayers/SingleFile.js 
    OpenLayers.js 
    OpenLayers/BaseTypes.js 
    OpenLayers/BaseTypes/Class.js 
    OpenLayers/Util.js 
    
    [last] 
    
    [include] 
    OpenLayers/Map.js 
    OpenLayers/Layer/WMS.js 
    OpenLayers/Control/LayerSwitcher.js 
    OpenLayers/Control/Navigation.js 
    OpenLayers/Control/Scale.js 
    
    [exclude]

What Just Happened?

We just created a configuration file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required