Skip to content
Permalink
Browse files

loop over metadata urls to show their content

  • Loading branch information
Samweli committed Dec 13, 2019
1 parent 57730ab commit c126c7ac14595fdcac40f86aafa2e68444af8716
Showing with 17 additions and 8 deletions.
  1. +17 −8 src/providers/wms/qgswmsprovider.cpp
@@ -1750,15 +1750,24 @@ QString QgsWmsProvider::layerMetadata( QgsWmsLayerProperty &layer )
tr( "Title" ) %
QStringLiteral( "</td>"
"<td>" ) %
layer.title %
QStringLiteral( "</td></tr>"
layer.title;

// Layer Metadata URL
"<tr><td>" ) %
tr( "Metadata URL" ) %
QStringLiteral( "</td>"
"<td>" ) %
layer.metadataUrl.onlineResource.xlinkHref;
// Metadata URLs
if ( !layer.metadataUrl.isEmpty() )
{
metadata += QStringLiteral("</td></tr>" );
metadata += QStringLiteral( "<tr><th>" ) %
tr( "MetadataURLs" ) %
QStringLiteral( "</th>"
"<td><table class=\"tabular-view\">"
"<tr><th>Format</th><th>URL</th></tr>" );
for ( int k = 0; k < layer.metadataUrl.size(); k++ )
{
const QgsWmsMetadataUrlProperty &l = layer.metadataUrl[k];
metadata += QStringLiteral( "<tr><td>" ) % l.format % QStringLiteral( "</td><td>" ) % l.onlineResource.xlinkHref % QStringLiteral( "</td></tr>" );
}
metadata += QStringLiteral( "</table>" );
}

QStringLiteral( "</td></tr>"

0 comments on commit c126c7a

Please sign in to comment.
You can’t perform that action at this time.