Skip to content
Permalink
Browse files

Add GetContext request to QGIS WMS Server

This non standard request retruns the QGIS project as an OWSContext
document version 0.3.1.
This request gives more interoperability to QGIS Server that can be
directly used in client supporting OWSContext as config file.
This function has been funded by Ifremer.
  • Loading branch information
rldhont committed May 31, 2013
1 parent ce92549 commit 48b39b65357007453e070165deba119ed92ec162
@@ -550,6 +550,22 @@ int main( int argc, char * argv[] )
delete theServer;
continue;
}
else if ( request.compare( "GetContext", Qt::CaseInsensitive ) == 0 )
{
try
{
QDomDocument doc = theServer->getContext();
theRequestHandler->sendGetStyleResponse( doc );
}
catch ( QgsMapServiceException& ex )
{
theRequestHandler->sendServiceException( ex );
}

delete theRequestHandler;
delete theServer;
continue;
}
else if ( request.compare( "GetStyles", Qt::CaseInsensitive ) == 0 || request.compare( "GetStyle", Qt::CaseInsensitive ) == 0 ) // GetStyle for compatibility with earlier QGIS versions
{
try
@@ -45,6 +45,8 @@ class QgsConfigParser

virtual void featureTypeList( QDomElement& parentElement, QDomDocument& doc ) const = 0;

virtual void owsGeneralAndResourceList( QDomElement& parentElement, QDomDocument& doc, const QString& strHref ) const = 0;

virtual void describeFeatureType( const QString& aTypeName, QDomElement& parentElement, QDomDocument& doc ) const = 0;
/**Returns one or possibly several maplayers for a given type name. If no layers/style are found, an empty list is returned*/
virtual QList<QgsMapLayer*> mapLayerFromTypeName( const QString& tName, bool useCache = true ) const = 0;

0 comments on commit 48b39b6

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