X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dcbc807526b5eb456e33e22d794374ae7ff3723b..55f0402471729354c31d85635e1c740599b1a0ad:/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 912bde949..c1ef0c6f0 100644 --- a/app/views/user/_map.html.erb +++ b/app/views/user/_map.html.erb @@ -1,36 +1,29 @@ -<% friends = @user.friends.collect { |f| f.befriendee }.select { |f| !f.home_lat.nil? and !f.home_lon.nil? } %> -<% nearest = @user.nearby - friends %> - -<% 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' %> -<%= javascript_include_tag 'map.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 +%>