<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Measurement: work with local API? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-work-with-local-api/m-p/342694#M31708</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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!&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://github.com/kevinsagis/MeasureWidgetLocalAPI"&gt;https://github.com/kevinsagis/MeasureWidgetLocalAPI&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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&amp;nbsp; js / lib / esri.&amp;nbsp; 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.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2013 19:00:13 GMT</pubDate>
    <dc:creator>KevinMacLeod1</dc:creator>
    <dc:date>2013-02-18T19:00:13Z</dc:date>
    <item>
      <title>Measurement: work with local API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-work-with-local-api/m-p/342694#M31708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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!&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://github.com/kevinsagis/MeasureWidgetLocalAPI"&gt;https://github.com/kevinsagis/MeasureWidgetLocalAPI&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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&amp;nbsp; js / lib / esri.&amp;nbsp; 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.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 19:00:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-work-with-local-api/m-p/342694#M31708</guid>
      <dc:creator>KevinMacLeod1</dc:creator>
      <dc:date>2013-02-18T19:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Measurement: work with local API?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-work-with-local-api/m-p/342695#M31709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is no hardcoded path in measurement widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you didn't see the icons, please try to set it in the CSS and let me know if it works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.distanceIcon {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;background-image:url(./Measure_Distance16.png); //your image url&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But this shouldn't cause the error that you described.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 20:36:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/measurement-work-with-local-api/m-p/342695#M31709</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2013-02-19T20:36:19Z</dc:date>
    </item>
  </channel>
</rss>

