<?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 Re: Ending measurement via button in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453055#M41884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an FYI; don't know if this works, but SitePoint has code for enabling a double tap if you are using iPhones or iPads at: &lt;A href="http://appcropolis.com/blog/howto/implementing-doubletap-on-iphones-and-ipads//" title="http://appcropolis.com/blog/howto/implementing-doubletap-on-iphones-and-ipads//"&gt;Implementing doubletap on iPhones and iPads | Appcropolis&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Dec 2014 16:42:32 GMT</pubDate>
    <dc:creator>ChrisSergent</dc:creator>
    <dc:date>2014-12-30T16:42:32Z</dc:date>
    <item>
      <title>Ending measurement via button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453050#M41879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im developing a measure tool app and would like to make it touch screen friendly. Is there anyway to call the measure-end function besides using a double click? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 15:29:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453050#M41879</guid>
      <dc:creator>IbrahimHussein</dc:creator>
      <dc:date>2014-12-30T15:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Ending measurement via button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453051#M41880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ibrahim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could create a button and on click cycle through all the measurement tools and deactivate them via this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4 style="margin-top: 0.2em; margin-bottom: 0.4em; font-family: 'Avenir LT W01 65 Medium', Arial, Helvetica, sans-serif; color: #4d4d4d;"&gt;setTool(toolName, activate)&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/measurement.html#settool" title="https://developers.arcgis.com/javascript/jsapi/measurement.html#settool"&gt;Measurement | API Reference | ArcGIS API for JavaScript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 15:43:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453051#M41880</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2014-12-30T15:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Ending measurement via button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453052#M41881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One thing you could consider is creating a button and writing the code to deactivate the measurement tool through that button. Here is the API reference: &lt;A href="https://developers.arcgis.com/javascript/jsapi/measurement-amd.html#settool" title="https://developers.arcgis.com/javascript/jsapi/measurement-amd.html#settool"&gt;Measurement | API Reference | ArcGIS API for JavaScript&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;measurementWidget&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;setTool&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #999999;"&gt;"theNameOfYourWidgetGoesHere"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #000088;"&gt;false&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 15:45:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453052#M41881</guid>
      <dc:creator>ChrisSergent</dc:creator>
      <dc:date>2014-12-30T15:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Ending measurement via button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453053#M41882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys, I did try that and it worked but I still came across an issue. In the measure-end function, I use evt.geometry to convert the measurement into a graphic. I get a Cannot read property 'geometry' of undefined when I use the same code inside the function of the button.&amp;nbsp; this gets me in the right direction, thanks for the replies!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 16:21:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453053#M41882</guid>
      <dc:creator>IbrahimHussein</dc:creator>
      <dc:date>2014-12-30T16:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Ending measurement via button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453054#M41883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Ibrahim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this happens because you don't technically "end" your measurement. The measure-end only runs when the user double-clicks to end the particular measure task. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within the button maybe use the &lt;A href="https://developers.arcgis.com/javascript/jsapi/measurement.html#event-measure"&gt;measure&lt;/A&gt; instead of measure-end, which also has a geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 16:27:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453054#M41883</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2014-12-30T16:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Ending measurement via button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453055#M41884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an FYI; don't know if this works, but SitePoint has code for enabling a double tap if you are using iPhones or iPads at: &lt;A href="http://appcropolis.com/blog/howto/implementing-doubletap-on-iphones-and-ipads//" title="http://appcropolis.com/blog/howto/implementing-doubletap-on-iphones-and-ipads//"&gt;Implementing doubletap on iPhones and iPads | Appcropolis&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 16:42:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453055#M41884</guid>
      <dc:creator>ChrisSergent</dc:creator>
      <dc:date>2014-12-30T16:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ending measurement via button</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453056#M41885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great idea, but for some reason it doesnt work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on mesure I do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var graphic = new Graphic(evt.geometry, lineColor);&lt;/P&gt;&lt;P&gt;map.graphics.add(graphic);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lineColor is defined globally as:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var lineColor = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255,0,0]), 3 )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;edit - &lt;A href="http://jsfiddle.net/knktntpp/"&gt;jsfiddle &lt;/A&gt;link&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I commented out &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;//var graphic = new Graphic(evt.geometry, lineColor);&lt;/P&gt;&lt;P&gt;&amp;nbsp; // map.graphics.add(graphic);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;in the measure-end, if you uncomment you see it works. put that code in measure and it does not work&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Dec 2014 17:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/ending-measurement-via-button/m-p/453056#M41885</guid>
      <dc:creator>IbrahimHussein</dc:creator>
      <dc:date>2014-12-30T17:22:14Z</dc:date>
    </item>
  </channel>
</rss>

