0

Reimplement signs/POIs

This commit is contained in:
Andrew Chin
2012-03-03 23:42:05 -05:00
parent 3fd9b82108
commit 6b77d54555
8 changed files with 346 additions and 14 deletions

View File

@@ -42,11 +42,6 @@ directory.
self.outputdir = outputdir
self.renders = dict()
# stores Points Of Interest to be mapped with markers
# This is a dictionary of lists of dictionaries
# Each regionset's name is a key in this dictionary
self.POI = dict()
# look for overviewerConfig in self.outputdir
try:
with open(os.path.join(self.outputdir, "overviewerConfig.js")) as c:
@@ -65,13 +60,6 @@ directory.
return dict()
def found_poi(self, regionset, poi_type, contents, chunkX, chunkY):
if regionset.name not in self.POI.keys():
POI[regionset.name] = []
# TODO based on the type, so something
POI[regionset.name].append
def initialize(self, tilesets):
"""Similar to finalize() but calls the tilesets' get_initial_data()
instead of get_persistent_data() to compile the generated javascript
@@ -152,6 +140,12 @@ directory.
global_assets = os.path.join(util.get_program_path(), "web_assets")
mirror_dir(global_assets, self.outputdir)
# write a dummy baseMarkers.js if none exists
if not os.path.exists(os.path.join(self.outputdir, "baseMarkers.js")):
with open(os.path.join(self.outputdir, "baseMarkers.js"), "w") as f:
f.write("// if you wants signs, please see genPOI.py\n");
# create overviewer.js from the source js files
js_src = os.path.join(util.get_program_path(), "overviewer_core", "data", "js_src")
if not os.path.isdir(js_src):