I am working through the Install directions for JavaScript API version 2.7.
All of my 2.7 API files are in the wwwroot\arcgis_js_api\library folder.
Looking at the 2.7\jsapi\js\esri\esri.js file you are told to search and replace the "[HOSTNAME_AND_PATH_JSAPI]" with your information: "http://myserver/arcgis_js_api/library/2.7/jsapi/".
However, there are no mentions of "[HOSTNAME_AND_PATH_JSAPI]" in this particular file. Nor are there any mentions of this text inside the other files you are to work with.
Has anyone got this working? If so which version worked for you?
Thanks..
dojo.registerModulePath("dojo", (location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "[HOSTNAME_AND_PATH_TO_JSAPI]js/dojo/dojo"); dojo.registerModulePath("dijit", (location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "[HOSTNAME_AND_PATH_TO_JSAPI]js/dojo/dijit"); dojo.registerModulePath("dojox", (location.protocol === 'file:' ? 'http:' : location.protocol) + '//' + "[HOSTNAME_AND_PATH_TO_JSAPI]js/dojo/dojox");
Went back this morning, and looked again for the notations inside the 2.7 files:
esri.js
dojo.xd.js
dojo.x.djs.uncompressed.js
There were no places for replacement in two of the files.
I downloaded the 2.8 api/sdk files and have gotten through the textual replaces outlinned in steps 1-22 in the supplied install.htm document.
Inside step 23 of the install doc you are instructed to browse to the following url.
http://<myserver>/arcgis/_js_api/library/2.8/arcgis/ or http://<myserver>/arcgis/_js_api/library/2.8/jsapicompact/
I was never able to get this first link to work as written.. I think there is a typo.
If you try... http://<myserver>/arcgis/_js_api/library/2.8/jsapi/
you will get a page describing the version of dojo you have installed.
The second link seems to work just fine.
The included Test Code has not worked as of yet. I have changed the <MyServer> to the appropriate name and am getting two Console errors.
#1) "r is null" in jsapi(line 14)
#2) "uncaught exception: Could not load cross-domain resources: esri.map"
If anyone has any suggestions I would welcome the input.
Slightly off-topic but will JSAPI 3.0 also have a [HOSTNAME_AND_PATH_TO_JSAPI] or will this become unnecessary?