mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-06-28 06:12:08 +02:00
Finished logic to supress pyramid regeneration in mtwebmapper. Untested.
This commit is contained in:
@ -177,6 +177,8 @@ func activeChanges(changes []xzc) map[xz]bool {
|
||||
|
||||
func (tu *tileUpdater) doUpdates() {
|
||||
|
||||
bth := common.NewBaseTileHash()
|
||||
|
||||
for {
|
||||
tu.cond.L.Lock()
|
||||
for len(tu.changes) == 0 {
|
||||
@ -201,7 +203,7 @@ func (tu *tileUpdater) doUpdates() {
|
||||
btc := common.NewBaseTileCreator(
|
||||
client, tu.colors, tu.bg,
|
||||
tu.yMin, tu.yMax,
|
||||
tu.transparent, baseDir, true)
|
||||
tu.transparent, baseDir, bth.Update)
|
||||
done.Add(1)
|
||||
go tu.updateBaseTiles(jobs, btc, &done)
|
||||
}
|
||||
@ -334,8 +336,12 @@ func (tu *tileUpdater) updateBaseTiles(
|
||||
for job := range jobs {
|
||||
xz := job.dequantize()
|
||||
//log.Printf("%d/%d %d/%d", x, z, job.X, job.Z)
|
||||
if err := btc.CreateTile(xz.X-1, xz.Z-1, int(job.X), int(job.Z)); err != nil {
|
||||
updated, err := btc.CreateTile(xz.X-1, xz.Z-1, int(job.X), int(job.Z))
|
||||
if err != nil {
|
||||
log.Printf("WARN: create tile failed: %s\n", err)
|
||||
}
|
||||
if !updated {
|
||||
job.canceled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user