mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-08 11:10:27 +01:00
mtwebmapper: renamed yRanges to tileDepths in preparation of moving the BaseTileCreator to common.
This commit is contained in:
parent
3e4c1aa2d9
commit
b3ce895294
|
@ -25,8 +25,8 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
// To scan the whole height in terms of the y coordinate
|
// To scan the whole height in terms of the y coordinate
|
||||||
// the database is queried in height units defined in the yRanges table.
|
// the database is queried in height units defined in the tileDepths table.
|
||||||
var yRanges = [][]int16{
|
var tileDepths = [...][2]int16{
|
||||||
{1024, 1934},
|
{1024, 1934},
|
||||||
{256, 1023},
|
{256, 1023},
|
||||||
{128, 255},
|
{128, 255},
|
||||||
|
@ -88,12 +88,14 @@ func (tu *tileUpdater) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
tu.cond.L.Lock()
|
if len(newChanges) > 0 {
|
||||||
for _, c := range newChanges {
|
tu.cond.L.Lock()
|
||||||
tu.changes[c.quantize()] = true
|
for _, c := range newChanges {
|
||||||
|
tu.changes[c.quantize()] = true
|
||||||
|
}
|
||||||
|
tu.cond.L.Unlock()
|
||||||
|
tu.cond.Signal()
|
||||||
}
|
}
|
||||||
tu.cond.L.Unlock()
|
|
||||||
tu.cond.Signal()
|
|
||||||
|
|
||||||
rw.WriteHeader(http.StatusOK)
|
rw.WriteHeader(http.StatusOK)
|
||||||
}
|
}
|
||||||
|
@ -192,7 +194,7 @@ func (btc *BaseTileCreator) createTile(x, z int16, i, j int) error {
|
||||||
X1: 0, Z1: 0,
|
X1: 0, Z1: 0,
|
||||||
X2: int16(tileWidth) - 1, Z2: int16(tileHeight) - 1}
|
X2: int16(tileWidth) - 1, Z2: int16(tileHeight) - 1}
|
||||||
|
|
||||||
for _, yRange := range yRanges {
|
for _, yRange := range tileDepths {
|
||||||
c1.Y = yRange[0]
|
c1.Y = yRange[0]
|
||||||
c2.Y = yRange[1]
|
c2.Y = yRange[1]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user