diff --git a/app/controllers/map_controller.rb b/app/controllers/map_controller.rb index 3569c618e9..de82797e07 100644 --- a/app/controllers/map_controller.rb +++ b/app/controllers/map_controller.rb @@ -1,25 +1,4 @@ class MapController < ApplicationController - def index - @title = 'Maps' - @nodes = Node.paginate(page: params[:page], per_page: 32) - .order('nid DESC') - .where(type: 'map', status: 1) - - @map_lat = nil - @map_lon = nil - if current_user&.has_power_tag("lat") && current_user&.has_power_tag("lon") - @map_lat = current_user.get_value_of_power_tag("lat").to_f - @map_lon = current_user.get_value_of_power_tag("lon").to_f - end - # I'm not sure if this is actually eager loading the tags... - @maps = Node.joins(:tag) - .where('type = "map" AND status = 1 AND (term_data.name LIKE ? OR term_data.name LIKE ?)', 'lat:%', 'lon:%') - .distinct - - # This is supposed to eager load the url_aliases, and seems to run, but doesn't actually eager load them...? - # @maps = Node.select("node.*,url_alias.dst AS dst").joins(:tag).where('type = "map" AND status = 1 AND (term_data.name LIKE ? OR term_data.name LIKE ?)', 'lat:%', 'lon:%').joins("INNER JOIN url_alias ON url_alias.src = CONCAT('node/',node.nid)") - end - def show @node = Node.find_map(params[:name], params[:date]) diff --git a/app/views/map/index.html.erb b/app/views/map/index.html.erb deleted file mode 100644 index 64693124aa..0000000000 --- a/app/views/map/index.html.erb +++ /dev/null @@ -1,107 +0,0 @@ -<%= render :partial => "map/mapDependencies" %> - -
-- <% if !@map_lat.nil? && !@map_lon.nil? %> - Current view based on your shared location. Click here to adjust. - <% else %> - Share your own location on your profile. - Learn about privacy - <% end %> -
- - -These maps were largely made by taking photos from balloons and kites, a technique adopted and refined by Public Lab contributors. Make one yourself and it can be featured here.
-- oil-spill - wetlands - landfill - garden - NDVI - gowanus - protest -
- -This archive represents the collective work of our community to provide an alternative source for aerial imagery, and to highlight issues of environmental and social concern with Do-It-Yourself tools. The archive provides:
- -Most of the maps in this archive were made in MapKnitter, a free and open source tool created by Public Lab contributors to turn aerial photos into maps.
-To add your open source map to the archive, contact staff@<%= request.host %> and be prepared to provide some background and to tell the story of your map. Creative Commons and Public Domain maps are both accepted.
-