本文整理汇总了Python中tile.Tile.scale方法的典型用法代码示例。如果您正苦于以下问题:Python Tile.scale方法的具体用法?Python Tile.scale怎么用?Python Tile.scale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tile.Tile
的用法示例。
在下文中一共展示了Tile.scale方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_tile
# 需要导入模块: from tile import Tile [as 别名]
# 或者: from tile.Tile import scale [as 别名]
def test_tile(self):
#we'll go with zuerich
ll = (47.376957, 8.539893)
#for each zoom
for z in range(0, 19):
#get the tile coords
x, y, z = xyFromLatLng(ll, z, self.projection)
#the tile we want
tile = {'x': x, 'y': y, 'z': z, 'gid': 0, 'clientid': 0, 'priority':0 , 'style': 'map'}
print 'input: ' + str(tile)
#convert to mapware tile
tile = Tile(RenderTask.RenderTask(None, tile), self.projection)
print 'calc tile: ' + str(tile)
tile.scale = calculateScale(tile)
print 'calc scale: ' + str(tile)
示例2: test_tile
# 需要导入模块: from tile import Tile [as 别名]
# 或者: from tile.Tile import scale [as 别名]
def test_tile(self):
# we'll go with saramento (west coast bias)
ll = (38.555556, -121.468889)
# for each zoom
for z in range(0, 19):
# get the tile coords
x, y, z = xyFromLatLng(ll, z, self.projection)
print "Tile info", x, y, z
# the tile we want
tile = {"x": x, "y": y, "z": z, "gid": 0, "clientid": 0, "priority": 0, "style": "map"}
print "input: " + str(tile)
# convert to mapware tile
tile = Tile(RenderTask.RenderTask(None, tile), self.projection)
print "calc tile: " + str(tile)
tile.scale = calculateScale(tile)
print "calc scale: " + str(tile)
示例3: test_tile
# 需要导入模块: from tile import Tile [as 别名]
# 或者: from tile.Tile import scale [as 别名]
def test_tile(self):
#we'll go with saramento (west coast bias)
ll = (38.555556, -121.468889)
#for each zoom
for z in range(0, 19):
#get the tile coords
x, y, z = xyFromLatLng(ll, z, self.projection)
print "Tile info", x, y, z
#the tile we want
tile = {'x': x, 'y': y, 'z': z, 'gid': 0, 'clientid': 0, 'priority':0 , 'style': 'map'}
print 'input: ' + str(tile)
#convert to mapware tile
tile = Tile(RenderTask.RenderTask(None, tile), self.projection)
print 'calc tile: ' + str(tile)
tile.scale = calculateScale(tile)
print 'calc scale: ' + str(tile)