Display credit in map composer?Automating citation of data source in QGIS print composer?Exported PDF...

What would be some possible ways of escaping higher gravity planets?

Why write a book when there's a movie in my head?

Solving the linear first order differential equation?

Buying a "Used" Router

Performance and power usage for Raspberry Pi in the Stratosphere

What are some ways of extending a description of a scenery?

Modern Algebraic Geometry and Analytic Number Theory

Count repetitions of an array

Why does a single AND gate need 60 transistors?

smartctl reports overall health test as passed but the tests failed?

Even as admin, I cannot edit DefaultFonts.plist for Notes.app. What am I doing wrong?

Promise.all returning empty objects

Does red noise even at low values mean a hardware problem with my camera's sensor?

Dealing with an internal ScriptKiddie

Maybe pigeonhole problem?

Is Screenshot Time-tracking Common?

Calculating the strength of an ionic bond that contains poly-atomic ions

Why do neural networks need so many examples to perform?

Was Opportunity's last message to Earth "My battery is low and it's getting dark"?

Coworker asking me to not bring cakes due to self control issue. What should I do?

Can I travel from country A to country B to country C without going back to country A?

How do I fight with Heavy Armor as a Wizard with Tenser's Transformation?

Is it recommended to be 100% delegated for a baker?

How would an EMP effect spacesuits (and small-arms weapons)?



Display credit in map composer?


Automating citation of data source in QGIS print composer?Exported PDF resulting in misaligned Bing Aerial and vector layer using QGIS?How to display multiple attributes in a QGIS Composer legend?QGIS Map Composer has wrong coordinatesDraw Coordinates problem in QGIS map composerQGIS Composer Map Frame BlankAutomatic map rotation in map composer QGISHow to display inches in the Print Composer margin guideQGIS showing decimal degree coordinates in map/layout composer displayMap orientation in print composer in QGISHow to update map canvas in QGIS 3.4 Print Composer













0















I am trying to publish maps from QGIS Map Composer.



I would like to automatically add the credits of the background layers displayed in the composition (like OSM, Bing, ...)



I am aware of such a feature in main QGIS window using
View -> Decorations -> Copyright label but




  • this data is not shown in composer

  • I am looking for an expression to adapt the text depending of the active layer


(Currently using either qgis 2.18 or 3.4)










share|improve this question





























    0















    I am trying to publish maps from QGIS Map Composer.



    I would like to automatically add the credits of the background layers displayed in the composition (like OSM, Bing, ...)



    I am aware of such a feature in main QGIS window using
    View -> Decorations -> Copyright label but




    • this data is not shown in composer

    • I am looking for an expression to adapt the text depending of the active layer


    (Currently using either qgis 2.18 or 3.4)










    share|improve this question



























      0












      0








      0








      I am trying to publish maps from QGIS Map Composer.



      I would like to automatically add the credits of the background layers displayed in the composition (like OSM, Bing, ...)



      I am aware of such a feature in main QGIS window using
      View -> Decorations -> Copyright label but




      • this data is not shown in composer

      • I am looking for an expression to adapt the text depending of the active layer


      (Currently using either qgis 2.18 or 3.4)










      share|improve this question
















      I am trying to publish maps from QGIS Map Composer.



      I would like to automatically add the credits of the background layers displayed in the composition (like OSM, Bing, ...)



      I am aware of such a feature in main QGIS window using
      View -> Decorations -> Copyright label but




      • this data is not shown in composer

      • I am looking for an expression to adapt the text depending of the active layer


      (Currently using either qgis 2.18 or 3.4)







      qgis print-composer qgis-print-layouts






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 8 mins ago









      underdark

      68.3k13177342




      68.3k13177342










      asked 3 hours ago









      kFlykFly

      3081314




      3081314






















          1 Answer
          1






          active

          oldest

          votes


















          1














          One answer to your question can be a union of the great answers (in fact, your question is almost a duplicate) of this one: Automating citation of data source in QGIS print composer?




          • Add a new text label to the layout.


          • In the item properties of the label, main properties, click on Insert an Expression.


          • In the expression builder, switch to the Function Editor tab, and paste this code:



          # Be sure to import iface from qgis.utils

          from qgis.core import *
          from qgis.gui import *
          from qgis.utils import iface

          @qgsfunction(args='auto', group='Custom')
          def get_layer_name(feature, parent):
          return qgis.utils.iface.activeLayer().name()


          Its define a new get_layer_name() function that returns the name of the active layer and can be found under the Custom group of the expressions list.




          • Click on Save and Load Function.


          • Switch to the Expression tab and write this expression:



          layer_property( get_layer_name(), 'attribution')



          It returns the Attribution metadata of the active layer.



          Don't forget to refresh the layout view when the active layer has changed.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "79"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313384%2fdisplay-credit-in-map-composer%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            One answer to your question can be a union of the great answers (in fact, your question is almost a duplicate) of this one: Automating citation of data source in QGIS print composer?




            • Add a new text label to the layout.


            • In the item properties of the label, main properties, click on Insert an Expression.


            • In the expression builder, switch to the Function Editor tab, and paste this code:



            # Be sure to import iface from qgis.utils

            from qgis.core import *
            from qgis.gui import *
            from qgis.utils import iface

            @qgsfunction(args='auto', group='Custom')
            def get_layer_name(feature, parent):
            return qgis.utils.iface.activeLayer().name()


            Its define a new get_layer_name() function that returns the name of the active layer and can be found under the Custom group of the expressions list.




            • Click on Save and Load Function.


            • Switch to the Expression tab and write this expression:



            layer_property( get_layer_name(), 'attribution')



            It returns the Attribution metadata of the active layer.



            Don't forget to refresh the layout view when the active layer has changed.






            share|improve this answer






























              1














              One answer to your question can be a union of the great answers (in fact, your question is almost a duplicate) of this one: Automating citation of data source in QGIS print composer?




              • Add a new text label to the layout.


              • In the item properties of the label, main properties, click on Insert an Expression.


              • In the expression builder, switch to the Function Editor tab, and paste this code:



              # Be sure to import iface from qgis.utils

              from qgis.core import *
              from qgis.gui import *
              from qgis.utils import iface

              @qgsfunction(args='auto', group='Custom')
              def get_layer_name(feature, parent):
              return qgis.utils.iface.activeLayer().name()


              Its define a new get_layer_name() function that returns the name of the active layer and can be found under the Custom group of the expressions list.




              • Click on Save and Load Function.


              • Switch to the Expression tab and write this expression:



              layer_property( get_layer_name(), 'attribution')



              It returns the Attribution metadata of the active layer.



              Don't forget to refresh the layout view when the active layer has changed.






              share|improve this answer




























                1












                1








                1







                One answer to your question can be a union of the great answers (in fact, your question is almost a duplicate) of this one: Automating citation of data source in QGIS print composer?




                • Add a new text label to the layout.


                • In the item properties of the label, main properties, click on Insert an Expression.


                • In the expression builder, switch to the Function Editor tab, and paste this code:



                # Be sure to import iface from qgis.utils

                from qgis.core import *
                from qgis.gui import *
                from qgis.utils import iface

                @qgsfunction(args='auto', group='Custom')
                def get_layer_name(feature, parent):
                return qgis.utils.iface.activeLayer().name()


                Its define a new get_layer_name() function that returns the name of the active layer and can be found under the Custom group of the expressions list.




                • Click on Save and Load Function.


                • Switch to the Expression tab and write this expression:



                layer_property( get_layer_name(), 'attribution')



                It returns the Attribution metadata of the active layer.



                Don't forget to refresh the layout view when the active layer has changed.






                share|improve this answer















                One answer to your question can be a union of the great answers (in fact, your question is almost a duplicate) of this one: Automating citation of data source in QGIS print composer?




                • Add a new text label to the layout.


                • In the item properties of the label, main properties, click on Insert an Expression.


                • In the expression builder, switch to the Function Editor tab, and paste this code:



                # Be sure to import iface from qgis.utils

                from qgis.core import *
                from qgis.gui import *
                from qgis.utils import iface

                @qgsfunction(args='auto', group='Custom')
                def get_layer_name(feature, parent):
                return qgis.utils.iface.activeLayer().name()


                Its define a new get_layer_name() function that returns the name of the active layer and can be found under the Custom group of the expressions list.




                • Click on Save and Load Function.


                • Switch to the Expression tab and write this expression:



                layer_property( get_layer_name(), 'attribution')



                It returns the Attribution metadata of the active layer.



                Don't forget to refresh the layout view when the active layer has changed.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 26 mins ago

























                answered 32 mins ago









                Gabriel De LucaGabriel De Luca

                2,753215




                2,753215






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313384%2fdisplay-credit-in-map-composer%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Щит и меч (фильм) Содержание Названия серий | Сюжет |...

                    Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

                    Meter-Bus Содержание Параметры шины | Стандартизация |...