Soenneker.ZipCodes.Lookup
4.0.3
Prefix Reserved
dotnet add package Soenneker.ZipCodes.Lookup --version 4.0.3
NuGet\Install-Package Soenneker.ZipCodes.Lookup -Version 4.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.ZipCodes.Lookup" Version="4.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.ZipCodes.Lookup" Version="4.0.3" />
<PackageReference Include="Soenneker.ZipCodes.Lookup" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.ZipCodes.Lookup --version 4.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.ZipCodes.Lookup, 4.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.ZipCodes.Lookup@4.0.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.ZipCodes.Lookup&version=4.0.3
#tool nuget:?package=Soenneker.ZipCodes.Lookup&version=4.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.ZipCodes.Lookup
Fast ZipCode Resolution for .NET
Installation
dotnet add package Soenneker.ZipCodes.Lookup
Usage
services.AddZipCodeLookupUtilAsSingleton();
ZipCodeInfo? info = await zipCodeLookupUtil.Get("90210");
string? city = await zipCodeLookupUtil.GetCity("90210");
string? state = await zipCodeLookupUtil.GetState("90210");
(double Latitude, double Longitude)? coordinates = await zipCodeLookupUtil.GetLatitudeLongitude("90210");
string? timeZoneId = await zipCodeLookupUtil.GetTimeZoneId("90210");
ZipCodeCoordinates? fastCoordinates = await zipCodeLookupUtil.GetCoordinates("90210");
if (fastCoordinates != null)
{
// use fastCoordinates.Value.Latitude and fastCoordinates.Value.Longitude
}
IReadOnlyList<ZipCodeInfo> californiaZipCodes = await zipCodeLookupUtil.GetByState("CA");
IReadOnlyList<ZipCodeInfo> beverlyHillsZipCodes = await zipCodeLookupUtil.GetByCityAndState("Beverly Hills", "CA");
The lookup data is loaded lazily from USZipCodeGeometry.txt, provided by Soenneker.ZipCodes.Data.GeoNames.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Soenneker.Asyncs.Initializers (>= 4.0.49)
- Soenneker.TimeZones.Lookup (>= 4.0.2)
- Soenneker.Utils.File (>= 4.0.2157)
- Soenneker.Utils.Paths.Resources (>= 4.0.149)
- Soenneker.ZipCodes.Data.GeoNames (>= 4.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.