Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTileRendererChan ¶
func NewTileRendererChan(stylesheet string) chan<- TileFetchRequest
Types ¶
type LayerMultiplex ¶
type LayerMultiplex struct {
// contains filtered or unexported fields
}
func DefaultRenderMultiplex ¶
func DefaultRenderMultiplex(defaultStylesheet string) *LayerMultiplex
func NewLayerMultiplex ¶
func NewLayerMultiplex() *LayerMultiplex
func (*LayerMultiplex) AddRenderer ¶
func (l *LayerMultiplex) AddRenderer(name string, stylesheet string)
func (*LayerMultiplex) AddSource ¶
func (l *LayerMultiplex) AddSource(name string, fetchChan chan<- TileFetchRequest)
func (LayerMultiplex) SubmitRequest ¶
func (l LayerMultiplex) SubmitRequest(r TileFetchRequest) bool
type TileCoord ¶
func (TileCoord) OSMFilename ¶
type TileDb ¶
type TileDb struct {
// contains filtered or unexported fields
}
MBTiles 1.2-compatible Tile Db with multi-layer support. Was named Mbtiles before, hence the use of *m in methods.
func (TileDb) InsertQueue ¶
func (m TileDb) InsertQueue() chan<- TileFetchResult
func (TileDb) RequestQueue ¶
func (m TileDb) RequestQueue() chan<- TileFetchRequest
type TileFetchRequest ¶
type TileFetchRequest struct { Coord TileCoord OutChan chan<- TileFetchResult }
type TileFetchResult ¶
type TileRenderer ¶
type TileRenderer struct {
// contains filtered or unexported fields
}
Renders images as Web Mercator tiles
func NewTileRenderer ¶
func NewTileRenderer(stylesheet string) *TileRenderer
func (*TileRenderer) RenderTile ¶
func (t *TileRenderer) RenderTile(c TileCoord) ([]byte, error)
func (*TileRenderer) RenderTileZXY ¶
func (t *TileRenderer) RenderTileZXY(zoom, x, y uint64) ([]byte, error)
Render a tile with coordinates in Google tile format. Most upper left tile is always 0,0. Method is not thread-safe, so wrap with a mutex when accessing the same renderer by multiple threads or setup multiple goroutinesand communicate with channels, see NewTileRendererChan.
type TileServer ¶
type TileServer struct { TmsSchema bool // contains filtered or unexported fields }
Handles HTTP requests for map tiles, caching any produced tiles in an MBtiles 1.2 compatible sqlite db.
func NewTileServer ¶
func NewTileServer(cacheFile string) *TileServer
func (*TileServer) AddMapnikLayer ¶
func (t *TileServer) AddMapnikLayer(layerName string, stylesheet string)
func (*TileServer) ServeHTTP ¶
func (t *TileServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*TileServer) ServeTileRequest ¶
func (t *TileServer) ServeTileRequest(w http.ResponseWriter, r *http.Request, tc TileCoord)
Click to show internal directories.
Click to hide internal directories.