/////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// public static AgsLayer CreateLayer(AgsServer server, MapLayer layer) { if (layer.MapServiceInfo.Type == null) { throw new SettingsException((string)App.Current.FindResource("InvalidMapLayerType")); } AgsLayer agsLayer = null; if (layer.MapServiceInfo.Type.Equals(DYNAMIC_SERVICE, StringComparison.OrdinalIgnoreCase)) { agsLayer = new AgsDynamicLayer(server, layer); } else if (layer.MapServiceInfo.Type.Equals(CACHED_SERVICE, StringComparison.OrdinalIgnoreCase)) { agsLayer = new AgsCachedLayer(server, layer); } else { throw new SettingsException((string)App.Current.FindResource("UnknownMapLayerType")); } return(agsLayer); }
/////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////// public static AgsLayer CreateLayer(AgsServer server, MapLayer layer) { if (layer.MapServiceInfo.Type == null) throw new SettingsException((string)App.Current.FindResource("InvalidMapLayerType")); AgsLayer agsLayer = null; if (layer.MapServiceInfo.Type.Equals(DYNAMIC_SERVICE, StringComparison.OrdinalIgnoreCase)) { agsLayer = new AgsDynamicLayer(server, layer); } else if (layer.MapServiceInfo.Type.Equals(CACHED_SERVICE, StringComparison.OrdinalIgnoreCase)) { agsLayer = new AgsCachedLayer(server, layer); } else throw new SettingsException((string)App.Current.FindResource("UnknownMapLayerType")); return agsLayer; }