mapserver/tilerenderer/renderer.go

30 lines
599 B
Go
Raw Normal View History

2019-01-11 18:00:40 +03:00
package tilerenderer
import (
2019-01-13 18:37:03 +03:00
"image"
"mapserver/coords"
"mapserver/mapblockrenderer"
2019-01-11 18:00:40 +03:00
)
type TileRenderer struct {
2019-01-13 18:37:03 +03:00
mapblockrenderer *mapblockrenderer.MapBlockRenderer
2019-01-11 18:00:40 +03:00
}
2019-01-17 10:53:07 +03:00
func NewTileRenderer(mapblockrenderer *mapblockrenderer.MapBlockRenderer) *TileRenderer {
2019-01-13 18:37:03 +03:00
return &TileRenderer{
mapblockrenderer: mapblockrenderer,
}
2019-01-11 18:00:40 +03:00
}
//TODO layerConfig
2019-01-17 10:53:07 +03:00
func (tr *TileRenderer) Render(tc coords.TileCoords) (*image.NRGBA, error) {
2019-01-17 12:04:09 +03:00
if tc.Zoom == 13 {
//max zoomed in on mapblock level
//mbr := coords.GetMapBlockRangeFromTile(tc, 0)
//return tr.mapblockrenderer.Render()
}
2019-01-13 18:37:03 +03:00
return nil, nil
2019-01-11 18:00:40 +03:00
}