4

I'm working with QGIS 3.22.10-Białowieża. In my project, I'm using the ESRI Satellite tile basemap (through Quick Map Services plugin), which I would like to credit in the map.

I've seen nothing about attribution among the variables section of the map and I can't find anything useful through a Google search. Is it possible to automate that?

1 Answer 1

8

You can use layer_property('layername','attribution'). Use it together with array_to_string(layer_property('layername','attribution')) to display the array as string. But: Not all layers provide this. Seems like ESRI Satellite does not. But for example OpenStreetMap does.

enter image description here

Properties you can use (from the docs):

  • name: layer name
  • id: layer ID
  • title: metadata title string
  • abstract: metadata abstract string
  • keywords: metadata keywords
  • data_url: metadata URL
  • attribution: metadata attribution string
  • attribution_url: metadata attribution URL
  • source: layer source
  • min_scale: minimum display scale for layer
  • max_scale: maximum display scale for layer
  • is_editable: if layer is in edit mode
  • crs: layer CRS
  • crs_definition: layer CRS full definition
  • crs_description: layer CRS description
  • extent: layer extent (as a geometry object)
  • distance_units: layer distance units
  • type: layer type, e.g., Vector or Raster
  • storage_type: storage format (vector layers only)
  • geometry_type: geometry type, e.g., Point (vector layers only)
  • feature_count: approximate feature count for layer (vector layers only)
  • path: File path to the layer data source. Only available for file based layers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.