Blazor Server app with a single page: type an address and see the geocoded coordinates. Server-side rendering keeps the Google API key off the client.
GOOGLE_API_KEY=your_api_key dotnet run --project samples/Blazor.GeocodingOpen the URL the host prints (typically https://localhost:5001).
The API key is sourced from the GOOGLE_API_KEY env var, falling back to the GoogleApiKey config value (e.g. via appsettings.json or user secrets).
IGoogleMapsClientinstance client (.Geocode) registered viaAddHttpClient<IGoogleMapsClient, GoogleMapsClient>()and injected into a serviceGeocodingRequestGeocodingResponse- Wrapping the library in a DI-injected service consumed by a Blazor Server component