1
0
forked from MTSR/mapserver

test fixes

This commit is contained in:
Thomas Rudin 2019-06-19 21:19:53 +02:00
parent ef6ad8d151
commit 2b706f0fe7
2 changed files with 4 additions and 3 deletions

View File

@ -140,7 +140,7 @@ func (r *MapBlockRenderer) Render(pos1, pos2 *coords.MapBlockCoords) (*image.NRG
c := r.colors.GetColor(nodeName)
hasfullpalette := nodeName == "unifiedbricks:brickblock"
if hasfullpalette {
if hasfullpalette && r.fullpalette != nil {
param2 := mb.GetParam2(x, y, z)
c = r.fullpalette.GetColor(param2)
}

View File

@ -2,7 +2,6 @@ package tilerenderer
import (
"bytes"
"github.com/sirupsen/logrus"
"io/ioutil"
"mapserver/colormapping"
"mapserver/coords"
@ -15,6 +14,8 @@ import (
"os"
"testing"
"time"
"github.com/sirupsen/logrus"
)
func TestTileRender(t *testing.T) {
@ -45,7 +46,7 @@ func TestTileRender(t *testing.T) {
t.Fatal(err)
}
r := mapblockrenderer.NewMapBlockRenderer(cache, c)
r := mapblockrenderer.NewMapBlockRenderer(cache, c, nil)
tiletmpdir, err := ioutil.TempDir("", "TestTileRenderTiles.*.sqlite")
defer os.RemoveAll(tiletmpdir)