I'm new to Backbone.js and i'm using it for a data visualization, as a school project. I've implemented require.js after some weeks of work, following this tutorial: http://backbonetutorials.com/organizing-backbone-using-modules/
I've reorganized my code then, but now i got an error that i'm not able to fix... I use Datamaps (http://datamaps.github.io/) to create a world map. I passed the needed scripts in the require define() function, but i'm probably doing something wrong.
Here is the code part which provide the error :
define([
'jquery',
'underscore',
'backbone',
'd3',
'c3',
'topojson',
'datamaps',
'jqueryui',
'text!templates/map.html'
], function($, _, Backbone, mapTemplate){
var MapView = Backbone.View.extend({
el: $('.container'),
initialize: function(){
var _this = this;
var map = new Datamap({ ... })
...
And the browser respond with "Uncaught ReferenceError: Datamap is not defined". It was working before, and since i use require, it doesn't work anymore, i've probably missed a param or something else.
I would appreciate some help on this ;)
Thank you in advance!
d3
->mapTemplate
) – source.rar