Skip to content

Instantly share code, notes, and snippets.

@robhawkes
Created April 23, 2015 20:20
Show Gist options
  • Save robhawkes/2d5c99ff6f9b5472a072 to your computer and use it in GitHub Desktop.
Save robhawkes/2d5c99ff6f9b5472a072 to your computer and use it in GitHub Desktop.
var csvConfig = {
input: {
type: "BlueprintInputCSV",
options: {
path: "./data/some.csv"
}
},
output: {
type: "BlueprintOutputDebugPoints",
options: {}
},
triggers: [{
triggerObject: "output",
triggerName: "initialised",
triggerArguments: [],
actionObject: "input",
actionName: "requestData",
actionArguments: [],
actionOutput: {}
}, {
triggerObject: "input",
triggerName: "dataReceived",
triggerArguments: ["csv"],
actionObject: "output",
actionName: "outputPoints",
actionArguments: ["data"],
actionOutput: {
data: {
process: "map",
itemsObject: "csv",
itemsProperties: "data",
transformation: {
coordinates: ["Longitude", "Latitude"]
}
}
}
}]
};
var switchboardCSV = new VIZI.BlueprintSwitchboard(csvConfig);
switchboardCSV.addToWorld(world);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment