Skip to content

Commit

Permalink
fix exception on tiles not in archive
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon committed Jun 8, 2021
1 parent dee5491 commit ec1f005
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ func main() {
tile_value := <-tile_req.value
tile = tile_value.bytes
} else {
if coord.Z < root_value.directory.LeafZ {
w.WriteHeader(404)
return
}
leaf := pmtiles.GetParentTile(coord, root_value.directory.LeafZ)

offsetlen, ok := root_value.directory.Leaves[leaf]
Expand Down

0 comments on commit ec1f005

Please sign in to comment.