I have used the mapbox example from Add a 3D model but when I add minzoom : 17, property to the layer definition is not hidden once the zoom out is lower, but it works well with other fill or fill extrusion layers.
Is this a known bug, a constrain or by design decision?
mapbox-gl-js v1.10.1:
browser:
minzoom : 17, to the fiddle sample Add a 3D modelHere's the test fiddle
The Layer should hide as any other layer
I found a workaround but must be done after the layer is created through addLayer which is not ideal. You must execute setLayerZoomRange explicitly, the attribute in the addLayer creation doesn't work for custom layers.
map.setLayerZoomRange('layername', 17, 22);
Is this a know bug, a constrain or by design decision?
I wouldn't call it a bug because the Custom Layer Interface doesn't document any min/max zoom properties. That said, I think this would be a useful feature to add.
Although, this isn't a problem of missing capability, it's just not available in the initial add call. https://stackoverflow.com/questions/61918709/minzoom-seems-not-to-work-with-custom-layers-in-mapbox
Although, this isn't a problem of missing capability, it's just not available in the initial
addcall. https://stackoverflow.com/questions/61918709/minzoom-seems-not-to-work-with-custom-layers-in-mapbox
thanks that鈥檚 my own question and workaround 馃槀馃槀馃槀
Hah, I didn't even see the Workaround in the top post :)
Most helpful comment
I wouldn't call it a bug because the Custom Layer Interface doesn't document any min/max zoom properties. That said, I think this would be a useful feature to add.