/////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// internal MapLayer(MapServiceInfoWrap serviceInfo, AgsServer server, Map map) { Debug.Assert(serviceInfo != null); _id = Guid.NewGuid(); _serviceInfo = serviceInfo; _map = map; }
/////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// private List <MapServiceInfoWrap> _CreateServices(MapInfo settings, UserMapInfo userSettings) { Debug.Assert(settings != null); Debug.Assert(userSettings != null); if (userSettings.Services == null) { userSettings.Services = new List <UserMapServiceInfo>(); } List <UserMapServiceInfo> userServices = userSettings.Services; List <MapServiceInfoWrap> wrapServices = new List <MapServiceInfoWrap>(); foreach (MapServiceInfo info in settings.Services) { if (!String.IsNullOrEmpty(info.Name)) { UserMapServiceInfo userInfo = _FindServiceInfo(info.Name, userServices); if (userInfo == null) { userInfo = new UserMapServiceInfo(); userInfo.Name = info.Name; userInfo.IsVisible = info.IsVisible; userInfo.Opacity = info.Opacity; userServices.Add(userInfo); } MapServiceInfoWrap wrap = new MapServiceInfoWrap(info, userInfo); wrapServices.Add(wrap); } else { Logger.Warning("Map service configuration error: invalid name."); } } return(wrapServices); }
internal AgsMapLayer(MapServiceInfoWrap serviceInfo, AgsServer server, Map map) : base(serviceInfo, server, map) { Server = server; }
/////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// private List<MapServiceInfoWrap> _CreateServices(MapInfo settings, UserMapInfo userSettings) { Debug.Assert(settings != null); Debug.Assert(userSettings != null); if (userSettings.Services == null) userSettings.Services = new List<UserMapServiceInfo>(); List<UserMapServiceInfo> userServices = userSettings.Services; List<MapServiceInfoWrap> wrapServices = new List<MapServiceInfoWrap>(); foreach (MapServiceInfo info in settings.Services) { if (!String.IsNullOrEmpty(info.Name)) { UserMapServiceInfo userInfo = _FindServiceInfo(info.Name, userServices); if (userInfo == null) { userInfo = new UserMapServiceInfo(); userInfo.Name = info.Name; userInfo.IsVisible = info.IsVisible; userInfo.Opacity = info.Opacity; userServices.Add(userInfo); } MapServiceInfoWrap wrap = new MapServiceInfoWrap(info, userInfo); wrapServices.Add(wrap); } else Logger.Warning("Map service configuration error: invalid name."); } return wrapServices; }