AnsweredAssumed Answered

RequireJS and ArcGIS API for JS

Question asked by endlessdsire on May 13, 2015
Latest reply on May 14, 2015 by jacobsj

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

Attachments

Outcomes