The issue was that renderer/labeling were only keeping "their" required fields,
but the final fields may have been extended by the other, making the field indices
cached in expressions invalid.
The fix is to keep the final QgsFields around and avoid creating those QgsFields on-the-fly
from previously requested fields.
This adds a new tab in the layer styling dock widget for vector tile layers.
The new QgsVectorTileBasicLabelingWidget class is based on the code used for QgsVectorTileBasicRendererWidget
- filtering of input layers by expressions and min/max zoom level
- custom layer names in the output
- writing of custom metadata for MBTiles output
- auto-calculate output extent (instead of defaulting to the whole world's extent)
- passing transform context to the encoder
Initial work... Currently supporting output to a directory based on XYZ template, using Mapbox vector tiles encoding.
New classes:
- QgsVectorTileMVTEncoder - low-level class that operates on a single tile, converts vector features to raw tile byte array, for internal use
- QgsVectorTileWriter - higher level class that manages generation of multiple tiles, for use by clients
- QgsVectorTileMVTUtils - assorted helper functions for MVT encoding/decoding