More data about events in the maps geojson

This commit is contained in:
echarp 2015-11-10 23:37:23 +01:00
parent 4fa3170085
commit 9374e442e0

View File

@ -88,9 +88,10 @@ class Event < ActiveRecord::Base
def as_json(_options = {})
{ type: 'Feature', properties: {
id: id, name: title, tags: tags,
popupContent: "<a href=\"/events/#{id}\">#{self}</a>",
start_time: start_time, end_time: end_time, locality: locality
id: id, name: title, start_time: start_time, end_time: end_time,
place_name: place_name, address: address, city: city, locality: locality,
tags: tags,
popupContent: "<a href=\"/events/#{id}\">#{self}</a>"
}, geometry: { type: 'Point', coordinates: [longitude, latitude] } }
end