Skip to content

Commit

Permalink
fix #3585
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15457 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 12, 2011
1 parent e7a49cd commit ca31b17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/qgswmssourceselect.cpp
Expand Up @@ -597,7 +597,7 @@ void QgsWMSSourceSelect::addClicked()
connArgs += "GetFeatureInfo";
}

if ( connInfo.startsWith( "username=" ) )
if ( connInfo.startsWith( "username=" ) || connInfo.startsWith( "tiled=" ) )
{
connInfo.prepend( connArgs + "," );
}
Expand Down
8 changes: 4 additions & 4 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -567,8 +567,8 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, i
double ymax = qMin( viewExtent.yMaximum(), layerExtent.yMaximum() );

// snap to tile coordinates
double x0 = floor(( xmin - layerExtent.xMinimum() ) / mTileWidth / tres ) * mTileWidth * tres + layerExtent.xMinimum() + mTileWidth * tres * 0.001;
double y0 = floor(( ymin - layerExtent.yMinimum() ) / mTileHeight / tres ) * mTileHeight * tres + layerExtent.yMinimum() + mTileHeight * tres * 0.001;
double x0 = floor(( xmin - layerExtent.xMinimum() ) / mTileWidth / tres ) * mTileWidth * tres + layerExtent.xMinimum(); // + mTileWidth * tres * 0.001;
double y0 = floor(( ymin - layerExtent.yMinimum() ) / mTileHeight / tres ) * mTileHeight * tres + layerExtent.yMinimum(); // + mTileHeight * tres * 0.001;

#ifdef QGISDEBUG
// calculate number of tiles
Expand Down Expand Up @@ -2095,7 +2095,7 @@ bool QgsWmsProvider::calculateExtent()
{
if ( tilesetsSupported[i].layers.join( "," ) == layers &&
tilesetsSupported[i].styles.join( "," ) == styles &&
tilesetsSupported[i].boundingBox.crs == imageCrs )
tilesetsSupported[i].crs == imageCrs )
{
layerExtent = tilesetsSupported[i].boundingBox.box;
return true;
Expand All @@ -2104,7 +2104,7 @@ bool QgsWmsProvider::calculateExtent()
QgsDebugMsg( QString( "mismatch layers=%1, styles=%2 and crs=%3." )
.arg( tilesetsSupported[i].layers.join( "," ) )
.arg( tilesetsSupported[i].styles.join( "," ) )
.arg( tilesetsSupported[i].boundingBox.crs ) );
.arg( tilesetsSupported[i].crs ) );
}

QgsDebugMsg( "no extent for layer" );
Expand Down

0 comments on commit ca31b17

Please sign in to comment.