Gravity.GoogleMaps.StaticMapBuilder
3.0.0
dotnet add package Gravity.GoogleMaps.StaticMapBuilder --version 3.0.0
NuGet\Install-Package Gravity.GoogleMaps.StaticMapBuilder -Version 3.0.0
<PackageReference Include="Gravity.GoogleMaps.StaticMapBuilder" Version="3.0.0" />
<PackageVersion Include="Gravity.GoogleMaps.StaticMapBuilder" Version="3.0.0" />
<PackageReference Include="Gravity.GoogleMaps.StaticMapBuilder" />
paket add Gravity.GoogleMaps.StaticMapBuilder --version 3.0.0
#r "nuget: Gravity.GoogleMaps.StaticMapBuilder, 3.0.0"
#:package Gravity.GoogleMaps.StaticMapBuilder@3.0.0
#addin nuget:?package=Gravity.GoogleMaps.StaticMapBuilder&version=3.0.0
#tool nuget:?package=Gravity.GoogleMaps.StaticMapBuilder&version=3.0.0
๐ Gravity.GoogleMaps.StaticMapBuilder
Gravity.GoogleMaps.StaticMapBuilder is a fully type-safe, fluent, and extensible .NET URL builder for the Google Static Maps API.
It helps you generate valid, optimized static map URLs effortlessly โ with full IntelliSense, compile-time checks, and support for complex features like styles, markers, paths, map IDs, and more.
๐ Features
- โ Fully type-safe and fluent API
- ๐ง Smart validation for all query parameters
- ๐จ Full support for styles, map types, and custom markers
- ๐งญ Handles edge cases (map ID conflicts, marker limits, etc.)
- ๐ Built with test coverage in mind (96%+)
- ๐งช Easy to unit test and extend
๐ฆ Installation
dotnet add package Gravity.GoogleMaps.StaticMapBuilder
๐ Documentation
Explore detailed usage guides for key features:
Markersโ Standalone vs grouped markers, icons, limits, examplesMap Stylesโ Hue, lightness, feature typesPathsโ Lines, polylines, geodesic options
๐งญ See the official Google Maps Static API for complete reference.
โก Quick Start
var url = new StaticMapsUrlBuilder()
.AddCenterWithCoordinates(48.8566, 2.3522)
.AddZoom(13)
.AddSize(600, 400)
.AddMarkers(
new LocationMarker("Eiffel Tower", label: 'E'),
new CoordinatesMarker(48.8584, 2.2945, label: 'T')
)
.AddMapStyle(
new MapStyle(
new StyleRule(Color: new HexColor("0xFF0000")),
Features.Road.AllRoad,
Elements.Geometry.AllGeometry
)
)
.AddKey("YOUR_API_KEY")
.Build();
Please note that the url is not signed, see the official Google documentation for details.
๐งฑ Fluent Builders
Every parameter of the API is covered through intuitive, self-documenting builder methods:
.AddCenterWithLocation("Paris")
.AddZoom(12)
.AddScale(MapScale.Two)
.AddMapType(StaticMapType.Terrain)
.AddLanguage("en")
๐จ Custom Styles Made Simple
var style = new MapStyle(
new StyleRule(Hue: new HexColor("0x00FF00"), Visibility: Visibility.Simplified),
Features.Administrative.Country,
Elements.Labels.Text.AllText
);
๐ Marker Groups and Icons
var group = new MarkerGroup(MarkerSize.Mid, iconUrl: "http://yourcdn.com/marker.png");
group.AddLocation("Lyon");
group.AddCoordinates(45.75, 4.85);
๐งช Test Coverage & Reliability
- 95%+ code coverage
- Every builder method has unit and integration tests
- Constraints validated both at build-time and runtime
๐ก๏ธ License
๐ Credits
Made with โค๏ธ by GravityApps Developed & maintained by freelance developer https://github.com/AntoninLolivier
Want to contribute or suggest an improvement? ๐ Open an issue or pull request on GitHub
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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. |
-
net10.0
- Gravity.GoogleMaps.Core (>= 1.0.0)
- OneOf (>= 3.0.271)
-
net8.0
- Gravity.GoogleMaps.Core (>= 1.0.0)
- OneOf (>= 3.0.271)
-
net9.0
- Gravity.GoogleMaps.Core (>= 1.0.0)
- OneOf (>= 3.0.271)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.