mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Add test
This commit is contained in:
parent
39bce943bd
commit
534e1e811e
@ -46,8 +46,8 @@ class TestQgsServerWMS(QgsServerTestBase):
|
||||
# Set to True to re-generate reference files for this class
|
||||
regenerate_reference = False
|
||||
|
||||
def wms_request_compare(self, request, extra=None, reference_file=None):
|
||||
project = self.testdata_path + "test_project.qgs"
|
||||
def wms_request_compare(self, request, extra=None, reference_file=None, project='test_project.qgs'):
|
||||
project = self.testdata_path + project
|
||||
assert os.path.exists(project), "Project file not found: " + project
|
||||
|
||||
query_string = 'https://www.qgis.org/?MAP=%s&SERVICE=WMS&VERSION=1.3&REQUEST=%s' % (urllib.parse.quote(project), request)
|
||||
@ -217,6 +217,21 @@ class TestQgsServerWMS(QgsServerTestBase):
|
||||
'query_layers=testlayer+%C3%A8%C3%A9&X=190&Y=320',
|
||||
'wms_getfeatureinfo-text-xml')
|
||||
|
||||
# layer1 is a clone of layer0 but with a scale visibility. Thus,
|
||||
# GetFeatureInfo response contains only a feature for layer0 and layer1
|
||||
# is ignored for the required bbox. Without the scale visibility option,
|
||||
# the feature for layer1 would have been in the response too.
|
||||
mypath = self.testdata_path + "test_project_scalevisibility.qgs"
|
||||
self.wms_request_compare('GetFeatureInfo',
|
||||
'&layers=layer0,layer1&styles=&' +
|
||||
'VERSION=1.1.0&' +
|
||||
'info_format=text%2Fxml&' +
|
||||
'width=500&height=500&srs=EPSG%3A4326' +
|
||||
'&bbox=8.1976,44.8998,8.2100,44.9027&' +
|
||||
'query_layers=layer0,layer1&X=235&Y=243',
|
||||
'wms_getfeatureinfo_notvisible',
|
||||
'test_project_scalevisibility.qgs')
|
||||
|
||||
def test_describelayer(self):
|
||||
# Test DescribeLayer
|
||||
self.wms_request_compare('DescribeLayer',
|
||||
|
626
tests/testdata/qgis_server/test_project_scalevisibility.qgs
vendored
Normal file
626
tests/testdata/qgis_server/test_project_scalevisibility.qgs
vendored
Normal file
@ -0,0 +1,626 @@
|
||||
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
|
||||
<qgis version="2.99.0-Master" projectname="QGIS Test Project">
|
||||
<title>QGIS Test Project</title>
|
||||
<autotransaction active="0"/>
|
||||
<evaluateDefaultValues active="0"/>
|
||||
<layer-tree-group>
|
||||
<customproperties/>
|
||||
<layer-tree-layer name="layer1" expanded="1" providerKey="ogr" id="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1" checked="Qt::Checked" source="/home/blottiere/devel/packages/oslandia/QGIS/QGIS_pbl_server_bugfix_layernotfoud/tests/testdata/qgis_server/testlayer.shp">
|
||||
<customproperties/>
|
||||
</layer-tree-layer>
|
||||
<layer-tree-layer name="layer0" expanded="1" providerKey="ogr" id="testlayer20150528120452665" checked="Qt::Checked" source="/home/blottiere/devel/packages/oslandia/QGIS/QGIS_pbl_server_bugfix_layernotfoud/tests/testdata/qgis_server/testlayer.shp">
|
||||
<customproperties/>
|
||||
</layer-tree-layer>
|
||||
<custom-order enabled="0">
|
||||
<item>testlayer20150528120452665</item>
|
||||
<item>layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1</item>
|
||||
</custom-order>
|
||||
</layer-tree-group>
|
||||
<snapping-settings intersection-snapping="0" enabled="0" type="2" unit="2" mode="1" tolerance="0">
|
||||
<individual-layer-settings>
|
||||
<layer-setting enabled="0" type="2" id="testlayer20150528120452665" units="1" tolerance="10"/>
|
||||
<layer-setting enabled="0" type="2" id="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1" units="1" tolerance="10"/>
|
||||
</individual-layer-settings>
|
||||
</snapping-settings>
|
||||
<relations/>
|
||||
<mapcanvas name="theMapCanvas" annotationsVisible="1">
|
||||
<units>degrees</units>
|
||||
<extent>
|
||||
<xmin>8.2031776049190217</xmin>
|
||||
<ymin>44.90114119073537324</ymin>
|
||||
<xmax>8.20391417535903322</xmax>
|
||||
<ymax>44.90187776117541318</ymax>
|
||||
</extent>
|
||||
<rotation>0</rotation>
|
||||
<destinationsrs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</destinationsrs>
|
||||
<rendermaptile>0</rendermaptile>
|
||||
<layer_coordinate_transform_info>
|
||||
<layer_coordinate_transform layerid="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1" srcDatumTransform="-1" destDatumTransform="-1" srcAuthId="EPSG:4326" destAuthId="EPSG:4326"/>
|
||||
<layer_coordinate_transform layerid="testlayer20150528120452665" srcDatumTransform="-1" destDatumTransform="-1" srcAuthId="EPSG:4326" destAuthId="EPSG:4326"/>
|
||||
<layer_coordinate_transform layerid="testlayer_èé_f5fb1f33_2dfa_4ed4_8a31_8d5c730e5d7e" srcDatumTransform="-1" destDatumTransform="-1" srcAuthId="EPSG:4326" destAuthId="EPSG:4326"/>
|
||||
</layer_coordinate_transform_info>
|
||||
</mapcanvas>
|
||||
<legend updateDrawingOrder="true">
|
||||
<legendlayer name="layer1" drawingOrder="-1" showFeatureCount="0" open="true" checked="Qt::Checked">
|
||||
<filegroup open="true" hidden="false">
|
||||
<legendlayerfile layerid="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1" visible="1" isInOverview="0"/>
|
||||
</filegroup>
|
||||
</legendlayer>
|
||||
<legendlayer name="layer0" drawingOrder="-1" showFeatureCount="0" open="true" checked="Qt::Checked">
|
||||
<filegroup open="true" hidden="false">
|
||||
<legendlayerfile layerid="testlayer20150528120452665" visible="1" isInOverview="0"/>
|
||||
</filegroup>
|
||||
</legendlayer>
|
||||
</legend>
|
||||
<mapViewDocks/>
|
||||
<projectlayers>
|
||||
<maplayer simplifyAlgorithm="0" simplifyMaxScale="1" autoRefreshEnabled="0" type="vector" maxScale="4.65662e-10" geometry="Point" simplifyLocal="1" hasScaleBasedVisibilityFlag="1" simplifyDrawingHints="0" minScale="3101" autoRefreshTime="0" simplifyDrawingTol="1" readOnly="0">
|
||||
<extent>
|
||||
<xmin>8.20345930703634352</xmin>
|
||||
<ymin>44.90139483904469131</ymin>
|
||||
<xmax>8.20354699399348775</xmax>
|
||||
<ymax>44.90148252600183554</ymax>
|
||||
</extent>
|
||||
<id>layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1</id>
|
||||
<datasource>./testlayer.shp</datasource>
|
||||
<title>A test vector layer</title>
|
||||
<abstract>A test vector layer with unicode òà</abstract>
|
||||
<keywordList>
|
||||
<value></value>
|
||||
</keywordList>
|
||||
<layername>layer1</layername>
|
||||
<srs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</srs>
|
||||
<provider encoding="UTF-8">ogr</provider>
|
||||
<vectorjoins/>
|
||||
<layerDependencies/>
|
||||
<dataDependencies/>
|
||||
<expressionfields/>
|
||||
<map-layer-style-manager current="">
|
||||
<map-layer-style name=""/>
|
||||
</map-layer-style-manager>
|
||||
<renderer-v2 type="singleSymbol" forceraster="0" symbollevels="0" enableorderby="0">
|
||||
<symbols>
|
||||
<symbol type="marker" name="0" clip_to_extent="1" alpha="1">
|
||||
<layer enabled="1" class="SimpleMarker" locked="0" pass="0">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="0,164,52,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="0,0,0,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="area"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<effect type="effectStack" enabled="0">
|
||||
<effect type="drawSource">
|
||||
<prop k="blend_mode" v="0"/>
|
||||
<prop k="draw_mode" v="2"/>
|
||||
<prop k="enabled" v="1"/>
|
||||
<prop k="opacity" v="1"/>
|
||||
</effect>
|
||||
</effect>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="name" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" name="type" value="collection"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<rotation/>
|
||||
<sizescale/>
|
||||
<effect type="effectStack" enabled="0">
|
||||
<effect type="drawSource">
|
||||
<prop k="blend_mode" v="0"/>
|
||||
<prop k="draw_mode" v="2"/>
|
||||
<prop k="enabled" v="1"/>
|
||||
<prop k="opacity" v="1"/>
|
||||
</effect>
|
||||
</effect>
|
||||
</renderer-v2>
|
||||
<customproperties>
|
||||
<property key="embeddedWidgets/count" value="0"/>
|
||||
<property key="variableNames"/>
|
||||
<property key="variableValues"/>
|
||||
</customproperties>
|
||||
<blendMode>0</blendMode>
|
||||
<featureBlendMode>0</featureBlendMode>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Pie">
|
||||
<DiagramCategory scaleBasedVisibility="0" penAlpha="255" maxScaleDenominator="1e+8" scaleDependency="Area" sizeType="MM" sizeScale="3x:0,0,0,0,0,0" penWidth="0" penColor="#000000" lineSizeScale="3x:0,0,0,0,0,0" width="15" backgroundColor="#ffffff" minScaleDenominator="4.65662e-10" lineSizeType="MM" enabled="0" opacity="1" barWidth="5" height="15" minimumSize="0" rotationOffset="270" diagramOrientation="Up" backgroundAlpha="255" labelPlacementMethod="XHeight">
|
||||
<fontProperties style="" description="Ubuntu,9,-1,5,50,0,0,0,0,0"/>
|
||||
<attribute label="" color="#000000" field=""/>
|
||||
</DiagramCategory>
|
||||
</SingleCategoryDiagramRenderer>
|
||||
<DiagramLayerSettings linePlacementFlags="2" obstacle="0" showAll="1" zIndex="0" priority="0" placement="0" dist="0">
|
||||
<properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="name" value=""/>
|
||||
<Option type="Map" name="properties">
|
||||
<Option type="Map" name="show">
|
||||
<Option type="bool" name="active" value="true"/>
|
||||
<Option type="QString" name="field" value="id"/>
|
||||
<Option type="int" name="type" value="2"/>
|
||||
</Option>
|
||||
</Option>
|
||||
<Option type="QString" name="type" value="collection"/>
|
||||
</Option>
|
||||
</properties>
|
||||
</DiagramLayerSettings>
|
||||
<fieldConfiguration>
|
||||
<field name="id">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="IsMultiline" value="0"/>
|
||||
<Option type="QString" name="UseHtml" value="0"/>
|
||||
</Option>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="name">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="IsMultiline" value="0"/>
|
||||
<Option type="QString" name="UseHtml" value="0"/>
|
||||
</Option>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="utf8nameè">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="IsMultiline" value="0"/>
|
||||
<Option type="QString" name="UseHtml" value="0"/>
|
||||
</Option>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
</fieldConfiguration>
|
||||
<aliases>
|
||||
<alias name="" field="id" index="0"/>
|
||||
<alias name="" field="name" index="1"/>
|
||||
<alias name="" field="utf8nameè" index="2"/>
|
||||
</aliases>
|
||||
<excludeAttributesWMS/>
|
||||
<excludeAttributesWFS/>
|
||||
<defaults>
|
||||
<default expression="" field="id"/>
|
||||
<default expression="" field="name"/>
|
||||
<default expression="" field="utf8nameè"/>
|
||||
</defaults>
|
||||
<constraints>
|
||||
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="id" unique_strength="0"/>
|
||||
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="name" unique_strength="0"/>
|
||||
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="utf8nameè" unique_strength="0"/>
|
||||
</constraints>
|
||||
<constraintExpressions>
|
||||
<constraint exp="" desc="" field="id"/>
|
||||
<constraint exp="" desc="" field="name"/>
|
||||
<constraint exp="" desc="" field="utf8nameè"/>
|
||||
</constraintExpressions>
|
||||
<attributeactions>
|
||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
||||
</attributeactions>
|
||||
<attributetableconfig sortOrder="0" sortExpression="" actionWidgetStyle="dropDown">
|
||||
<columns>
|
||||
<column type="field" name="id" hidden="0" width="-1"/>
|
||||
<column type="field" name="name" hidden="0" width="-1"/>
|
||||
<column type="field" name="utf8nameè" hidden="0" width="-1"/>
|
||||
<column type="actions" hidden="1" width="-1"/>
|
||||
</columns>
|
||||
</attributetableconfig>
|
||||
<editform>../../../../../../../..</editform>
|
||||
<editforminit/>
|
||||
<editforminitcodesource>0</editforminitcodesource>
|
||||
<editforminitfilepath>../../../../../../../..</editforminitfilepath>
|
||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
||||
"""
|
||||
QGIS forms can have a Python function that is called when the form is
|
||||
opened.
|
||||
|
||||
Use this function to add extra logic to your forms.
|
||||
|
||||
Enter the name of the function in the "Python Init function"
|
||||
field.
|
||||
An example follows:
|
||||
"""
|
||||
from qgis.PyQt.QtWidgets import QWidget
|
||||
|
||||
def my_form_open(dialog, layer, feature):
|
||||
geom = feature.geometry()
|
||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
||||
]]></editforminitcode>
|
||||
<featformsuppress>0</featformsuppress>
|
||||
<editorlayout>generatedlayout</editorlayout>
|
||||
<widgets/>
|
||||
<conditionalstyles>
|
||||
<rowstyles/>
|
||||
<fieldstyles/>
|
||||
</conditionalstyles>
|
||||
<expressionfields/>
|
||||
<previewExpression>name</previewExpression>
|
||||
<mapTip>[% 'Name: ' || "name" %]</mapTip>
|
||||
</maplayer>
|
||||
<maplayer simplifyAlgorithm="0" simplifyMaxScale="1" autoRefreshEnabled="0" type="vector" maxScale="4.65662e-10" geometry="Point" simplifyLocal="1" hasScaleBasedVisibilityFlag="0" simplifyDrawingHints="0" minScale="1e+8" autoRefreshTime="0" simplifyDrawingTol="1" readOnly="0">
|
||||
<extent>
|
||||
<xmin>8.20345930703634352</xmin>
|
||||
<ymin>44.90139483904469131</ymin>
|
||||
<xmax>8.20354699399348775</xmax>
|
||||
<ymax>44.90148252600183554</ymax>
|
||||
</extent>
|
||||
<id>testlayer20150528120452665</id>
|
||||
<datasource>./testlayer.shp</datasource>
|
||||
<title>A test vector layer</title>
|
||||
<abstract>A test vector layer with unicode òà</abstract>
|
||||
<keywordList>
|
||||
<value></value>
|
||||
</keywordList>
|
||||
<layername>layer0</layername>
|
||||
<srs>
|
||||
<spatialrefsys>
|
||||
<proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
|
||||
<srsid>3452</srsid>
|
||||
<srid>4326</srid>
|
||||
<authid>EPSG:4326</authid>
|
||||
<description>WGS 84</description>
|
||||
<projectionacronym>longlat</projectionacronym>
|
||||
<ellipsoidacronym>WGS84</ellipsoidacronym>
|
||||
<geographicflag>true</geographicflag>
|
||||
</spatialrefsys>
|
||||
</srs>
|
||||
<provider encoding="UTF-8">ogr</provider>
|
||||
<vectorjoins/>
|
||||
<layerDependencies/>
|
||||
<dataDependencies/>
|
||||
<expressionfields/>
|
||||
<map-layer-style-manager current="">
|
||||
<map-layer-style name=""/>
|
||||
</map-layer-style-manager>
|
||||
<renderer-v2 type="singleSymbol" forceraster="0" symbollevels="0" enableorderby="0">
|
||||
<symbols>
|
||||
<symbol type="marker" name="0" clip_to_extent="1" alpha="1">
|
||||
<layer enabled="1" class="SimpleMarker" locked="0" pass="0">
|
||||
<prop k="angle" v="0"/>
|
||||
<prop k="color" v="164,0,2,255"/>
|
||||
<prop k="horizontal_anchor_point" v="1"/>
|
||||
<prop k="joinstyle" v="bevel"/>
|
||||
<prop k="name" v="circle"/>
|
||||
<prop k="offset" v="0,0"/>
|
||||
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="offset_unit" v="MM"/>
|
||||
<prop k="outline_color" v="0,0,0,255"/>
|
||||
<prop k="outline_style" v="solid"/>
|
||||
<prop k="outline_width" v="0"/>
|
||||
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="outline_width_unit" v="MM"/>
|
||||
<prop k="scale_method" v="area"/>
|
||||
<prop k="size" v="2"/>
|
||||
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
|
||||
<prop k="size_unit" v="MM"/>
|
||||
<prop k="vertical_anchor_point" v="1"/>
|
||||
<effect type="effectStack" enabled="0">
|
||||
<effect type="drawSource">
|
||||
<prop k="blend_mode" v="0"/>
|
||||
<prop k="draw_mode" v="2"/>
|
||||
<prop k="enabled" v="1"/>
|
||||
<prop k="opacity" v="1"/>
|
||||
</effect>
|
||||
</effect>
|
||||
<data_defined_properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="name" value=""/>
|
||||
<Option name="properties"/>
|
||||
<Option type="QString" name="type" value="collection"/>
|
||||
</Option>
|
||||
</data_defined_properties>
|
||||
</layer>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<rotation/>
|
||||
<sizescale/>
|
||||
<effect type="effectStack" enabled="0">
|
||||
<effect type="drawSource">
|
||||
<prop k="blend_mode" v="0"/>
|
||||
<prop k="draw_mode" v="2"/>
|
||||
<prop k="enabled" v="1"/>
|
||||
<prop k="opacity" v="1"/>
|
||||
</effect>
|
||||
</effect>
|
||||
</renderer-v2>
|
||||
<customproperties>
|
||||
<property key="embeddedWidgets/count" value="0"/>
|
||||
<property key="variableNames"/>
|
||||
<property key="variableValues"/>
|
||||
</customproperties>
|
||||
<blendMode>0</blendMode>
|
||||
<featureBlendMode>0</featureBlendMode>
|
||||
<layerOpacity>1</layerOpacity>
|
||||
<SingleCategoryDiagramRenderer attributeLegend="1" diagramType="Pie">
|
||||
<DiagramCategory scaleBasedVisibility="0" penAlpha="255" maxScaleDenominator="1e+8" scaleDependency="Area" sizeType="MM" sizeScale="3x:0,0,0,0,0,0" penWidth="0" penColor="#000000" lineSizeScale="3x:0,0,0,0,0,0" width="15" backgroundColor="#ffffff" minScaleDenominator="4.65662e-10" lineSizeType="MM" enabled="0" opacity="1" barWidth="5" height="15" minimumSize="0" rotationOffset="270" diagramOrientation="Up" backgroundAlpha="255" labelPlacementMethod="XHeight">
|
||||
<fontProperties style="" description="Ubuntu,9,-1,5,50,0,0,0,0,0"/>
|
||||
<attribute label="" color="#000000" field=""/>
|
||||
</DiagramCategory>
|
||||
</SingleCategoryDiagramRenderer>
|
||||
<DiagramLayerSettings linePlacementFlags="2" obstacle="0" showAll="1" zIndex="0" priority="0" placement="0" dist="0">
|
||||
<properties>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="name" value=""/>
|
||||
<Option type="Map" name="properties">
|
||||
<Option type="Map" name="show">
|
||||
<Option type="bool" name="active" value="true"/>
|
||||
<Option type="QString" name="field" value="id"/>
|
||||
<Option type="int" name="type" value="2"/>
|
||||
</Option>
|
||||
</Option>
|
||||
<Option type="QString" name="type" value="collection"/>
|
||||
</Option>
|
||||
</properties>
|
||||
</DiagramLayerSettings>
|
||||
<fieldConfiguration>
|
||||
<field name="id">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="IsMultiline" value="0"/>
|
||||
<Option type="QString" name="UseHtml" value="0"/>
|
||||
</Option>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="name">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="IsMultiline" value="0"/>
|
||||
<Option type="QString" name="UseHtml" value="0"/>
|
||||
</Option>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
<field name="utf8nameè">
|
||||
<editWidget type="TextEdit">
|
||||
<config>
|
||||
<Option type="Map">
|
||||
<Option type="QString" name="IsMultiline" value="0"/>
|
||||
<Option type="QString" name="UseHtml" value="0"/>
|
||||
</Option>
|
||||
</config>
|
||||
</editWidget>
|
||||
</field>
|
||||
</fieldConfiguration>
|
||||
<aliases>
|
||||
<alias name="" field="id" index="0"/>
|
||||
<alias name="" field="name" index="1"/>
|
||||
<alias name="" field="utf8nameè" index="2"/>
|
||||
</aliases>
|
||||
<excludeAttributesWMS/>
|
||||
<excludeAttributesWFS/>
|
||||
<defaults>
|
||||
<default expression="" field="id"/>
|
||||
<default expression="" field="name"/>
|
||||
<default expression="" field="utf8nameè"/>
|
||||
</defaults>
|
||||
<constraints>
|
||||
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="id" unique_strength="0"/>
|
||||
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="name" unique_strength="0"/>
|
||||
<constraint constraints="0" exp_strength="0" notnull_strength="0" field="utf8nameè" unique_strength="0"/>
|
||||
</constraints>
|
||||
<constraintExpressions>
|
||||
<constraint exp="" desc="" field="id"/>
|
||||
<constraint exp="" desc="" field="name"/>
|
||||
<constraint exp="" desc="" field="utf8nameè"/>
|
||||
</constraintExpressions>
|
||||
<attributeactions>
|
||||
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
|
||||
</attributeactions>
|
||||
<attributetableconfig sortOrder="0" sortExpression="" actionWidgetStyle="dropDown">
|
||||
<columns>
|
||||
<column type="field" name="id" hidden="0" width="-1"/>
|
||||
<column type="field" name="name" hidden="0" width="-1"/>
|
||||
<column type="field" name="utf8nameè" hidden="0" width="-1"/>
|
||||
<column type="actions" hidden="1" width="-1"/>
|
||||
</columns>
|
||||
</attributetableconfig>
|
||||
<editform>../../../../../../../..</editform>
|
||||
<editforminit/>
|
||||
<editforminitcodesource>0</editforminitcodesource>
|
||||
<editforminitfilepath>../../../../../../../..</editforminitfilepath>
|
||||
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
|
||||
"""
|
||||
QGIS forms can have a Python function that is called when the form is
|
||||
opened.
|
||||
|
||||
Use this function to add extra logic to your forms.
|
||||
|
||||
Enter the name of the function in the "Python Init function"
|
||||
field.
|
||||
An example follows:
|
||||
"""
|
||||
from qgis.PyQt.QtWidgets import QWidget
|
||||
|
||||
def my_form_open(dialog, layer, feature):
|
||||
geom = feature.geometry()
|
||||
control = dialog.findChild(QWidget, "MyLineEdit")
|
||||
]]></editforminitcode>
|
||||
<featformsuppress>0</featformsuppress>
|
||||
<editorlayout>generatedlayout</editorlayout>
|
||||
<widgets/>
|
||||
<conditionalstyles>
|
||||
<rowstyles/>
|
||||
<fieldstyles/>
|
||||
</conditionalstyles>
|
||||
<expressionfields/>
|
||||
<previewExpression>name</previewExpression>
|
||||
<mapTip>[% 'Name: ' || "name" %]</mapTip>
|
||||
</maplayer>
|
||||
</projectlayers>
|
||||
<layerorder>
|
||||
<layer id="testlayer20150528120452665"/>
|
||||
<layer id="layer0_119a7843_4041_45ec_87f9_09e9c2ec99b1"/>
|
||||
</layerorder>
|
||||
<properties>
|
||||
<WFSLayers type="QStringList">
|
||||
<value>testlayer20150528120452665</value>
|
||||
</WFSLayers>
|
||||
<WMSContactPhone type="QString"></WMSContactPhone>
|
||||
<Macros>
|
||||
<pythonCode type="QString"></pythonCode>
|
||||
</Macros>
|
||||
<WFSLayersPrecision>
|
||||
<testlayer20150528120452665 type="int">8</testlayer20150528120452665>
|
||||
</WFSLayersPrecision>
|
||||
<Measure>
|
||||
<Ellipsoid type="QString">WGS84</Ellipsoid>
|
||||
</Measure>
|
||||
<WMSOnlineResource type="QString"></WMSOnlineResource>
|
||||
<WMSContactMail type="QString">elpaso@itopen.it</WMSContactMail>
|
||||
<WMSUrl type="QString"></WMSUrl>
|
||||
<WMSRestrictedComposers type="QStringList"/>
|
||||
<WMSAccessConstraints type="QString">None</WMSAccessConstraints>
|
||||
<WMSFees type="QString">conditions unknown</WMSFees>
|
||||
<WMSRequestDefinedDataSources type="bool">false</WMSRequestDefinedDataSources>
|
||||
<Variables>
|
||||
<variableValues type="QStringList"/>
|
||||
<variableNames type="QStringList"/>
|
||||
</Variables>
|
||||
<WCSLayers type="QStringList"/>
|
||||
<SpatialRefSys>
|
||||
<ProjectCrs type="QString">EPSG:4326</ProjectCrs>
|
||||
<ProjectionsEnabled type="int">1</ProjectionsEnabled>
|
||||
<ProjectCRSID type="int">3452</ProjectCRSID>
|
||||
<ProjectCRSProj4String type="QString">+proj=longlat +datum=WGS84 +no_defs</ProjectCRSProj4String>
|
||||
</SpatialRefSys>
|
||||
<DefaultStyles>
|
||||
<Opacity type="double">1</Opacity>
|
||||
<RandomColors type="bool">true</RandomColors>
|
||||
<AlphaInt type="int">255</AlphaInt>
|
||||
<Marker type="QString"></Marker>
|
||||
<Fill type="QString"></Fill>
|
||||
<Line type="QString"></Line>
|
||||
<ColorRamp type="QString"></ColorRamp>
|
||||
</DefaultStyles>
|
||||
<Gui>
|
||||
<SelectionColorAlphaPart type="int">255</SelectionColorAlphaPart>
|
||||
<CanvasColorGreenPart type="int">255</CanvasColorGreenPart>
|
||||
<SelectionColorBluePart type="int">0</SelectionColorBluePart>
|
||||
<CanvasColorRedPart type="int">255</CanvasColorRedPart>
|
||||
<SelectionColorGreenPart type="int">255</SelectionColorGreenPart>
|
||||
<SelectionColorRedPart type="int">255</SelectionColorRedPart>
|
||||
<CanvasColorBluePart type="int">255</CanvasColorBluePart>
|
||||
</Gui>
|
||||
<PositionPrecision>
|
||||
<Automatic type="bool">true</Automatic>
|
||||
<DecimalPlaces type="int">2</DecimalPlaces>
|
||||
<DegreeFormat type="QString">D</DegreeFormat>
|
||||
</PositionPrecision>
|
||||
<WMSAddWktGeometry type="bool">true</WMSAddWktGeometry>
|
||||
<Identify>
|
||||
<disabledLayers type="QStringList"/>
|
||||
</Identify>
|
||||
<WMSContactPosition type="QString"></WMSContactPosition>
|
||||
<WMSPrecision type="QString">4</WMSPrecision>
|
||||
<WMSExtent type="QStringList">
|
||||
<value>8.20315414376310059</value>
|
||||
<value>44.901236559338642</value>
|
||||
<value>8.204164917965862</value>
|
||||
<value>44.90159838674664172</value>
|
||||
</WMSExtent>
|
||||
<WMSServiceTitle type="QString">QGIS TestProject</WMSServiceTitle>
|
||||
<WMSContactPerson type="QString">Alessandro Pasotti</WMSContactPerson>
|
||||
<Digitizing>
|
||||
<LayerSnappingList type="QStringList"/>
|
||||
<SnappingMode type="QString">current_layer</SnappingMode>
|
||||
<AvoidIntersectionsList type="QStringList"/>
|
||||
<LayerSnappingEnabledList type="QStringList"/>
|
||||
<DefaultSnapType type="QString">off</DefaultSnapType>
|
||||
<LayerSnappingToleranceUnitList type="QStringList"/>
|
||||
<LayerSnappingToleranceList type="QStringList"/>
|
||||
<DefaultSnapToleranceUnit type="int">2</DefaultSnapToleranceUnit>
|
||||
<LayerSnapToList type="QStringList"/>
|
||||
<DefaultSnapTolerance type="double">0</DefaultSnapTolerance>
|
||||
</Digitizing>
|
||||
<WMSServiceAbstract type="QString">Some UTF8 text èòù</WMSServiceAbstract>
|
||||
<WMSContactOrganization type="QString">QGIS dev team</WMSContactOrganization>
|
||||
<PAL>
|
||||
<DrawRectOnly type="bool">false</DrawRectOnly>
|
||||
<ShowingAllLabels type="bool">false</ShowingAllLabels>
|
||||
<DrawOutlineLabels type="bool">true</DrawOutlineLabels>
|
||||
<CandidatesLine type="int">50</CandidatesLine>
|
||||
<CandidatesPolygon type="int">30</CandidatesPolygon>
|
||||
<ShowingPartialsLabels type="bool">true</ShowingPartialsLabels>
|
||||
<SearchMethod type="int">0</SearchMethod>
|
||||
<CandidatesPoint type="int">16</CandidatesPoint>
|
||||
<ShowingCandidates type="bool">false</ShowingCandidates>
|
||||
</PAL>
|
||||
<WMSRestrictedLayers type="QStringList"/>
|
||||
<WFSUrl type="QString"></WFSUrl>
|
||||
<WFSTLayers>
|
||||
<Update type="QStringList">
|
||||
<value>testlayer20150528120452665</value>
|
||||
</Update>
|
||||
<Delete type="QStringList">
|
||||
<value>testlayer20150528120452665</value>
|
||||
</Delete>
|
||||
<Insert type="QStringList">
|
||||
<value>testlayer20150528120452665</value>
|
||||
</Insert>
|
||||
</WFSTLayers>
|
||||
<WCSUrl type="QString"></WCSUrl>
|
||||
<Legend>
|
||||
<filterByMap type="bool">false</filterByMap>
|
||||
</Legend>
|
||||
<WMSImageQuality type="int">90</WMSImageQuality>
|
||||
<Paths>
|
||||
<Absolute type="bool">false</Absolute>
|
||||
</Paths>
|
||||
<WMSSegmentizeFeatureInfoGeometry type="bool">false</WMSSegmentizeFeatureInfoGeometry>
|
||||
<WMSUseLayerIDs type="bool">false</WMSUseLayerIDs>
|
||||
<Measurement>
|
||||
<AreaUnits type="QString">m2</AreaUnits>
|
||||
<DistanceUnits type="QString">meters</DistanceUnits>
|
||||
</Measurement>
|
||||
<WMSKeywordList type="QStringList">
|
||||
<value></value>
|
||||
</WMSKeywordList>
|
||||
<WMSServiceCapabilities type="bool">true</WMSServiceCapabilities>
|
||||
</properties>
|
||||
<visibility-presets/>
|
||||
<Annotations/>
|
||||
<Layouts/>
|
||||
</qgis>
|
12
tests/testdata/qgis_server/wms_getfeatureinfo_notvisible.txt
vendored
Normal file
12
tests/testdata/qgis_server/wms_getfeatureinfo_notvisible.txt
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
*****
|
||||
Content-Type: text/xml; charset=utf-8
|
||||
|
||||
<GetFeatureInfoResponse>
|
||||
<Layer name="layer0">
|
||||
<Feature id="2">
|
||||
<Attribute value="3" name="id"/>
|
||||
<Attribute value="three" name="name"/>
|
||||
<Attribute value="three èé↓" name="utf8nameè"/>
|
||||
</Feature>
|
||||
</Layer>
|
||||
</GetFeatureInfoResponse>
|
Loading…
x
Reference in New Issue
Block a user