<div dir="ltr">Hi,<br><div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-28 10:28 GMT+02:00 Alexandre Neto <span dir="ltr"><<a href="mailto:senhor.neto@gmail.com" target="_blank">senhor.neto@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">Not sure if this is the kind of stuff you were looking.</p>
<p dir="ltr"><a href="https://gisunchained.wordpress.com/2014/09/09/coordenadas-dos-cantos-do-mapa-em-qgis-map-corner-coordinates-in-qgis/" target="_blank">https://gisunchained.<wbr>wordpress.com/2014/09/09/<wbr>coordenadas-dos-cantos-do-<wbr>mapa-em-qgis-map-corner-<wbr>coordinates-in-qgis/</a><br>
</p><div class="gmail-HOEnZb"><div class="gmail-h5">
<br></div></div></blockquote><div>I knew I've read something about that in the past but didn't recall where. And as soon as I found the map_extent_center variable, I focused all my tests on it<br></div><div>Will give it a try. Thanks Alexandre<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><div class="gmail_quote"><div dir="ltr">A qui, 27/10/2016, 20:08, Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com" target="_blank">nyall.dawson@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg"></p>
<p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg">On 28 Oct 2016 1:51 AM, "DelazJ" <<a href="mailto:delazj@gmail.com" class="gmail-m_-7433226267006851510gmail_msg" target="_blank">delazj@gmail.com</a>> wrote:<br class="gmail-m_-7433226267006851510gmail_msg">
><br class="gmail-m_-7433226267006851510gmail_msg">
> Hi all,<br class="gmail-m_-7433226267006851510gmail_msg">
><br class="gmail-m_-7433226267006851510gmail_msg">
> Is that possible to create a label which displays the x and y coordinates of a selected map item in the composer.<br class="gmail-m_-7433226267006851510gmail_msg">
> I suspect x(@map_extent_center) to do the trick but I'm unable to find how to call the map_extent_center variable in a label item as it's stuck to the map item afaics.<br class="gmail-m_-7433226267006851510gmail_msg">
><br class="gmail-m_-7433226267006851510gmail_msg">
> Any tip, please?</p>
<p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg">It's not currently possible unless you write a python function to do this.</p>
<p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg"></p></blockquote></div></div></div></blockquote><div>Alexandre seems to have done it for me :)<br></div><div>What about extending the var function to take also the context of the 
variable? If it's only one parameter then according to where it's called
 it retrieves the good variable and with two parameters it looks for the
 variable within the passed context, which can be id of a layer, a composer item....<br><br></div><div>Harrissou<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg">I've been pondering this week about allowing items to access the variables from another item but need to think this through more.</p>
<p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg">My (current) use case:<br class="gmail-m_-7433226267006851510gmail_msg">
- working on a map of a train line which consists of three vertical panels covering different parts of the line<br class="gmail-m_-7433226267006851510gmail_msg">
- certain elements (like label buffers) in the map style use a @background_color variable to data define their color<br class="gmail-m_-7433226267006851510gmail_msg">
- each map item in the composition has its own @background_color variable set so that this color represents a good background color for the visible content within that panel<br class="gmail-m_-7433226267006851510gmail_msg">
- I want to style things like North arrows to reuse the @background_color variable from the map item they are associated with.</p>
<p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg"></p><p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg">Nyall</p><p dir="ltr" class="gmail-m_-7433226267006851510gmail_msg"><br class="gmail-m_-7433226267006851510gmail_msg">
><br class="gmail-m_-7433226267006851510gmail_msg">
> Thanks,<br class="gmail-m_-7433226267006851510gmail_msg">
> Harrissou<br class="gmail-m_-7433226267006851510gmail_msg">
><br class="gmail-m_-7433226267006851510gmail_msg">
> ______________________________<wbr>_________________<br class="gmail-m_-7433226267006851510gmail_msg">
> Qgis-user mailing list<br class="gmail-m_-7433226267006851510gmail_msg">
> <a href="mailto:Qgis-user@lists.osgeo.org" class="gmail-m_-7433226267006851510gmail_msg" target="_blank">Qgis-user@lists.osgeo.org</a><br class="gmail-m_-7433226267006851510gmail_msg">
> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" class="gmail-m_-7433226267006851510gmail_msg" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br class="gmail-m_-7433226267006851510gmail_msg">
> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" class="gmail-m_-7433226267006851510gmail_msg" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br class="gmail-m_-7433226267006851510gmail_msg"></p>
______________________________<wbr>_________________<br class="gmail-m_-7433226267006851510gmail_msg">
Qgis-user mailing list<br class="gmail-m_-7433226267006851510gmail_msg">
<a href="mailto:Qgis-user@lists.osgeo.org" class="gmail-m_-7433226267006851510gmail_msg" target="_blank">Qgis-user@lists.osgeo.org</a><br class="gmail-m_-7433226267006851510gmail_msg">
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" class="gmail-m_-7433226267006851510gmail_msg" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br class="gmail-m_-7433226267006851510gmail_msg">
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" class="gmail-m_-7433226267006851510gmail_msg" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a></blockquote></div></div></div><span class="gmail-HOEnZb"><font color="#888888"><div dir="ltr">-- <br></div><div><div dir="ltr"><div>Alexandre Neto</div><div>---------------------</div><div>@AlexNetoGeo</div><div><a href="http://sigsemgrilhetas.wordpress.com" target="_blank">http://sigsemgrilhetas.<wbr>wordpress.com</a></div><a href="http://gisunchained.wordpress.com" target="_blank">http://gisunchained.wordpress.<wbr>com</a><br></div></div>
</font></span></blockquote></div><br></div></div></div>