33 lines
893 B
C#
33 lines
893 B
C#
using System.Text.Json.Serialization;
|
|
using TileServer.Domain.Tiles;
|
|
|
|
namespace TileServer.Application.Tiles;
|
|
|
|
public sealed record TileQueryResult(TileData Tile, string ExtractId, DateTimeOffset? BuiltAt);
|
|
|
|
public interface ITileQueryService
|
|
{
|
|
Task<TileQueryResult?> GetTileAsync(string extractId, TileCoordinate tile, CancellationToken ct);
|
|
|
|
TileJsonResponse GetTileJson(string extractId, string tilesUrl);
|
|
}
|
|
|
|
public sealed record TileJsonResponse(
|
|
string Tilejson,
|
|
string Name,
|
|
string[] Tiles,
|
|
double[] Bounds,
|
|
double[] Center,
|
|
int Minzoom,
|
|
int Maxzoom,
|
|
string Format,
|
|
string Attribution,
|
|
[property: JsonPropertyName("vector_layers")] IReadOnlyList<VectorLayerJson> VectorLayers);
|
|
|
|
public sealed record VectorLayerJson(
|
|
string Id,
|
|
string Description,
|
|
int Minzoom,
|
|
int Maxzoom,
|
|
IReadOnlyDictionary<string, string> Fields);
|