private void PreprocessGeoJson(List <Feature> features, List <Feature> containers)
 {
     MergePlacesPoints(features);
     foreach (var feature in features)
     {
         AddAddressField(feature, containers);
         (var searchFactor, var iconColorCategory) = _tagsHelper.GetInfo(feature.Attributes);
         feature.Attributes.AddAttribute(FeatureAttributes.SEARCH_FACTOR, searchFactor);
         feature.Attributes.AddAttribute(FeatureAttributes.ICON, iconColorCategory.Icon);
         feature.Attributes.AddAttribute(FeatureAttributes.ICON_COLOR, iconColorCategory.Color);
         feature.Attributes.AddAttribute(FeatureAttributes.POI_CATEGORY, iconColorCategory.Category);
         feature.Attributes.AddAttribute(FeatureAttributes.POI_SOURCE, Sources.OSM);
         feature.Attributes.AddAttribute(FeatureAttributes.POI_LANGUAGE, Languages.ALL);
         UpdateLocation(feature);
     }
 }
Ejemplo n.º 2
0
        public void RegularPlace_ShouldReturnHomeIconNoneCategory()
        {
            (var factor, var iconColorCategory) = _tagsHelper.GetInfo(new AttributesTable
            {
                { "place", "place" }
            });

            Assert.AreEqual(1, factor);
            Assert.AreEqual("icon-home", iconColorCategory.Icon);
            Assert.AreEqual(Categories.NONE, iconColorCategory.Category);
        }
Ejemplo n.º 3
0
 private void AddAttributes(List <Feature> features)
 {
     foreach (var feature in features)
     {
         (var searchFactor, var iconColorCategory) = _tagsHelper.GetInfo(feature.Attributes);
         feature.Attributes.AddAttribute(FeatureAttributes.SEARCH_FACTOR, searchFactor);
         feature.Attributes.AddAttribute(FeatureAttributes.ICON, iconColorCategory.Icon);
         feature.Attributes.AddAttribute(FeatureAttributes.ICON_COLOR, iconColorCategory.Color);
         feature.Attributes.AddAttribute(FeatureAttributes.POI_CATEGORY, iconColorCategory.Category);
         feature.Attributes.AddAttribute(FeatureAttributes.POI_SOURCE, Sources.OSM);
         feature.Attributes.AddAttribute(FeatureAttributes.POI_LANGUAGE, Languages.ALL);
         feature.Attributes.AddAttribute(FeatureAttributes.POI_CONTAINER, feature.IsValidContainer());
         feature.SetTitles();
         UpdateLocation(feature);
     }
 }