示例#1
0
	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)
 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
0
 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)