sensible default initial bounds
This commit is contained in:
parent
47c661095c
commit
4ec2a7bb8b
1 changed files with 2 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
import json
|
import json
|
||||||
|
from itertools import chain
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
import qrcode
|
import qrcode
|
||||||
|
@ -115,7 +116,7 @@ def map_index(request, mode=None, slug=None, slug2=None, details=None, options=N
|
||||||
|
|
||||||
initial_bounds = settings.INITIAL_BOUNDS
|
initial_bounds = settings.INITIAL_BOUNDS
|
||||||
if not initial_bounds:
|
if not initial_bounds:
|
||||||
initial_bounds = (0, 0, 10, 10)
|
initial_bounds = tuple(chain(*Source.max_bounds()))
|
||||||
|
|
||||||
ctx = {
|
ctx = {
|
||||||
'bounds': json.dumps(Source.max_bounds(), separators=(',', ':')),
|
'bounds': json.dumps(Source.max_bounds(), separators=(',', ':')),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue