X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/940995c816cb6f18ab76beb5cae5142fb6545b86..ec1667fc093976cb9a69e5aba675ee4281d7ff64:/app/views/user/_map.html.erb diff --git a/app/views/user/_map.html.erb b/app/views/user/_map.html.erb index 55f23cd0d..2d886527c 100644 --- a/app/views/user/_map.html.erb +++ b/app/views/user/_map.html.erb @@ -1,21 +1,19 @@ -<% 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') %> - <% 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/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' %>