2014-08-06 14:47:47 +02:00
|
|
|
# Geocoding
|
|
|
|
#
|
|
|
|
# Access to OSM controls
|
2014-04-28 00:33:21 +02:00
|
|
|
class MapsController < ApplicationController
|
|
|
|
def index
|
2014-07-31 01:32:47 +02:00
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
2014-10-25 23:36:29 +02:00
|
|
|
format.json do
|
|
|
|
@events = Event.moderated.future.geo
|
|
|
|
@events = @events.region params[:region] if params[:region]
|
|
|
|
@events = @events.locality params[:locality] if params[:locality]
|
|
|
|
@events = @events.tag params[:tag] if params[:tag]
|
|
|
|
render json: @events
|
|
|
|
end
|
2014-07-31 01:32:47 +02:00
|
|
|
end
|
2014-04-28 00:33:21 +02:00
|
|
|
end
|
|
|
|
end
|