public MapServerLayerProperties(ESRI.ArcGIS.Client.Map myMap) { InitializeComponent(); this.myMap = myMap; provider = new MapServerLayerProvider(myMap); }
public void CreateFromXml(System.Xml.XmlElement element) { string fileName = string.Empty; foreach (System.Xml.XmlElement child in element.ChildNodes[0].ChildNodes) { if (child.Name.Equals("serverName")) { lblServerName.Content = child.InnerText; serverName = child.InnerText; } if (child.Name.Equals("visibleLayers")) { if (child.InnerText.Equals(string.Empty)) { visibleLayers = null; } else { string[] parts = child.InnerText.Split(','); visibleLayers = new int[parts.Length]; for (int x = 0; x < parts.Length; x++) { visibleLayers[x] = int.Parse(parts[x]); } } } } if (provider == null) { provider = new MapServerLayerProvider(myMap); } provider.RenderServerImage(serverName, visibleLayers); if (MapGenerated != null) { MapGenerated(this, new EventArgs()); } }