osm

package
v0.0.2-rc-ci Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Router

func Router(service *Service) func(chi.Router)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (Client) GetTile

func (c Client) GetTile(ctx context.Context, z, x, y int) ([]byte, error)

type FileCache

type FileCache struct {
	// contains filtered or unexported fields
}

func (FileCache) Clear

func (f FileCache) Clear() error

func (FileCache) GetTile

func (f FileCache) GetTile(ctx context.Context, z, x, y int) ([]byte, error)

func (FileCache) SetTile

func (f FileCache) SetTile(ctx context.Context, z, x, y int, tile []byte) error

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(cacheDir string, tileServer string) *Service

func (*Service) ClearCache

func (s *Service) ClearCache(ctx context.Context) error

func (*Service) GetTile

func (s *Service) GetTile(ctx context.Context, z, x, y int) ([]byte, error)

func (*Service) LastModified

func (s *Service) LastModified() time.Time

type Tiler

type Tiler interface {
	GetTile(ctx context.Context, z, x, y int) ([]byte, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL