diff --git a/googlemap.py b/googlemap.py index 48fede1..07e082d 100644 --- a/googlemap.py +++ b/googlemap.py @@ -71,6 +71,7 @@ class MapGen(object): self.web_assets_hook = configInfo.get('web_assets_hook', None) self.web_assets_path = configInfo.get('web_assets_path', None) self.bg_color = configInfo.get('bg_color') + self.north_direction = configInfo.get('north_direction', 'upper-right') if not len(quadtrees) > 0: raise ValueError("there must be at least one quadtree to work on") @@ -109,6 +110,8 @@ class MapGen(object): "{minzoom}", str(0)) config = config.replace( "{maxzoom}", str(zoomlevel)) + config = config.replace( + "{north_direction}", self.north_direction) config = config.replace("{spawn_coords}", json.dumps(list(self.world.spawn))) diff --git a/web_assets/overviewerConfig.js b/web_assets/overviewerConfig.js index ce38479..22097d0 100644 --- a/web_assets/overviewerConfig.js +++ b/web_assets/overviewerConfig.js @@ -79,7 +79,11 @@ var overviewerConfig = { * Set to true to turn on debug mode, which adds a grid to the map along * with co-ordinates and a bunch of console output. */ - 'debug': false + 'debug': false, + /** + * Set which way north points. + */ + 'north_direction': '{north_direction}' }, /** * Group definitions for objects that are partially selectable (signs and