2019-04-29 18:29:38 +02:00
|
|
|
json.array!(@events) do |e|
|
2018-04-05 22:00:07 +02:00
|
|
|
json.merge!(
|
|
|
|
type: 'Feature',
|
|
|
|
properties: {
|
2019-04-29 18:29:38 +02:00
|
|
|
id: e.id,
|
|
|
|
name: e.title,
|
|
|
|
start_time: e.start_time, end_time: e.end_time,
|
|
|
|
submission_time: e.submission_time,
|
|
|
|
decision_time: e.decision_time,
|
|
|
|
place_name: e.place_name, address: e.address, city: e.city,
|
|
|
|
region: t(e.region.code.presence ? e.region.code : e.region.name,
|
|
|
|
scope: :countries, default: e.region.name),
|
|
|
|
region_id: e.region_id,
|
|
|
|
tags: e.tag_list,
|
|
|
|
popupContent: link_to(e, event_url(e))
|
2018-04-05 22:00:07 +02:00
|
|
|
},
|
|
|
|
geometry: {
|
|
|
|
type: 'Point',
|
2019-04-29 18:29:38 +02:00
|
|
|
coordinates: [e.longitude, e.latitude]
|
2018-04-05 22:00:07 +02:00
|
|
|
}
|
|
|
|
)
|
|
|
|
end
|