mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2024-11-10 12:10:23 +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
|
||||
// the database is queried in height units defined in the yRanges table.
|
||||
var yRanges = [][]int16{
|
||||
// the database is queried in height units defined in the tileDepths table.
|
||||
var tileDepths = [...][2]int16{
|
||||
{1024, 1934},
|
||||
{256, 1023},
|
||||
{128, 255},
|
||||
|
@ -88,12 +88,14 @@ func (tu *tileUpdater) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
tu.cond.L.Lock()
|
||||
for _, c := range newChanges {
|
||||
tu.changes[c.quantize()] = true
|
||||
if len(newChanges) > 0 {
|
||||
tu.cond.L.Lock()
|
||||
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)
|
||||
}
|
||||
|
@ -192,7 +194,7 @@ func (btc *BaseTileCreator) createTile(x, z int16, i, j int) error {
|
|||
X1: 0, Z1: 0,
|
||||
X2: int16(tileWidth) - 1, Z2: int16(tileHeight) - 1}
|
||||
|
||||
for _, yRange := range yRanges {
|
||||
for _, yRange := range tileDepths {
|
||||
c1.Y = yRange[0]
|
||||
c2.Y = yRange[1]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user