Exemplo n.º 1
0
        private AttributesTable GetAttributes(JsonOffroadTrack offroadTrack)
        {
            var geoLocation = new AttributesTable
            {
                { FeatureAttributes.LAT, offroadTrack.start.latitude },
                { FeatureAttributes.LON, offroadTrack.start.longitude }
            };
            var category   = GetCategory(offroadTrack.activityType);
            var attributes = new AttributesTable
            {
                { FeatureAttributes.ID, offroadTrack.id },
                { FeatureAttributes.NAME, offroadTrack.title },
                { FeatureAttributes.POI_SOURCE, Sources.OFFROAD },
                { FeatureAttributes.POI_CATEGORY, category },
                { FeatureAttributes.POI_LANGUAGE, Languages.HEBREW },
                { FeatureAttributes.POI_NAMES, new AttributesTable {
                      { Languages.HEBREW, offroadTrack.title }
                  } },
                { FeatureAttributes.ICON, GetIconByCategory(category) },
                { FeatureAttributes.ICON_COLOR, "black" },
                { FeatureAttributes.SEARCH_FACTOR, 1.0 },
                { FeatureAttributes.GEOLOCATION, geoLocation },
                { FeatureAttributes.WEBSITE, $"http://off-road.io/track/{offroadTrack.id}" }
            };

            return(attributes);
        }
Exemplo n.º 2
0
        private AttributesTable GetAttributes(JsonOffroadTrack offroadTrack)
        {
            var geoLocation = new AttributesTable
            {
                { FeatureAttributes.LAT, offroadTrack.start.latitude },
                { FeatureAttributes.LON, offroadTrack.start.longitude }
            };
            var attributes = new AttributesTable
            {
                { FeatureAttributes.ID, offroadTrack.id },
                { FeatureAttributes.NAME, offroadTrack.title },
                { FeatureAttributes.POI_SOURCE, Sources.OFFROAD },
                { FeatureAttributes.POI_CATEGORY, GetCategory(offroadTrack.activityType) },
                { FeatureAttributes.ICON, GetIcon(offroadTrack.myAdventureUserId) },
                { FeatureAttributes.ICON_COLOR, "black" },
                { FeatureAttributes.SEARCH_FACTOR, 1 },
                { FeatureAttributes.GEOLOCATION, geoLocation }
            };

            return(attributes);
        }
Exemplo n.º 3
0
        private AttributesTable GetAttributes(JsonOffroadTrack offroadTrack)
        {
            var geoLocation = new AttributesTable
            {
                { FeatureAttributes.LAT, offroadTrack.start.latitude },
                { FeatureAttributes.LON, offroadTrack.start.longitude }
            };
            var category   = GetCategory(offroadTrack.activityType);
            var attributes = new AttributesTable
            {
                { FeatureAttributes.ID, offroadTrack.id },
                { FeatureAttributes.NAME, offroadTrack.title },
                { FeatureAttributes.POI_SOURCE, Sources.OFFROAD },
                { FeatureAttributes.POI_CATEGORY, category },
                { FeatureAttributes.POI_LANGUAGE, Languages.ALL },
                { FeatureAttributes.OSM_TYPE, string.Empty },
                { FeatureAttributes.ICON, GetIconByCategory(category) },
                { FeatureAttributes.ICON_COLOR, "black" },
                { FeatureAttributes.SEARCH_FACTOR, 1 },
                { FeatureAttributes.GEOLOCATION, geoLocation }
            };

            return(attributes);
        }