LeafletForBlazor 4.0.0.22

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

LealletForBlazor32 Leaflet Map for Blazor

Leaflet for Blazor is a library that provides components for displaying map in Blazor applications.

πŸ”‘ KEYWORDS: Pure C# - Write map logic entirely in .NET / no JavaScript interop boilerplate, LINQ Integration - Destructuring/Structuring LINQ expression, Fluent API - objects Hierarchical and Linguistic structure and Chain methods, Zero JavaScript Config - no script references and no css links etc

NuGet Version NuGet DownloadsGitHub stars GitHub last commitLicense: MIT

🧩 Version 4.0 rehydrates the Map control. The new control will inherit the minimalism of the Map control and the optimizations of the RealTimeMap control.

βš™οΈ Core Concepts

  1. No JavaScript or HTML specific configurations required, no API script configurations, no CSS references, no HTML items etc.
  2. Optimized code through various solutions
    • minimizing the number of calls to JavaScript;
    • collection searches by destructuring and structuring LINQ expressions;
    • fluent API, a design pattern that allows code to be written in a readable way, similar to an English sentence
    • redusing size of the JavaScript code by removing unused code.
    • Memory Cache

More about Core Concept

πŸš€ Quick Start

πŸ”§ Basic configuration

πŸ”΅ Add the Map component to your project in just 3 steps:

  1. add LeafletForBlazor NuGet package:

Using Visual Studio interface:

  • Tools β†’ NuGet Package Manager β†’ Manage NuGet Packages for Solution...

Search for "LeafletForBlazor" and add the package to the project or solution.

Or using Visual Studio console:

  • Tools β†’ NuGet Package Manager β†’ Package Manager Console

    NuGet\Install-Package LeafletForBlazor
    
  1. add the LeafletForBlazor namespace to the project, using the @using directive

To do this, add the following directives to the _Imports.razor file

	@using LeafletForBlazor
	@using static LeafletForBlazor.Map
  1. Configuring the Blazor page (which will host the Map control):

The @using directive allows selecting the API for generating the map:

@using static LeafletForBlazor.techs.maps.Leaflet

πŸ—ΊοΈ Add Map

Adding the map to the blazor page:

<Map height="calc(100vh - 1rem)" width="calc(100vw - 2rem)"/>

More information

🧭 Map configuration

The loadParameter parameter of the Map component allows you to configure the map at initialization. The initialization parameters are:

  • πŸ“ Location of the center of the displayed map (View of Map):

     location = new Location()
     {
         latitude = 45.2831589721668,
         longitude = 27.98740645063448
     },
    
  • πŸ” Zoom Level

      zoomLevel = 12,
    
  • πŸŽ›οΈ Configuring map controls

      mapControls = new MapControls()
      {
          layerList = new LayerList() { position = Position.topRight },
          scaleBar = new ScaleBar()
          {
              position = Position.bottomRight,
              unitOfScaleBar = UnitOfScaleBar.metric
          },
    

more about Map Configuration - Blazor WebAssembly Standalone App

more about Map Configuration - .NET MAUI Blazor Hybrid App

πŸ“ StreamPoint collection

StreamPoint collection provides real-time map synchronization - any property change (coordinates, appearance, timestamp) instantly updates the map visualization. Objects are cached for performance but remain fully dynamic.

The StreamPoint collection is hosted by @map.Geometric.Points and provides operating functionalities with a predefined but hierarchically extensible root data structure.

more about StreamCollection - Blazor WebAssembly Standalone App

more about StreamCollection - .NET MAUI Blazor Hybrid App

🎨 Appearance

Appearance is a method that accepts Expression<Func<T, bool>> predicates and allows filtering and applying different styles to the elements displayed in the map:

await map.Geometric.Points.Appearance(e.type => e.type == "Market").SetStyle(...).SetLabel(...);

more about Appearance - Blazor WebAssembly Standalone App

more about Appearance - .NET MAUI Blazor Hybrid App

πŸ› οΈ Settings

Here you can configure how the collection of points displayed on the map behaves.

map.Geometric.Points.settings = new LeafletForBlazor.techs.core.Geometry.Points.Settings(){};

⚑ Events

StreamPoint Collection Events.

more about events

πŸ“Š Dashboard

StreamPoint collection can be used to monitor moving targets: vehicles, boats, aircraft, even fleets of vehicles, drones and so one.

more about Map Dashboard


O-L I - αΆœβ΄Λ‘α΅˜β·α΅˜β΅α΅˜αΆ Λ‘α΅‰β·βΈα΅˜βΏ πŸ•

Thank you for choosing this package!

Laurentiu Ichim

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0.22 0 7/30/2026
4.0.0.2 115 7/27/2026
4.0.0 180 7/24/2026
2.4.6.28 7,524 3/10/2026
2.4.6.26 1,678 2/19/2026
2.4.6.24 989 2/12/2026
2.4.6.22 313 2/11/2026
2.4.6.2 394 2/8/2026
2.4.6 292 2/5/2026
2.4.4.88 1,931 1/25/2026
2.4.4.86 334 1/21/2026
2.4.4.84 306 1/18/2026
2.4.4.82 354 1/17/2026
2.4.4.8 646 1/14/2026
2.4.4.6 189 1/13/2026
2.4.4.4 308 1/9/2026
2.4.4.2 392 1/5/2026
2.4.4 205 1/4/2026
2.4.2 222 12/31/2025
2.4.0.8 169 12/31/2025
Loading failed

1. @map.Geometric.Points.settings/animationSettings
2. @map.Geometric.Points.settings/extentSettings
3. isAnimationEnabled(bool) - Increase/Decrease animation mouse over chart
4. isFitExtentEnabled - Add/Update - change current Extent of Map View.