From f4a44dcc93171682399dd6f995ca3ffce4a22c65 Mon Sep 17 00:00:00 2001 From: pathmapper Date: Sat, 13 Jan 2024 15:25:04 +0100 Subject: [PATCH 1/4] Add WMS with_maptip parameter value to request only maptip for HTML feature info response --- src/server/services/wms/qgswmsparameters.cpp | 25 ++++++- src/server/services/wms/qgswmsparameters.h | 15 ++++ src/server/services/wms/qgswmsrenderer.cpp | 73 +++++++++++++++---- .../test_qgsserver_wms_getfeatureinfo.py | 20 +++++ ...atureinfo-html-only-with-maptip-raster.txt | 4 + ...atureinfo-html-only-with-maptip-vector.txt | 4 + 6 files changed, 123 insertions(+), 18 deletions(-) create mode 100644 tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-raster.txt create mode 100644 tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-vector.txt diff --git a/src/server/services/wms/qgswmsparameters.cpp b/src/server/services/wms/qgswmsparameters.cpp index fd09aae686cd..33946c4366ca 100644 --- a/src/server/services/wms/qgswmsparameters.cpp +++ b/src/server/services/wms/qgswmsparameters.cpp @@ -541,8 +541,7 @@ namespace QgsWms save( pWithGeometry ); const QgsWmsParameter pWithMapTip( QgsWmsParameter::WITH_MAPTIP, - QVariant::Bool, - QVariant( false ) ); + QVariant::String ); save( pWithMapTip ); const QgsWmsParameter pWithDisplayName( QgsWmsParameter::WITH_DISPLAY_NAME, @@ -2105,9 +2104,29 @@ namespace QgsWms return mWmsParameters.value( QgsWmsParameter::WITH_GEOMETRY ).toBool(); } + QString QgsWmsParameters::withMapTipAsString() const + { + return mWmsParameters.value( QgsWmsParameter::WITH_MAPTIP ).toString(); + } + bool QgsWmsParameters::withMapTip() const { - return mWmsParameters.value( QgsWmsParameter::WITH_MAPTIP ).toBool(); + const QString mStr = withMapTipAsString(); + + if ( mStr.startsWith( QLatin1String( "true" ), Qt::CaseInsensitive ) ) + return true; + else + return false; + } + + bool QgsWmsParameters::htmlInfoOnlyMapTip() const + { + const QString mStr = withMapTipAsString(); + + if ( mStr.startsWith( QLatin1String( "true_and_html_fi_only_maptip" ), Qt::CaseInsensitive ) ) + return true; + else + return false; } bool QgsWmsParameters::withDisplayName() const diff --git a/src/server/services/wms/qgswmsparameters.h b/src/server/services/wms/qgswmsparameters.h index 7f0f2dd21b63..c808fb9ca54f 100644 --- a/src/server/services/wms/qgswmsparameters.h +++ b/src/server/services/wms/qgswmsparameters.h @@ -1308,12 +1308,27 @@ namespace QgsWms */ bool withGeometry() const; + /** + * \brief withMapTipAsString + * \returns WITH_MAPTIP parameter as string + * \since QGIS 3.36 + */ + QString withMapTipAsString() const; + /** * \brief withMapTip * \returns TRUE if maptip information is requested for feature info response */ bool withMapTip() const; + /** + * Returns TRUE if only maptip information is requested for HTML + * feature info response + * \returns htmlInfoOnlyMapTip + * \since QGIS 3.36 + */ + bool htmlInfoOnlyMapTip() const; + /** * \brief withDisplayName * \returns TRUE if the display name is requested for feature info response diff --git a/src/server/services/wms/qgswmsrenderer.cpp b/src/server/services/wms/qgswmsrenderer.cpp index f6256569352a..54db38b53465 100644 --- a/src/server/services/wms/qgswmsrenderer.cpp +++ b/src/server/services/wms/qgswmsrenderer.cpp @@ -2580,7 +2580,11 @@ namespace QgsWms QByteArray QgsRenderer::convertFeatureInfoToHtml( const QDomDocument &doc ) const { - QString featureInfoString = QStringLiteral( R"HTML( + const bool onlyMapTip = mWmsParameters.htmlInfoOnlyMapTip(); + QString featureInfoString; + if ( !onlyMapTip ) + { + featureInfoString.append( QStringLiteral( R"HTML( Information @@ -2613,7 +2617,8 @@ namespace QgsWms - )HTML" ); + )HTML" ) ); + } const QDomNodeList layerList = doc.elementsByTagName( QStringLiteral( "Layer" ) ); @@ -2628,14 +2633,20 @@ namespace QgsWms if ( !featureNodeList.isEmpty() ) //vector layer { - const QString featureInfoLayerTitleString = QStringLiteral( "
%1
" ).arg( layerElem.attribute( QStringLiteral( "title" ) ).toHtmlEscaped() ); - featureInfoString.append( featureInfoLayerTitleString ); + if ( !onlyMapTip ) + { + const QString featureInfoLayerTitleString = QStringLiteral( "
%1
" ).arg( layerElem.attribute( QStringLiteral( "title" ) ).toHtmlEscaped() ); + featureInfoString.append( featureInfoLayerTitleString ); + } for ( int j = 0; j < featureNodeList.size(); ++j ) { const QDomElement featureElement = featureNodeList.at( j ).toElement(); - featureInfoString.append( QStringLiteral( R"HTML( + if ( !onlyMapTip ) + { + featureInfoString.append( QStringLiteral( R"HTML( )HTML" ) ); + } //attribute loop const QDomNodeList attributeNodeList = featureElement.elementsByTagName( QStringLiteral( "Attribute" ) ); @@ -2649,16 +2660,28 @@ namespace QgsWms value = value.toHtmlEscaped(); } - const QString featureInfoAttributeString = QStringLiteral( R"HTML( + if ( !onlyMapTip ) + { + const QString featureInfoAttributeString = QStringLiteral( R"HTML( )HTML" ).arg( name, value ); - featureInfoString.append( featureInfoAttributeString ); + featureInfoString.append( featureInfoAttributeString ); + } + else if ( name == QStringLiteral( "maptip" ) ) + { + featureInfoString.append( value ); + break; + } + } - featureInfoString.append( QStringLiteral( R"HTML( + if ( !onlyMapTip ) + { + featureInfoString.append( QStringLiteral( R"HTML(
%1 %2
)HTML" ) ); + } } } else //no result or raster layer @@ -2668,11 +2691,15 @@ namespace QgsWms // raster layer if ( !attributeNodeList.isEmpty() ) { - const QString featureInfoLayerTitleString = QStringLiteral( "
%1
" ).arg( layerElem.attribute( QStringLiteral( "title" ) ).toHtmlEscaped() ); - featureInfoString.append( featureInfoLayerTitleString ); + if ( !onlyMapTip ) + { + const QString featureInfoLayerTitleString = QStringLiteral( "
%1
" ).arg( layerElem.attribute( QStringLiteral( "title" ) ).toHtmlEscaped() ); + featureInfoString.append( featureInfoLayerTitleString ); - featureInfoString.append( QStringLiteral( R"HTML( + featureInfoString.append( QStringLiteral( R"HTML( )HTML" ) ); + } + for ( int j = 0; j < attributeNodeList.size(); ++j ) { const QDomElement attributeElement = attributeNodeList.at( j ).toElement(); @@ -2687,23 +2714,39 @@ namespace QgsWms value = value.toHtmlEscaped(); } - const QString featureInfoAttributeString = QStringLiteral( R"HTML( + if ( !onlyMapTip ) + { + const QString featureInfoAttributeString = QStringLiteral( R"HTML( )HTML" ).arg( name, value ); - featureInfoString.append( featureInfoAttributeString ); + + featureInfoString.append( featureInfoAttributeString ); + } + else if ( name == QStringLiteral( "maptip" ) ) + { + featureInfoString.append( value ); + break; + } + } - featureInfoString.append( QStringLiteral( R"HTML( + if ( !onlyMapTip ) + { + featureInfoString.append( QStringLiteral( R"HTML(
%1 %2
)HTML" ) ); + } } } } //end the html body - featureInfoString.append( QStringLiteral( R"HTML( + if ( !onlyMapTip ) + { + featureInfoString.append( QStringLiteral( R"HTML( )HTML" ) ); + } return featureInfoString.toUtf8(); } diff --git a/tests/src/python/test_qgsserver_wms_getfeatureinfo.py b/tests/src/python/test_qgsserver_wms_getfeatureinfo.py index 63a494ad951b..afbc79b656aa 100644 --- a/tests/src/python/test_qgsserver_wms_getfeatureinfo.py +++ b/tests/src/python/test_qgsserver_wms_getfeatureinfo.py @@ -145,6 +145,16 @@ def testGetFeatureInfo(self): 'with_maptip=true', 'wms_getfeatureinfo-text-html-maptip') + # Test getfeatureinfo response html only with maptip for vector layer + self.wms_request_compare('GetFeatureInfo', + '&layers=testlayer%20%C3%A8%C3%A9&styles=&' + + 'info_format=text%2Fhtml&transparent=true&' + + 'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' + + '5606005.488876367%2C913235.426296057%2C5606035.347090538&' + + 'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320&' + + 'with_maptip=true_and_html_fi_only_maptip', + 'wms_getfeatureinfo-html-only-with-maptip-vector') + # Test getfeatureinfo response html with maptip and display name in text mode for vector layer self.wms_request_compare('GetFeatureInfo', '&layers=testlayer%20%C3%A8%C3%A9&styles=&' + @@ -271,6 +281,16 @@ def testGetFeatureInfo(self): 'with_maptip=true', 'wms_getfeatureinfo-raster-text-xml-maptip') + # Test GetFeatureInfo on raster layer HTML only with maptip + self.wms_request_compare('GetFeatureInfo', + '&layers=landsat&styles=&' + + 'info_format=text%2Fhtml&transparent=true&' + + 'width=500&height=500&srs=EPSG%3A3857&' + + 'bbox=1989139.6,3522745.0,2015014.9,3537004.5&' + + 'query_layers=landsat&X=250&Y=250&' + + 'with_maptip=true_and_html_fi_only_maptip', + 'wms_getfeatureinfo-html-only-with-maptip-raster') + def testGetFeatureInfoValueRelation(self): """Test GetFeatureInfo resolves "value relation" widget values. regression 18518""" mypath = self.testdata_path + "test_project_values.qgz" diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-raster.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-raster.txt new file mode 100644 index 000000000000..b52bdf366945 --- /dev/null +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-raster.txt @@ -0,0 +1,4 @@ +***** +Content-Type: text/html; charset=utf-8 + +Value Band 5: 90 diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-vector.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-vector.txt new file mode 100644 index 000000000000..9bbcbfecded7 --- /dev/null +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-vector.txt @@ -0,0 +1,4 @@ +***** +Content-Type: text/html; charset=utf-8 + +Name: three From 1ca64976314924051efb0a2c3ac44d7b614c7afb Mon Sep 17 00:00:00 2001 From: pathmapper Date: Sat, 13 Jan 2024 17:53:02 +0100 Subject: [PATCH 2/4] Use valid HTML content for tests ref https://github.com/qgis/QGIS/pull/55823#discussion_r1451549154 --- tests/testdata/qgis_server/test_project.qgs | 8 +- ...atureinfo-html-only-with-maptip-raster.txt | 2 + ...atureinfo-html-only-with-maptip-vector.txt | 2 + ..._getfeatureinfo-raster-text-xml-maptip.txt | 2 +- ..._getfeatureinfo-text-html-maptip-plain.txt | 4 +- .../wms_getfeatureinfo-text-html-maptip.txt | 104 +++++++++--------- 6 files changed, 67 insertions(+), 55 deletions(-) diff --git a/tests/testdata/qgis_server/test_project.qgs b/tests/testdata/qgis_server/test_project.qgs index 745684222ecb..16c6df2434f2 100644 --- a/tests/testdata/qgis_server/test_project.qgs +++ b/tests/testdata/qgis_server/test_project.qgs @@ -315,7 +315,9 @@ - [% 'Value Band 5: ' || raster_value(@layer_id, 5, @layer_cursor_point) %] + <!DOCTYPE html> +<title>Maptip</title> +[% 'Value Band 5: ' || raster_value(@layer_id, 5, @layer_cursor_point) %] @@ -561,7 +563,9 @@ "name" - [% 'Name: ' || represent_value( "name" ) %] + <!DOCTYPE html> +<title>Maptip</title> +[% 'Name: ' || represent_value( "name" ) %] diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-raster.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-raster.txt index b52bdf366945..3242aeb5a862 100644 --- a/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-raster.txt +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-raster.txt @@ -1,4 +1,6 @@ ***** Content-Type: text/html; charset=utf-8 + +Maptip Value Band 5: 90 diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-vector.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-vector.txt index 9bbcbfecded7..d45503007d12 100644 --- a/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-vector.txt +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-html-only-with-maptip-vector.txt @@ -1,4 +1,6 @@ ***** Content-Type: text/html; charset=utf-8 + +Maptip Name: three diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-raster-text-xml-maptip.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-raster-text-xml-maptip.txt index bfb3ede1dc9e..0d17c07f5c9e 100644 --- a/tests/testdata/qgis_server/wms_getfeatureinfo-raster-text-xml-maptip.txt +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-raster-text-xml-maptip.txt @@ -13,6 +13,6 @@ Content-Type: text/xml; charset=utf-8 - + diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip-plain.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip-plain.txt index ca9de8f5b3e1..151ca155a228 100644 --- a/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip-plain.txt +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip-plain.txt @@ -8,6 +8,8 @@ Feature 2 id = '3' name = 'three' utf8nameè = 'three èé↓' -maptip = 'Name: three' +maptip = ' +Maptip +Name: three' displayName = 'three' diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip.txt index bdc2ad74b579..8b840ce8f915 100644 --- a/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip.txt +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip.txt @@ -3,58 +3,60 @@ Content-Type: text/html; charset=utf-8 - - Information - - - + .layer-title { + font-weight: bold; + padding: 2px; + } + + - -
A test vector layer
- - - - - - - - - - - - - - - - - - - - - -
id3
namethree
utf8nameèthree èé↓
maptipName: three
displayNamethree
- + +
A test vector layer
+ + + + + + + + + + + + + + + + + + + + + +
id3
namethree
utf8nameèthree èé↓
maptip +Maptip +Name: three
displayNamethree
+ From d91a0f10887a99b2d0617b7273854baf2f73a4ae Mon Sep 17 00:00:00 2001 From: pathmapper Date: Sat, 13 Jan 2024 20:24:33 +0100 Subject: [PATCH 3/4] Add by default ref https://github.com/qgis/QGIS/pull/55823#discussion_r1451572812 --- src/server/services/wms/qgswmsrenderer.cpp | 10 ++++++---- tests/testdata/qgis_server/test_project.qgs | 6 ++---- .../wms_getfeatureinfo-raster-text-xml-maptip.txt | 2 +- .../wms_getfeatureinfo-text-html-maptip-plain.txt | 3 +-- .../wms_getfeatureinfo-text-html-maptip.txt | 3 +-- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/server/services/wms/qgswmsrenderer.cpp b/src/server/services/wms/qgswmsrenderer.cpp index 54db38b53465..9e2f914f3a40 100644 --- a/src/server/services/wms/qgswmsrenderer.cpp +++ b/src/server/services/wms/qgswmsrenderer.cpp @@ -2581,10 +2581,10 @@ namespace QgsWms QByteArray QgsRenderer::convertFeatureInfoToHtml( const QDomDocument &doc ) const { const bool onlyMapTip = mWmsParameters.htmlInfoOnlyMapTip(); - QString featureInfoString; + QString featureInfoString = QStringLiteral( " " ); if ( !onlyMapTip ) { - featureInfoString.append( QStringLiteral( R"HTML( + featureInfoString.append( QStringLiteral( R"HTML( Information @@ -2672,7 +2672,8 @@ namespace QgsWms } else if ( name == QStringLiteral( "maptip" ) ) { - featureInfoString.append( value ); + featureInfoString.append( QStringLiteral( R"HTML( + %1)HTML" ).arg( value ) ); break; } @@ -2727,7 +2728,8 @@ namespace QgsWms } else if ( name == QStringLiteral( "maptip" ) ) { - featureInfoString.append( value ); + featureInfoString.append( QStringLiteral( R"HTML( + %1)HTML" ).arg( value ) ); break; } diff --git a/tests/testdata/qgis_server/test_project.qgs b/tests/testdata/qgis_server/test_project.qgs index 16c6df2434f2..116018fe9a84 100644 --- a/tests/testdata/qgis_server/test_project.qgs +++ b/tests/testdata/qgis_server/test_project.qgs @@ -315,8 +315,7 @@ - <!DOCTYPE html> -<title>Maptip</title> + <title>Maptip</title> [% 'Value Band 5: ' || raster_value(@layer_id, 5, @layer_cursor_point) %] @@ -563,8 +562,7 @@ "name" - <!DOCTYPE html> -<title>Maptip</title> + <title>Maptip</title> [% 'Name: ' || represent_value( "name" ) %]
diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-raster-text-xml-maptip.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-raster-text-xml-maptip.txt index 0d17c07f5c9e..67426047982a 100644 --- a/tests/testdata/qgis_server/wms_getfeatureinfo-raster-text-xml-maptip.txt +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-raster-text-xml-maptip.txt @@ -13,6 +13,6 @@ Content-Type: text/xml; charset=utf-8 - + diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip-plain.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip-plain.txt index 151ca155a228..d86da4100afc 100644 --- a/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip-plain.txt +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip-plain.txt @@ -8,8 +8,7 @@ Feature 2 id = '3' name = 'three' utf8nameè = 'three èé↓' -maptip = ' -Maptip +maptip = 'Maptip Name: three' displayName = 'three' diff --git a/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip.txt b/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip.txt index 8b840ce8f915..1f7bf622f24c 100644 --- a/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip.txt +++ b/tests/testdata/qgis_server/wms_getfeatureinfo-text-html-maptip.txt @@ -50,8 +50,7 @@ Content-Type: text/html; charset=utf-8 maptip - -Maptip + Maptip Name: three From e13d9aab32affa2eb6f95fe7b137ed995613bbe6 Mon Sep 17 00:00:00 2001 From: pathmapper Date: Fri, 19 Jan 2024 11:11:59 +0100 Subject: [PATCH 4/4] Address code review comments --- src/server/services/wms/qgswmsparameters.cpp | 7 +++++-- src/server/services/wms/qgswmsrenderer.cpp | 6 +++--- tests/src/python/test_qgsserver_wms_getfeatureinfo.py | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/server/services/wms/qgswmsparameters.cpp b/src/server/services/wms/qgswmsparameters.cpp index 33946c4366ca..ea1eb3dd5159 100644 --- a/src/server/services/wms/qgswmsparameters.cpp +++ b/src/server/services/wms/qgswmsparameters.cpp @@ -2113,7 +2113,10 @@ namespace QgsWms { const QString mStr = withMapTipAsString(); - if ( mStr.startsWith( QLatin1String( "true" ), Qt::CaseInsensitive ) ) + if ( mStr.startsWith( QLatin1String( "true" ), Qt::CaseInsensitive ) || + mStr.startsWith( QLatin1String( "on" ), Qt::CaseInsensitive ) || + mStr.startsWith( QLatin1String( "yes" ), Qt::CaseInsensitive ) || + mStr.startsWith( QLatin1String( "1" ) ) ) return true; else return false; @@ -2123,7 +2126,7 @@ namespace QgsWms { const QString mStr = withMapTipAsString(); - if ( mStr.startsWith( QLatin1String( "true_and_html_fi_only_maptip" ), Qt::CaseInsensitive ) ) + if ( mStr.startsWith( QLatin1String( "html_fi_only_maptip" ), Qt::CaseInsensitive ) ) return true; else return false; diff --git a/src/server/services/wms/qgswmsrenderer.cpp b/src/server/services/wms/qgswmsrenderer.cpp index 9e2f914f3a40..3deaffdc8ba5 100644 --- a/src/server/services/wms/qgswmsrenderer.cpp +++ b/src/server/services/wms/qgswmsrenderer.cpp @@ -1989,7 +1989,7 @@ namespace QgsWms //add maptip attribute based on html/expression (in case there is no maptip attribute) QString mapTip = layer->mapTipTemplate(); - if ( !mapTip.isEmpty() && mWmsParameters.withMapTip() ) + if ( !mapTip.isEmpty() && ( mWmsParameters.withMapTip() || mWmsParameters.htmlInfoOnlyMapTip() ) ) { QDomElement maptipElem = infoDocument.createElement( QStringLiteral( "Attribute" ) ); maptipElem.setAttribute( QStringLiteral( "name" ), QStringLiteral( "maptip" ) ); @@ -2319,7 +2319,7 @@ namespace QgsWms } //add maptip attribute based on html/expression QString mapTip = layer->mapTipTemplate(); - if ( !mapTip.isEmpty() && mWmsParameters.withMapTip() ) + if ( !mapTip.isEmpty() && ( mWmsParameters.withMapTip() || mWmsParameters.htmlInfoOnlyMapTip() ) ) { QDomElement maptipElem = infoDocument.createElement( QStringLiteral( "Attribute" ) ); maptipElem.setAttribute( QStringLiteral( "name" ), QStringLiteral( "maptip" ) ); @@ -3093,7 +3093,7 @@ namespace QgsWms { QString mapTip = layer->mapTipTemplate(); - if ( !mapTip.isEmpty() && mWmsParameters.withMapTip() ) + if ( !mapTip.isEmpty() && ( mWmsParameters.withMapTip() || mWmsParameters.htmlInfoOnlyMapTip() ) ) { QString fieldTextString = QgsExpression::replaceExpressionText( mapTip, &expressionContext ); QDomElement fieldElem = doc.createElement( QStringLiteral( "qgs:maptip" ) ); diff --git a/tests/src/python/test_qgsserver_wms_getfeatureinfo.py b/tests/src/python/test_qgsserver_wms_getfeatureinfo.py index afbc79b656aa..739c69d43ff3 100644 --- a/tests/src/python/test_qgsserver_wms_getfeatureinfo.py +++ b/tests/src/python/test_qgsserver_wms_getfeatureinfo.py @@ -152,7 +152,7 @@ def testGetFeatureInfo(self): 'width=600&height=400&srs=EPSG%3A3857&bbox=913190.6389747962%2C' + '5606005.488876367%2C913235.426296057%2C5606035.347090538&' + 'query_layers=testlayer%20%C3%A8%C3%A9&X=190&Y=320&' + - 'with_maptip=true_and_html_fi_only_maptip', + 'with_maptip=html_fi_only_maptip', 'wms_getfeatureinfo-html-only-with-maptip-vector') # Test getfeatureinfo response html with maptip and display name in text mode for vector layer @@ -288,7 +288,7 @@ def testGetFeatureInfo(self): 'width=500&height=500&srs=EPSG%3A3857&' + 'bbox=1989139.6,3522745.0,2015014.9,3537004.5&' + 'query_layers=landsat&X=250&Y=250&' + - 'with_maptip=true_and_html_fi_only_maptip', + 'with_maptip=html_fi_only_maptip', 'wms_getfeatureinfo-html-only-with-maptip-raster') def testGetFeatureInfoValueRelation(self):