tile

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ALL            = -1
	BASE_DECIMAL   = 10
	MAX_ZOOM_LEVEL = 19
	TEMPLATE_X     = "${x}"
	TEMPLATE_Y     = "${y}"
	TEMPLATE_ZOOM  = "${z}"
	TILE_SIZE      = 256
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source interface {
	Get(zoom uint8, x uint32, y uint32) (Tile, error)
	Prefetch(level uint8)
}

* A source for map tiles.

func CreateOSMSource

func CreateOSMSource(uri string, cachePath string) Source

* Creates a tile source based on OpenStreetMaps data.

type Tile

type Tile interface {
	Data() io.ReadSeeker
	Id() TileId
}

* A map tile.

type TileId

type TileId interface {
	X() uint32
	Y() uint32
	Zoom() uint8
}

* A tile ID.

Jump to

Keyboard shortcuts

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