Skip to content

Commit

Permalink
layout
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored Sep 17, 2024
1 parent 641215e commit 94bba59
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/src/python/test_qgsmapboxglconverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ def testScaledIcon(self):
"source-layer": "landcover_pt",
"minzoom": 14.0,
"layout": {
"icon-size": ["interpolate", [ "exponential", 1.6 ], [ "zoom" ], 14, 0.2, 18, 1],
"icon-size": [ "interpolate", [ "exponential", 1.6 ], [ "zoom" ], 14, 0.2, 18, 1 ],
"text-font": [],
"icon-image": "{foo}",
"visibility": "visible",
Expand All @@ -849,15 +849,14 @@ def testScaledIcon(self):
"icon-ignore-placement": False,
"icon-rotation-alignment": "map"
},
"paint": {"icon-opacity": {"stops": [[ 14, 0.4 ], [ 18, 0.6 ]]}}
"paint": {"icon-opacity": {"stops": [ [ 14, 0.4 ], [ 18, 0.6 ] ]}}
}
renderer, has_renderer, labeling, has_labeling = QgsMapBoxGlStyleConverter.parseSymbolLayer(style, context)
self.assertTrue(has_renderer)
dd_properties = renderer.symbol().symbolLayers()[0].dataDefinedProperties()
self.assertEqual(dd_properties.property(QgsSymbolLayer.Property.PropertyWidth).asExpression(),
'''CASE WHEN "foo" = 'foo' THEN 2*((0.2) + ((1.6^(@vector_tile_zoom - 14) - 1) / (1.6^(18 - 14) - 1)) * ((1) - (0.2))) END''')


def testScaledLabelShieldIcon(self):
""" Test icon-size property for label shields that depends on a data attribute """
context = QgsMapBoxGlStyleConversionContext()
Expand Down

0 comments on commit 94bba59

Please sign in to comment.