Windows 10 phone application. Can I do it programmatically or not? Windows 7 have no variants, maybe windows 10 mobile have new methods or variants?
Yes. But not if the user has disabled GPS on their device.
First you need to enable it.
From msdn site:
Then you can request access to the location. Example from msdn: Add this using statement:
using Windows.Devices.Geolocation;
And call this method:
var accessStatus = await Geolocator.RequestAccessAsync();
Read the documentation here for further details: https://msdn.microsoft.com/windows/uwp/maps-and-location/get-location