From 4ebc48618e1b554cb0dda07f3fd34a7d3b7185a0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 28 Feb 2010 16:04:30 +0000 Subject: [PATCH] Get the location for "Where Am I?" from the view tab's link instead of by asking the map so that it works in edit mode as well. Closes #2383. --- app/views/site/_search.html.erb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/views/site/_search.html.erb b/app/views/site/_search.html.erb index 3750a7dc9..0fea3793f 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() { -- 2.43.2