How can I use leaflet over vue+webpack inside a component?How to use Leaflet marker clustering with image map...

Is layered encryption more secure than long passwords?

How many copper coins fit inside a cubic foot?

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

Did the characters in Moving Pictures not know about cameras like Twoflower's?

How can I portray body horror and still be sensitive to people with disabilities?

STM32 PWM problem

Does the Resurrection spell consume material components if the target isn’t willing to be resurrected?

How do I split ammo?

Why is the meaning of kanji 閑 "leisure"?

Why is Shelob considered evil?

How do I know my password or backup information is not being shared when creating a new wallet?

Aligning Systems of Equations

A cancellation property for permutations

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

Smallest possible mole

TikZtree with asymmetric siblings

What is the difference between crontab -e and nano /etc/crontab?

What does "don't have a baby" imply or mean in this sentence?

What is the reason behind this musical reference to Pinocchio in the Close Encounters main theme?

Can a planet be tidally unlocked?

Translation for threshold (figuratively)

Are there any spells or magic items that allow for making of ‘logic gates or wires’?

Cryptic cross... with words

Can I legally make a website about boycotting a certain company?



How can I use leaflet over vue+webpack inside a component?


How to use Leaflet marker clustering with image map only?Leaflet: How do you use removeLayer?OpenLayers3 with google map local tiles serverLeaflet: Capturing points for features inside circleHow to access array inside of Leaflet LayerControl?Binding angularjs inside leaflet path messageGenerate pattern inside polygon in LeafletGet the point coordinates of images of an interactive web map?Use of leaflet to display raster layers in djangoleaflet search control not showing up in geodjango app













3















I am making a vue project and I want to use leaflet inside of my components.



import L from 'leaflet';

export default {
created() {
L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom
},
};


html:



<template lang="html">
<div class="row">
<div>
<h1> Hello </h1>
</div>
<div id="map">

</div>
</div>
</template>


But I get the error Map container not found?










share|improve this question

























  • You can find an example on: github.com/vicmars5/skycatch-challenge/blob/master/src/…. It works fine for me.

    – Víctor Agustin Díaz
    Apr 11 '17 at 4:32













  • mounted() { L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom }

    – Anton
    Nov 8 '17 at 14:53
















3















I am making a vue project and I want to use leaflet inside of my components.



import L from 'leaflet';

export default {
created() {
L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom
},
};


html:



<template lang="html">
<div class="row">
<div>
<h1> Hello </h1>
</div>
<div id="map">

</div>
</div>
</template>


But I get the error Map container not found?










share|improve this question

























  • You can find an example on: github.com/vicmars5/skycatch-challenge/blob/master/src/…. It works fine for me.

    – Víctor Agustin Díaz
    Apr 11 '17 at 4:32













  • mounted() { L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom }

    – Anton
    Nov 8 '17 at 14:53














3












3








3


0






I am making a vue project and I want to use leaflet inside of my components.



import L from 'leaflet';

export default {
created() {
L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom
},
};


html:



<template lang="html">
<div class="row">
<div>
<h1> Hello </h1>
</div>
<div id="map">

</div>
</div>
</template>


But I get the error Map container not found?










share|improve this question
















I am making a vue project and I want to use leaflet inside of my components.



import L from 'leaflet';

export default {
created() {
L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom
},
};


html:



<template lang="html">
<div class="row">
<div>
<h1> Hello </h1>
</div>
<div id="map">

</div>
</div>
</template>


But I get the error Map container not found?







javascript leaflet






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 1 '17 at 18:15









Martin Hügi

2,3042937




2,3042937










asked Apr 1 '17 at 17:33









Víctor Agustin DíazVíctor Agustin Díaz

1613




1613













  • You can find an example on: github.com/vicmars5/skycatch-challenge/blob/master/src/…. It works fine for me.

    – Víctor Agustin Díaz
    Apr 11 '17 at 4:32













  • mounted() { L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom }

    – Anton
    Nov 8 '17 at 14:53



















  • You can find an example on: github.com/vicmars5/skycatch-challenge/blob/master/src/…. It works fine for me.

    – Víctor Agustin Díaz
    Apr 11 '17 at 4:32













  • mounted() { L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom }

    – Anton
    Nov 8 '17 at 14:53

















You can find an example on: github.com/vicmars5/skycatch-challenge/blob/master/src/…. It works fine for me.

– Víctor Agustin Díaz
Apr 11 '17 at 4:32







You can find an example on: github.com/vicmars5/skycatch-challenge/blob/master/src/…. It works fine for me.

– Víctor Agustin Díaz
Apr 11 '17 at 4:32















mounted() { L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom }

– Anton
Nov 8 '17 at 14:53





mounted() { L.map('map').setView([33.4501001, -101.9107704], 4); // Coordinates, Zoom }

– Anton
Nov 8 '17 at 14:53










1 Answer
1






active

oldest

votes


















0














[vue2-leaflet](https://www.npmjs.com/package/vue2-leaflet
) provides Vue2 leaflet components so you can do things like <l-map ...><l-tile-layer ...>...</l-tile-layer></l-map>.



Here's the GitHub Repo.






share|improve this answer








New contributor




A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    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%2f234391%2fhow-can-i-use-leaflet-over-vuewebpack-inside-a-component%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














    [vue2-leaflet](https://www.npmjs.com/package/vue2-leaflet
    ) provides Vue2 leaflet components so you can do things like <l-map ...><l-tile-layer ...>...</l-tile-layer></l-map>.



    Here's the GitHub Repo.






    share|improve this answer








    New contributor




    A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      [vue2-leaflet](https://www.npmjs.com/package/vue2-leaflet
      ) provides Vue2 leaflet components so you can do things like <l-map ...><l-tile-layer ...>...</l-tile-layer></l-map>.



      Here's the GitHub Repo.






      share|improve this answer








      New contributor




      A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        [vue2-leaflet](https://www.npmjs.com/package/vue2-leaflet
        ) provides Vue2 leaflet components so you can do things like <l-map ...><l-tile-layer ...>...</l-tile-layer></l-map>.



        Here's the GitHub Repo.






        share|improve this answer








        New contributor




        A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        [vue2-leaflet](https://www.npmjs.com/package/vue2-leaflet
        ) provides Vue2 leaflet components so you can do things like <l-map ...><l-tile-layer ...>...</l-tile-layer></l-map>.



        Here's the GitHub Repo.







        share|improve this answer








        New contributor




        A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 34 mins ago









        A LeeA Lee

        1012




        1012




        New contributor




        A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        A Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            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%2f234391%2fhow-can-i-use-leaflet-over-vuewebpack-inside-a-component%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 Классификация | Примечания | Ссылки |...

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

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