示例#1
0
文件: NakebGateway.cs 项目: ifle/Site
        private AttributesTable GetAttributes(JsonNakebItem nakebItem)
        {
            var geoLocation = new AttributesTable
            {
                { FeatureAttributes.LAT, nakebItem.start.Lat },
                { FeatureAttributes.LON, nakebItem.start.Lng }
            };
            var attributes = new AttributesTable
            {
                { FeatureAttributes.ID, nakebItem.id },
                { FeatureAttributes.NAME, nakebItem.title },
                { FeatureAttributes.POI_SOURCE, Sources.NAKEB },
                { FeatureAttributes.POI_CATEGORY, Categories.ROUTE_HIKE },
                { FeatureAttributes.POI_LANGUAGE, Languages.HEBREW },
                { FeatureAttributes.POI_NAMES, new AttributesTable {
                      { Languages.HEBREW, nakebItem.title }
                  } },
                { FeatureAttributes.ICON, "icon-hike" },
                { FeatureAttributes.ICON_COLOR, "black" },
                { FeatureAttributes.SEARCH_FACTOR, 1.0 },
                { FeatureAttributes.GEOLOCATION, geoLocation },
            };

            return(attributes);
        }
示例#2
0
        private AttributesTable GetAttributes(JsonNakebItem nakebItem)
        {
            var geoLocation = new AttributesTable
            {
                { FeatureAttributes.LAT, nakebItem.start.lat },
                { FeatureAttributes.LON, nakebItem.start.lng }
            };
            var attributes = new AttributesTable
            {
                { FeatureAttributes.ID, nakebItem.id },
                { FeatureAttributes.NAME, nakebItem.title },
                { FeatureAttributes.POI_SOURCE, Sources.NAKEB },
                { FeatureAttributes.POI_CATEGORY, Categories.ROUTE_HIKE },
                { FeatureAttributes.ICON, "icon-nakeb" },
                { FeatureAttributes.ICON_COLOR, "black" },
                { FeatureAttributes.SEARCH_FACTOR, 1 },
                { FeatureAttributes.GEOLOCATION, geoLocation }
            };


            return(attributes);
        }
示例#3
0
        private Feature ConvertToPointFeature(JsonNakebItem nakebItem)
        {
            var point = new Point(nakebItem.start.ToCoordinate());

            return(new Feature(point, GetAttributes(nakebItem)));
        }