Skip to content

Instantly share code, notes, and snippets.

@robhawkes
Created April 23, 2015 20:20
Show Gist options
  • Select an option

  • Save robhawkes/2d5c99ff6f9b5472a072 to your computer and use it in GitHub Desktop.

Select an option

Save robhawkes/2d5c99ff6f9b5472a072 to your computer and use it in GitHub Desktop.

Revisions

  1. robhawkes revised this gist Apr 23, 2015. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -7,9 +7,7 @@ var csvConfig = {
    },
    output: {
    type: "BlueprintOutputDebugPoints",
    options: {
    modelPathPrefix: "./data/"
    }
    options: {}
    },
    triggers: [{
    triggerObject: "output",
  2. robhawkes created this gist Apr 23, 2015.
    43 changes: 43 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    var csvConfig = {
    input: {
    type: "BlueprintInputCSV",
    options: {
    path: "./data/some.csv"
    }
    },
    output: {
    type: "BlueprintOutputDebugPoints",
    options: {
    modelPathPrefix: "./data/"
    }
    },
    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);