Select to view content in your preferred language

Draw Widget - Measure in Nautical Miles

478
2
02-28-2013 08:44 AM
SusanGoulet_Powell
New Contributor
Has anyone attempted to create a custom Draw tool that could measure in Nautical Miles?
I've searched Hi and Low through the documentation and it doens't appear to be a configurable option.
Does anyone know why that may be?

Thanks for any input,
Susan
Tags (2)
0 Kudos
2 Replies
AnthonyGiles
Honored Contributor
Susan,

Do you have the ability to amend the source code? If so, you'll see it's fairly straight forward to add in the conversion for nautical miles. You should be able to see where you would need to add the code:

https://github.com/Esri/arcgis-viewer-flex/blob/develop/src/widgets/Draw/DrawWidget.mxml


In the function basewidget_widgetConfigLoaded there is a case statement with the units of measure listed and there is an array list near the bottom with the same again

Regards

Anthony
0 Kudos
RhettZufelt
MVP Notable Contributor
Sure,

the enhanced DrawWidget allows you to configure whatever distance, area, and point units you want.  Just need to add the converion option to the eDrawWidget.xml.

http://www.arcgis.com/home/item.html?id=91a0014160fc4a9caadc2c7fd7089c1b

I use this in my xml for knots as my data is in meters.  
        <distanceunit abbr="nm" conversion="0.0005400">Knots</distanceunit>


R_
0 Kudos