Query regarding arcgis javascript api and dojo :

1775
4
06-13-2011 04:11 AM
DeepikaAgarwal
New Contributor
In my application i am using arcgis.js(version1.1) . In arcgis.js there is link reference "http://serverapi.arcgisonline.com/jsapi/arcgis/1.1/...." this provide reference. I dont want this reference that makes my project very slow and also while hosting my app on server it gives error "host not found".
Kindly help me . i have downloaded dojo toolkit manually and also refered the link
"http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_dojo.htm"  but all arcgis javascript .js( arcgis ver:1.1 , arcgis ver 1.6 or esri.js) files has the link  " http://serverapi.arcgisonline.com/jsapi/arcgis/1.1/..."
how to remove and what further customization needed?
0 Kudos
4 Replies
derekswingley1
Frequent Contributor
Please see this topic about hosting the API locally:  http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_accessapi.html

Have you given any thought to upgrading to a newer or the newest version of the API?
0 Kudos
DeepikaAgarwal
New Contributor
Please see this topic about hosting the API locally:  http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_accessapi.html

Have you given any thought to upgrading to a newer or the newest version of the API?


Thankyou so much i have checked the link and implemented it . i downloaded and install the arcgis api and sdk as given . I have installed upgraded version 2.3 . Now there is an error in arcgis
"Could not load cross-domain resources" .
I have gone through some solutions(http://forums.esri.com/Thread.asp?c=204&f=2388&t=255896 , http://old.nabble.com/Cross-domain-loading--td26380182.html , etc )
but they all say to add dojo.js , gfx.js explicitly on webpage. I have done that again it give another error that "esri" not defined in firebug.js. I tried also by editing djconfig its baseurl and module path but no solution to my problem. Please help me .
0 Kudos
derekswingley1
Frequent Contributor
Make sure follow all of the steps in install.htm that is at the root of the zip file. If that's what you did, and you're still having trouble, it is probably best if you contact support.
0 Kudos
DeepikaAgarwal
New Contributor
Make sure follow all of the steps in install.htm that is at the root of the zip file. If that's what you did, and you're still having trouble, it is probably best if you contact support.


I have checked all the steps again it was correctly done.
Actually problem was due to updated version of dojo and that contains updated namespace. In my code dojox.color.Generator was need to be updated as from  dojo.require("dojox.color.Generator")   to  dojo.require("dojox.color.Palette");.
help taken from the link " http://forums.esri.com/Thread.asp?c=158&f=2396&t=289240 "
and also refered " http://dojotoolkit.org/api/1.2.3/dojox.color.Color " for knowing updation in dojo versions.
MY problem solved. Thankyou swingley. 🙂
0 Kudos