Hi Adger,
JavaScript Actions are perfectly for actions that do not require any UI. They can be used in Nanoflows.
There a standard Location Action available in the packages https://appstore.home.mendix.com/link/app/109515/
That can be used in Native, Hybrid and Web applications
Cheers,
Andries