在顶部街道图层上添加卫星图层

Add satellite layer on top street layer

例如,如何以编程方式在街道图层顶部添加卫星图层。 该演示使用预定义样式 Mapbox GL toggle satellite without setting style 来实现我想要的效果,但我更喜欢以编程方式演示。

您可以像添加任何其他图层一样添加卫星图层。

map.addLayer({
  id: 'satellite',
  source: {"type": "raster",  "url": "mapbox://mapbox.satellite", "tileSize": 256},
  type: "raster"
}, 'optional_before_argument');

http://jsbin.com/cucemulala/1/edit?html,output