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); }
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; }