X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/acd72861ed8ad46d759a6e509f3e7c459db1a4f5..574407e2baa079c503d1629d96d65b381da2966a:/app/views/user/_map.html.erb?ds=inline diff --git a/app/views/user/_map.html.erb b/app/views/user/_map.html.erb index 17f4ed344..eb99f4372 100644 --- a/app/views/user/_map.html.erb +++ b/app/views/user/_map.html.erb @@ -1,40 +1,19 @@ - - -<% if @user.home_lat.nil? or @user.home_lon.nil? %> - <% lon = h(params['lon'] || '-0.1') %> - <% lat = h(params['lat'] || '51.5') %> - <% zoom = h(params['zoom'] || '4') %> -<% else %> - <% marker = true %> - <% mlon = @user.home_lon %> - <% mlat = @user.home_lat %> - <% lon = @user.home_lon %> - <% lat = @user.home_lat %> - <% zoom = '12' %> -<% end %> - -<%= javascript_include_tag '/openlayers/OpenLayers.js' %> -<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %> +<% +if @user.home_lat.nil? or @user.home_lon.nil? + lon = h(params['lon'] || '0') + lat = h(params['lat'] || '20') + zoom = h(params['zoom'] || '1') +else + marker = true + mlon = @user.home_lon + mlat = @user.home_lat + lon = @user.home_lon + lat = @user.home_lat + zoom = '12' +end +%> + +<%= javascript_include_tag 'openlayers.js' %> <%= javascript_include_tag 'map.js' %> - -