@ -5,6 +5,9 @@ $config['categoriesDir'] = 'node_modules/openstreetbrowser-categories-main';
// Set to true to reload categories on every page visit.
$config['categoriesAlwaysReload'] = true;
// (optional) URL, which points to the OpenStreetBrowser Editor
#$config['urlCategoriesEditor'] = 'editor/';
// URL of the Overpass API
$config['overpassUrl'] = array(
'//overpass-api.de/api/interpreter',
@ -67,7 +67,18 @@ function addCategoriesShow (repo) {
li.appendChild(a)
a.appendChild(document.createTextNode('name' in data ? lang(data.name) : id))
if (config.urlCategoriesEditor) {
a = document.createElement('a')
if (repo) {
a.href = config.urlCategoriesEditor + '?id=' + repo + '.' + id
} else {
a.href = config.urlCategoriesEditor + '?repo=' + id
}
a.target = '_blank'
a.innerHTML = '<img src="img/edit.png"/>'
ul.appendChild(li)