Legacy
Mapbox.js is no longer in active development. To learn more about our newer mapping tools see Mapbox GL JS.
L.mapbox.styleLayer(url, options)
Extends: L.tileLayer
L.mapbox.styleLayer
renders Mapbox Studio styles as raster tiles using the Mapbox Static Tiles API tiles endpoint.
Options | Value | Description |
---|---|---|
url | string | Must be a string like mapbox://styles/mapbox/cin286r4x006safncofpcb71v |
options | object | If provided, it is the same options as provided to L.tileLayer , as well as:
|
Example:
var styleLayer = L.mapbox.styleLayer(url)
.addTo(map);
Returns a L.mapbox.styleLayer
object.