Merge branch 'master' into overpass
This commit is contained in:
commit
203ba58bab
68 changed files with 1573 additions and 522 deletions
|
@ -1,32 +0,0 @@
|
|||
# Note that this file is currently unused
|
||||
# I (xin@zxv.ltd.uk) suspect this is slower than using OSM module, which in turn uses libxml
|
||||
# it will be good to output xml this way eventually.
|
||||
xml.instruct! :xml, :version=>"1.0"
|
||||
xml.osm("version" => "0.5", "generator" => "OpenStreetMap Server") do
|
||||
@nodes.each do |node|
|
||||
xml.tag! "node",:id => node.id,
|
||||
:lat => node.lat,
|
||||
:lon => node.lon,
|
||||
:user => node.user_display_name,
|
||||
:visible => node.visible,
|
||||
:timestamp => node.timestamp.xmlschema do
|
||||
node.tags.each do |tag|
|
||||
k,v = tag.split('=')
|
||||
xml.tag! "tag",:k => k, :v => v
|
||||
end
|
||||
end
|
||||
end
|
||||
@ways.each do |way|
|
||||
xml.tag! "way", :id => way.id,
|
||||
:user => way.user_display_name,
|
||||
:visible => way.visible,
|
||||
:timestamp => way.timestamp.xmlschema do
|
||||
way.nds.each do |nd|
|
||||
xml.tag! "nd", :ref => nd
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
end
|
|
@ -26,7 +26,7 @@
|
|||
<% if @type == "node" and common_details.visible? %>
|
||||
<div class="details geo">
|
||||
<%= t 'browse.location' %>
|
||||
<%= link_to(content_tag(:span, number_with_delimiter(common_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(common_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :lat => h(common_details.lat), :lon => h(common_details.lon), :zoom => "18"}) %>
|
||||
<%= link_to(content_tag(:span, number_with_delimiter(common_details.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(common_details.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :anchor => "map=18/#{common_details.lat}/#{common_details.lon}"}) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= t 'diary_entry.location.location' %>
|
||||
|
||||
<a href="<%= url_for :controller => 'site', :action => 'index', :lat => location.latitude, :lon => location.longitude, :zoom => 14 %>">
|
||||
<a href="<%= url_for :controller => 'site', :action => 'index', :anchor => "map=14/#{location.latitude}/#{location.longitude}" %>">
|
||||
<abbr class="geo" title="<%= number_with_precision(location.latitude, :precision => 4) %>; <%= number_with_precision(location.longitude, :precision => 4) %>">
|
||||
<%= describe_location location.latitude, location.longitude, 14, location.language_code %>
|
||||
</abbr>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<% end %>
|
||||
... <%= t'trace.trace.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %></span>
|
||||
<%= link_to t('trace.trace.more'), {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => t('trace.trace.trace_details')} %> /
|
||||
<%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => t('trace.trace.view_map')} %> /
|
||||
<%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :anchor => "map=14/#{trace.latitude}/#{trace.longitude}"}, {:title => t('trace.trace.view_map')} %> /
|
||||
<%= link_to t('trace.trace.edit'), {:controller => 'site', :action => 'edit', :gpx => trace.id }, {:title => t('trace.trace.edit_map')} %>
|
||||
<span class="trace_<%= trace.visibility %>"><%= t('trace.trace.' + trace.visibility) %></span>
|
||||
<br />
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<span class="latitude"><%= @trace.latitude %></span>;
|
||||
<span class="longitude"><%= @trace.longitude %></span>
|
||||
</div>
|
||||
(<%=link_to t('trace.edit.map'), :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %> / <%=link_to t('trace.edit.edit'), :controller => 'site', :action => 'edit', :lat => @trace.latitude, :lon => @trace.longitude, :gpx=> @trace.id, :zoom => 14 %>)
|
||||
(<%=link_to t('trace.edit.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.edit.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)
|
||||
</fieldset>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<td><%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %></td></tr>
|
||||
<tr>
|
||||
<td><%= t'trace.view.start_coordinates' %></td>
|
||||
<td><div class="geo" style="display: inline"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%=link_to t('trace.view.map'), :controller => 'site', :action => 'index', :lat => @trace.latitude, :lon => @trace.longitude, :zoom => 14 %> / <%=link_to t('trace.view.edit'), :controller => 'site', :action => 'edit', :lat => @trace.latitude, :lon => @trace.longitude, :gpx=> @trace.id, :zoom => 14 %>)</td>
|
||||
<td><div class="geo" style="display: inline"><span class="latitude"><%= @trace.latitude %></span>; <span class="longitude"><%= @trace.longitude %></span></div> (<%=link_to t('trace.view.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.view.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>)</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue