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(string name, string url, IFeatureLayer[] layers) : this(name, url) { _inputLayers = layers; _conflictDefForSymbol = new ConflictDefinition(); _conflictDefForLabel = new ConflictDefinition(new Size(60, 16), true); }
public void Dispose() { _host.OnCanvasSizeChanged -= _resizeHandler; _grids = null; _conflictDef = null; _host = null; }
public Map() { _version = new MapVersion(); _author = new MapAuthor(); _arguments = new MapArguments(); _conflictDefForSymbol = new ConflictDefinition(); _conflictDefForLabel = new ConflictDefinition(new Size(60, 16), true); }
public PixelConflictor(ConflictDefinition conflictDef, IMapRuntimeHost host) { _conflictDef = conflictDef; _host = host; _resizeHandler = new EventHandler(_control_SizeChanged); _host.OnCanvasSizeChanged += _resizeHandler; BuildGrids(); }
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); }
internal void SetConflictDefinition(ConflictDefinition sym, ConflictDefinition label) { if (sym != null) { _conflictDefForSymbol = sym; } if (label != null) { _conflictDefForLabel = label; } }
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 ConflictDefinition FromXElement(XElement ele) { if (ele == null) { return(new ConflictDefinition()); } string sizestr = ele.Attribute("gridsize").Value; string[] sizestrs = sizestr.Split(','); ConflictDefinition def = new ConflictDefinition(); def.GridSize = new Size(int.Parse(sizestrs[0]), int.Parse(sizestrs[1])); def.Enabled = bool.Parse(ele.Attribute("enabled").Value); return(def); }
private static void GetConflictDef(XDocument doc, out ConflictDefinition sym, out ConflictDefinition label) { sym = null; label = null; var result = doc.Element("Map").Element("ConflictDefinitionSymbol"); if (result == null) { return; } sym = ConflictDefinition.FromXElement(result.Element("ConflictDefinition") as XElement); result = doc.Element("Map").Element("ConflictDefinitionLabel"); label = ConflictDefinition.FromXElement(result.Element("ConflictDefinition") as XElement); return; }
public void Dispose() { if (_graphics != null) { _graphics.Dispose(); _graphics = null; } if (_bitmap != null) { _bitmap.Dispose(); _bitmap = null; } _host.OnCanvasSizeChanged -= _resizeHandler; _resizeHandler = null; //_control.SizeChanged -= _resizeHandler; _conflictDef = null; //_control = null; _host = null; }
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(); } }