0

Added initial work on a structure to allow map annocations

The spawn point is automatically added to the gmap as a marker.
Adding other markers (signs, mob spawners, etc) should be fairly
easy.  Note: the math that converts from in-game block coordinates
to pixel coordinates is iffy.  it requires a careful codereview
This commit is contained in:
Andrew Chin
2010-09-24 23:26:43 -04:00
parent 32b776e6cc
commit 80c15a3910
3 changed files with 146 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ import functools
import re
import shutil
import collections
import json
from PIL import Image
@@ -119,6 +120,11 @@ class QuadtreeGen(object):
with open(os.path.join(self.destdir, "index.html"), 'w') as output:
output.write(html)
with open(os.path.join(self.destdir, "markers.js"), 'w') as output:
output.write("var markerData=%s" % json.dumps(self.world.POI))
def _get_cur_depth(self):
"""How deep is the quadtree currently in the destdir? This glances in
index.html to see what maxZoom is set to.