BlazorLeafletInterop 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package BlazorLeafletInterop --version 1.0.2
NuGet\Install-Package BlazorLeafletInterop -Version 1.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="BlazorLeafletInterop" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlazorLeafletInterop --version 1.0.2
#r "nuget: BlazorLeafletInterop, 1.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.
// Install BlazorLeafletInterop as a Cake Addin
#addin nuget:?package=BlazorLeafletInterop&version=1.0.2

// Install BlazorLeafletInterop as a Cake Tool
#tool nuget:?package=BlazorLeafletInterop&version=1.0.2

Blazor Leaflet Interop

This is a Blazor WASM library for Leaflet maps. It is a wrapper around the LeafletJS JavaScript library. It is a work in progress and only supports a small subset of the Leaflet API.

Getting Started

To make a simple map use the following code:

@page "/"

@using BlazorLeafletInterop.Components
@using BlazorLeafletInterop.Components.Base
@using BlazorLeafletInterop.Models
@using BlazorLeafletInterop.Models.Basics

<Map @ref="Map" Class="map" MapOptions="Options">
    <TileLayer @ref="TileLayer" UrlTemplate="https://tile.openstreetmap.org/{z}/{x}/{y}.png" />
    <Marker Icon="IconRef" LatLng="new LatLng(50, 9)">
        <Popup>
            Testing Popup Content
        </Popup>
        <Tooltip>
            Testing Tooltip Content
        </Tooltip>
    </Marker>
</Map>

@code {
    private Map? Map { get; set; }
    private TileLayer? TileLayer { get; set; }
    private MapOptions Options { get; set; } = new() { Center = new LatLng(50, 9), Zoom = 13 };
    private Icon? IconRef { get; set; }

    protected override async Task OnInitializedAsync()
    {
	    var options = new IconOptions()
	    {
		    IconUrl = "https://leafletjs.com/examples/custom-icons/leaf-green.png", 
		    IconSize = new Point(38, 95), 
		    IconAnchor = new Point(22, 94), 
		    PopupAnchor = new Point(-3, -76), 
		    ShadowUrl = "https://leafletjs.com/examples/custom-icons/leaf-shadow.png", 
		    ShadowSize = new Point(50, 64), 
		    ShadowAnchor = new Point(4, 62), 
		    ClassName = "my-div-icon"
	    };
	    IconRef = new Icon(options);
	}
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  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. 
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.3.2 222 1/19/2024
4.3.1 77 1/19/2024
4.3.0 168 12/15/2023
4.2.0 141 11/28/2023
4.1.2 125 11/13/2023
4.1.1 69 11/13/2023
4.1.0 89 11/13/2023
4.0.1 88 11/13/2023
4.0.0 78 11/12/2023
3.3.9 117 10/31/2023
3.3.8 116 10/31/2023
3.3.7 125 10/30/2023
3.3.6 117 10/29/2023
3.3.5 105 10/29/2023
3.3.4 107 10/29/2023
3.3.3 125 10/26/2023
3.3.2 106 10/26/2023
3.3.1 120 10/26/2023
3.2.0 104 10/25/2023
3.1.6 131 10/25/2023
3.1.5 100 10/25/2023
3.1.4 124 10/24/2023
3.1.3 113 10/24/2023
3.1.2 136 10/24/2023
3.1.1 112 10/24/2023
3.1.0 107 10/24/2023
3.0.3 122 10/20/2023
3.0.2 129 10/20/2023
3.0.1 111 10/19/2023
3.0.0 107 10/19/2023
2.1.0 124 10/18/2023
2.0.0 105 10/18/2023
1.0.6 120 10/17/2023
1.0.5 98 10/17/2023
1.0.4 126 10/17/2023
1.0.3 121 10/17/2023
1.0.2 106 10/16/2023