More data about events in the maps geojson

recurrent
echarp 7 years ago
parent 4fa3170085
commit 9374e442e0
  1. 7
      app/models/event.rb

@ -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

Loading…
Cancel
Save