Extension Invalid Visualization error in Mashup on Qlik Server
Dear community,
I am developing a Mashup hosted on the Qlik Server. A very simple one, embedding Qlik visualisation in a html page. One of the visualisation uses Articque Map Extension.
The first version of the mashup had only three files :
index.html
index.css
index.js <--- where all the magic happens. This is where I connect to the app and retrieve the objects with app.getObject()
Everything was working fine.
Then I decided to refactor the code. The second version of the mashup has this organisation:
index.html
index.css
index.js <--- has prefix, config, require.config and qlik.openApp()
app/app.js <--- declare the modules header/selection and qlik/qselements
app/header/selection.js <--- has app.getList("SelectionObject")
app/qlik/qselements.js <--- has all the app.getObjects() commands
And this is where I don't understand what is happening. All but the Articque Map visualizations are displayed correctly. The console shows the following two errors:
Error: Mismatched anonymous define() module [...] -- linked to the app/app.js
TypeError: "e.getLayout is not a function" -- linked to the extensions/articquemap/articquemap.js
I've included app/app.js and index.js as attachements.
I feel my problem has to be with the app/app.js and how I declare context in index.js. However, I'm pretty new at Javascrip and I can't get to find the solution.