Skip to content

Commit

Permalink
Use correct values when generating quad keys
Browse files Browse the repository at this point in the history
The x, y and zoom level values have been used in wrong order,
resulting in incorrect quad keys being generated.
  • Loading branch information
M4rtinK committed Jun 27, 2015
1 parent 9d6a617 commit 2e28e20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/tiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def quadTree(tx, ty, zoom):
return quadKey

def getQuadtreeUrl(lzxy):
quadKey = quadTree(lzxy[1], lzxy[2], lzxy[3])
quadKey = quadTree(lzxy[2], lzxy[3], lzxy[1])
# don't know what the g argument is, maybe revision ?
# looks like it isn't optional
return '%s%s?g=452' % (lzxy[0].url, quadKey)

def getQuadtreeSubstitutionUrl(lzxy):
quadKey = quadTree(lzxy[1], lzxy[2], lzxy[3])
quadKey = quadTree(lzxy[2], lzxy[3], lzxy[1])
template = string.Template(lzxy[0].url)
return str(template.substitute(quadindex=quadKey))

Expand Down

0 comments on commit 2e28e20

Please sign in to comment.