Exemplo n.º 1
0
def welcomepage():
    """This is the first page anyone sees."""
    worldId = request.args.get('worldId')
    if (worldId == None):
        worldId = random.randint(1, 100000)
    worldname = WorldMap.generate_name(worldId, server)
    return render_template('map.html', worldId=worldId, worldname=worldname)
Exemplo n.º 2
0
def welcomepage():
    """This is the first page anyone sees."""
    worldId = request.args.get("worldId")
    if worldId == None:
        worldId = random.randint(1, 100000)
    worldname = WorldMap.generate_name(worldId, server)
    return render_template("map.html", worldId=worldId, worldname=worldname)
Exemplo n.º 3
0
def worldspecularmap():
    """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.specular_map(mapdata)

    return send_file(myImage, mimetype="image/png", cache_timeout=100)
Exemplo n.º 4
0
def worldspecularmap():
    """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.specular_map(mapdata)

    return send_file(myImage, mimetype='image/png', cache_timeout=100)