[QGIS Commit] r15769 - trunk/qgis/src/providers/wms

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Apr 19 11:03:41 EDT 2011


Author: jef
Date: 2011-04-19 08:03:41 -0700 (Tue, 19 Apr 2011)
New Revision: 15769

Modified:
   trunk/qgis/src/providers/wms/qgswmsprovider.cpp
Log:
re-add wms tile extension workaround

Modified: trunk/qgis/src/providers/wms/qgswmsprovider.cpp
===================================================================
--- trunk/qgis/src/providers/wms/qgswmsprovider.cpp	2011-04-19 14:42:42 UTC (rev 15768)
+++ trunk/qgis/src/providers/wms/qgswmsprovider.cpp	2011-04-19 15:03:41 UTC (rev 15769)
@@ -568,8 +568,8 @@
     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 @@
     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();



More information about the QGIS-commit mailing list