title: Dynamically change the color of a polygon in leaflet?
body: <p>For anyone who is familiar with Leaflet, do you know a way to dynamically change a polygon's color? For example, take a circle defined like this:</p>
  
  <pre><code>window.circle = L.circle([51.508, -0.11], 500, {
  color: 'red',
  fillColor: '#ffffff',
      fillOpacity: 0.5
  }).addTo(map);
  </code></pre>
  
  <p>Then later, after a user clicks a button somewhere on an interface (for example), I want to change the color of the circle like this:</p>
  
  <pre><code>window.circle.options.fillColor = "#dddddd";
  </code></pre>
  
  <p>The code changes the value for window.circle.options.fillColor, but the change is not reflected by a change to the color of the polygon on the map. I've searched around but haven't found anything. Any ideas?</p>
  
  <p>Thanks.</p>