Hi, I am trying to change the default unit for
VictorTey_0-1621167151138.png
They are currently set to Miles and I want to change it to KM.
VictorTey_1-1621167187972.png
My organization is set to Metric
VictorTey_2-1621167408566.png
In Widget.js -> _switchToAnalysisTool, I also tried to set the unit via the arg which works for create buffer.
VictorTey_3-1621167464492.png
Any suggestions?
@RobertScheitlin__GISP (Any advise from you is much appreciated 🙂 )
Solved! Go to Solution.
I have not tested this but it should be as simple as adding these lines to the same function:
if(this.currentToolSetting.title === 'summarizeNearby'){
args.units = "Kilometers";
}
I have not tested this but it should be as simple as adding these lines to the same function:
if(this.currentToolSetting.title === 'summarizeNearby'){
args.units = "Kilometers";
}
Hi @RobertScheitlin__GISP I have not idea how you know that but it works. I had a break point on the submit hoping to see it in the argument but I don't see units there. Did you know to use units from the rest endpoint ? Again thank you so much 🙂
https://developers.arcgis.com/rest/analysis/api-reference/summarize-nearby.htm
VictorTey_0-1621333313287.png
I just looked at the available properties for the tool in the documentation.
https://developers.arcgis.com/javascript/3/jsapi/summarizenearby-amd.html#properties