[Qgis-user] Map Scale text in composer

Randal Hale rjhale at northrivergeographic.com
Wed Oct 12 07:52:09 PDT 2016


I tried almost the same thing and received a 0 also - so I thought I was 
doing it wrong. Yippee for repeatable discoveries that may or may not be 
an error.


On 10/12/2016 10:42 AM, Carlos Cerdán wrote:
>
> Hi Randal:
>
>
> The label expression:
>
>
> [% '1 inch to ' || (to_int( $scale )/12) || ' Feet'%]
>
>
> must work... but I got "1 inch to 0 Feet".  $scale help says: "This 
> function is only available in some contexts and will be 0 otherwise". 
> .... Which contexts?
>
> Developers, please light us.
>
>
> Carlos Cerdán
>
>
>
> 2016-10-12 8:52 GMT-05:00 Randal Hale <rjhale at northrivergeographic.com 
> <mailto:rjhale at northrivergeographic.com>>:
>
>     I've had this question come up several times and I've done some
>     digging but can't find an answer.
>
>     In map composer I can set my scale (Feet) to 1:7920 which is 1
>     inch to 660 Feet.
>
>       * I can display a scale bar.
>       * I can display scale text (1:7920)
>
>     Can I display  "1 inch to 660 Feet"  through use of an expression?
>     I've been manually typing it in and sometimes I'll change map
>     scale and forget to change the typed scale.
>
>     Randy
>
>
>     -- 
>     -----------------
>     Randal Hale
>     North River Geographic Systems, Inc
>     http://www.northrivergeographic.com
>     <http://www.northrivergeographic.com>
>     423.653.3611rjhale at northrivergeographic.com
>     <mailto:rjhale at northrivergeographic.com>
>     twitter:rjhale
>
>     _______________________________________________ Qgis-user mailing
>     list Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
>     List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>     <http://lists.osgeo.org/mailman/listinfo/qgis-user> Unsubscribe:
>     http://lists.osgeo.org/mailman/listinfo/qgis-user
>     <http://lists.osgeo.org/mailman/listinfo/qgis-user> 
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
-- 
-----------------
Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjhale at northrivergeographic.com
twitter:rjhale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20161012/23c4c233/attachment.html>


More information about the Qgis-user mailing list