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.simplestyle.style(feature)
Given a GeoJSON Feature with optional simplestyle-spec properties, return an options object formatted to be used as Leaflet Path options.
Options | Value | Description |
---|---|---|
feature | object | A GeoJSON feature object |
Examples:
L.geoJson(geoJson, {
pointToLayer: L.mapbox.simplestyle.style,
});
A working example of L.mapbox.simplestyle in use
Returns:
An object formatted to be used as Leaflet Path options.