public void GetLegend_WhenCalled_ShouldReturnLegend() { // arrange var capabilties = new XmlDocument { XmlResolver = null }; capabilties.Load($"{AssemblyInfo.AssemblyDirectory}\\Resources\\capabilities_1_3_0.xml"); var provider = new WmsProvider(capabilties) { CRS = "EPSG:900913", ContinueOnError = true }; provider.AddLayer("Maasluis complex - top"); provider.AddLayer("Kreftenheye z2 - top"); provider.SetImageFormat(provider.OutputFormats[0]); // act var legendImages = provider.GetLegends(); // assert Assert.True(legendImages.Count() == 2); }
public void GetLegendRequestUrls_WhenInitialized_ShouldReturnListOfUrls() { // arrange var capabilties = new XmlDocument(); capabilties.XmlResolver = null; capabilties.Load(".\\Resources\\capabilities_1_3_0.xml"); var provider = new WmsProvider(capabilties); provider.SpatialReferenceSystem = "EPSG:900913"; provider.AddLayer("Maasluis complex - top"); provider.AddLayer("Kreftenheye z2 - top"); provider.SetImageFormat(provider.OutputFormats[0]); provider.ContinueOnError = true; // act var legendUrls = provider.GetLegendRequestUrls(); // assert Assert.True(legendUrls.Count() == 2); }
private static WmsProvider CreateWmsProvider() { const string wmsUrl = "http://geoserver.nl/world/mapserv.cgi?map=world/world.map&VERSION=1.1.1"; var provider = new WmsProvider(wmsUrl); provider.SpatialReferenceSystem = "EPSG:900913"; provider.AddLayer("World"); provider.SetImageFormat(provider.OutputFormats[0]); provider.ContinueOnError = true; provider.TimeOut = 20000; //Set timeout to 20 seconds return(provider); }
private static WmsProvider CreateWmsProvider() { const string wmsUrl = "http://jordbrugsanalyser.dk/geoserver/ows?request=GetCapabilities&service=wms"; var provider = new WmsProvider(wmsUrl) { ContinueOnError = true, TimeOut = 20000, CRS = "EPSG:3857" }; provider.AddLayer("Jordbrugsanalyser:Marker12"); provider.SetImageFormat(provider.OutputFormats[0]); return(provider); }
private static WmsProvider CreateWmsProvider() { const string wmsUrl = "https://geodata.nationaalgeoregister.nl/windkaart/wms?request=GetCapabilities"; var provider = new WmsProvider(wmsUrl) { ContinueOnError = true, TimeOut = 20000, CRS = "EPSG:28992" }; provider.AddLayer("windsnelheden100m"); provider.SetImageFormat(provider.OutputFormats[0]); return(provider); }
private static WmsProvider CreateWmsProvider() { const string wmsUrl = "http://geodata.nationaalgeoregister.nl/ahn25m/wms?service=wms&request=getcapabilities"; var provider = new WmsProvider(wmsUrl) { ContinueOnError = true, TimeOut = 20000, CRS = "EPSG:28992" }; provider.AddLayer("ahn25m"); provider.SetImageFormat(provider.OutputFormats[0]); return(provider); }
public void GetLegendRequestUrls_WhenInitialized_ShouldReturnListOfUrls() { // arrange var capabilities = new XmlDocument { XmlResolver = null }; capabilities.Load($"{AssemblyInfo.AssemblyDirectory}{Path.DirectorySeparatorChar}Resources{Path.DirectorySeparatorChar}capabilities_1_3_0.xml"); var provider = new WmsProvider(capabilities) { CRS = "EPSG:3857" }; provider.AddLayer("Maasluis complex - top"); provider.AddLayer("Kreftenheye z2 - top"); provider.SetImageFormat((provider.OutputFormats)[0]); provider.ContinueOnError = true; // act var legendUrls = provider.GetLegendRequestUrls(); // assert Assert.True(legendUrls.Count() == 2); }