title: VueJS Mixins Methods
body: <p>I want to use a mixin within my VUEJS module:</p>
  
  <p><strong>Module</strong></p>
  
  <pre><code>&lt;script&gt;
      var GoogleMaps = require('../mixins/GoogleMaps');
  
      export default {
          mixins: [GoogleMaps],
          events: {
              MapsApiLoaded: function(data) {
                  GoogleMaps.initGISMap(data);
              }
          },
  }
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Mixin</strong></p>
  
  <pre><code>export default {
      methods: {
          initGISMap(selector) {
              map = new google.maps.Map(selector, {
                  zoom: 10,
                  mapTypeId: google.maps.MapTypeId.ROADMAP,
              });
  
              // Set initial Location and center map to this location
              initialLocation = new google.maps.LatLng(48.184845, 11.252553);
              map.setCenter(initialLocation);
  
              // Create a searchmarker
              searchMarker = createMarker();
  
              // Init Autocomplete for GIS
              initAutoComplete();
          }
      }
  }
  </code></pre>
  
  <p>But I get an error, that GoogleMaps.initGISMap is not a function. How do I use a method of a mixin within a component?</p>