public Map(string name, string url, MapVersion version, MapAuthor author, MapArguments arg, ILayer[] layers) : this(name, url, version, author, arg) { _inputLayers = layers; _conflictDefForSymbol = new ConflictDefinition(); _conflictDefForLabel = new ConflictDefinition(new Size(60, 16), true); }
public Map() { _version = new MapVersion(); _author = new MapAuthor(); _arguments = new MapArguments(); _conflictDefForSymbol = new ConflictDefinition(); _conflictDefForLabel = new ConflictDefinition(new Size(60, 16), true); }
public Map(string name, string url) { _name = name; _url = url; _version = new MapVersion(); _author = new MapAuthor(); _arguments = new MapArguments(); _conflictDefForSymbol = new ConflictDefinition(); _conflictDefForLabel = new ConflictDefinition(new Size(60, 16), true); }
private static MapVersion GetMapVersion(XDocument doc) { var result = doc.Element("Map").Element("Version"); if (result == null) { return(null); } return(MapVersion.FromXElement(result as XElement)); }
public Map(string name, string url, MapVersion version, MapAuthor author, MapArguments arg) { _name = name; _url = url; _version = version; _author = author; if (arg == null) { arg = new MapArguments(); } _arguments = arg; _conflictDefForSymbol = new ConflictDefinition(); _conflictDefForLabel = new ConflictDefinition(new Size(60, 16), true); }
public static MapVersion FromXElement(XElement xelement) { if (xelement == null) { return(null); } MapVersion version = new MapVersion(); version.AuthorYear = int.Parse(xelement.Attribute("year").Value); version.Description = xelement.Attribute("description").Value; version.Publisher = xelement.Attribute("publisher").Value; version.ScaleOfMapping = int.Parse(xelement.Attribute("scaleofmapping").Value); if (xelement.Attribute("source") != null) { version.Source = xelement.Attribute("source").Value; } return(version); }
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(); } }