X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/940995c816cb6f18ab76beb5cae5142fb6545b86..bd12ec7a8bfdc244756272a2f4fec1f645a6d852:/app/views/user/_map.html.erb?ds=sidebyside 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' %>