--- layout: api title: "v1.6.0 API: L.mapbox.template(template, data)" categories: api version: v1.6.0 permalink: /api/v1.6.0/l-mapbox-template --- {% raw %}
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"
Mapbox.js is optimized for mobile devices and small screens by default. There are, however, best practices to make sure your map always looks its best.
{% endraw %}