title: GeoJSON layer does not get recreated when rendered using EmberJS's 'link-to' helper
body: <p>I am trying to render a LeafletJS map where the colours of the states in the map are dependent on a global parameter that is set in the appropriate Ember route. The setting of the parameter is not the issue but rather the (re)creation of the geoJson layer. When hitting the URL for the first time or when reloading the page the correct map is created, however when the page is rendered using Ember's 'link-to' helper, the map still holds the state colours of the previous page.</p>
  
  <pre><code>drawAll: function() {
  var that = this;
  Ember.$.ajax('/data/sa_provinces.json').then( function(data){
    Frontend.globalPaths = data;
    that.get('store').findAll('province').then(function(provinces) {
      provinces.forEach(function(province) {
        var provinceGeoJSON = window.L.geoJson( province.get('dataFromJSON'),
                                                { style: province.get('geoJSONStyle'),
                                                  province: province,
                                                  onEachFeature: province.get('onEachFeature') });
        province.set('geo_json', provinceGeoJSON);
        provinceGeoJSON.addTo(Frontend.map);
        window.province = province;
      });
    });
  });
    }.property('drawAll')
  </code></pre>
  
  <p>This <em>drawAll</em> function is located within a Ember controller and is called from an Ember template. The functions <em>dataFromJSON</em>, <em>geoJSONStyle</em> and <em>onEachFeature</em> are all called the first time a page is called or when the page is refreshed but not when the page is rendered using the Ember's 'link-to' helper. Neither are they called when the URL is entered manually. </p>
  
  <p>If anyone has any ideas or experience with LeafletJS and/or Ember I would really appreciate your help. Thanks in advance, Greg.   </p>