title: javascript config file for openlayers
body: <p>I am new to OpenLayers. I am trying to figure out what is the best way to have a configuration file for the map I am creating.  </p>
  
  <p>For example, I am creating a map with the following style :</p>
  
  <pre><code>    var defaultStyle = new OpenLayers.Style(
                          {
                              pointRadius: 10,
                              fillColor: "yellow",
                              strokeColor:"#0500bd", 
                              strokeWidth:2,
                              fillOpacity:0.4,
                              labelXOffset: "${xOffset}",
                              labelYOffset: "${yOffset}",
                              labelAlign: "${align}"
                          });
  </code></pre>
  
  <p>I would like to have the <code>pointRadius</code> and <code>fillColor</code> in a config file so I don't have to modify my source code but just the config file. </p>
  
  <p>Shall I create a JS file; config.js with the following content:  </p>
  
  <pre><code>      var config = {
             map:{
                 style: {
                     pointRadius: 10,
                     fillColor: "yellow"
                 },
             },
        };
  </code></pre>
  
  <p>And then, in my other JS that create the style, does: </p>
  
  <pre><code>    var defaultStyle = new OpenLayers.Style(
      {
          pointRadius: config.map.style.pointRadius,
              fillColor: config.map.style.fillColor,
          strokeColor:"#0500bd", 
          strokeWidth:2,
          fillOpacity:0.4,
                      labelXOffset: "${xOffset}",
              labelYOffset: "${yOffset}",
          labelAlign: "${align}"
      });
  </code></pre>
  
  <p>What is recommended?</p>