mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-07-13 21:40:31 +02:00
Render transparent tiles if command line flag is set.
This commit is contained in:
@ -48,6 +48,7 @@ func order(a, b int) (int, int) {
|
||||
func createBaseLevel(
|
||||
address string,
|
||||
xMin, zMin, xMax, zMax int,
|
||||
transparent bool,
|
||||
colorsFile, outDir string,
|
||||
numWorkers int) (err error) {
|
||||
|
||||
@ -71,7 +72,7 @@ func createBaseLevel(
|
||||
return
|
||||
}
|
||||
done.Add(1)
|
||||
btc := common.NewBaseTileCreator(client, colors, baseDir, false)
|
||||
btc := common.NewBaseTileCreator(client, colors, transparent, baseDir, false)
|
||||
go createTiles(btc, jobs, &done)
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ func main() {
|
||||
numWorkers int
|
||||
skipBaseLevel bool
|
||||
skipPyramid bool
|
||||
transparent bool
|
||||
)
|
||||
|
||||
flag.IntVar(&port, "port", 6379, "port to of mtredisalize server")
|
||||
@ -39,6 +40,8 @@ func main() {
|
||||
flag.BoolVar(&skipBaseLevel, "sb", false, "Do not generate base level tiles (shorthand)")
|
||||
flag.BoolVar(&skipPyramid, "skip-pyramid", false, "Do not generate pyramid tiles")
|
||||
flag.BoolVar(&skipPyramid, "sp", false, "Do not generate pyramid tiles (shorthand)")
|
||||
flag.BoolVar(&transparent, "transparent", false, "Render transparent blocks.")
|
||||
flag.BoolVar(&transparent, "t", false, "Render transparent blocks (shorthand).")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
@ -46,7 +49,12 @@ func main() {
|
||||
if !skipBaseLevel {
|
||||
address := fmt.Sprintf("%s:%d", host, port)
|
||||
if err = createBaseLevel(
|
||||
address, xMin, zMin, xMax, zMax, colorsFile, outDir, numWorkers); err != nil {
|
||||
address,
|
||||
xMin, zMin, xMax, zMax,
|
||||
transparent,
|
||||
colorsFile,
|
||||
outDir,
|
||||
numWorkers); err != nil {
|
||||
log.Fatalf("Creating base level tiles failed: %s", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user