Geolocation in Blazor

The Geolocation API can only be used via JavaScript. Here’s a Blazor component that wraps all the interop code. Now you can get device position using C# only.