Skip to content
Permalink
Browse files

identify context only if not projected on server

  • Loading branch information
blazek committed Oct 19, 2012
1 parent 14de543 commit e192e399bedf4795bfbc7c70c5784f0900e47a1a
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/mapserver/qgswmsserver.cpp
@@ -1304,7 +1304,16 @@ int QgsWMSServer::featureInfoFromRasterLayer( QgsRasterLayer* layer,

QMap<QString, QString> attributes;
// use context extent, width height (comes with request) to use WCS cache
attributes = layer->dataProvider()->identify( *infoPoint, mMapRenderer->extent(), mMapRenderer->outputSize().width(), mMapRenderer->outputSize().height() );
// We can only use context if raster is not reprojected, otherwise it is difficult
// to guess correct source resolution
if ( mMapRenderer->hasCrsTransformEnabled() && layer->dataProvider()->crs() != mMapRenderer->destinationCrs() )
{
attributes = layer->dataProvider()->identify( *infoPoint );
}
else
{
attributes = layer->dataProvider()->identify( *infoPoint, mMapRenderer->extent(), mMapRenderer->outputSize().width(), mMapRenderer->outputSize().height() );
}

for ( QMap<QString, QString>::const_iterator it = attributes.constBegin(); it != attributes.constEnd(); ++it )
{

0 comments on commit e192e39

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