| @@ -1,7 +1,7 @@ | |||||
| module PostsHelper | module PostsHelper | ||||
| def post_to_poi(post, subscription) | def post_to_poi(post, subscription) | ||||
| # http://layar.com/documentation/browser/api/getpois-response/ | # http://layar.com/documentation/browser/api/getpois-response/ | ||||
| { | |||||
| res = { | |||||
| :id => post.id, | :id => post.id, | ||||
| :imageURL => "%s%s/assets/layar-icons/tal-logo-100.png" % [ request.protocol, request.env['HTTP_HOST'] ], | :imageURL => "%s%s/assets/layar-icons/tal-logo-100.png" % [ request.protocol, request.env['HTTP_HOST'] ], | ||||
| :anchor => { | :anchor => { | ||||
| @@ -24,14 +24,18 @@ module PostsHelper | |||||
| :method => "GET", | :method => "GET", | ||||
| :activityType => 1 | :activityType => 1 | ||||
| }, | }, | ||||
| ], | |||||
| :object => { | |||||
| ] | |||||
| } | |||||
| unless subscription.icon_url.blank? | |||||
| res[:object] = { | |||||
| :contentType => "image/vnd.layar.generic", | :contentType => "image/vnd.layar.generic", | ||||
| :url => subscription.icon_url, | :url => subscription.icon_url, | ||||
| :reducedURL => subscription.icon_url, | :reducedURL => subscription.icon_url, | ||||
| :size => 120 | :size => 120 | ||||
| } | } | ||||
| } | |||||
| end | |||||
| res | |||||
| end | end | ||||
| def decode_entities(s) | def decode_entities(s) | ||||