title: How to Update marker icon's source in Leaflet
body: <p>I'm creating x markers on map in leaflet. (Generating via php script, but it shouldn't be important) Problem is, that I generate new image every 60 seconds, but icons on web maps are not updating.</p>
  
  <p>I want to update icons every X seconds - not important again. I couldn't find any methods to update icons. So I tried removing markers and them recreating them, but wasn't successful too - marker is not defined. Is there any way how to do it?</p>
  
  <p><strong>Edited code:</strong></p>
  
  <pre><code>var icon = L.Icon.extend({
      options: {
          iconSize: [35, 35]
      }
  });
  
  function createIcons() {
      //Icons_start
      kopanky = new icon({iconUrl: 'img/kopanky.png'});
      kopankyM.setIcon(kopanky);
      kopankyM.update();
  }
  
  function testCreate() {
      kopanky = new icon({iconUrl: 'img/hvezdarna.png'});
      kopankyM.setIcon(kopanky);
      kopankyM.update();
      console.log("test");
  }
  function createMarkers() {
      //Markers_start
      kopankyM = L.marker([48.9585,17.791666666667]).bindPopup("Kopanky Bile Karpaty").bindLabel('9 kt, 145°', { noHide: true }).addTo(map);
  }
  
  createMarkers();
  createIcons();
  
  setInterval(function(){
      testCreate();
  }, 5000);
  </code></pre>
  
  <p>I can't refresh via meta-tag, because when I do it, I lost user's current map settings. </p>