diff options
author | Jochen Topf <jochen@topf.org> | 2014-05-13 09:28:12 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2014-05-13 09:28:12 +0200 |
commit | b9f4796b8b2a4537b34337dc56bec475a92543e5 (patch) | |
tree | ef065e0051bbc3ea470b61dbaf966a7adeea757d /web/views | |
parent | 82dab89f663561829f24a29c079c4406bcba4a69 (diff) | |
download | taginfo-b9f4796b8b2a4537b34337dc56bec475a92543e5.tar taginfo-b9f4796b8b2a4537b34337dc56bec475a92543e5.tar.gz |
Add support for showing geo distribution of tags.
This adds all the necessary code but it is still disabled.
Diffstat (limited to 'web/views')
-rw-r--r-- | web/views/tag.erb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/web/views/tag.erb b/web/views/tag.erb index f8a9d7a..9330d6d 100644 --- a/web/views/tag.erb +++ b/web/views/tag.erb @@ -24,6 +24,7 @@ <ul> <li><a href="#overview"><%= h(t.taginfo.overview) %></a></li> <li><a href="#combinations"><%= h(t.taginfo.combinations) %></a></li> +<!-- <li><a href="#map"><%= h(t.taginfo.map) %></a></li>--> <li><a href="#wiki"><%= h(t.sources.wiki.name) %></a></li> <li><a href="#josm"><%= h(t.sources.josm.name) %></a></li> </ul> @@ -48,6 +49,29 @@ <table id="grid-combinations"> </table> </div> +<!-- <div id="map"> + <h2><%= h(t.pages.tag.geographic_distribution.title) %></h2> + <% if @has_map %> + <% if @filter_type == 'all' %> + <div style="background-image: url(<%= TaginfoConfig.get('geodistribution.background_image') %>); background-repeat: no-repeat; background-position: 1px 1px;"/> + <img class="map" src="/api/4/tag/distribution/nodes?key=<%= @key_uri %>&value=<%= @value_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>" style="position: absolute;"/> + <img class="map" src="/api/4/tag/distribution/ways?key=<%= @key_uri %>&value=<%= @value_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>"/> + </div> + <% elsif @filter_type == 'nodes' %> + <div style="background-image: url(<%= TaginfoConfig.get('geodistribution.background_image') %>); background-repeat: no-repeat; background-position: 1px 1px;"/> + <img class="map" src="/api/4/tag/distribution/nodes?key=<%= @key_uri %>&value=<%= @value_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>"/> + </div> + <% elsif @filter_type == 'ways' %> + <div style="background-image: url(<%= TaginfoConfig.get('geodistribution.background_image') %>); background-repeat: no-repeat; background-position: 1px 1px;"/> + <img class="map" src="/api/4/tag/distribution/ways?key=<%= @key_uri %>&value=<%= @value_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>"/> + </div> + <% elsif @filter_type == 'relations' %> + <p class="empty"><%= h(t.pages.tag.geographic_distribution.relations) %></p> + <% end %> + <% else %> + <p class="empty"><%= h(t.pages.tag.geographic_distribution.no_map) %></p> + <% end %> + </div>--> <div id="wiki"> <h2><%= h(t.pages.tag.wiki_pages.title) %></h2> <% if @wiki_count > 0 %> |