Select to view content in your preferred language

Measurement widget default unit

821
2
03-17-2023 01:01 PM
Status: Open
CoreyMetz
Occasional Contributor

The sidebar instant app has been a wonderful replacement for an outdated parcel viewer map that we used to provide and it's been a great tool thus far. One minor annoyance however (that is keeping some of our users from fully adopting it over the old app) is the fact that the Line and Area measurements default to metric for the unit.

I know a more recent update allowed us to change the Default format for the Coordinate measurement to any of the available choices, and I would love to see the same thing be added for the distance and area units (for example if given the option I would select Feet for line unit and Acre for area unit).

2 Comments
KellyHutchins

@CoreyMetz we do have plans to add support for linear and area units at the next release. In the meantime if you are comfortable using a tool like AGO Assistant you can update the app data to set these values now. I recommend making a copy of your app first and testing out the steps there before editing your app. Here are the basic steps: 

 

1. Open AGO assistant and log-in to your org

2. Navigate to your content and find the Sidebar app you want to edit

3. Click the app title then click the "View Item JSON" button

4. In the Edit JSON panel click the Data tab then click the "Edit JSON" button 

5. Look for measure:true then add the following options to set the linear and area units. 

Screenshot 2023-03-17 at 3.59.59 PM.png

6. Save and test your app. 

Valid values for area and length units can be found in the SDK reference: https://developers.arcgis.com/javascript/latest/api-reference/esri-core-units.html#AreaUnit

 

AndrewZimba1

This is awesome.  Cumbersome to get to and it would be better if the config options were available from the Instant App configuration interface, but still awesome that this is at least possible.

Question though - I have my linear unit set to "feet" and my area unit set to "acres", but when the tool is used in the app while the area is reported in acres the perimeter of the shape is still reported in miles.  Any way to change that to "feet" as well?

StillMiles.JPG