Ejemplo n.º 1
0
        public KmlLayerProperties(ESRI.ArcGIS.Client.Map myMap)
        {
            InitializeComponent();

            this.myMap = myMap;

            provider = new KmlLayerProvider(myMap);
        }
Ejemplo n.º 2
0
        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("url"))
                {
                    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 KmlLayerProvider(myMap);
            }
            provider.RenderServerImage(serverName, visibleLayers);
            if (MapGenerated != null)
            {
                MapGenerated(this, new EventArgs());
            }
        }