<commit_before>'use strict';

angular.module('mage')
  .factory('USARMarkerIconService', ['appConstants', 'FeatureTypeService',
    function (appConstants, FeatureTypeService) {
      var ***REMOVED*** = {};
      var featureTypes = FeatureTypeService.getTypes();

      ***REMOVED***.getIconUrl = function(typeName, o) {
        var type = _.find(o.types, function(t) { 
          return t.name == typeName; 
        });

        if (!type) {
          var type = _.find(o.types, function(t) { 
            return t.name == 'UNDEFINED'; 
          });
        }

        return type.icon;
      }

      ***REMOVED***.getCl***REMOVED*** = function(typeName, o) {
        return;
      }

      // Blue = < 1 hour
      // Red = 1-5 hours
      // Yellow = 5-8 hours
      // Green = > 8 hours
      ***REMOVED***.getColor = function(timestamp) {
        return;
      }

      ***REMOVED***.markerTemplate = function(element, attributes) {
        return '<div>' +
                 '<img ng-src="{{iconSrc}}"/>' +
               '</div>';
      }

      ***REMOVED***.iconTemplate = function() {
        return '<img ng-src="{{iconSrc}}"/>';
      }

      ***REMOVED***.defaultLeafletIcon = function() {
        return L.AwesomeMarkers.icon({
          icon: 'plus',
          color: 'cadetblue'
        });
      }

      ***REMOVED***.leafletIcon = function (feature, o) {
        var properties = feature.properties || feature.attributes;

        return L.icon({
          iconUrl: ***REMOVED***.getIconUrl(properties.TYPE, o),
          iconSize: [22, 22],
          iconAnchor: [11, 11]
        });
      };

      ***REMOVED***.iconHtml = function() {
        return ***REMOVED***.template;
      }

      ***REMOVED***.setTemplateVariables = function(feature, scope) {
        if (feature.properties && feature.properties.TYPE) {
          featureTypes.success(function(success) {
            scope.iconSrc = ***REMOVED***.getIconUrl(properties.TYPE, {types: success});
          });
        }
      }

      return ***REMOVED***;
    }
  ]
);<commit_msg>- fixed a problem with the news feed not showing the  icon<commit_after>'use strict';

angular.module('mage')
  .factory('USARMarkerIconService', ['appConstants', 'FeatureTypeService',
    function (appConstants, FeatureTypeService) {
      var ***REMOVED*** = {};
      var featureTypes = FeatureTypeService.getTypes();

      ***REMOVED***.getIconUrl = function(typeName, o) {
        var type = _.find(o.types, function(t) { 
          return t.name == typeName; 
        });

        if (!type) {
          var type = _.find(o.types, function(t) { 
            return t.name == 'UNDEFINED'; 
          });
        }

        return type.icon;
      }

      ***REMOVED***.getCl***REMOVED*** = function(typeName, o) {
        return;
      }

      // Blue = < 1 hour
      // Red = 1-5 hours
      // Yellow = 5-8 hours
      // Green = > 8 hours
      ***REMOVED***.getColor = function(timestamp) {
        return;
      }

      ***REMOVED***.markerTemplate = function(element, attributes) {
        return '<div>' +
                 '<img ng-src="{{iconSrc}}"/>' +
               '</div>';
      }

      ***REMOVED***.iconTemplate = function() {
        return '<img ng-src="{{iconSrc}}"/>';
      }

      ***REMOVED***.defaultLeafletIcon = function() {
        return L.AwesomeMarkers.icon({
          icon: 'plus',
          color: 'cadetblue'
        });
      }

      ***REMOVED***.leafletIcon = function (feature, o) {
        var properties = feature.properties || feature.attributes;

        return L.icon({
          iconUrl: ***REMOVED***.getIconUrl(properties.TYPE, o),
          iconSize: [22, 22],
          iconAnchor: [11, 11]
        });
      };

      ***REMOVED***.iconHtml = function() {
        return ***REMOVED***.iconTemplate();
      }

      ***REMOVED***.setTemplateVariables = function(feature, scope) {
        if (feature && feature.properties && feature.properties.TYPE) {
          featureTypes.success(function(success) {
            scope.iconSrc = ***REMOVED***.getIconUrl(feature.properties.TYPE, {types: success});
          });
        }
      }

      return ***REMOVED***;
    }
  ]
);
{'fraction_non_alphanumeric': 0.17238095238095238, 'fraction_numerical': 0.006666666666666667, 'mean_word_length': 1.9773210489014883, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2762997', 'n_tokens_mistral': 1290, 'n_tokens_neox': 1230, 'n_words': 234}