maplibre-gl-js
maplibre-gl-js copied to clipboard
Add 3D Tiles / batched-model support
In MapBox GL JS v3 there is support for 'batched-model', with this we can add glTF 2.0 models to the map (like 3D Tiles).
Demo: https://bertt.github.io/mapbox_3dtiles_samples/samples/standard/tienhoven/
Sample code:
map.addSource('bag-3d', {
"type": "batched-model",
"maxzoom": 15,
"minzoom": 15,
"tiles": [
"https://bertt.github.io/mapbox_3dtiles_samples/samples/standard/tienhoven/content/{z}-{x}-{y}.glb"
]
}
)});
// add the custom style layer to the map
map.on('style.load', () => {
map.addLayer({
id: 'bag-layer',
type: 'model',
source: 'bag-3d',
});
Can we have support for batched-model in MapLibre as well?