DP.Blazor.MapLibre
2.0.2
dotnet add package DP.Blazor.MapLibre --version 2.0.2
NuGet\Install-Package DP.Blazor.MapLibre -Version 2.0.2
<PackageReference Include="DP.Blazor.MapLibre" Version="2.0.2" />
<PackageVersion Include="DP.Blazor.MapLibre" Version="2.0.2" />
<PackageReference Include="DP.Blazor.MapLibre" />
paket add DP.Blazor.MapLibre --version 2.0.2
#r "nuget: DP.Blazor.MapLibre, 2.0.2"
#:package DP.Blazor.MapLibre@2.0.2
#addin nuget:?package=DP.Blazor.MapLibre&version=2.0.2
#tool nuget:?package=DP.Blazor.MapLibre&version=2.0.2
<a id="readme-top"></a>
<div align="center">
<img src="https://maplibre.org/_astro/maplibre-logo.wyLiUNdu_Zcg5mX.svg" alt="MapLibre" width="280" />
DP.Blazor.MapLibre
C# / Blazor wrapper around MapLibre GL JS.
Demo & docs · Report bug · Request feature
</div>
Origin
This repository started as a fork of Yet-another-solution/Blazor.MapLibre (Community.Blazor.MapLibre). It is now maintained independently under the DP.Blazor.MapLibre name and package identity.
Install
dotnet add package DP.Blazor.MapLibre
Optional plugins (separate NuGet packages):
dotnet add package DP.Blazor.MapLibre.TerraDrawPlugin
dotnet add package DP.Blazor.MapLibre.ComparePlugin
dotnet add package DP.Blazor.MapLibre.MinimapPlugin
dotnet add package DP.Blazor.MapLibre.FrameratePlugin
dotnet add package DP.Blazor.MapLibre.GeoGridPlugin
dotnet add package DP.Blazor.MapLibre.StarfieldPlugin
Add MapLibre CSS in your app:
<link href="_content/DP.Blazor.MapLibre/maplibre-gl/dist/maplibre-gl.css" rel="stylesheet" />
The JS bundle is ESM (maplibre-gl.mjs + worker) and is loaded by the component via prepareMapLibreGl. Do not use a classic <script src="…/maplibre-gl.js"> tag.
Targets: .NET 8 / 9 / 10. Bundled MapLibre GL JS: 6.2.0 (ESM: maplibre-gl.mjs + worker, restored via LibMan).
Typed interop facade
TypeScript sources live under src/DP.Blazor.MapLibre/ts. Build with:
cd src/DP.Blazor.MapLibre/ts
npm ci
npm run build
This typechecks the GeoportalMapHandle facade and emits wwwroot/js/geoportal-map-facade.js.
Browser lifecycle tests
cd tests/browser
npm ci
npx playwright install chromium
npm test
<MapLibre Options="_mapOptions" />
@code {
private readonly MapOptions _mapOptions = new();
}
See the documentation site for API notes, plugins, and live examples.
Publishing NuGet packages
Packages are published from CI when you push a version tag:
git tag v1.0.0
git push origin v1.0.0
Requires repository secret NUGET_USER (nuget.org profile username, not email) and a Trusted Publishing policy on nuget.org pointing at this repo + build-deploy-publish.yml.
You can also run the Build, Test, and Publish workflow manually (workflow_dispatch).
Documentation site (GitHub Pages)
On every push to main, CI builds the DocFX + examples site and deploys it via GitHub Actions.
- Repo Settings → Pages → Source: GitHub Actions
- Site URL:
https://denispolagaev.github.io/DP.Blazor.MapLibre/
License
Released under the Unlicense. MapLibre GL JS itself is under the BSD-3-Clause license — see MapLibre GL JS LICENSE.
Use of this library is at your own risk; it is provided as-is without warranty.
| 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
- Microsoft.AspNetCore.Components.Web (>= 10.0.9)
- OneOf (>= 3.0.271)
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.11)
- OneOf (>= 3.0.271)
- System.Text.Json (>= 10.0.9)
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.0)
- OneOf (>= 3.0.271)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on DP.Blazor.MapLibre:
| Package | Downloads |
|---|---|
|
DP.Blazor.MapLibre.FrameratePlugin
Framerate monitor control plugin for DP.Blazor.MapLibre. |
|
|
DP.Blazor.MapLibre.GeoGridPlugin
Geographic graticule (geogrid-maplibre-gl) plugin for DP.Blazor.MapLibre. |
|
|
DP.Blazor.MapLibre.MinimapPlugin
Minimap control plugin for DP.Blazor.MapLibre. |
|
|
DP.Blazor.MapLibre.ComparePlugin
Map compare (swipe) plugin for DP.Blazor.MapLibre. |
|
|
DP.Blazor.MapLibre.TerraDrawPlugin
Terra Draw drawing tools plugin for DP.Blazor.MapLibre. |
GitHub repositories
This package is not used by any popular GitHub repositories.