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.
This commit is contained in:
Tom Hughes 2010-02-28 16:04:30 +00:00
parent b90567e197
commit 4ebc48618e

View file

@ -5,12 +5,11 @@
} }
function describeLocation() { function describeLocation() {
var position = getPosition(); var args = getArgs($("viewanchor").href);
var zoom = getZoom();
<%= remote_function(:loading => "startSearch()", <%= remote_function(:loading => "startSearch()",
:url => { :controller => :geocoder, :action => :description }, :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() { function setSearchViewbox() {