private Tms.Capabilities GetCapabilities() { var layers = EntitiesConverter.SourcesToLayers(this.tileSourceFabric.Sources); return(new Tms.Capabilities { ServiceTitle = this.tileSourceFabric.ServiceProperties.Title, ServiceAbstract = this.tileSourceFabric.ServiceProperties.Abstract, BaseUrl = this.BaseUrl, Layers = layers.ToArray(), }); }
private IActionResult ProcessGetCapabilitiesRequest() { var layers = EntitiesConverter.SourcesToLayers(this.tileSourceFabric.Sources) .Where(l => l.Format == ImageFormats.Png || l.Format == ImageFormats.Jpeg) // Only raster formats .ToList(); var xmlDoc = new CapabilitiesUtility( new Wmts.ServiceProperties { Title = this.tileSourceFabric.ServiceProperties.Title, Abstract = this.tileSourceFabric.ServiceProperties.Abstract, Keywords = this.tileSourceFabric.ServiceProperties.KeywordsList, }, BaseUrl + "/wmts", layers) .GetCapabilities(); // TODO: fix base URL return(File(xmlDoc.ToUTF8ByteArray(), MediaTypeNames.Text.Xml)); }