X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e19c04c7a7410dd134df9242c221e8a8bb83e3c6..10dca1b6dfa11f6b40a58facad74434fa4295fbd:/app/views/site/_search.html.erb?ds=inline diff --git a/app/views/site/_search.html.erb b/app/views/site/_search.html.erb index 3750a7dc9..31b5af16f 100644 --- a/app/views/site/_search.html.erb +++ b/app/views/site/_search.html.erb @@ -5,12 +5,11 @@ } function describeLocation() { - var position = getPosition(); - var zoom = getZoom(); + var args = getArgs($("viewanchor").href); <%= remote_function(:loading => "startSearch()", :url => { :controller => :geocoder, :action => :description }, - :with => "'lat=' + position.lat + '&lon=' + position.lon + '&zoom=' + zoom") %> + :with => "'lat=' + args['lat'] + '&lon=' + args['lon'] + '&zoom=' + args['zoom']") %> } function setSearchViewbox() { @@ -33,8 +32,8 @@ <% content_for "optionals" do %>
- <%= t 'site.search.search' %> <%= t 'site.search.where_am_i' %> +

<%= t 'site.search.search' %>

<% form_remote_tag(:before => "setSearchViewbox()",