aboutsummaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-24 22:13:03 +0100
committerJochen Topf <jochen@topf.org>2013-01-24 22:13:03 +0100
commit301079127471428fabb0504e40eaa33a4afc3525 (patch)
tree77aa8f2cf08e3545e88cc0a279643658b85618cf /web/lib
parent4bfa3306d07f006fb85a26de261c2052b256694a (diff)
downloadtaginfo-301079127471428fabb0504e40eaa33a4afc3525.tar
taginfo-301079127471428fabb0504e40eaa33a4afc3525.tar.gz
Add in_wiki column to tags
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/api/v4/tags.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/web/lib/api/v4/tags.rb b/web/lib/api/v4/tags.rb
index 9830e7a..68d5ff5 100644
--- a/web/lib/api/v4/tags.rb
+++ b/web/lib/api/v4/tags.rb
@@ -9,6 +9,7 @@ class Taginfo < Sinatra::Base
:result => paging_results([
[:key, :STRING, 'Key'],
[:value, :STRING, 'Value'],
+ [:in_wiki, :BOOL, 'In there a page in the wiki for this tag?'],
[:count_all, :INT, 'Number of objects in the OSM database with this tag.'],
[:count_all_fraction, :FLOAT, 'Number of objects in relation to all objects.'],
[:count_nodes, :INT, 'Number of nodes in the OSM database with this tag.'],
@@ -31,6 +32,7 @@ class Taginfo < Sinatra::Base
order_by(@ap.sortname, @ap.sortorder) { |o|
o.tag :skey
o.tag :svalue
+ o.in_wiki
o.count_all
o.count_nodes
o.count_ways
@@ -46,6 +48,7 @@ class Taginfo < Sinatra::Base
:data => res.map{ |row| {
:key => row['skey'],
:value => row['svalue'],
+ :in_wiki => row['in_wiki'],
:count_all => row['count_all'].to_i,
:count_all_fraction => (row['count_all'].to_f / @db.stats('objects')).round_to(4),
:count_nodes => row['count_nodes'].to_i,