Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
GoogleMaps API with VueJS and Laravel integration

I want to integrate a map via GoogleMaps API in my Laravel app. Therefore I chose a setup like this:

HTML

(...)
<body>

    <div class="wrapper wrapper-content animated fadeInRight">
        <div id="app">    
        </div>
    </div>

  <script src="https://maps.googleapis.com/maps/api/js?key=[APIKEY]&libraries=places,geometry&callback=app.init" async defer></script>

</body>
(...)

Javascript VUE

window.Vue = Vue;
window.Event = new class {
    constructor() {
        this.Vue = new Vue();
    }

    fire(event, data = null) {
        this.Vue.$emit(event, data);
    }

    listen(event, callback) {
        this.Vue.$on(event, callback);
    }
};

window.app = new Vue({
    el: '#app',
    components: {
        GISView: GISView
    },
    data: {
    },
    methods: {
        init: function() {
            this.$broadcast('MapsApiLoaded');
        }
    }
});

When loading the page I find in the dev tools console the message: enter image description here

Why is the function app.init not found, as I have set it up in my VUE instance?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!