POST
|
I am also in your situation and ended up including the entirety of the necessary JS API modules in my project. It's an awful solution. But it does work. In case that is also feasible for other people, here is the relevant section of my RequireJS config: requirejs.config({
paths: {
//arcgis libraries
'esri': '../Scripts/arcgis/esri',
'dojo': '../Scripts/arcgis/dojo',
'dojox': '../Scripts/arcgis/dojox',
'dijit': '../Scripts/arcgis/dijit',
'gismoment': '../Scripts/arcgis/moment',
'domReady': '../Scripts/arcgis/dojo/domReady'
},
map: {
//make all modules requiring moment use vanilla moment
'*': {
'moment': 'moment'
},
//except ArcGIS modules must use special version of moment for whatever reason
'esri': {
'moment': 'gismoment'
},
'dojo': {
'moment': 'gismoment'
},
'dojox': {
'moment': 'gismoment'
},
'dijit': {
'moment': 'gismoment'
}
}
});
Like Rene Rubalcava says, this only works with 3.x version of the library. I am currently in the process of trying to see if I can use a CDN version of the library, but it looks like RequireJS doesn't allow the mapping of URLs for directories (i.e., your CDN reference must point to an actual file, NOT a directory). So I am stuck with a massive Scripts library!
... View more
08-27-2018
02:21 PM
|
0
|
0
|
964
|
POST
|
Aha, it was an issue with CSS. I had updated my Javascript files but not the CSS. Thanks for responding so quickly!
... View more
10-31-2016
02:02 PM
|
1
|
0
|
516
|
POST
|
Hi Robert, I am able to reproduce my issue with the following code: define([
"dojo/parser", "dojo/ready", "dojo/dom",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane",
"esri/map", "esri/urlUtils", "esri/arcgis/utils",
"dojo/domReady!"
], function (
parser, ready, dom,
BorderContainer, ContentPane,
Map, urlUtils, arcgisUtils
) {
function drawMap() {
//render map
return ready(function () {
parser.parse();
arcgisUtils.arcgisUrl = myUrl;
return arcgisUtils.createMap(myWebMapId, "map");
});
}
drawMap();
}); Please let me know if I can provide any further information.
... View more
10-31-2016
01:16 PM
|
0
|
1
|
516
|
POST
|
Hi Jonathan, I'm experiencing the same problem. Did you happen to figure out how to fix it?
... View more
10-31-2016
12:51 PM
|
0
|
3
|
516
|
Title | Kudos | Posted |
---|---|---|
1 | 10-31-2016 02:02 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|