[Geomoose-users] PDF legend print in GM3

Christopher Hughes chughes at co.lincoln.or.us
Mon Nov 16 08:12:14 PST 2020


Hi Flavio,

Within that 'letter-landscape-legend' you referenced, there should be a
legend element that specifies where the legend appears (as well
as a legend title and a box around the legend):

        {
            type: 'text',
            x: 7.6, y: .9,
            text: 'Legend',
        },
        {
            type: 'legend',
            x: 7.61, y: 1.0
        },
        {
            type: 'rect',
            x: 7.6, y: .75,
            width: 2.4,
            height: 7,
            strokeWidth: .01,
         }

You also need to make sure that you're telling it to use custom layouts in
the print preview variable (if you haven't already). You can
try making minor adjustments other than the legend to make sure your custom
layout is being used. I've also found it's easier to copy
the entire example and implement that before making my customizations.

 var print_preview = app.add(gm3.components.PrintModal, 'print-preview', {
   layouts: custom_layouts
 });


Hope that helps,

Chris

On Mon, Nov 16, 2020 at 1:43 AM flavio rigolon <flavio.rigolon at gmail.com>
wrote:

> Hi all,
>  following the custom layout how to [1] I'm trying to insert a legend
> to the print layout ("letter-landscape-legend" layout) but no legend
> appears in the generated PDF page.
> The how to page explains the various elements in a custom layout
> (text, map, rect, ellipse, image,..) but no notion refers to "legend".
> Are there any other documents or pages I can look for?
>
> thank in advance for any suggestion
> flavio
>
> [1] https://geomoose.github.io/gm3/howto/print-layouts.html
>
> --
> /"\  ASCII Ribbon Campaign
> \ /  Respect for low technology.
>  X  Keep e-mail messages readable by any computer system.
> / \  Keep it ASCII.
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users



-- 
Chris Hughes

GIS Analyst
Lincoln County Surveyor Department
880 NE 7th St. l Newport, OR 97365
Tel: (541) 574 1283
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20201116/9408ec9e/attachment.html>


More information about the Geomoose-users mailing list