From 56a8970bdce933f2469fe54ed1ea7fc936265c22 Mon Sep 17 00:00:00 2001 From: Gregory Short Date: Mon, 6 Sep 2010 17:44:08 -0500 Subject: [PATCH 1/2] Updated template.html to use google maps api v3. This also resolves the bug where double-clicking on the right side of the map to zoom in would zoom somewhere else entirely. --- template.html | 207 +++++++++++++++++--------------------------------- 1 file changed, 70 insertions(+), 137 deletions(-) diff --git a/template.html b/template.html index f960e14..fbb5b27 100644 --- a/template.html +++ b/template.html @@ -1,140 +1,73 @@ - - - - - + - - Minecraft Map Viewer - - - -
-
-
- - + }; + map = new google.maps.Map(document.getElementById("mcmap"), mapOptions); + + // Now attach the coordinate map type to the map's registry + map.mapTypes.set('mcmap', MCMapType); + + // We can now set the map to use the 'coordinate' map type + map.setMapTypeId('mcmap'); + } + + + +
+ + \ No newline at end of file From bf07d3d10c2e00eba3371cff700c8f3cb4d8e3e8 Mon Sep 17 00:00:00 2001 From: Gregory Short Date: Mon, 6 Sep 2010 19:58:56 -0500 Subject: [PATCH 2/2] Moved gmap tiles into a tiles/ subdirectory for a cleaner gmap final output (output directory contains just index.html and tiles/) --- gmap.py | 5 ++++- template.html | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gmap.py b/gmap.py index 6f56698..77e9be3 100755 --- a/gmap.py +++ b/gmap.py @@ -41,8 +41,11 @@ def main(): if not os.path.exists(destdir): os.mkdir(destdir) + tiledir = os.path.join(destdir, "tiles"); + if not os.path.exists(tiledir): + os.mkdir(tiledir) - zoom = world.generate_quadtree(results, mincol, maxcol, minrow, maxrow, destdir) + zoom = world.generate_quadtree(results, mincol, maxcol, minrow, maxrow, tiledir) print "DONE" diff --git a/template.html b/template.html index fbb5b27..2d87c39 100644 --- a/template.html +++ b/template.html @@ -12,7 +12,7 @@