Skip to content
Permalink
Browse files
re-add wms tile extension workaround
git-svn-id: http://svn.osgeo.org/qgis/trunk@15769 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Apr 19, 2011
1 parent 6e17e93 commit 740fb5ce6d3aa6652a73d6b55e6c5ca941250f0c
Showing with 10 additions and 2 deletions.
  1. +10 −2 src/providers/wms/qgswmsprovider.cpp
@@ -568,8 +568,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
@@ -724,6 +724,14 @@ void QgsWmsProvider::tileReplyFinished()
mCacheHits++;
else
mCacheMisses++;

QgsDebugMsgLevel( "headers:", 3 );
foreach( const QNetworkReply::RawHeaderPair &pair, reply->rawHeaderPairs() )
{
QgsDebugMsgLevel( QString( " %1:%2" )
.arg( QString::fromUtf8( pair.first ) )
.arg( QString::fromUtf8( pair.second ) ), 3 );
}
#endif
int tileReqNo = reply->request().attribute( static_cast<QNetworkRequest::Attribute>( QNetworkRequest::User + 0 ) ).toInt();
int tileNo = reply->request().attribute( static_cast<QNetworkRequest::Attribute>( QNetworkRequest::User + 1 ) ).toInt();

0 comments on commit 740fb5c

Please sign in to comment.