Skip to content

Commit

Permalink
Removed redundant map settings in favour of LEAFLET_CONFIG #152
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Sep 28, 2014
1 parent fecbb3b commit 8afeb8d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 7 additions & 2 deletions nodeshot/conf/project_template/project_name/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
SERVER_EMAIL = EMAIL_HOST_USER # used for error reporting

#NODESHOT_ADMIN_MAP_ZOOM = 5
#NODESHOT_ADMIN_MAP_COORDINATES = [41.8934, 12.4960]
LEAFLET_CONFIG.update({
'DEFAULT_CENTER': (49.06775, 30.62011),
'DEFAULT_ZOOM': 4,
'MIN_ZOOM': 1,
'MAX_ZOOM': 18,
'TILES': 'http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png',
})

# social auth
FACEBOOK_APP_ID = ''
Expand Down
2 changes: 0 additions & 2 deletions nodeshot/core/base/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@
})
ACL_DEFAULT_VALUE = getattr(settings, 'NODESHOT_ACL_DEFAULT_VALUE', 'public')
ACL_DEFAULT_EDITABLE = getattr(settings, 'NODESHOT_ACL_DEFAULT_EDITABLE', True)
ADMIN_MAP_COORDINATES = getattr(settings, 'NODESHOT_ADMIN_MAP_COORDINATES', [54.36775, 25.62011])
ADMIN_MAP_ZOOM = getattr(settings, 'NODESHOT_ADMIN_MAP_ZOOM', 1)
DISCONNECTABLE_SIGNALS = getattr(settings, 'NODESHOT_DISCONNECTABLE_SIGNALS', [])
8 changes: 4 additions & 4 deletions nodeshot/ui/default/settings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.conf import settings
# TODO: improve consistency
from nodeshot.core.base.settings import ADMIN_MAP_COORDINATES as MAP_CENTER
from leaflet import app_settings as LEAFLET_SETTINGS


TILESERVER_URL = getattr(settings, 'NODESHOT_UI_TILESERVER_URL', 'http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png')
MAP_ZOOM = getattr(settings, 'NODESHOT_FRONTEND_MAP_ZOOM', 4)
TILESERVER_URL = LEAFLET_SETTINGS['TILES'][0][1]
MAP_ZOOM = LEAFLET_SETTINGS['DEFAULT_ZOOM']
MAP_CENTER = LEAFLET_SETTINGS['DEFAULT_CENTER']

0 comments on commit 8afeb8d

Please sign in to comment.