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 /sources/josm | |
parent | 64d4f868ebdf36f96fe08fca9928a9d95c12cdc8 (diff) | |
download | taginfo-9f7eecc2d5c34fd71fae022ed8ef37a176898686.tar taginfo-9f7eecc2d5c34fd71fae022ed8ef37a176898686.tar.gz |
Show icons/map symbols in JOSM tab.
Diffstat (limited to 'sources/josm')
-rwxr-xr-x | sources/josm/import_josm.rb | 10 | ||||
-rw-r--r-- | sources/josm/pre.sql | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sources/josm/import_josm.rb b/sources/josm/import_josm.rb index 6851cb0..52ad3b2 100755 --- a/sources/josm/import_josm.rb +++ b/sources/josm/import_josm.rb @@ -37,7 +37,8 @@ class Rule attr_accessor :k, :v, :b attr_accessor :scale_min, :scale_max attr_accessor :icon_source - attr_accessor :line_width, :line_realwidth + attr_accessor :line_color, :line_width, :line_realwidth + attr_accessor :area_color attr_reader :rule @@ -47,15 +48,17 @@ class Rule def insert(db) db.execute( - 'INSERT INTO josm_style_rules (k, v, b, scale_min, scale_max, icon_source, line_width, line_realwidth, rule) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)', + 'INSERT INTO josm_style_rules (k, v, b, scale_min, scale_max, icon_source, line_color, line_width, line_realwidth, area_color, rule) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', k, v, b, scale_min, scale_max, icon_source, + line_color, line_width, line_realwidth, + area_color, rule ) end @@ -85,7 +88,10 @@ doc.elements.each('/rules/rule') do |rule_element| rule.scale_max = element.text when 'icon' rule.icon_source = element.attributes['src'] + when 'area' + rule.area_color = element.attributes['colour'] when 'line' + rule.line_color = element.attributes['colour'] rule.line_width = element.attributes['width'] rule.line_realwidth = element.attributes['realwidth'] end diff --git a/sources/josm/pre.sql b/sources/josm/pre.sql index 9335ecf..3bf48a7 100644 --- a/sources/josm/pre.sql +++ b/sources/josm/pre.sql @@ -36,8 +36,10 @@ CREATE TABLE josm_style_rules ( scale_min INTEGER, scale_max INTEGER, icon_source VARCHAR, + line_color VARCHAR, line_width INTEGER, line_realwidth INTEGER, + area_color VARCHAR, rule VARCHAR ); |