Documentation ¶
Index ¶
- type DB
- func (tileset *DB) Close() error
- func (d DB) ContentType() string
- func (d DB) HasUTFGrid() bool
- func (d DB) HasUTFGridData() bool
- func (tileset *DB) ReadGrid(z uint8, x uint64, y uint64, data *[]byte) error
- func (tileset *DB) ReadMetadata() (map[string]interface{}, error)
- func (tileset *DB) ReadTile(z uint8, x uint64, y uint64, data *[]byte) error
- func (d DB) TileFormat() TileFormat
- func (d DB) TileFormatString() string
- func (d DB) TimeStamp() time.Time
- func (d DB) UTFGridCompression() TileFormat
- type TileFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func NewDB ¶
Creates a new DB instance. Connection is closed by runtime on application termination or by calling .Close() method.
func (DB) ContentType ¶
ContentType returns the content-type string of the TileFormat of the DB.
func (DB) HasUTFGrid ¶
HasUTFGrid returns whether the DB has a UTF grid.
func (DB) HasUTFGridData ¶
HasUTFGridData returns whether the DB has UTF grid data.
func (*DB) ReadGrid ¶
Reads a grid at z, x, y into provided *[]byte. This merges in grid key data, if any exist The data is returned in the original compression encoding (zlib or gzip)
func (*DB) ReadMetadata ¶
Read the metadata table into a map, casting their values into the appropriate type
func (DB) TileFormat ¶
func (d DB) TileFormat() TileFormat
TileFormatreturns the TileFormat of the DB.
func (DB) TileFormatString ¶
TileFormatString returns the string representation of the TileFormat of the DB.
func (DB) UTFGridCompression ¶
func (d DB) UTFGridCompression() TileFormat
UTFGridCompression returns the compression type of the UTFGrid in the DB: ZLIB or GZIP
type TileFormat ¶
type TileFormat uint8
const ( UNKNOWN TileFormat = iota GZIP // encoding = gzip ZLIB // encoding = deflate PNG JPG PBF WEBP )
func (TileFormat) ContentType ¶
func (t TileFormat) ContentType() string
func (TileFormat) String ¶
func (t TileFormat) String() string