[web2py] Re: Fetching rows with st_asgeojson()

2016-10-09 Thread Gael Princivalle
Thanks Massimo. It works but the main problem still the same. I cannot call field properties (I don't know if it's the right term). For example in the loop if I call for a datetime: for event in events: item = { "type": "Feature", "properties":

[web2py] Re: Fetching rows with st_asgeojson()

2016-09-18 Thread Massimo Di Pierro
How about this? features = [] for event in events: link = A(event[db.events.title], _href=URL('default', 'event_page', vars=dict(event_id=event[db.events.id]))).xml() item = { "type": "Feature", "popupContent": link, "track_quotation":

[web2py] Re: Fetching rows with st_asgeojson()

2016-09-17 Thread Gael Princivalle
Someone have an idea? Here is the code that works: features= [{"type": "Feature", "properties": { "popupContent": "" + event[db.events.title] + "", "track_quotation": str(event[db.events.track_quotation]) },