tilemap

package module
v0.0.0-...-456fa5e Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: MIT Imports: 10 Imported by: 0

README

tilemap

An optimized open streetmap API that memory maps a single map of tiles. Includes associated tools for importing and serving tiles.

Documentation

Index

Constants

View Source
const (
	NO_COMP uint32 = 0x00000400
	COMP    uint32 = 0x00000004
	NO_COW  uint32 = 0x00800000
)
View Source
const (
	MaxZoom = maxDimension
)

Variables

View Source
var (
	ErrInvalidBufferSize   = errors.New("Invalid buffer size")
	ErrInvalidDimension    = errors.New("Invalid tile zoom")
	ErrInvalidTileID       = errors.New("invalid tile id")
	ErrInvalidTileBuffer   = errors.New("invalid tile buffer")
	ErrInvalidDatapointer  = errors.New("invalid tile datapointer, file may be corrupt")
	ErrInvalidDPRegionSize = errors.New("invalid tile datapointer region size, file may be corrupt")
	ErrPartialWrite        = errors.New("Partial write")
)

Functions

This section is empty.

Types

type Tilemap

type Tilemap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewTilemap

func NewTilemap(pth string, zoom int, ro bool) (w *Tilemap, err error)

func (*Tilemap) Add

func (w *Tilemap) Add(x, y int, buff []byte) (err error)

func (*Tilemap) Close

func (w *Tilemap) Close() (err error)

func (*Tilemap) GetTile

func (w *Tilemap) GetTile(x, y int) (buff []byte, err error)

Directories

Path Synopsis
tools

Jump to

Keyboard shortcuts

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