0

Avoid digging into the tileset when writing out config.js

This commit is contained in:
Andrew Chin
2012-01-16 21:32:12 -05:00
parent bbe105ead7
commit 0d23adb237
3 changed files with 20 additions and 19 deletions

View File

@@ -380,7 +380,22 @@ class TileSet(object):
TileSet. Typically this is called by AssetManager
"""
return None
def bgcolorformat(color):
return "#%02x%02x%02x" % color[0:3]
d = dict(name = self.options.get('title'),
zoomLevels = self.treedepth,
minZoom = 0,
defaultZoom = 1,
maxZoom = self.treedepth,
path = self.options.get('name'),
base = '',
bgcolor = bgcolorformat(self.options.get('bgcolor')),
world = self.options.get('worldname_orig'),
last_rendertime = self.this_rendertime,
north_direction = 'upper-left')
print "get_persistent_data: %r" % d
return d
def _find_chunk_range(self):
"""Finds the chunk range in rows/columns and stores them in
@@ -1301,6 +1316,7 @@ class RenderTile(object):
imgpath = ".".join((path, imgformat))
return imgpath
@classmethod
def from_path(cls, path):
"""Constructor that takes a path and computes the col,row address of