I am using ArcGIS 3.5 Javascript API and RequireJS
I implemented it using this code:
<script>
var map;
require(["esri/map", "dojo/domReady!"], function(Map) {
map = new Map("mapDiv", {
center: [-96.571541, 39.155622],
zoom: 3,
basemap: "streets"
});
});
});
</script>
with this RequireJS Configuration :
requirejs.config({
baseUrl: "js/",
paths: {
underscore: 'libs/underscore',
tpl: 'tpl',
backbone: 'libs/backbone',
text: 'libs/text',
domReady: 'libs/domReady'
},
packages: [
{
name: 'dojo',
location: "http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/js/dojo/dojo/"
},
{
name: 'dojox',
location: "http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/js/dojo/dojox"
},
{
name: 'dijit',
location: "http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/js/dojo/dijit"
},
{
name: 'esri',
location: "http://serverapi.arcgisonline.com/jsapi/arcgis/3.5compact/js/esri"
}
],
shim: {
'backbone': {
//These script dependencies should be loaded before loading backbone.js
deps: ['underscore'],
//Once loaded, use the global 'Backbone' as the module value.
exports: 'Backbone'
},
'underscore': {
exports: '_'
}
}
});
And It displays the following error:
I have this error
**Uncaught TypeError: Object function (){} has no method 'add' has.js:8
Uncaught Error: Load timeout for modules: dojo/domReady!_unnormalized2,dojo/has!dom-addeventlistener?:./aspect_unnormalized3,dojo/i18n!dojo/cldr/nls/number_unnormalized4,dojo/i18n!dojo/cldr/nls/gregorian_unnormalized5,dojo/i18n!esri/nls/jsapi_unnormalized6,dojox/gfx/renderer!_unnormalized7,dojo/selector/_loader!default_unnormalized8,dojo/has!host-browser?dom-addeventlistener?:../on:_unnormalized9**
Does any one have an explanation, or an idea about how to solve it?