Google maps js needs to know north-direction
This commit is contained in:
@@ -71,6 +71,7 @@ class MapGen(object):
|
|||||||
self.web_assets_hook = configInfo.get('web_assets_hook', None)
|
self.web_assets_hook = configInfo.get('web_assets_hook', None)
|
||||||
self.web_assets_path = configInfo.get('web_assets_path', None)
|
self.web_assets_path = configInfo.get('web_assets_path', None)
|
||||||
self.bg_color = configInfo.get('bg_color')
|
self.bg_color = configInfo.get('bg_color')
|
||||||
|
self.north_direction = configInfo.get('north_direction', 'upper-right')
|
||||||
|
|
||||||
if not len(quadtrees) > 0:
|
if not len(quadtrees) > 0:
|
||||||
raise ValueError("there must be at least one quadtree to work on")
|
raise ValueError("there must be at least one quadtree to work on")
|
||||||
@@ -109,6 +110,8 @@ class MapGen(object):
|
|||||||
"{minzoom}", str(0))
|
"{minzoom}", str(0))
|
||||||
config = config.replace(
|
config = config.replace(
|
||||||
"{maxzoom}", str(zoomlevel))
|
"{maxzoom}", str(zoomlevel))
|
||||||
|
config = config.replace(
|
||||||
|
"{north_direction}", self.north_direction)
|
||||||
|
|
||||||
config = config.replace("{spawn_coords}",
|
config = config.replace("{spawn_coords}",
|
||||||
json.dumps(list(self.world.spawn)))
|
json.dumps(list(self.world.spawn)))
|
||||||
|
|||||||
@@ -79,7 +79,11 @@ var overviewerConfig = {
|
|||||||
* Set to true to turn on debug mode, which adds a grid to the map along
|
* 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.
|
* 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
|
* Group definitions for objects that are partially selectable (signs and
|
||||||
|
|||||||
Reference in New Issue
Block a user