title: redraw openlayers vector layer
body: <p>I want to redraw an OpenLayers vector.</p>
  
  <p>my html button:</p>
  
  <pre><code>&lt;button id="refresh" type="button"&gt;Refresh&lt;/button&gt;
  </code></pre>
  
  <p>and my jquery functions to redraw the layer, the parksLayer in the refresh function is logging as false:</p>
  
  <pre><code>function refresh() {
      parksLayer.redraw(true);
  }
  
  function bind(){
      $("#refresh").bind("click", refresh);
  }
  </code></pre>
  
  <p>and my map, I want to redraw the ParksLayer:</p>
  
  <pre><code>        map = new OpenLayers.Map({
              div: "map",
              layers: [
                  new OpenLayers.Layer.OSM(),
                  parksLayer
              ]
          });
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Thanks for the help, my vector layer is defined like this:</p>
  
  <pre><code>function changeme(avalue){
          parksLayer = new OpenLayers.Layer.Vector("Parks", {
              projection: new OpenLayers.Projection("EPSG:4326"),
              strategies: [new OpenLayers.Strategy.Fixed()],
              protocol: new OpenLayers.Protocol.Script({
                  url: "http://my.cartodb.com/api/v2/sql",
                  params: {
          q: "SELECT * FROM activities where type_code is not null"+" "+avalue,
          format: "geojson"
      },
                  format: new OpenLayers.Format.GeoJSON({
                      ignoreExtraDims: true
                  }),
                  callbackKey: "callback"
              }),
          });  
      }
  </code></pre>
  
  <p>I have a form that changes <code>avalue</code> dynamically which changes the GeoJSON query, so if I could redraw the parksLayer I would be left with a new selection from the layer.</p>