~flavour/sahana-eden/trunk

« back to all changes in this revision

Viewing changes to deployment-templates/models/000_config.py

  • Committer: Fran Boon
  • Date: 2012-01-24 12:36:44 UTC
  • Revision ID: fran@aidiq.com-20120124123644-l3hi48oseybfgjp2
GIS: Prepop all config instead of using deployment_settings & zzz_1st_run

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
deployment_settings.gis.display_L0 = False
212
212
# Currently unused
213
213
#deployment_settings.gis.display_L1 = True
214
 
 
215
 
# Map settings that relate to locale, such as the number and names of the
216
 
# location hierarchy levels, are now in gis_config.  The site-wide gis_config
217
 
# will be populated from the settings here.
218
 
# @ToDo: Move to 1st_run to avoid confusion
219
 
deployment_settings.gis.location_hierarchy = OrderedDict([
220
 
    ("L0", T("Country")),
221
 
    ("L1", T("State")),
222
 
     #("L2", "%s / %s / %s" % (T("County"), T("District")),
223
 
    ("L3", "%s / %s / %s" % (T("City"), T("Town"), T("Village"))),
224
 
    #("L2", T("City")),
225
 
    #("L3", T("Town")),
226
 
    #("L4", T("Neighborhood")),
227
 
    #("L4", T("Village")),
228
 
])
229
 
# Maximum hierarchy level to allow for any map configuration.
230
 
deployment_settings.gis.max_allowed_hierarchy_level = "L4"
231
 
# @ToDo: Move to 1st_run to avoid confusion
232
 
deployment_settings.gis.default_symbology = "US"
233
 
# Default map configuration values for the site:
234
 
# @ToDo: Move this to zzz_1st_run / prepopulate
235
 
# @ToDo: Projections & Markers should use UUIDs not IDs
236
 
deployment_settings.gis.default_config_values = Storage(
237
 
    name = "Site Map Configuration",
238
 
    # Where the map is centered:
239
 
    lat = "22.593723263",
240
 
    lon = "5.28516253",
241
 
    # How close to zoom in initially -- larger is closer.
242
 
    zoom = 2,
243
 
    zoom_levels = 22,
244
 
    projection_id = 1,
245
 
    marker_id = 1,
246
 
    map_height = 600,
247
 
    map_width = 1000,
248
 
    # Rough bounds for locations, used by onvalidation to filter out lon, lat
249
 
    # which are obviously wrong (e.g. missing minus sign) or far outside the
250
 
    # intended region.
251
 
    min_lon = -180,
252
 
    min_lat = -90,
253
 
    max_lon = 180,
254
 
    max_lat = 90,
255
 
    # Optional source of map tiles.
256
 
    #wmsbrowser_name = "Web Map Service",
257
 
    #wmsbrowser_url = "http://geo.eden.sahanafoundation.org/geoserver/wms?service=WMS&request=GetCapabilities",
258
 
    search_level = "L0",
259
 
    # Should locations that link to a hierarchy location be required to link
260
 
    # at the deepest level? (False means they can have a hierarchy location of
261
 
    # any level as parent.)
262
 
    strict_hierarchy = False,
263
 
    # Should all specific locations (e.g. addresses, waypoints) be required to
264
 
    # link to where they are in the location hierarchy?
265
 
    location_parent_required = False
266
 
)
267
214
# Set this if there will be multiple areas in which work is being done,
268
215
# and a menu to select among them is wanted. With this on, any map
269
216
# configuration that is designated as being available in the menu will appear