BlazorLeaflet 0.1.0-alpha
See the version list below for details.
dotnet add package BlazorLeaflet --version 0.1.0-alpha
NuGet\Install-Package BlazorLeaflet -Version 0.1.0-alpha
<PackageReference Include="BlazorLeaflet" Version="0.1.0-alpha" />
paket add BlazorLeaflet --version 0.1.0-alpha
#r "nuget: BlazorLeaflet, 0.1.0-alpha"
// Install BlazorLeaflet as a Cake Addin #addin nuget:?package=BlazorLeaflet&version=0.1.0-alpha&prerelease // Install BlazorLeaflet as a Cake Tool #tool nuget:?package=BlazorLeaflet&version=0.1.0-alpha&prerelease
<div align="center"> <img src="media/logo.png" width=300> <h1>Blazor Leaflet</h1> <div> <a href="#description">Description</a> • <a href="#installation">Installation</a> • <a href="#samples">Samples</a> </div> </div>
Description
BlazorLeaflet is a wrapper offering easy-to-use Blazor components that expose the <a href="https://leafletjs.com/">Leaflet API</a> in C#.
The wrapper is still in its early days so it's very lackluster and doesn't expose the entirety of leaflet's API.
Check out the samples project to learn how to use it.
<img src="media/example1.gif" height=400>
Installation
Install the package in the target project:
dotnet add package BlazorLeaflet
In your _Host
file reference the interoperability script in the <head>
element like so:
<script src="_content/BlazorLeaflet/leafletBlazorInterops.js"></script>
You can now use the components and the rest of the library.
Samples
Create the map
<LeafletMap Layers="_layers" InitialPosition="_startAt" InitialZoom="4.8f" />
Bind the parameters to the respective objects
private PointF _startAt = new PointF(47.5574007f, 16.3918687f);
private ObservableCollection<Layer> _layers = // etc...
Storing the layers in an ObservableCollection will automatically update the map as soon as the collection changed.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.Components (>= 3.0.0-rc1.19457.4)
- Microsoft.AspNetCore.Components.Web (>= 3.0.0-rc1.19457.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on BlazorLeaflet:
Package | Downloads |
---|---|
Blazor-Map-Component
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.4.0-alpha | 22,618 | 1/21/2020 |
0.3.0-alpha | 381 | 12/5/2019 |
0.2.0-alpha | 454 | 9/25/2019 |
0.1.0-alpha | 330 | 9/24/2019 |