Tilestream: Fixing interaction

When I upgrade to a new version of Tilestream / Wax, apparently the method for adding interactivity change. Before I think it pulled some of the info from a JSON file. It can still do this, but my files seemed to include localhost versions of the server. Anyhow, long story short, you need to make sure you specify a template in your TileJSON. To find this, request the TileJSON Tilestream serves up for your made:

http://server/v2/layer_name.json

Now look for the template variable and add it into the TileJSON you define in your javascript file. Mine is:

template: ‘{{#__location__}}{{/__location__}}{{#__teaser__}}{{{name}}} </br>\n{{{address}}}{{/__teaser__}}{{#__full__}}{{{permit_id}}}{{/__full__}}’,

Leave a Reply

Your email address will not be published. Required fields are marked *