Martin, Andreas, Nyall,

 

thanks again for your answers and your help. This list ist really great, you 
not only get answers very fast but you can even be informed about the 
backgrounds. Fantastic! The software support for expensive GIS Software is very 
often far away from that level.

 

My idea to the question of circular refs: objects in print composer, e. g. 
rectangles and triangles, must have some kind of information about their 
position relative to other objects on the same level. They know if they have to 
draw on top or below of others.

In styles dialog (outside print composer), the drawing order for streets, 
rivers and so on can be chosen by setting symbol levels.

 

Maybe one of those mechanisms can be used to teach a composer object from which 
other objects on the same hierarchy level it can read variables and from which 
not? Just an idea.

 

Mit freundlichen Grüßen,

 

Uwe Fischer

 

Von: Nyall Dawson [mailto:nyall.daw...@gmail.com] 
Gesendet: Donnerstag, 23. Juni 2016 23:24
An: Andreas Neumann <a.neum...@carto.net>
Cc: qgis-user <qgis-user@lists.osgeo.org>; Uwe Fischer <gisfi...@t-online.de>
Betreff: Re: [Qgis-user] Variables in print composer

 

On 23 Jun 2016 21:57, "Neumann, Andreas" <a.neum...@carto.net 
<mailto:a.neum...@carto.net> > wrote:
>
> Hi Uwe,
>
> All "map_xx" variables are only available on the map frame item itself (when 
> it is selected) - nowhere else. Items in print composer are on the same 
> hierarchy - so can't see each other's scope or variables in each scope. But 
> all items in a composition can see the "composition" variables because they 
> are one hierarchy above in the scope.
>
> That's a limitation you can't currently overcome. It would be nice to 
> cross-reference variables from other elements in the same hierarchy - but it 
> is not possible currently - at least I don't know how.

Andreas has summed it up perfectly. I originally had a function which allowed 
items to access variables from another composer item, but had to pull it out as 
it opened the risk of circular references (ie data defined position for an item 
which uses item position variable from another item, which in turn uses a 
variable from the first item). It's not trivial (or fun) to solve, but if 
sponsorship is available I could fix this.

Nyall

>
> Andreas
>
> On 2016-06-23 13:36, Uwe Fischer wrote:
>>
>> Martin,
>>
>>  
>>
>> thank you very much for your tip, but in the variables list no variables of 
>> type „map" show up (please see attachment). But in print composter they are 
>> present and visible.
>>
>>  
>>
>> Mit freundlichen Grüßen,
>>
>>  
>>
>> Uwe Fischer
>>
>>  
>>
>> Von: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org 
>> <mailto:qgis-user-boun...@lists.osgeo.org> ] Im Auftrag von Martin Stubbs
>> Gesendet: Donnerstag, 23. Juni 2016 12:46
>> An: qgis-user@lists.osgeo.org <mailto:qgis-user@lists.osgeo.org> 
>> Betreff: Re: [Qgis-user] Variables in print composer
>>
>>  
>>
>> On 23/06/16 08:30, Uwe Fischer wrote:
>>>
>>> Hello List,
>>>
>>>  
>>>
>>> what is the use of variables in print composer? A map frame has variables 
>>> assigned like map_extent_height and _width. But how to make use of those 
>>> variables? If I try to place a rectangle around the map frame using the 
>>> determined extent variables (plus something), I cannot use the variables. 
>>> There is a ‚data defined override' section in the Position and size dialog 
>>> for rectangles, but when I select ‚variable' it tells me that there are no 
>>> variables, which seems to be nonsense.
>>>
>>>  
>>>
>>>  
>>>
>>> Best regards, Uwe
>>>
>>>  
>>
>> Uwe,
>>
>> When you select a Data_defined_override in Position and size, pick edit from 
>> the list instead of variable. In the Expression string builder you will find 
>> map_extent_height in the Variables list.
>>
>> Regards
>> Martin
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org <mailto:Qgis-user@lists.osgeo.org> 
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>  
>
>  
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org <mailto:Qgis-user@lists.osgeo.org> 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to