Select to view content in your preferred language

dojo custom build and layers

837
3
04-19-2010 04:53 AM
DavideCremonesi
New Contributor
Hi there,
I would like to make a custom build of dojo in order to take advantage of layers (http://docs.dojocampus.org/build/index) and reduce the large number of single js files requests.
Since my application use also other dojo widgets the first time the browser opens it is very slow (I see in Firebug and Fiddler that the problem is due to the sequential load of small files).
How will the custom dojo and the one loaded within the ArcGIS API live together?
Which is the correct order to write <script> tags in the HTML file to be sure that dojo.require will load js from my custom build path and not from arcgisonline?

Thank you very much,
Davide Cremonesi
Globo srl (BP Italy)

PS the application is visible here http://territorio.comune.bergamo.it/orologis/webgis20/mappa.jsp
0 Kudos
3 Replies
CoreyAlix
Regular Contributor
I also am trying to do a similar thing.  I've created serveral dojo components that I would like to package using the the dojo build tools but I cannot work out the details.  An example would be greatly appreciated.

How about and example which begins with two or more *localized* widgets defined in separate files and ends with a working sample.  I'm getting tripped up trying to figure out how to get dojo to look for my resources locally instead of the arcgisonline server:

http://serverapi.arcgisonline.com/jsapi/arcgis/2.1/js/dojo/dojo/nls/myresources_en-us.xd.js"
0 Kudos
ScottDavis
Frequent Contributor
Did you guys ever figure this out? We are trying to do the same thing.
0 Kudos
CoreyAlix
Regular Contributor
I'm afraid not.  If I do not find an answer soon I'm going to merge all my dojo files into one file and run a compressor against that one file and <include> that file in my main page.  If you figure it out please post back.
0 Kudos