[QGIS Commit] r14171 - trunk/qgis/src/mapserver
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Aug 31 07:16:07 EDT 2010
Author: mhugent
Date: 2010-08-31 11:16:07 +0000 (Tue, 31 Aug 2010)
New Revision: 14171
Modified:
trunk/qgis/src/mapserver/qgsgetrequesthandler.cpp
trunk/qgis/src/mapserver/qgswmsserver.cpp
Log:
Fix feature info in mapserver
Modified: trunk/qgis/src/mapserver/qgsgetrequesthandler.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgsgetrequesthandler.cpp 2010-08-30 18:08:39 UTC (rev 14170)
+++ trunk/qgis/src/mapserver/qgsgetrequesthandler.cpp 2010-08-31 11:16:07 UTC (rev 14171)
@@ -204,7 +204,7 @@
}
//feature loop (for vector layers)
- QDomNodeList featureNodeList = infoDoc.elementsByTagName( "Feature" );
+ QDomNodeList featureNodeList = layerElem.elementsByTagName( "Feature" );
QDomElement currentFeatureElement;
if ( featureNodeList.size() < 1 ) //raster layer?
@@ -229,7 +229,6 @@
{
for ( int j = 0; j < featureNodeList.size(); ++j )
{
- featureInfoString.append( "<TABLE border=1 width=100%>\n" );
QDomElement featureElement = featureNodeList.at( j ).toElement();
if ( infoFormat == "text/plain" )
{
@@ -237,6 +236,7 @@
}
else if ( infoFormat == "text/html" )
{
+ featureInfoString.append( "<TABLE border=1 width=100%>\n" );
featureInfoString.append( "<TR><TH>Feature</TH><TD>" + featureElement.attribute( "id" ) + "</TD></TR>\n" );
}
//attribute loop
@@ -254,7 +254,11 @@
featureInfoString.append( "<TR><TH>" + attributeElement.attribute( "name" ) + "</TH><TD>" + attributeElement.attribute( "value" ) + "</TD></TR>\n" );
}
}
- featureInfoString.append( "</TABLE>\n</BR>\n" );
+
+ if ( infoFormat == "text/html" )
+ {
+ featureInfoString.append( "</TABLE>\n</BR>\n" );
+ }
}
}
if ( infoFormat == "text/plain" )
Modified: trunk/qgis/src/mapserver/qgswmsserver.cpp
===================================================================
--- trunk/qgis/src/mapserver/qgswmsserver.cpp 2010-08-30 18:08:39 UTC (rev 14170)
+++ trunk/qgis/src/mapserver/qgswmsserver.cpp 2010-08-31 11:16:07 UTC (rev 14171)
@@ -899,7 +899,7 @@
//we need a selection rect (0.01 of map width)
QgsRectangle mapRect = mapRender->extent();
QgsRectangle layerRect = mapRender->mapToLayerCoordinates( layer, mapRect );
- double searchRadius = ( layerRect.xMaximum() - layerRect.xMinimum() ) / 100;
+ double searchRadius = ( layerRect.xMaximum() - layerRect.xMinimum() ) / 200;
QgsRectangle searchRect( infoPoint.x() - searchRadius, infoPoint.y() - searchRadius, \
infoPoint.x() + searchRadius, infoPoint.y() + searchRadius );
More information about the QGIS-commit
mailing list