Skip to content

Commit

Permalink
identify context only if not projected on server
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Oct 19, 2012
1 parent 14de543 commit e192e39
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/mapserver/qgswmsserver.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit e192e39

Please sign in to comment.