Example #1
0
        public static TileMapService CreateFromResource(Stream result)
        {
            var tileMapService = new TileMapService();

            XDocument xml = XDocument.Parse(new StreamReader(result).ReadToEnd());

            tileMapService.TileMaps =
                from tileMap in xml.Root.Descendants("TileMap")
                select new TileMapItem
            {
                Href    = tileMap.Attribute("href").Value,
                Srs     = tileMap.Attribute("srs").Value,
                Title   = tileMap.Attribute("title").Value,
                Profile = tileMap.Attribute("profile").Value
            };

            return(tileMapService);
        }
Example #2
0
        public static TileMapService CreateFromResource(Stream result)
        {
            var tileMapService = new TileMapService();
            
            XDocument xml = XDocument.Parse(new StreamReader(result).ReadToEnd());

            tileMapService.TileMaps =
                from tileMap in xml.Root.Descendants("TileMap")
                select new TileMapItem
                {
                    Href = tileMap.Attribute("href").Value,
                    Srs = tileMap.Attribute("srs").Value,
                    Title = tileMap.Attribute("title").Value,
                    Profile = tileMap.Attribute("profile").Value
                };

            return tileMapService;
        }