diff options
author | Jochen Topf <jochen@topf.org> | 2011-12-28 23:31:27 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2011-12-28 23:31:27 +0100 |
commit | 9f7eecc2d5c34fd71fae022ed8ef37a176898686 (patch) | |
tree | 1e1de8bb91405ebb30a4424c6d9debebd2cc28d0 /web/lib | |
parent | 64d4f868ebdf36f96fe08fca9928a9d95c12cdc8 (diff) | |
download | taginfo-9f7eecc2d5c34fd71fae022ed8ef37a176898686.tar taginfo-9f7eecc2d5c34fd71fae022ed8ef37a176898686.tar.gz |
Show icons/map symbols in JOSM tab.
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/api/josm.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/lib/api/josm.rb b/web/lib/api/josm.rb index 70a0099..ff85f31 100644 --- a/web/lib/api/josm.rb +++ b/web/lib/api/josm.rb @@ -33,7 +33,11 @@ class Taginfo < Sinatra::Base :k => row['k'], :v => row['v'], :b => row['b'], - :rule => h(row['rule']) + :rule => h(row['rule']), + :area_color => row['area_color'] ? h(row['area_color'].sub(/^.*#/, '#')) : '', + :line_color => row['line_color'] ? h(row['line_color'].sub(/^.*#/, '#')) : '', + :line_width => row['line_width'] ? h(row['line_width']) : 0, + :icon => row['icon_source'] && row['icon_source'] != 'misc/deprecated.png' ? h(row['icon_source']) : '' } } }.to_json end |