Add "center" config option
This option allows you to specify your own initial center for a tileset, which is useful if your map is extremely asymmetric or you don't really care about what's around the spawn. Future work needs to be done on the JS side in order to fix the fromWorldToLatLng and friends, as they're currently off by -24 in X and +24 in Z direction. Closes #1350.
This commit is contained in:
@@ -589,7 +589,9 @@ class TileSet(object):
|
||||
imgextension=self.imgextension,
|
||||
isOverlay=isOverlay,
|
||||
poititle=self.options.get("poititle"),
|
||||
showlocationmarker=self.options.get("showlocationmarker")
|
||||
showlocationmarker=self.options.get("showlocationmarker"),
|
||||
center=(self.options.get("center") or self.options.get("spawn")
|
||||
or [0, 64, 0])
|
||||
)
|
||||
d['maxZoom'] = self.options.get('maxzoom', self.treedepth)
|
||||
if d['maxZoom'] < 0:
|
||||
|
||||
Reference in New Issue
Block a user