overviewer / Minecraft-Overviewer

Render high-resolution maps of a Minecraft world with a Leaflet powered interface
https://overviewer.org/
GNU General Public License v3.0
3.36k stars 482 forks source link

Only first manual POI displaying #1216

Closed DavicXI closed 9 years ago

DavicXI commented 9 years ago

Only the first manual POI I've set shows up on the map. The first POI ("Pirate Cove" in this case) shows up perfectly, exactly as it should, but no others appear.

I've reshuffled the code a couple of times; the first item in the manualmarkers.py file will always be the onlyone to work, regardless of which I choose.

Non-manual POIS (signs, etc.) show up properly; it's only manual POIs that aren't working.

As best I can tell I've followed the guides correctly.

config file:

import sys
sys.path.append("/home/david_cellante_gmail_com/overviewer/")

from manualmarkers import *

def townFilter(poi):
    if poi['id'] == 'Town':
        try:
            return (poi['name'], poi['description'])
        except KeyError:
            return poi['name'] + '\n'

def fortFilter(poi):
    if poi['id'] == 'Fort':
        try:
            return (poi['name'], poi['description'])
        except KeyError:
            return poi['name'] + '\n'

def farmFilter(poi):
    if poi['id'] == 'Farm':
        try:
            return (poi['name'], poi['description'])
        except KeyError:
            return poi['name'] + '\n'

def portFilter(poi):
    if poi['id'] == 'Port':
        try:
            return (poi['name'], poi['description'])
        except KeyError:
            return poi['name'] + '\n'

def houseFilter(poi):
    if poi['id'] == 'House':
        try:
            return (poi['name'], poi['description'])
        except KeyError:
            return poi['name'] + '\n'

worlds["Beacon"] = "~/minecraft/Beacon"

renders["beaconDay"] = {
    "world": "Beacon",
    "title": "Beacon - Day",
    "rendermode": smooth_lighting,
    "dimension": "overworld",
    "manualpois":mymarkers,

"markers":
    [
        dict(name="Towns", filterFunction=townFilter, icon="marker_town.png", checked="true"),
        dict(name="Forts", filterFunction=fortFilter, icon="marker_tower.png"),
        dict(name="Farms", filterFunction=farmFilter, icon="marker_hoe_red.png"),
        dict(name="Houses", filterFunction=houseFilter, icon="marker_town_red.png"),
        dict(name="Ports", filterFunction=portFilter, icon="marker_ship_red.png", checked="true")
    ]
}

outputdir = "~/overviewer/render"

manualmarkers file:

mymarkers = [
    {
    'id':'Town',
    'x':1186,
    'y':69,
    'z':107,
    'name':'Pirate Cove',
    'description':'Though an independent harbour, Pirate Cove is the largest port in the Kingdom. As such, it serves as a natural trade and travel hub, despite (or perhaps due to) its general lawlessness.'
    },

    {
    'id':'Town',
    'x':120,
    'y':73,
    'z':280,
    'name':'Beacon',
    'description':'The largest farm in all the land, Beacon provides the Kingdom with the majority of its supplies. The Forestry lies to the North of the river, and the storehouse is buried in the hills to the South.'
    },

    {'id':'Town',
    'x':1359,
    'y':74,
    'z':376,
    'name':'Twin Keeps',
    'description':'This fortified town has the largest population of any in the Kingdom. The Two-Ponds Tavern can be found to the North-East, and Wesson\'s Smithy to the North-West.'
    },

    {'id':'Town',
    'x':1185,
    'y':70,
    'z':946,
    'name':'Brickpool',
    'description':'This town is the home of Lord Dylan, Steward of the Crown\'s Justice. The people here are hard, and their food even moreso.'
    },

    {
    'id':'Fort',
    'x':1422,
    'y':112,
    'z':405,
    'name':'Dylan\'s Fortress',
    'description':'The fortress of Lord Dylan is the seat of the King\'s Justice.'
    },

    {
    'id':'Fort',
    'x':1323,
    'y':104,
    'z':363,
    'name':'David\'s Fortress',
    'description':'The Fortress of Lord David serves as the primary source of magic in the King\'s absence'
    },

    {
    'id':'Fort',
    'x':1095,
    'y':68,
    'z':894,
    'name':'Fort Brickpool',
    'description':'This port protects Brickpool from attacks by sea.'
    },

    {
    'id':'Port',
    'x':1110,
    'y':68,
    'z':805,
    'name':'The Port of Brickpool',
    'description':'This fortified town has the largest population of any in the Kingdom. The Two-Ponds Tavern can be found to the North-East, and Wesson\'s Smithy to the North-West.'
    },

    {
    'id':'Port',
    'x':1440,
    'y':68,
    'z':275,
    'name':'Kingsport',
    'description':'This is the primary port of Twin Keeps.'
    },

    {
    'id':'Port',
    'x':1150,
    'y':68,
    'z':164,
    'name':'Pirate Cove',
    'description':'The largest port in the land.'
    },

    {
    'id':'Port',
    'x':205,
    'y':66,
    'z':222,
    'name':'Port Beacon',
    'description':'This small port serves the farm of Beacon, shipping goods throughout the Kingdom.'
    },

    {
    'id':'Port',
    'x':-2666,
    'y':68,
    'z':-330,
    'name':'<TBD> Port',
    'description':'<TBD> Port.'
    },

    {
    'id':'Farm',
    'x':133,
    'y':64,
    'z':254,
    'name':'Beacon Farm',
    'description':'Beacon Farm is the largest in the Kingdom. It supplies produce, timber, fabric, and herbs.'
    },

    {
    'id':'Farm',
    'x':1346,
    'y':70,
    'z':492,
    'name':'Twin Keeps Farmland',
    'description':'The lands to the south of Twin Keeps prvide its many citizens with food.'
    },

    {
    'id':'Farm',
    'x':-2795,
    'y':63,
    'z':-687,
    'name':'<TBD> farms',
    'description':'<TBD> Farms.'
    },

    {
    'id':'House',
    'x':85,
    'y':132,
    'z':298,
    'name':'Tower Tree',
    'description':'David\'s crib.'
    },

    {
    'id':'House',
    'x':120,
    'y':74,
    'z':325,
    'name':'Dylan\'s Bunker',
    'description':'Dylan\'s underground pad.'
    },

    {
    'id':'House',
    'x':94,
    'y':72,
    'z':344,
    'name':'Kit Keep',
    'description':'Kit\'s home of murder and dreams.'
    }
]
agrif commented 9 years ago

A fix for this has been merged, and updated windows and debian builds will be available shortly!