How to change the name of those formats.
If I try to reassign format.name = 'new name' it works but the coordinates disappear as below pic.
After some playing around I have managed to change the label using the following code:
reactiveUtils .whenOnce(() => ccWidget.formats.length > 0) .then(() => { let filteredFormats = ccWidget.formats.items.filter( (f) => f.name === "basemap" || f.name === "xy" ); filteredFormats[ filteredFormats.findIndex((f) => f.name === "basemap") ].label = "BNG"; filteredFormats[ filteredFormats.findIndex((f) => f.name === "xy") ].label = "Long/Lat"; ccWidget.formats.items = filteredFormats; });
I have noticed in the 4.24 release there is a new property label, is it possible to now achieve this using this new property and if so, how?
Thanks @RemiBecheru, that makes sense. We'll add this enhancement to our roadmap. I'm not sure when this will be come available, but I made a note to update this thread when I have some news to share.
Considering in production the app will be used by people which don't know what DD means for example.
That's why it will be more explanatory to change DD.name with Lat. Long.
Hi @RemiBecheru, thanks for the question. Unfortunately, this is not currently possible. The only alternative would be duplicating one of the existing formats, but giving it a different name. But then you would have to implement the conversion logic yourself.
We are considering this as an enhancement for the CoordinateConversion widget. Could you explain why this functionality would be useful for your work/project?
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.