Callback function returning an undefined object inside vue component

I have a map object that is within the context of my vue component. When the map is ready I need to asynchronously load a script from a third-party library. I appended it in the head of my .html file, no problem. The issue arises when it tries to execute the callback function. It returns ‘AVUXI is undefined’ which should be in a global context but the map object being passed to it is within my component.

This is the script which I load from within my component when the map is initialized:

let sc = document.createElement('script'); = 'vxscript';
      sc.type = 'text/javascript';
      sc.async = 'async';
      sc.src = '{APIkey}/en?callback=avapil';

This is the callback function which is inside my component:

avapil() {
      AVUXI.MapStart('mymap', {APIkey});

I tried putting the callback function in the head of .html but apparently it will not work because my map is in my local component. What would be the best way to approach this?


92 thoughts on “Callback function returning an undefined object inside vue component”

  1. With havin so much written content do you ever run into any issues of plagorism or copyright infringement?
    My site has a lot of completely unique content I’ve either written myself or outsourced but it appears a lot of it is popping it up all over the web without my agreement.

    Do you know any methods to help protect against content from being ripped off?
    I’d definitely appreciate it.

  2. Pingback: cheap dapoxetine
  3. Pingback: sterapred 375 uses
  4. Pingback: generic stromectol
  5. Pingback: ivermectin generic
  6. Pingback: viagra otc

Leave a Comment