<?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: Customize unit lists in the Measurement Widget v4.16 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533870#M49776</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nils,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The Measure widgets activeWidget property gives you the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;AreaMeasurement2D or&amp;nbsp;&lt;SPAN&gt;LinearMeasurement2D depending on which option was chosen by the user.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Sep 2020 12:56:47 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2020-09-29T12:56:47Z</dc:date>
    <item>
      <title>Customize unit lists in the Measurement Widget v4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533869#M49775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do you customize the list of units in the Measurement Widget?&amp;nbsp; When I create the measurement widget (&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Measurement.html"&gt;Measurement | ArcGIS API for JavaScript 4.16&lt;/A&gt;&amp;nbsp;) it gives me access to the distance and area measurement widget tools.&amp;nbsp; While I can specify the arealUnit and linearUnit that should be used as the default for the tool I can't customize the list of units displayed.&amp;nbsp; If I were to create just an AreaMeasurement2D widget or LinearMeasurement2D widget they both have unitOptions property that let's me customize the list.&amp;nbsp; However, when I create just the Measurement widget it doesn't have a unitOptions, or something similar, property.&amp;nbsp; So how do I customize the list of units or is that not possible when using the Measurement widget?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:27:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533869#M49775</guid>
      <dc:creator>NilsBabel1</dc:creator>
      <dc:date>2020-09-28T20:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Customize unit lists in the Measurement Widget v4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533870#M49776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nils,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The Measure widgets activeWidget property gives you the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;AreaMeasurement2D or&amp;nbsp;&lt;SPAN&gt;LinearMeasurement2D depending on which option was chosen by the user.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:56:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533870#M49776</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-09-29T12:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Customize unit lists in the Measurement Widget v4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533871#M49777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert, I have seen that property.&amp;nbsp; But I can't seem to figure out how to work with it.&amp;nbsp; It doesn't actually tell you the active widget until a user starts clicking on the map to measure.&amp;nbsp; There are no events on the measurement widget and I'm not sure how to set a listener on the activeWidget property.&amp;nbsp; The only thing I can think of is to use the 'click' event to check the activeWidget and then change the unitOptions.&amp;nbsp; But that seems a little heavy handed every time a user clicks on the map.&amp;nbsp; Is there an easy way to listen for changes to the activeWidget?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2020 13:50:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533871#M49777</guid>
      <dc:creator>NilsBabel1</dc:creator>
      <dc:date>2020-09-30T13:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Customize unit lists in the Measurement Widget v4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533872#M49778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nils,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OK, you seem to be unfamiliar with the 4.x APIs way of watching properties. Just use watchUtils to watch the activeWidget using the&amp;nbsp;whenDefined method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2020 14:06:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533872#M49778</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-09-30T14:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Customize unit lists in the Measurement Widget v4.16</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533873#M49779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert, yes I'm coming from the 3.x API and haven't used watchUtils very much.&amp;nbsp; That does the trick.&amp;nbsp; Thanks very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2020 18:04:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/customize-unit-lists-in-the-measurement-widget-v4/m-p/533873#M49779</guid>
      <dc:creator>NilsBabel1</dc:creator>
      <dc:date>2020-09-30T18:04:56Z</dc:date>
    </item>
  </channel>
</rss>

