Skip to content
Permalink
Browse files
Add feature bounding box to GetFeatureInfo response if invoked with f…
…ilter and without x/y coordinates
  • Loading branch information
mhugent authored and mach0 committed Nov 13, 2011
1 parent 6fb07df commit 6f25bf3fa99e9d9766ee040345f8ee104bd6800a
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/mapserver/qgswmsserver.cpp
@@ -1153,6 +1153,15 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
geometryElement.setAttribute( "type", "derived" );
featureElement.appendChild( geometryElement );
}

//append feature bounding box to feature info xml
QDomElement bBoxElem = infoDocument.createElement( "BoundingBox" );
bBoxElem.setAttribute( "CRS", mapRender->destinationCrs().authid() );
bBoxElem.setAttribute( "minx", box.xMinimum() );
bBoxElem.setAttribute( "maxx", box.xMaximum() );
bBoxElem.setAttribute( "miny", box.yMinimum() );
bBoxElem.setAttribute( "maxy", box.yMaximum() );
featureElement.appendChild( bBoxElem );
}
}

0 comments on commit 6f25bf3

Please sign in to comment.