Legacy
Mapbox.js is no longer in active development. To learn more about our newer mapping tools see Mapbox GL JS.
You are viewing an older version of Mapbox.js. Check out v3.3.1 for the latest.
L.mapbox.template(template, data)
A mustache template rendering function, as used by the templating feature provided by L.mapbox.gridControl
.
Options | Value | Description |
---|---|---|
template | string | The template string |
data | object | Data you wish to pass into the template string |
Example:
var output = L.mapbox.template('Name: {{name}}', {name: 'John'});
// output is "Name: John"