Map not displaying using ArcGIS API 4.3 with requireJS

767
1
06-01-2017 11:28 AM
TylerLawson
New Contributor III

Currently, I am trying to get a simple map to display in an application that uses requireJS. I have read in multiple places that the DOJO AMD loader that is built into the ArcGIS API conflicts with the requireJS and that the best way to work around this is to rely on requireJS to handle loading using a path structure to reference the API. I am using a locally hosted version of the API and referencing it using paths in a require.config.

This allows my application to reference the API and it seems to be loading the modules successfully (The containing divs are populated with the controls and the view.then(success) function activates), but when the map is loaded, it does not display anything. Using the same code in a simple HTML page works correctly, with the map loading and successfully displaying, so I think that the problem might be something to do with requireJS/Dojo compatability. There are also no errors thrown when loading it in a browser.

Any help with this issue would be greatly appreciated.

Paths statement:

Controls:

Result (Area in blue box is the loaded map control) :

Tags (1)
0 Kudos
1 Reply
TylerLawson
New Contributor III

Update: For some reason, adding a BaseMapGallery to the view got the map to display correctly. However when I try to add some modules to the define/require statement (i.e FeatureLayer) I get a 404 error regarding loading the moment.js. 

0 Kudos