[openstreetmap/openstreetmap-website] Display coordinates on notes pages (#1773)

Andy Allan notifications at github.com
Wed Apr 18 07:19:15 UTC 2018


gravitystorm requested changes on this pull request.



> @@ -19,6 +19,11 @@
     <% end %>
   </div>
 
+  <div class="details geo">
+  <%= t 'browse.note.location' %>
+  <%= link_to(content_tag(:span, number_with_delimiter(@note.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(@note.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :anchor => "map=18/#{@note.lat}/#{@note.lon}"}) %>

When I view a note url directly (e.g. http://example.com/note/12345) it zooms to z15

https://github.com/openstreetmap/openstreetmap-website/blob/30424e89d2c91922efb50f246b593cbbe43e220f/app/assets/javascripts/index/note.js#L104

Should this also zoom to z15?

> @@ -19,6 +19,11 @@
     <% end %>
   </div>
 
+  <div class="details geo">
+  <%= t 'browse.note.location' %>
+  <%= link_to(content_tag(:span, number_with_delimiter(@note.lat), :class => "latitude") + ", " + content_tag(:span, number_with_delimiter(@note.lon), :class => "longitude"), {:controller => 'site', :action => 'index', :anchor => "map=18/#{@note.lat}/#{@note.lon}"}) %>

Please use named routes where possible, e.g. root_path(:anchor => foo), rather than specifying controllers and actions in long-form. Named paths can be found by running `bundle exec rake routes` or visiting http://localhost:3000/rails/info/routes in development.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1773#pullrequestreview-113098998
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180418/d0ae9fc8/attachment.html>


More information about the rails-dev mailing list