mapbox/wax — Issue #167: Way to retrieve the data object from interaction hit
Author: jacobtoye
Created: 2012-02-16 19:52:57+00:00
State: open

Is there any way to get the data object that is associated with an interaction point? Previously I have done:

````
formatter: function (options, data) {
return data;
}
```

as my custom formatter function. However (after updating wax) it seems like wax is expecting you to want to format the data as html.

The functionality that I require is a bit more complex than rendering an html template. E.g. when a user mouses over a bus stop I return the id, lat, lng, name. From here I render a menu popup at the lat/lng and when the user clicks on a menu option it will perform an ajax request to fetch more information from the database.

I could provide my own wax.formatter implementation but I thought I would ask first.