fix data for level selector
This commit is contained in:
parent
3392226c44
commit
ee20019417
3 changed files with 3 additions and 3 deletions
|
@ -697,7 +697,7 @@ c3nav = {
|
|||
c3nav._firstRouteLevel = null;
|
||||
for (i = c3nav.levels.length - 1; i >= 0; i--) {
|
||||
var level = c3nav.levels[i];
|
||||
var layerGroup = c3nav._levelControl.addLevel(level[0], level[2]);
|
||||
var layerGroup = c3nav._levelControl.addLevel(level[0], level[1]);
|
||||
c3nav._locationLayers[level[0]] = L.layerGroup().addTo(layerGroup);
|
||||
c3nav._routeLayers[level[0]] = L.layerGroup().addTo(layerGroup);
|
||||
}
|
||||
|
|
|
@ -122,7 +122,7 @@ def map_index(request, mode=None, slug=None, slug2=None, details=None, level=Non
|
|||
|
||||
ctx = {
|
||||
'bounds': json.dumps(Source.max_bounds(), separators=(',', ':')),
|
||||
'levels': json.dumps(tuple(levels.values()), separators=(',', ':')),
|
||||
'levels': json.dumps(tuple((level.pk, level.short_label) for level in levels.values()), separators=(',', ':')),
|
||||
'state': json.dumps(state, separators=(',', ':')),
|
||||
'tile_cache_server': settings.TILE_CACHE_SERVER,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue