Getting Leaflet.Control.Layer.Tree 'children's' to collapse by default? The Next CEO of Stack...

Trouble understanding the speech of overseas colleagues

How to write papers efficiently when English isn't my first language?

What happens if you roll doubles 3 times then land on "Go to jail?"

Does the Brexit deal have to be agreed by both Houses?

Is it okay to store user locations?

Why does GHC infer a monomorphic type here, even with MonomorphismRestriction disabled?

What is the meaning of "rider"?

Customer Requests (Sometimes) Drive Me Bonkers!

How do we know the LHC results are robust?

How do scammers retract money, while you can’t?

Why did we only see the N-1 starfighters in one film?

What does "Its cash flow is deeply negative" mean?

Why here is plural "We went to the movies last night."

MAZDA 3 2006 (UK) - poor acceleration then takes off at 3250 revs

Should I tutor a student who I know has cheated on their homework?

declare as function pointer and initialize in the same line

Bulk API v2 Get Job Status Failing - InvalidBatch : Field name not found

Solution of this Diophantine Equation

'Given that' in a matrix

What can we do to stop prior company from asking us questions?

Is there a good way to store credentials outside of a password manager?

Is it a good idea to use COLUMN AS (left([Another_Column],(4)) instead of LEFT in the select?

If the heap is initialized for security, then why is the stack uninitialized?

What is the purpose of the Evocation wizard's Potent Cantrip feature?



Getting Leaflet.Control.Layer.Tree 'children's' to collapse by default?



The Next CEO of Stack OverflowHow do I overlay a KML on leaflet 0.4.4How to set up a layer control using Leaflet?Control to select data source on Leaflet mapHow to add WMS legend in leaflet from Geoserver?Leaflet v1 plugin: layer control for ungrouped, grouped, and nested-grouped layersOpenLayers 2.13.1 - edit and export GeoJSON property valuesLeaflet DomEvent.addListener - why doesn't 'click' work, but 'dblclick','mouseout','mouseover' do?Changing size of globe in Leaflet globe mini map?leaflet search control not showing up in geodjango appLeaflet into SharePoint












0















I am using the Leaflet layer.control.tree plugin from here : https://github.com/jjimenezshaw/Leaflet.Control.Layers.Tree



But I can't figure out how to collapse the branch by default. Now it looks like this: enter image description here



does anybody know how to close the branch by default?



I do not mean the whole layer control that collapses by default I mean the tap where it says '' Warrior ''










share|improve this question





























    0















    I am using the Leaflet layer.control.tree plugin from here : https://github.com/jjimenezshaw/Leaflet.Control.Layers.Tree



    But I can't figure out how to collapse the branch by default. Now it looks like this: enter image description here



    does anybody know how to close the branch by default?



    I do not mean the whole layer control that collapses by default I mean the tap where it says '' Warrior ''










    share|improve this question



























      0












      0








      0








      I am using the Leaflet layer.control.tree plugin from here : https://github.com/jjimenezshaw/Leaflet.Control.Layers.Tree



      But I can't figure out how to collapse the branch by default. Now it looks like this: enter image description here



      does anybody know how to close the branch by default?



      I do not mean the whole layer control that collapses by default I mean the tap where it says '' Warrior ''










      share|improve this question
















      I am using the Leaflet layer.control.tree plugin from here : https://github.com/jjimenezshaw/Leaflet.Control.Layers.Tree



      But I can't figure out how to collapse the branch by default. Now it looks like this: enter image description here



      does anybody know how to close the branch by default?



      I do not mean the whole layer control that collapses by default I mean the tap where it says '' Warrior ''







      leaflet






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 5 mins ago









      PolyGeo

      53.8k1781245




      53.8k1781245










      asked 10 hours ago









      Cas JulicherCas Julicher

      184




      184






















          1 Answer
          1






          active

          oldest

          votes


















          0














          For the branch you want to be initially collapsed, use collapsed: true option. This option is inherited from L.control.layers.



          You can see use of this option in Airports demo of Leaflet.Control.Layers.Tree plugin: https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/airports.html






          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%2f316989%2fgetting-leaflet-control-layer-tree-childrens-to-collapse-by-default%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









            0














            For the branch you want to be initially collapsed, use collapsed: true option. This option is inherited from L.control.layers.



            You can see use of this option in Airports demo of Leaflet.Control.Layers.Tree plugin: https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/airports.html






            share|improve this answer




























              0














              For the branch you want to be initially collapsed, use collapsed: true option. This option is inherited from L.control.layers.



              You can see use of this option in Airports demo of Leaflet.Control.Layers.Tree plugin: https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/airports.html






              share|improve this answer


























                0












                0








                0







                For the branch you want to be initially collapsed, use collapsed: true option. This option is inherited from L.control.layers.



                You can see use of this option in Airports demo of Leaflet.Control.Layers.Tree plugin: https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/airports.html






                share|improve this answer













                For the branch you want to be initially collapsed, use collapsed: true option. This option is inherited from L.control.layers.



                You can see use of this option in Airports demo of Leaflet.Control.Layers.Tree plugin: https://jjimenezshaw.github.io/Leaflet.Control.Layers.Tree/examples/airports.html







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 3 hours ago









                TomazicMTomazicM

                1,3701216




                1,3701216






























                    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%2f316989%2fgetting-leaflet-control-layer-tree-childrens-to-collapse-by-default%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

                    (145452) 2005 RN43 Классификация | Примечания | Ссылки |...

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

                    Энтрерриос (город) Содержание История | Географическое...