From a8384fff7a6ea9810a1007b789ccbd557ca8bbc0 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann <lonvia@denofr.de> Date: Tue, 20 May 2014 23:41:04 +0200 Subject: add config options for base map attribution and separate scale factor for compare maps --- web/views/compare.erb | 1 + web/views/key.erb | 3 +++ web/views/tag.erb | 3 +++ 3 files changed, 7 insertions(+) (limited to 'web/views') diff --git a/web/views/compare.erb b/web/views/compare.erb index 1d24dd7..aae1065 100644 --- a/web/views/compare.erb +++ b/web/views/compare.erb @@ -70,6 +70,7 @@ <% key_or_tag = data[:value].nil? ? 'key' : 'tag' %> <img class="map" src="/api/4/<%= key_or_tag %>/distribution/nodes?key=<%= data[:key] %><%= data[:value].nil? ? '' : ('&value=' + data[:value]) %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>" style="position: absolute;"/> <img class="map" src="/api/4/<%= key_or_tag %>/distribution/ways?key=<%= data[:key] %><%= data[:value].nil? ? '' : ('&value=' + data[:value]) %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>"/> + <div class="note"><%= TaginfoConfig.get('geodistribution.image_attribution') %></div> </div> <% end %> </td> diff --git a/web/views/key.erb b/web/views/key.erb index 316529c..7e51f31 100644 --- a/web/views/key.erb +++ b/web/views/key.erb @@ -75,14 +75,17 @@ <div style="background-image: url(<%= TaginfoConfig.get('geodistribution.background_image') %>); background-repeat: no-repeat; background-position: 1px 1px;"/> <img class="map" src="/api/4/key/distribution/nodes?key=<%= @key_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>" style="position: absolute;"/> <img class="map" src="/api/4/key/distribution/ways?key=<%= @key_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>"/> + <div class="note"><%= TaginfoConfig.get('geodistribution.image_attribution') %></div> </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/key/distribution/nodes?key=<%= @key_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>"/> + <div class="note"><%= TaginfoConfig.get('geodistribution.image_attribution') %></div> </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/key/distribution/ways?key=<%= @key_uri %>" alt="" width="<%= @img_width %>" height="<%= @img_height %>"/> + <div class="note"><%= TaginfoConfig.get('geodistribution.image_attribution') %></div> </div> <% elsif @filter_type == 'relations' %> <p class="empty"><%= h(t.pages.key.geographic_distribution.relations) %></p> diff --git a/web/views/tag.erb b/web/views/tag.erb index 391d193..1ae5274 100644 --- a/web/views/tag.erb +++ b/web/views/tag.erb @@ -69,14 +69,17 @@ <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 class="note"><%= TaginfoConfig.get('geodistribution.image_attribution') %></div> </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 class="note"><%= TaginfoConfig.get('geodistribution.image_attribution') %></div> </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 class="note"><%= TaginfoConfig.get('geodistribution.image_attribution') %></div> </div> <% elsif @filter_type == 'relations' %> <p class="empty"><%= h(t.pages.tag.geographic_distribution.relations) %></p> -- cgit v1.2.3