Versions in this module Expand all Collapse all v2 v2.1.0 Jan 26, 2026 Changes in this version + type BytesBufferPool struct + func NewBytesBufferPool(maxPoolSize, maxBufferSize int) *BytesBufferPool + func (p *BytesBufferPool) Get() *bytes.Buffer + func (p *BytesBufferPool) Put(buf *bytes.Buffer) + func (p *BytesBufferPool) Stats() PoolStats + type PoolStats struct + Active int64 + Created int64 + ReuseRatio float64 + Reused int64 + type WorkerGzipCompressor struct + func NewWorkerGzipCompressor(level int) *WorkerGzipCompressor + func (c *WorkerGzipCompressor) Compress(data []byte, buf *bytes.Buffer) (*bytes.Buffer, error) v2.0.2 Dec 17, 2025 v2.0.1 May 20, 2024 Changes in this version + func CreateMetadataJSON(tj *TileJSON) *mbtiles.MetadataJson + func Gzip(data []byte) ([]byte, error) + func ParseTileJSON(filename string) (*TileJSON, ZoomLayerInfo, error) + func RoundRobinTiles(input []TileCoords, numWorkers int) [][]TileCoords + type BoundingBox struct + Bottom float64 + Left float64 + Right float64 + Top float64 + type CreateMetadataOptions struct + Filename string + Format MbTilesFormat + Version string + type DummyWriter struct + func (fw *DummyWriter) New() (TileWriter, func(), error) + func (fw *DummyWriter) Write(z, x, y int, tileData []byte) error + type FileWriter struct + Path string + func (fw *FileWriter) New() (TileWriter, func(), error) + func (fw *FileWriter) Write(z, x, y int, tileData []byte) error + type MbTilesFormat string + const MbTilesFormatJpg + const MbTilesFormatPbf + const MbTilesFormatPng + const MbTilesFormatWebP + type MbTilesMetadata map[string]string + func CreateMetadata(tj *TileJSON, opts CreateMetadataOptions) MbTilesMetadata + type MbTilesWriter struct + Filename string + Writer *mbtiles.Writer + func (w *MbTilesWriter) BulkWrite(data []mbtiles.TileData) error + func (w *MbTilesWriter) BulkWriteMetadata(meta MbTilesMetadata) error + func (w *MbTilesWriter) New() (TileWriter, func(), error) + func (w *MbTilesWriter) Write(z, x, y int, tileData []byte) error + func (w *MbTilesWriter) WriteMetadata(name, value string) error + type TileBulkWriter interface + BulkWrite func(data []mbtiles.TileData) error + type TileCoords struct + X int + Y int + Z int + func ListTiles(zooms []int, tj *TileJSON) []TileCoords + func TilesFromFile(filename string) ([]TileCoords, error) + type TileJSON struct + Attribution string + Bounds []float64 + Center []float64 + Description string + MaxZoom int + MinZoom int + Name string + VectorLayers []VectorLayer + Version string + type TileWriter interface + New func() (TileWriter, func(), error) + Write func(z, x, y int, tileData []byte) error + type VectorLayer struct + ID string + Queries []VectorQuery + type VectorQuery struct + MaxZoom int + MinZoom int + SQL string + type ZoomLayerInfo map[int]map[string][]string