RequireJS and ArcGIS API for JS

10418
10
Jump to solution
05-13-2015 08:46 AM
EvelynHernandez
Occasional Contributor III

Hello,

Idk if im in the correct forum asking this , but idk where can i ask for people that it is just starting to change to js language.

I am following a basic requireJS tutorial that i found in this link​ and following the steps im trying to put in the require.config path the latest api.

("https://js.arcgis.com/3.13 ")

but idk how is the structure in the require to call all the functions that i need to use the examples showed in the samples website for arcgis for js.

Ex: Create a map | ArcGIS API for JavaScript

The thing is i dont want to put the require in the same webpage, so im using the structure how the attachment shows.

My html just have this in the head.

<script src="js/require.js" data-main="js/main"></script>

My main.js file is something like:

require.config({
  paths: {
    'esri': 'https://js.arcgis.com/3.13'
    
  }
});


require(['order!jquery','esri','esri/Map', "dojo/domReady!"], function ($, Map) {

});

What im doing wrong or missing?

Thanks for all ur help as always

0 Kudos
10 Replies
JeffJacobson
Occasional Contributor III

"I can't post a jsFiddle with external file resources..."

FYI, Plunker will let you do this.

0 Kudos