def worldmap(): """Generate a worldmap and return it.""" worldId = int(request.args.get("worldId")) if worldId == None: worldId = random.randint(1, 100000) width = 800 height = 500 zoom = 1.0 xoffset = 0 yoffset = 0 # Generate the map data mapdata = WorldMap.generate_map(worldId, width, height, xoffset, yoffset, zoom) # Colorize the data and return a png. myImage = WorldMap.colorize_map(mapdata) return send_file(myImage, mimetype="image/png", cache_timeout=100)
def worldmap(): """Generate a worldmap and return it.""" worldId = int(request.args.get('worldId')) if (worldId == None): worldId = random.randint(1, 100000) width = 800 height = 500 zoom = 1.0 xoffset = 0 yoffset = 0 # Generate the map data mapdata = WorldMap.generate_map(worldId, width, height, xoffset, yoffset, zoom) # Colorize the data and return a png. myImage = WorldMap.colorize_map(mapdata) return send_file(myImage, mimetype='image/png', cache_timeout=100)