JSAPI compact build availability and size

795
3
05-12-2011 05:23 AM
RichardKaufholz
New Contributor
Hi,

I have developed a lightweight viewer that is to be used as an embedded object in some database applications created in other parts of my organisation. Now that it is working, I am trying to use the compact build to reduce the download size (I purposefully do not use much dojo in the mini-app) and have a couple of issues:

1. Loading from "http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.2compact" returns 403-forbidden, while the older version ((i.e. v=2.1 and v=2.0) do work fine. Why is that?

2. In the documentation (see FAQ under "Inside the API") it mentions that the download size is appealingly small, ~30kb. However, in pointing to v=2.1 the download is app 114kb. Why is it so "big"?

Thanks for any light that can be shed on these queries...

Cheers,
Richard.
0 Kudos
3 Replies
derekswingley1
Frequent Contributor
1. I'm not seeing a 403 when I load that url...it loads for me. This sample uses it and runs fine for me:  http://help.arcgis.com/en/webapi/javascript/arcgis/demos/mobile/mobile_simplemap.html

2. Can you link to the doc that says the compact build is ~30kB? The compact build doc page says that the compact version is 53kB smaller than the standard version and this (roughly) matches up with what I see. The compact version weighs in at about 125kB on the sample above where as the standard version comes in at about 185kB in this sample:  http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/map_topo.html
0 Kudos
RichardKaufholz
New Contributor
Hi Derek,

Thanks for helping out...

1. Well, surprisingly, the compact build did load this morning when I got into work. I thought the whole point of using the "cloud hosted" version is that it would always be available! Anyway, at least it was a server/delivery problem, so now I can use it again.

2. Go to: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/inside_faq.htm - "Frequently asked questions". The middle paragraph is as follows:

While the ArcGIS JavaScript API is built on top of Dojo, you can use JavaScript libraries like JQuery or ExtJS in your applications. At version 2.0 we released a compact build of the ArcGIS JavaScript API. The compact build is small (~30kb) and does not include the dijit namespace on initial download so its a great option for those who wish to use a framework other than Dojo. The SDK contains a sample that shows how to work with the ArcGIS JavaScript API and JQuery or ExtJS.
.

I suppose its not critical, but I would certainly prefer a 30kb version than the 124kb currently available!

Rich.
0 Kudos
derekswingley1
Frequent Contributor
Thanks, Rich. Definitely something that should be corrected in the documentation...
0 Kudos