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:
parent
b90567e197
commit
4ebc48618e
1 changed files with 2 additions and 3 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue