Beispiel #1
0
        private void _CreateLayers(ICollection <MapServiceInfoWrap> services,
                                   ICollection <AgsServer> servers)
        {
            Debug.Assert(servers != null);

            if (services != null)
            {
                foreach (MapServiceInfoWrap service in services)
                {
                    AgsServer server = ServiceHelper.FindServerByName(service.ServerName, servers);

                    if (server != null)
                    {
                        try
                        {
                            // create map layer
                            AgsMapLayer layer = new AgsMapLayer(service, server, this);
                            _layers.Add(layer);
                        }
                        catch (Exception e)
                        {
                            // skip layer
                            Logger.Warning(e);
                        }
                    }
                }
            }
        }
Beispiel #2
0
        private void _CreateLayers(ICollection<MapServiceInfoWrap> services,
            ICollection<AgsServer> servers)
        {
            Debug.Assert(servers != null);

            if (services != null)
            {
                foreach (MapServiceInfoWrap service in services)
                {
                    AgsServer server = ServiceHelper.FindServerByName(service.ServerName, servers);

                    if (server != null)
                    {
                        try
                        {
                            // create map layer
                            AgsMapLayer layer = new AgsMapLayer(service, server, this);
                            _layers.Add(layer);
                        }
                        catch (Exception e)
                        {
                            // skip layer
                            Logger.Warning(e);
                        }
                    }
                }
            }
        }