test

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "test"

Variables

View Source
var (
	Count    int
	MVTCount int
)

Functions

func Cleanup

func Cleanup()

Cleanup cleans up all the test providers.

func NewMVTTileProvider added in v0.12.0

func NewMVTTileProvider(config dict.Dicter) (provider.MVTTiler, error)

NewMVTTileProvider setups a test provider for mvt tiles providers. The only supported parameter is "test_file", which should point to a mvt tile file to return for MVTForLayers

func NewTileProvider

func NewTileProvider(config dict.Dicter) (provider.Tiler, error)

NewTileProvider setups a test provider. there are not currently any config params supported

Types

type TileProvider

type TileProvider struct {
	MVTTile []byte
}

TileProvider mocks out a tile provider

func (*TileProvider) Layers

func (tp *TileProvider) Layers() ([]provider.LayerInfo, error)

Layers returns the configured layers, there is always only one "test-layer"

func (*TileProvider) MVTForLayers added in v0.12.0

func (tp *TileProvider) MVTForLayers(ctx context.Context, _ provider.Tile, _ []provider.Layer) ([]byte, error)

MVTForLayers mocks out MVTForLayers by just returning the MVTTile bytes, this will never error

func (*TileProvider) TileFeatures

func (tp *TileProvider) TileFeatures(ctx context.Context, layer string, t provider.Tile, fn func(f *provider.Feature) error) error

TileFeatures always returns a feature with a polygon outlining the tile's Extent (not Buffered Extent)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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