diff --git a/roles/osm-vector/templates/iiab-update-osm b/roles/osm-vector/templates/iiab-update-osm index 395e6b114..ef25178b1 100755 --- a/roles/osm-vector/templates/iiab-update-osm +++ b/roles/osm-vector/templates/iiab-update-osm @@ -116,12 +116,14 @@ def write_osm_vector_idx(installed_maps): if map_dict == '': continue # Create the idx file in format required bo js-menu system - idx_dict[region] = {} - idx_dict[region]['file_name'] = os.path.basename(map_dict['url'][:-4]) - idx_dict[region]['menu_item'] = map_dict['perma_ref'] - idx_dict[region]['size'] = map_dict['size'] - idx_dict[region]['date'] = map_dict['date'] - idx_dict[region]['language'] = map_dict['perma_ref'][:2] + item = map_dict['perma_ref'] + idx_dict[item] = {} + idx_dict[item]['file_name'] = os.path.basename(map_dict['url'][:-4]) + idx_dict[item]['menu_item'] = map_dict['perma_ref'] + idx_dict[item]['size'] = map_dict['size'] + idx_dict[item]['date'] = map_dict['date'] + idx_dict[item]['region'] = region + idx_dict[item]['language'] = map_dict['perma_ref'][:2] with open(osm_vector_idx_dir + '/osm_version_idx.json','w') as idx: idx.write(json.dumps(idx_dict,indent=2)) @@ -143,7 +145,7 @@ def create_menu_def(region,default_name,intended_use='map'): menuDef["menu_item_name"] = default_name menuDef["title"] = "OpenStreetMap: 18 Levels of Zoom for " + item.get('title','ERROR') + '' menuDef["map_name"] = item['perma_ref'] - menuDef["start_url"] = lang + '-' + item['perma_ref'] + menuDef["start_url"] = "" menuDef["description"] = '
Resolution of the Whole World to 5 KM. OpenStreetMap data for ' + item.get('title','') + ' with details down to 5 Meters
' menuDef["extra_html"] = "" menuDef["automatically_generated"] = "true"