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
                    
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="DP.Blazor.MapLibre" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DP.Blazor.MapLibre" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="DP.Blazor.MapLibre" />
                    
Project file
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 DP.Blazor.MapLibre --version 2.0.2
                    
#r "nuget: DP.Blazor.MapLibre, 2.0.2"
                    
#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 DP.Blazor.MapLibre@2.0.2
                    
#: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=DP.Blazor.MapLibre&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=DP.Blazor.MapLibre&version=2.0.2
                    
Install as a Cake Tool

<a id="readme-top"></a>

<div align="center">

NuGet License: Unlicense Build

<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.

  1. Repo Settings → Pages → Source: GitHub Actions
  2. 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
2.0.2 193 8/20/2026
2.0.1 178 8/10/2026
2.0.0 167 8/9/2026
1.0.0 204 7/30/2026