Hi, 2016-10-28 10:28 GMT+02:00 Alexandre Neto <[email protected]>:
> Not sure if this is the kind of stuff you were looking. > > https://gisunchained.wordpress.com/2014/09/09/coordenadas-dos-cantos-do- > mapa-em-qgis-map-corner-coordinates-in-qgis/ > > 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 Will give it a try. Thanks Alexandre > A qui, 27/10/2016, 20:08, Nyall Dawson <[email protected]> escreveu: > >> On 28 Oct 2016 1:51 AM, "DelazJ" <[email protected]> wrote: >> > >> > Hi all, >> > >> > Is that possible to create a label which displays the x and y >> coordinates of a selected map item in the composer. >> > 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. >> > >> > Any tip, please? >> >> It's not currently possible unless you write a python function to do this. >> >> Alexandre seems to have done it for me :) 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.... Harrissou > I've been pondering this week about allowing items to access the variables >> from another item but need to think this through more. >> >> My (current) use case: >> - working on a map of a train line which consists of three vertical >> panels covering different parts of the line >> - certain elements (like label buffers) in the map style use a >> @background_color variable to data define their color >> - 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 >> - I want to style things like North arrows to reuse the @background_color >> variable from the map item they are associated with. >> >> Nyall >> >> >> > >> > Thanks, >> > Harrissou >> > >> > _______________________________________________ >> > Qgis-user mailing list >> > [email protected] >> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user >> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user >> _______________________________________________ >> Qgis-user mailing list >> [email protected] >> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user >> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user > > -- > Alexandre Neto > --------------------- > @AlexNetoGeo > http://sigsemgrilhetas.wordpress.com > http://gisunchained.wordpress.com >
_______________________________________________ Qgis-user mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
