source

package
v0.0.0-...-1a91edc Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package source defines sources of WMTS tiles. Sources implement the source interface

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ESAMaps

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

func NewESAMaps

func NewESAMaps(layer string) *ESAMaps

func (ESAMaps) GetTile

func (f ESAMaps) GetTile(ctx context.Context, col, row, zoom uint64) ([]byte, error)

func (ESAMaps) Name

func (ESAMaps) Name() string

type ESAMapsProjection

type ESAMapsProjection string

type GeoPackage

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

GeoPackage implements a tile source by retrieving tiles from geopackage

func NewGeoPackage

func NewGeoPackage(fpb filePathBuilder, tableName string) *GeoPackage

NewGeoPackage yields a fresh new GeoPackage tile source

func (GeoPackage) GetTile

func (g GeoPackage) GetTile(ctx context.Context, props tile.Properties) (*tile.Tile, error)

func (GeoPackage) Name

func (GeoPackage) Name() string

type MapBox

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

func NewMapBox

func NewMapBox(layer, accessToken string) *MapBox

func (MapBox) GetTile

func (f MapBox) GetTile(ctx context.Context, props tile.Properties) (*tile.Tile, error)

func (MapBox) Name

func (m MapBox) Name() string

type Mocked

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

MockedSource implements tile source by always returning the same tile useful for testing and simulations

func NewMocked

func NewMocked(data io.Reader, encoding tile.EncodingType, name string) (*Mocked, error)

func NewMockedFromFile

func NewMockedFromFile(path string, encoding tile.EncodingType, name string) (*Mocked, error)

func (Mocked) GetTile

func (m Mocked) GetTile(_ context.Context, props tile.Properties) (*tile.Tile, error)

func (Mocked) Name

func (m Mocked) Name() string

type Source

type Source interface {
	GetTile(ctx context.Context, props tile.Properties) (*tile.Tile, error)
	Name() string
}

Source models the behavior of a tile retriever

type WSW

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

func NewWSW

func NewWSW() *WSW

func (WSW) GetTile

func (f WSW) GetTile(ctx context.Context, props tile.Properties) (*tile.Tile, error)

func (WSW) Name

func (WSW) Name() string

Directories

Path Synopsis
Package middleware defines utility decorators of sources as such, middlewares implement the source interface
Package middleware defines utility decorators of sources as such, middlewares implement the source interface

Jump to

Keyboard shortcuts

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