Skip to content
Permalink
Browse files
Add crs to wms project group also if no crs constraint is there
  • Loading branch information
mhugent committed Aug 10, 2011
1 parent 2de610b commit 7acce8801eda2c24c1cdf8cbf91e32a313514f0c
Showing with 3 additions and 10 deletions.
  1. +1 −1 src/mapserver/qgsconfigparser.cpp
  2. +2 −9 src/mapserver/qgsprojectparser.cpp
@@ -140,7 +140,7 @@ QStringList QgsConfigParser::createCRSListForLayer( QgsMapLayer* theMapLayer ) c

//check the db is available
myResult = sqlite3_open( myDatabaseFileName.toLocal8Bit().data(), &myDatabase );
if ( myResult )
if ( myResult && theMapLayer )
{
//if the database cannot be opened, add at least the epsg number of the source coordinate system
crsNumbers.push_back( theMapLayer->crs().authid() );
@@ -102,15 +102,8 @@ void QgsProjectParser::layersAndStylesCapabilities( QDomElement& parentElement,
layerParentTitleElem.appendChild( layerParentTitleText );
layerParentElem.appendChild( layerParentTitleElem );

QSet<QString> crsSet = supportedOutputCrsSet();
QSet<QString>::const_iterator crsIt = crsSet.constBegin();
for(; crsIt != crsSet.constEnd(); ++crsIt )
{
QDomElement crsElem = doc.createElement("CRS");
QDomText crsText = doc.createTextNode( *crsIt );
crsElem.appendChild( crsText );
layerParentElem.appendChild( crsElem );
}
QStringList crsList = createCRSListForLayer( 0 );
appendCRSElementsToLayer( layerParentElem, doc, crsList );

//Map rectangle. If not empty, this will be set for every layer (instead of the bbox that comes from the data)
QgsRectangle mapExtent = mapRectangle();

0 comments on commit 7acce88

Please sign in to comment.