Select to view content in your preferred language

Error ArcGIS API for Javascript v3.1

4012
24
Jump to solution
09-24-2012 12:17 AM
KristianLucido
Emerging Contributor
Hi,
i have a big problem with the new Api for Javascript. :confused: In my web app i have the version 2.7 and run correctly.
When i upgrade my webapp at version 3.1 i have this problem. I did the correct installation of the API.
Put the Api in a local webserver and change the configuration of "init.js" and "dojo.js" with correct parameters.
But this is the result:
[ATTACH=CONFIG]17910[/ATTACH]

Thanks in advance for the answer! 😉
0 Kudos
1 Solution

Accepted Solutions
__Rich_
Deactivated User
...and your app is definitely referencing the API the same way?

Just humour me, put this in your application page before the script element used to load the API:

<script type="text/javascript">     var dojoConfig = {         baseUrl:"http://localhost/arcgis_js_api/library/3.1/jsapi/js/dojo/dojo/"     }; </script>

View solution in original post

0 Kudos
24 Replies
__Rich_
Deactivated User
What does that screenshot tell you?
0 Kudos
KristianLucido
Emerging Contributor
What does that screenshot tell you?


The url of the request is not correct! Of course the result is the error 404 Not found!
Why the url is not correct? Can i change this url? There is a problem in my configuration? I don't understand!
0 Kudos
__Rich_
Deactivated User
Yes, paths need to be set - did you follow the installation instructions?

Also, as you're migrating from 2.7 to 3.1 it's probably worth reading http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/migration_30.htm
0 Kudos
KristianLucido
Emerging Contributor
Yes, paths need to be set - did you follow the installation instructions?


yes of course! i follow the instruction and put the correct parameters of my webserver in the "init.js" and "dojo.js".
I did for try the test code in the installation guide and the map run correctly but in my web app i have this error!
0 Kudos
DavideLimosani
Frequent Contributor
did you put your application in a webserver? It is needed from 3.0
0 Kudos
KristianLucido
Emerging Contributor
did you put your application in a webserver? It is needed from 3.0


Of course!!
0 Kudos
__Rich_
Deactivated User
Please show us the path you have used to the JS API and also what you've got in your dojoConfig etc.

The base URL being used to retrieve resources is incorrect, we just need to work out why.
0 Kudos
KristianLucido
Emerging Contributor
Please show us the path you have used to the JS API and also what you've got in your dojoConfig etc.

The base URL being used to retrieve resources is incorrect, we just need to work out why.


My Arcgis Api is in:

C:\xampp\htdocs\arcgis_js_api\library\3.1\jsapi

and in the configuration i put this url:

localhost/arcgis_js_api/library/3.1/jsapi/js/dojo/dojo
or
192.168.13.56/arcgis_js_api/library/3.1/jsapi/js/dojo/dojo

192.168.13.56 is my local ip in my network...
0 Kudos
__Rich_
Deactivated User
My Arcgis Api is in:

C:\xampp\htdocs\arcgis_js_api\library\3.1\jsapi

and in the configuration i put this url:

localhost/arcgis_js_api/library/3.1/jsapi/js/dojo/dojo
or
192.168.13.56/arcgis_js_api/library/3.1/jsapi/js/dojo/dojo

192.168.13.56 is my local ip in my network...


....and where is your application (web page) relative to the API?

...and exactly what have you set in your dojoConfig?
0 Kudos