Source: site.view [edit]
Function name: cultureBonk
Arguments: DesiredCityCode
Description: Scrapes FlavorPill and associated Sources of Events in a PartyBonk manner. Chose City from sf, la, ldn, nyc, chi.
Page type: webl
Render function:   blogRender
Module: sandbox

Page source:

var P = GetURL("http://feeds.flavorpill.net/flavorpill/" + DesiredCityCode);

var RSSelem = Elem(P, "item");
var Result = "";
var Items = [];
var x = 0;
every CurEntry in RSSelem do
// while x < 1 do
var CurEntry = RSSelem[x];

  var CurLink = Elem(CurEntry, "guid");
  // doesnt work: (is there a bracket [] problem when passing the result?
  // symptoms when using [] or not: either displays overview text on the right OR displays the map itself with markers etc.
  var CurPillItem = WubCall("getPillItem", [Text(CurLink[0])]);
  var img = (WubCall("a9storefront", [CurPillItem.addr]) ? nil);
  if (img != nil) then
     CurPillItem.image := Markup(img)
  end;
  Items = Items + [CurPillItem];
  x = x + 1;
end;

//this DOES work: (apparently identical output when turning rendering function off)
// var sampleItem1 = [. label = " Four Flies on Gray Velvet (1971)", addr = "701 Mission St San Francisco, CA 94103-3138", desc = "description", lat = "37.786329", long = "-122.401882".];
// Items = Items + [sampleItem1];



[.
   title = "Map of current culture in " + DesiredCityCode,
   zoomLevel = "5",
   items = Items,
   width = 700,
   height = 400, 
   showIndex = "true"
.];