Пример #1
0
 private static IMap ParseMapFromXml(string filename)
 {
     PersistObject.BeginParse();
     try
     {
         XDocument          doc = XDocument.Load(filename);
         MapAuthor          author = GetMapAuthor(doc);
         MapVersion         version = GetMapVersion(doc);
         MapArguments       arg = GetMapArguments(doc);
         ConflictDefinition csym = null, clabel = null;
         GetConflictDef(doc, out csym, out clabel);
         ILayer[] layers  = GetFeatureLayer(doc);
         string   mapname = doc.Element("Map").Attribute("name").Value;
         Map      map = new Map(mapname, filename, version, author, arg, layers);
         map.SetConflictDefinition(csym, clabel);
         return(map);
     }
     finally
     {
         PersistObject.EndParse();
     }
 }