<?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 Help with Sketch Widget Tooltip Units in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-sketch-widget-tooltip-units/m-p/1472911#M84607</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to change the units displayed on the Sketch widget tooltip from meters to miles. I combed through the documentation and couldn't find any way to configure this. Our application stores the distance and area (plus the units) in miles, but we are having trouble displaying the built-in measurement while drawing in miles.&lt;/P&gt;&lt;P&gt;The tooltip in the screenshot is displayed using the "&lt;SPAN&gt;tooltipOptions&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;{ &lt;/SPAN&gt;&lt;SPAN&gt;enabled&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;SPAN&gt;}" parameter for the Sketch Widget&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The only alternative I found was to make a TextSymbol located at the centroid lat/lng of the polygon. But this felt clunky to implement given there is already a dynamic tooltip in the SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FlockSafety_0-1715783067466.png" style="width: 736px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104177iE1798A2AD4B92F65/image-dimensions/736x438?v=v2" width="736" height="438" role="button" title="FlockSafety_0-1715783067466.png" alt="FlockSafety_0-1715783067466.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2024 14:27:36 GMT</pubDate>
    <dc:creator>FlockSafety</dc:creator>
    <dc:date>2024-05-15T14:27:36Z</dc:date>
    <item>
      <title>Help with Sketch Widget Tooltip Units</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-sketch-widget-tooltip-units/m-p/1472911#M84607</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I would like to change the units displayed on the Sketch widget tooltip from meters to miles. I combed through the documentation and couldn't find any way to configure this. Our application stores the distance and area (plus the units) in miles, but we are having trouble displaying the built-in measurement while drawing in miles.&lt;/P&gt;&lt;P&gt;The tooltip in the screenshot is displayed using the "&lt;SPAN&gt;tooltipOptions&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;{ &lt;/SPAN&gt;&lt;SPAN&gt;enabled&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;SPAN&gt;}" parameter for the Sketch Widget&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The only alternative I found was to make a TextSymbol located at the centroid lat/lng of the polygon. But this felt clunky to implement given there is already a dynamic tooltip in the SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FlockSafety_0-1715783067466.png" style="width: 736px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/104177iE1798A2AD4B92F65/image-dimensions/736x438?v=v2" width="736" height="438" role="button" title="FlockSafety_0-1715783067466.png" alt="FlockSafety_0-1715783067466.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 14:27:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-sketch-widget-tooltip-units/m-p/1472911#M84607</guid>
      <dc:creator>FlockSafety</dc:creator>
      <dc:date>2024-05-15T14:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Sketch Widget Tooltip Units</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-sketch-widget-tooltip-units/m-p/1494680#M84897</link>
      <description>&lt;P&gt;I am running into the same issue. Doesn't appear that it can be changed.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 21:50:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-sketch-widget-tooltip-units/m-p/1494680#M84897</guid>
      <dc:creator>AlexQuintero1</dc:creator>
      <dc:date>2024-06-18T21:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Sketch Widget Tooltip Units</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-sketch-widget-tooltip-units/m-p/1625501#M87269</link>
      <description>&lt;P&gt;I was able to accomplish this by explicitly setting the &lt;STRONG&gt;valueOptions &amp;gt; displayUnits&lt;/STRONG&gt; property for the Sketch class. Here's an example of how I'm using it:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const sketchWidget = new Sketch({
      layer: sketchLayer,
      view: view,
      viewModel: sketchViewModel,
      valueOptions: {
        displayUnits: {
          length: "feet",
          area: "acres"
        }
      },
      visibleElements: {
        duplicateButton: false,
        createTools: {
          point: geometryTypes.includes("point"),
          polyline: geometryTypes.includes("polyline"),
          polygon: geometryTypes.includes("polygon"),
          rectangle: false,
          circle: false
        }
      },
      defaultUpdateOptions: {
        reshapeOptions: {
          shapeOperation: "none"
        },
        enableRotation: false,
        enableScaling: false,
        enableZ: false,
        highlightOptions: {
          enabled: false
        },
        tool: "reshape"
      },
      creationMode: "update"
    });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Here's a link to the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-interactive-sketch-SketchValueOptions.html#displayUnits" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; - it says it's in beta so perhaps this feature wasn't available when this post was originally made. It's supported since&amp;nbsp;&lt;STRONG&gt;ArcGIS Maps SDK for JavaScript 4.29.&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Hope this helps if someone comes across this post in the future!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jun 2025 22:09:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/help-with-sketch-widget-tooltip-units/m-p/1625501#M87269</guid>
      <dc:creator>Katie_Clark</dc:creator>
      <dc:date>2025-06-20T22:09:52Z</dc:date>
    </item>
  </channel>
</rss>

