Exemplo n.º 1
0
        public void List(WebLegend tree)
        {
            for (int i = Servicies.Count() - 1; i>=0; i--)
            {
                if (Servicies.ElementAt(i).GetType() == typeof(WMSClient))
                {
                    WMSClient WmsClient = (WMSClient)Servicies.ElementAt(i);
                    WmsClient.List(tree);
                }
                else
                {
                    WMTClient WmtClient = (WMTClient)Servicies.ElementAt(i);
                    WmtClient.List(tree);

                }
            }
        }
Exemplo n.º 2
0
        public void List(WebLegend tree, ServerLayer l = null, TreeNode parent = null)
        {
            if (l == null)
            {
                TreeNode tn = new TreeNode(_layer.Title);
                tn.ShowCheckBox = true;
                tn.Checked = _layer.visible;
                tn.Expand();

                if (_layer.Style != null)
                {
                    if (_layer.Style.Count() > 0)
                    {
                        if (_layer.Style[0].LegendUrl.OnlineResource.OnlineResource != "")
                        {
                            tn.ImageUrl = _layer.Style[0].LegendUrl.OnlineResource.OnlineResource;
                        }
                    }
                

                    List(tree, _layer, tn);
                }

                tree.Nodes.Add(tn);
            }
            else
            {
                //foreach (WmsServerLayer cl in l.ChildLayers)
                for (int i = l.ChildLayers.Count() - 1; i >= 0; i--)
                {
                    ServerLayer cl = l.ChildLayers[i];

                    TreeNode tn = new TreeNode(cl.Title);// + " " + cl.Name);
                    tn.ShowCheckBox = true;
                    tn.Checked = cl.visible;

                    List(tree, cl, tn);

                    tn.Expand();

                    parent.ChildNodes.Add(tn);

                }
            }
        }
Exemplo n.º 3
0
        public void List(WebLegend tree)
        {

            switch (Type)
            {

                #region -- Google --

                case (WebServiceType.GoogleMap):
                    {
                        Name = "Google Map";
                    }
                    break;
                case (WebServiceType.GoogleSatellite):
                    {
                        Name = "Google Satellite";
                    }
                    break;
                case (WebServiceType.GoogleLabels):
                    {
                        Name = "Google Labels";
                    }
                    break;
                case (WebServiceType.GoogleTerrain):
                    {
                        Name = "Google Terrain";
                    }
                    break;
                case (WebServiceType.GoogleHybrid):
                    {
                        Name = "Google Hybrid";
                    }
                    break;
                case (WebServiceType.GoogleMapChina):
                    {
                        Name = "Google Map";
                    }
                    break;
                case (WebServiceType.GoogleSatelliteChina):
                    {
                        Name = "Google Satellite";
                    }
                    break;
                case (WebServiceType.GoogleLabelsChina):
                    {
                        Name = "Google Labels";
                    }
                    break;
                case (WebServiceType.GoogleTerrainChina):
                    {
                        Name = "Google Terrain";
                    }
                    break;
                case (WebServiceType.GoogleHybridChina):
                    {
                        Name = "Google Hybrid";
                    }
                    break;
                #endregion

                #region -- Yahoo --
                case (WebServiceType.YahooMap):
                    {
                        Name = "Yahoo Map";
                    }
                    break;
                case (WebServiceType.YahooSatellite):
                    {
                        Name = "Yahoo Satellite";
                    }
                    break;
                case (WebServiceType.YahooLabels):
                    {
                        Name = "Yahoo Labels";
                    }
                    break;
                case (WebServiceType.YahooHybrid):
                    {
                        Name = "Yahoo Hybrid";
                    }
                    break;
                #endregion

                #region -- Bing --
                case (WebServiceType.BingMap):
                    {
                        Name = "Bing Map";
                    }
                    break;
                case (WebServiceType.BingMap_New):
                     {
                        Name = "Bing Map New";
                    }
                    break;
                case (WebServiceType.BingSatellite):
                     {
                         Name = "Bing Satellite";
                    }
                    break;
                case (WebServiceType.BingHybrid):
                    {
                        Name = "Bing Hybrid";
                    }
                    break;
                #endregion

                #region -- ArcGIS --
                case (WebServiceType.ArcGIS_StreetMap_World_2D):
                case (WebServiceType.ArcGIS_Imagery_World_2D):
                case (WebServiceType.ArcGIS_ShadedRelief_World_2D):
                case (WebServiceType.ArcGIS_Topo_US_2D):
                case (WebServiceType.ArcGIS_World_Physical_Map):
                case (WebServiceType.ArcGIS_World_Shaded_Relief):
                case (WebServiceType.ArcGIS_World_Street_Map):
                case (WebServiceType.ArcGIS_World_Terrain_Base):
                case (WebServiceType.ArcGIS_World_Topo_Map):
                    {
                        Name = "ArcGIS Map";
                    }
                    break;

                #endregion

                #region -- OpenStreet --
                case (WebServiceType.OpenStreetMap):
                case (WebServiceType.OpenStreetOsm):
                case (WebServiceType.OpenStreetMapSurfer):
                case (WebServiceType.OpenStreetMapSurferTerrain):
                case (WebServiceType.OpenSeaMapLabels):
                case (WebServiceType.OpenSeaMapHybrid):
                case (WebServiceType.OpenCycleMap):
                    {
                        Name = "Openstreetmap";
                    }
                    break;
                #endregion

            }
            TreeNode tn = new TreeNode(Name);
            tn.ShowCheckBox = true;
            tn.Checked = Visible;
            tree.Nodes.Add(tn);
        }