Versions in this module Expand all Collapse all v1 v1.2.0 Mar 25, 2023 v1.1.2 Sep 4, 2021 v1.1.1 May 9, 2021 v1.1.0 Apr 16, 2021 Changes in this version + var ErrInvalidLayerType = errors.New("invalid or unknown layer type") + var ErrInvalidTileCoord = errors.New("tile coordinates are not valid") + var ErrInvalidTileFormat = errors.New("invalid or unknown tile format") + var ErrNoUTFGrid = errors.New("tileset does not contain UTF grids") + var ErrTileNotFound = errors.New("tile not found") + var ErrTilesetNotFound = errors.New("tileset not found") + var ErrUnknownTileFormatPattern = errors.New("unknown tile format pattern") + func LoadTilesets(path string) error + type Attribute struct + Count int + Name string + Type string + Values []interface{} + type Layer struct + AttributeCount int + Attributes []Attribute + Count int64 + Geometry string + Name string + type LayerData struct + TileStats *TileStats + VectorLayers *[]VectorLayer + type LayerType int + const BaseLayer + const Overlay + func (t *LayerType) MarshalJSON() ([]byte, error) + func (t *LayerType) UnmarshalJSON(b []byte) error + func (t LayerType) String() string + type Metadata struct + Attribution string + Bounds [4]float64 + Center [3]float64 + Description string + Format TileFormat + LayerData *LayerData + MaxZoom int + MinZoom int + Name string + Type LayerType + Version string + type TileCoord struct + X uint64 + Y uint64 + Z uint8 + func ParseTileCoord(z, x, y string) (tc *TileCoord, err error) + type TileFormat int + const GZIP + const JPG + const PBF + const PNG + const UNKNOWN + const WEBP + const ZLIB + func (f *TileFormat) MarshalJSON() ([]byte, error) + func (f *TileFormat) UnmarshalJSON(b []byte) error + func (f TileFormat) ContentType() string + func (f TileFormat) String() string + type TileStats struct + LayerCount int + Layers []Layer + type Tileset struct + Filename string + Format TileFormat + Timestamp time.Time + UTFGrid bool + UTFGridCompression TileFormat + func GetTileset(id string) (*Tileset, error) + func NewTileset(file string) (*Tileset, error) + func (ts *Tileset) Close() error + func (ts *Tileset) ContentType() string + func (ts *Tileset) GetGrid(tc *TileCoord) ([]byte, error) + func (ts *Tileset) GetMetadata() (*Metadata, error) + func (ts *Tileset) GetTile(tc *TileCoord) ([]byte, error) + type VectorLayer struct + Description string + Fields map[string]interface{} + ID string + MaxZoom int + MinZoom int v1.1.0-beta.0 Jan 29, 2021 v1.0.0-beta.3 Jan 25, 2021 v1.0.0-beta.2 Sep 2, 2020 v1.0.0-beta.1 Feb 27, 2020 v1.0.0-beta.0 Jan 10, 2020