X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7c0055b5d71ed5be84998843cbc9b082d5ded2c5..012d5b69c6807ec59b8b6dfacd36a43778902a06:/app/views/layouts/_head.html.erb diff --git a/app/views/layouts/_head.html.erb b/app/views/layouts/_head.html.erb index 993544bae..c85594189 100644 --- a/app/views/layouts/_head.html.erb +++ b/app/views/layouts/_head.html.erb @@ -21,6 +21,16 @@ I18n.defaultLocale = "<%= I18n.default_locale %>"; I18n.locale = "<%= I18n.locale %>"; I18n.fallbacks = true; + + <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %> + OSM.home = <%= { :lat => @user.home_lat, :lon => @user.home_lon }.to_json.html_safe %>; + <% end %> + + <% if session[:location] %> + OSM.location = <%= session[:location].to_json.html_safe %>; + <% end %> + + OSM.preferred_editor = <%= preferred_editor.to_json.html_safe %>;