mvtprovider

package
v0.0.0-...-05a1c04 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const NamePrefix = "mvt_"

Variables

This section is empty.

Functions

func Cleanup

func Cleanup()

func Drivers

func Drivers() (l []string)

Drivers returns a list of registered drivers.

func Register

func Register(name string, init InitFunc, cleanup CleanupFunc) error

Register the provider with the system. This call is generally made in the init functions of the provider.

the clean up function will be called during shutdown of the provider to allow the provider to do any cleanup.

Types

type CleanupFunc

type CleanupFunc func()

CleanupFunc is called to when the system is shuting down, this allows the provider to cleanup.

type InitFunc

type InitFunc func(dicter dict.Dicter) (Tiler, error)

InitFunc initialize a provider given a config map. The init function should validate the config map, and report any errors. This is called by the For function.

type Layer

type Layer struct {
	// Name is the name of the Layer as recognized by the provider
	Name string
	// MVTName is the name of the layer to encode into the MVT.
	// this is often used when different provider layers are used
	// at different zoom levels but the MVT layer name is consistent
	MVTName string
}

layer holds information about a query.

type Tiler

type Tiler interface {
	provider.Layerer

	// MVTForLayers will return a MVT byte array or an error for the given layer names.
	MVTForLayers(ctx context.Context, tile provider.Tile, layers []Layer) ([]byte, error)
}

func For

func For(name string, config dict.Dicter) (Tiler, error)

For function returns a configured provider of the given type, provided the correct config map.

Directories

Path Synopsis
Package postgis is a placeholder for the postgis database.
Package postgis is a placeholder for the postgis database.

Jump to

Keyboard shortcuts

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