Skip to content
Permalink
Browse files

wmts: add a default style entry if the server doesn't provide any (fixes

  • Loading branch information
jef-n committed Nov 25, 2013
1 parent 0ca0d50 commit c321f597fd814f963cc55ec3edfbe708fcf37a45
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/providers/wms/qgswmsprovider.cpp
@@ -2985,6 +2985,15 @@ void QgsWmsProvider::parseWMTSContents( QDomElement const &e )
l.defaultStyle = s.identifier;
}

if ( l.styles.isEmpty() )
{
QgsWmtsStyle s;
s.identifier = "default";
s.title = tr( "Generated default style" );
s.abstract = tr( "Style was missing in capabilities" );
l.styles.insert( s.identifier, s );
}

for ( QDomElement e1 = e0.firstChildElement( "Format" ); !e1.isNull(); e1 = e1.nextSiblingElement( "Format" ) )
{
l.formats << e1.text();

0 comments on commit c321f59

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