Add project files.

This commit is contained in:
Bernard Darnton
2020-10-12 06:03:49 +13:00
parent 15357aad6b
commit 9576c5aa5b
61 changed files with 1993 additions and 0 deletions
@@ -0,0 +1,23 @@
using Microsoft.JSInterop;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace BlazorDeviceInterop.Components.LeafletMap
{
public class TileLayer : Layer
{
[JsonIgnore] public string UrlTemplate { get; }
[JsonIgnore] public TileLayerOptions Options { get; }
public TileLayer(string urlTemplate, TileLayerOptions options)
{
UrlTemplate = urlTemplate;
Options = options;
}
protected override async Task<JsRuntimeObjectRef> CreateJsObjectRef(IJSRuntime jsRuntime)
{
return await jsRuntime.InvokeAsync<JsRuntimeObjectRef>("LeafletMap.tileLayer", UrlTemplate, Options);
}
}
}