Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] item_variables expression function inside compositions #3968

Merged
merged 3 commits into from Jan 11, 2017

Commits on Jan 11, 2017

  1. Copy the full SHA
    d25fcec View commit details
    Browse the repository at this point in the history
  2. [FEATURE] item_variables expression function inside compositions

    This adds a new item_variables expression function when expressions
    are used inside a composition context.
    
    The function takes a single argument, the id for an item inside
    the composition, and returns a map of variable name to value
    for that item.
    
    This allows you to do things like insert text in a label fetching
    properties of another item in the composition, eg
    
    Insert scale of map into a label:
    
    map_get( item_variables( 'map'),'map_scale')
    
    Insert x coordinate of map center into a label:
    
    x(map_get( item_variables( 'map'),'map_extent_center'))
    nyalldawson committed Jan 11, 2017
    Copy the full SHA
    f2032ea View commit details
    Browse the repository at this point in the history
  3. [FEATURE] New expression variables for map settings

    - map_crs, map_crs_definition: retrieves crs details for map
    - map_units: retrieves units for map (eg 'meters','degrees')
    nyalldawson committed Jan 11, 2017
    Copy the full SHA
    db1009c View commit details
    Browse the repository at this point in the history