Skip to content

Commit 7acce88

Browse files
committed
Add crs to wms project group also if no crs constraint is there
1 parent 2de610b commit 7acce88

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/mapserver/qgsconfigparser.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ QStringList QgsConfigParser::createCRSListForLayer( QgsMapLayer* theMapLayer ) c
140140

141141
//check the db is available
142142
myResult = sqlite3_open( myDatabaseFileName.toLocal8Bit().data(), &myDatabase );
143-
if ( myResult )
143+
if ( myResult && theMapLayer )
144144
{
145145
//if the database cannot be opened, add at least the epsg number of the source coordinate system
146146
crsNumbers.push_back( theMapLayer->crs().authid() );

src/mapserver/qgsprojectparser.cpp

+2-9
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,8 @@ void QgsProjectParser::layersAndStylesCapabilities( QDomElement& parentElement,
102102
layerParentTitleElem.appendChild( layerParentTitleText );
103103
layerParentElem.appendChild( layerParentTitleElem );
104104

105-
QSet<QString> crsSet = supportedOutputCrsSet();
106-
QSet<QString>::const_iterator crsIt = crsSet.constBegin();
107-
for(; crsIt != crsSet.constEnd(); ++crsIt )
108-
{
109-
QDomElement crsElem = doc.createElement("CRS");
110-
QDomText crsText = doc.createTextNode( *crsIt );
111-
crsElem.appendChild( crsText );
112-
layerParentElem.appendChild( crsElem );
113-
}
105+
QStringList crsList = createCRSListForLayer( 0 );
106+
appendCRSElementsToLayer( layerParentElem, doc, crsList );
114107

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

0 commit comments

Comments
 (0)