[GeoMoose-users] Print Layouts

Anton Postl anton.postl at zwinz.co.at
Sun Mar 5 23:59:11 PST 2023


thanks for the reply, this is how it worked in the old version



my code in the app.js looks like this:



var custom_layouts = [

  {

    label: 'A4 Quer',

    orientation: 'landscape',

    page: 'a4',

    units: 'mm',

    elements: [

        {

            type: 'text',

            size: 15, fontStyle: 'bold',

            x: 10, y: 12, text: '{{title}}'

        },

        {

            type: 'map',

            x: 10, y: 15,

            width: 280, height: 185

        },

        {

            type: 'text',

                                               size: 8,

            x: 10, y: 205, text: 'gedruckt am {{day}}.{{month}}.{{year}}'

        }

    ]

  }

];





var print_preview = app.add(gm3.components.PrintModal, 'print-preview', {

layouts: custom_layouts

});





Thank you



Von: Christopher Hughes <chughes at co.lincoln.or.us>
Gesendet: Freitag, 3. März 2023 17:23
An: Anton Postl <anton.postl at zwinz.co.at>
Betreff: Re: Print Layouts

P {margin-top:0;margin-bo=tom:0;}
My assumption is that the label/orientation/page in your print template nee=s to match the format in the language json file here=/a> (or whichever language your site uses). I believe this change happened so that=eoMoose can more easily be translated into other languages.<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>


<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
So for example if you're trying to create/modify an 11x17 portrait layout t=e label would have to be tabloid-portrait, the orientation would have to b= portrait, and the page would have to be tabloid. If you're trying to =create a new template that's not in the language json files you probably would have to add them to the json fi=es and rebuild the application. You also need to make sure that you're dir=cting GeoMoose to use your custom layouts like this (I'm not sure if the w=y of doing that has change between 3.6 and 3.10):<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>


<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
var print_preview = app.add(gm3.components.PrintModal, 'print-preview', { <https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
   layouts: custom_layouts<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
 });

<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>


<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
If that doesn't help, sharing your print code in your app.js (including tem=lates) might help debug what's going on.<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>


<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
Chris<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>


<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>


<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
=-

<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
Chris Hughes <https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>


<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
GIS Analyst<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
Lincoln County=IS Department <https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
880 NE 7th St. l Newport, OR 97365<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
Tel: (541) 574=283<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>


<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
________________________________
From: GeoMoose-users on behalf of Anton Postl
Sent: Friday, March 3, 2023 12:57 AM
To: geomoose-users at lists.osgeo.org
Subject: [GeoMoose-users] Print Layouts <https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>
 <https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>

Hello,<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>

 <https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>

I'm trying to define my own print layout.<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>

according to the instructions:<https://gi=hub.com/geomoose/gm3/blob/main/src/gm3/lang/en.json>

https://docs.geomoose.org/3.x/howto/print-layouts.html=/a><https://cas5-0-urlprotect.trendmicro.co=:443/wis/clicktime/v1/query?url=https%3a%2f%2fdocs.geomoose.org%2f3.x%2f=owto%2fprint%2dlayouts.html&umid=c51612d1-b9a3-11ed-8159-6045bd03860=&auth=dc2ed28abfc38f9dccdc580b0625a9783b471d36-3ae64ebc1903a230e5261=d8919b6b12ee162144>

 <https://cas5-0-urlprotect.trendmicro.co=:443/wis/clicktime/v1/query?url=https%3a%2f%2fdocs.geomoose.org%2f3.x%2f=owto%2fprint%2dlayouts.html&umid=c51612d1-b9a3-11ed-8159-6045bd03860=&auth=dc2ed28abfc38f9dccdc580b0625a9783b471d36-3ae64ebc1903a230e5261=d8919b6b12ee162144>

in version 3.6.1 it worked without any problems. <https://cas5-0-urlprotect.trendmicro.co=:443/wis/clicktime/v1/query?url=https%3a%2f%2fdocs.geomoose.org%2f3.x%2f=owto%2fprint%2dlayouts.html&umid=c51612d1-b9a3-11ed-8159-6045bd03860=&auth=dc2ed28abfc38f9dccdc580b0625a9783b471d36-3ae64ebc1903a230e5261=d8919b6b12ee162144>

under 3.10.1 only the default layouts are displaye=, is there anything else to define?<https://cas5-0-urlprotect.trendmicro.co=:443/wis/clicktime/v1/query?url=https%3a%2f%2fdocs.geomoose.org%2f3.x%2f=owto%2fprint%2dlayouts.html&umid=c51612d1-b9a3-11ed-8159-6045bd03860=&auth=dc2ed28abfc38f9dccdc580b0625a9783b471d36-3ae64ebc1903a230e5261=d8919b6b12ee162144>

 <https://cas5-0-urlprotect.trendmicro.co=:443/wis/clicktime/v1/query?url=https%3a%2f%2fdocs.geomoose.org%2f3.x%2f=owto%2fprint%2dlayouts.html&umid=c51612d1-b9a3-11ed-8159-6045bd03860=&auth=dc2ed28abfc38f9dccdc580b0625a9783b471d36-3ae64ebc1903a230e5261=d8919b6b12ee162144>

Thank you<https://cas5-0-urlprotect.trendmicro.co=:443/wis/clicktime/v1/query?url=https%3a%2f%2fdocs.geomoose.org%2f3.x%2f=owto%2fprint%2dlayouts.html&umid=c51612d1-b9a3-11ed-8159-6045bd03860=&auth=dc2ed28abfc38f9dccdc580b0625a9783b471d36-3ae64ebc1903a230e5261=d8919b6b12ee162144>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20230306/8d683bab/attachment.htm>


More information about the GeoMoose-users mailing list