Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 7acce88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/mapserver/qgsconfigparser.cpp
Expand Up @@ -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() );
Expand Down
11 changes: 2 additions & 9 deletions src/mapserver/qgsprojectparser.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 7acce88

Please sign in to comment.