TinyTile.AspNetCore 0.0.1

dotnet add package TinyTile.AspNetCore --version 0.0.1
NuGet\Install-Package TinyTile.AspNetCore -Version 0.0.1
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="TinyTile.AspNetCore" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TinyTile.AspNetCore --version 0.0.1
#r "nuget: TinyTile.AspNetCore, 0.0.1"
#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 TinyTile.AspNetCore as a Cake Addin
#addin nuget:?package=TinyTile.AspNetCore&version=0.0.1

// Install TinyTile.AspNetCore as a Cake Tool
#tool nuget:?package=TinyTile.AspNetCore&version=0.0.1

TinyTile

Library for implementing or integrating tile services(TMS WMTS XYZ) in .NET application.

How to use

Intergrate xyz tile services to Asp.Net Core

Suppose Linq2db is the ORM.

[Table("points_of_interest", Schema = "public")]
public class Poi
{
    [Column("id"), PrimaryKey, NotNull]
    public int Id { get; set; }
    [Column("name")]
    public string Name { get; set; }
    [Column("kind")]
    public string Kind { get; set; }
    [Column("geom")]
    public Point Geometry { get; set; }
}
var source = new MbTile(path);
var layerMb = new Laye("points_mbtile_3857", source, gridSet:GridSet.Create(SRS.Epsg3857, schema:YAxisSchema.Xyz));

var pgSource = SqlSource.FromTable<TableAttribute,ColumnAttribute,Poi>(connstring,SRS.Epsg4326,t => t.Name,c => c.Name,new string[]{"0,4,0.2","4,8,0.4","8,16,0.5","16,21,1.0"});

var layerPg = new Layer("points_pg_4326",pgSource,gridSet:GridSet.Create(SRS.Epsg3857,schema:YAxisSchema.Xyz));

services
// AddMvc() 
// AddControllersWithViews()
.AddControllers()
.AddXyz(services,xyzBuilder => {
    xyzBuilder.Prefix = "geo/tiles/xyz";
    xyzBuilder.AddLayer(layerMb);
    xyzBuilder.AddLayer(layerPg);
});

See DemoApp for details.

Demo App

You should firstly create and init postgis database.

cd DemoApp
dotnet run

Visit mbtile xyz service,http://localhost:8088/mbtiles@3857@xyz.html avatar Visit PostGIS xyz service, http://localhost:8088/postgis@4490@xyz.html avatar

TO DO

  • Support other vector format tile,eg geojson,topojson...

  • Support various mbtiles(1.3 and epsg3857 only now)

  • Support render vector data source to raster tile(png,jpeg...) with styles(mapbox style,sld..)

  • Support WMTS

  • Support TMS

  • Support raster data source

  • Support various vector data source,eg PostGIS,Shapefile,GeoJson,Tile files,etc

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  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.1 is compatible.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
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
0.0.1 286 7/2/2021