Skip to content

Commit ca31b17

Browse files
author
jef
committed
fix #3585
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15457 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e7a49cd commit ca31b17

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/app/qgswmssourceselect.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ void QgsWMSSourceSelect::addClicked()
597597
connArgs += "GetFeatureInfo";
598598
}
599599

600-
if ( connInfo.startsWith( "username=" ) )
600+
if ( connInfo.startsWith( "username=" ) || connInfo.startsWith( "tiled=" ) )
601601
{
602602
connInfo.prepend( connArgs + "," );
603603
}

src/providers/wms/qgswmsprovider.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -567,8 +567,8 @@ QImage *QgsWmsProvider::draw( QgsRectangle const &viewExtent, int pixelWidth, i
567567
double ymax = qMin( viewExtent.yMaximum(), layerExtent.yMaximum() );
568568

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

573573
#ifdef QGISDEBUG
574574
// calculate number of tiles
@@ -2095,7 +2095,7 @@ bool QgsWmsProvider::calculateExtent()
20952095
{
20962096
if ( tilesetsSupported[i].layers.join( "," ) == layers &&
20972097
tilesetsSupported[i].styles.join( "," ) == styles &&
2098-
tilesetsSupported[i].boundingBox.crs == imageCrs )
2098+
tilesetsSupported[i].crs == imageCrs )
20992099
{
21002100
layerExtent = tilesetsSupported[i].boundingBox.box;
21012101
return true;
@@ -2104,7 +2104,7 @@ bool QgsWmsProvider::calculateExtent()
21042104
QgsDebugMsg( QString( "mismatch layers=%1, styles=%2 and crs=%3." )
21052105
.arg( tilesetsSupported[i].layers.join( "," ) )
21062106
.arg( tilesetsSupported[i].styles.join( "," ) )
2107-
.arg( tilesetsSupported[i].boundingBox.crs ) );
2107+
.arg( tilesetsSupported[i].crs ) );
21082108
}
21092109

21102110
QgsDebugMsg( "no extent for layer" );

0 commit comments

Comments
 (0)