
'use strict';

(function() {
    angular.module('fireStation.homeController', [])

    .controller('home', function($scope, map, $filter) {
            var homeMap = map.initMap('map', {scrollWheelZoom: false});
            homeMap.setView([40, -90], 4);
            var headquartersIcon = L.FireCARESMarkers.headquartersmarker();

            if (featured_departments != null) {
                L.geoJson(featured_departments, {
                    pointToLayer: function(feature, latlng) {
                       return L.marker(latlng, {icon: headquartersIcon});
                    },
                    onEachFeature: function(feature, layer) {
                       if (feature.properties && feature.properties.name) {
                           var popUp = '<b><a href="' + feature.properties.url +'">' + feature.properties.name + '</a></b>';

                           if (feature.properties.dist_model_score != null) {
                             popUp += '<br><b>Performance score: </b> ' + feature.properties.dist_model_score + ' seconds';
                           }

                           if (feature.properties.predicted_fires != null) {
                             popUp += '<br><b>Predicted annual residential fires: </b> ' + $filter('number')(feature.properties.predicted_fires, 0);
                           }

                           layer.bindPopup(popUp);
                          }
                        }
                }).addTo(homeMap);
            }
        });
})();


@@ -130,30 +130,24 @@
  $filter) %7B%0A
-      
       var ho
@@ -196,28 +196,24 @@
 m: false%7D);%0A
-    
         home
@@ -243,28 +243,24 @@
 4);%0A        
-    
 var headquar
@@ -312,36 +312,32 @@
 ker();%0A%0A        
-    
 if (featured_dep
@@ -366,22 +366,16 @@
         
- 
-     
 L.geoJso
@@ -414,22 +414,16 @@
         
-    
-  
 pointToL
@@ -452,30 +452,24 @@
 , latlng) %7B%0A
-      
             
@@ -542,22 +542,11 @@
     
- 
-     %7D,%0A     
+%7D,%0A
     
@@ -555,17 +555,16 @@
         
- 
 onEachFe
@@ -593,30 +593,24 @@
 e, layer) %7B%0A
-      
             
@@ -686,24 +686,16 @@
         
-  
-      
 var popU
@@ -800,32 +800,24 @@
             
-        
 if (feature.
@@ -872,32 +872,24 @@
             
-    
-    
 popUp += '%3Cb
@@ -990,34 +990,19 @@
         
-        %7D%0A%0A       
+%7D%0A%0A
         
@@ -1004,33 +1004,32 @@
                 
- 
 if (feature.prop
@@ -1058,32 +1058,24 @@
  != null) %7B%0A
-        
             
@@ -1218,32 +1218,24 @@
             
-        
 %7D%0A%0A         
@@ -1244,24 +1244,16 @@
         
- 
-       
 layer.bi
@@ -1282,37 +1282,26 @@
             
-        %7D%0A   
+%7D%0A
             
@@ -1301,36 +1301,26 @@
             
-    %7D%0A      
+%7D%0A
           %7D)
@@ -1340,34 +1340,26 @@
 p);%0A        
-    %7D%0A    
+%7D%0A
     %7D);%0A%7D)()

Update js to bust compressor cache.