2014-08-06 14:47:47 +02:00
|
|
|
# Geocoding
|
|
|
|
#
|
|
|
|
# Access to OSM controls
|
2014-04-28 00:33:21 +02:00
|
|
|
class MapsController < ApplicationController
|
2015-11-10 23:29:05 +01:00
|
|
|
has_scope :region, :locality, :tag, :daylimit
|
2014-11-25 19:54:20 +01:00
|
|
|
has_scope :future, type: :boolean, default: true
|
2015-11-10 23:49:15 +01:00
|
|
|
has_scope :period, type: :hash, using: [:year, :week]
|
2014-11-05 21:25:18 +01:00
|
|
|
|
2014-04-28 00:33:21 +02:00
|
|
|
def index
|
2014-07-31 01:32:47 +02:00
|
|
|
respond_to do |format|
|
2014-11-08 14:15:07 +01:00
|
|
|
format.html { render layout: 'iframe' if params[:iframe] }
|
2014-11-25 19:54:20 +01:00
|
|
|
format.json { render json: apply_scopes(Event.moderated.geo) }
|
2014-07-31 01:32:47 +02:00
|
|
|
end
|
2014-04-28 00:33:21 +02:00
|
|
|
end
|
|
|
|
end
|