Measurement: work with local API?

Discussion created by kmacleod on Feb 18, 2013
Latest reply on Feb 19, 2013 by Jian
We are running a site with the API local. We put Dojo in its own folder (outside the folder with the ESRI API files) for organizational purposes.

I am not sure but I think this is causing a problem for the Measurement widget. in Firebug it says "this.distance is undefined" on line 15, Measurement.js. I copied it in from the Measurement sample. So, the titlePane shows up in the upper right of course (using HTML right from ESRI sample) but the dijit never instantatiates. The 3 little icons of the measure tools never show up, only the divider line below where they should be.

I'm guessing there an issue with pathing with Measurement.js? I.e. a hardcoded path or something depending on dojo being reached with relative paths ../ or the like?

Dojo highlights the fact it is a modular system. So in theory this should work just fine. The rest of our site and widgets work great. Also, we re-pointed to all Dojo and extra packages (i.e. AGSJS TOC, WURadar) with dojoConfig.

I have put the code on GitHub. ESRI staff or anyone else seen this, and have any advice or know what is happening here? Thanks!

Note, I've stripped the actual ESRI API files due to concerns for licensing/redistributing, but I assure, they're just as they come in the API (minus the Dojo 1.8 which are in the separate folder as is apparent in the GitHub repo)...the esri API files were in  js / lib / esri.  However, are we allowed to post the API? If so I can re-add them back for convenience...but just put ESRI API files into the empty esri folder here in js/lib/esri and this site will run, just not the Measurement.