Skip to content

Commit ca683ca

Browse files
author
jef
committedApr 19, 2011
re-add wms tile extension workaround
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15769 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
 

‎src/providers/wms/qgswmsprovider.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,8 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, i
568568
double ymax = qMin( viewExtent.yMaximum(), layerExtent.yMaximum() );
569569

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

574574
#ifdef QGISDEBUG
575575
// calculate number of tiles
@@ -724,6 +724,14 @@ void QgsWmsProvider::tileReplyFinished()
724724
mCacheHits++;
725725
else
726726
mCacheMisses++;
727+
728+
QgsDebugMsgLevel( "headers:", 3 );
729+
foreach( const QNetworkReply::RawHeaderPair &pair, reply->rawHeaderPairs() )
730+
{
731+
QgsDebugMsgLevel( QString( " %1:%2" )
732+
.arg( QString::fromUtf8( pair.first ) )
733+
.arg( QString::fromUtf8( pair.second ) ), 3 );
734+
}
727735
#endif
728736
int tileReqNo = reply->request().attribute( static_cast<QNetworkRequest::Attribute>( QNetworkRequest::User + 0 ) ).toInt();
729737
int tileNo = reply->request().attribute( static_cast<QNetworkRequest::Attribute>( QNetworkRequest::User + 1 ) ).toInt();

0 commit comments

Comments
 (0)
Please sign in to comment.