Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setLayerZoomRange #190

Closed
mskzo opened this issue Jan 18, 2023 · 4 comments
Closed

setLayerZoomRange #190

mskzo opened this issue Jan 18, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@mskzo
Copy link

mskzo commented Jan 18, 2023

Hi,

setLayerZoomRange is not implemented but is available on native libs.
Is there any alternative to update layer zoom range?

Best Regards

@mariusvn
Copy link
Contributor

I think i have a workaround to that if you are using raster layer, you can achieve that by setting the source minZoom and maxZoom.
Otherwise, I'm not sure it is possible.

@JulianBissekkou JulianBissekkou added the bug Something isn't working label Jun 29, 2023
@m0nac0
Copy link
Collaborator

m0nac0 commented Dec 1, 2023

This can now be achieved with the MaplibreMapController#setLayerProperties method added in #303 by setting the minZoom and maxZoom properties.

@m0nac0 m0nac0 closed this as completed Dec 1, 2023
@LeeviLeppala
Copy link

This can now be achieved with the MaplibreMapController#setLayerProperties method added in #303 by setting the minZoom and maxZoom properties.

Can you give an example? I don't understand how to set minZoom or maxZoom via LayerProperties:

Set one or multiple properties of a layer. You can only use properties that are supported for the layer's type. So you can e.g. only use LineLayerProperties on a line layer.

But there are no minZoom or maxZoom properties in LineLayerProperties.

@m0nac0
Copy link
Collaborator

m0nac0 commented Dec 6, 2023

You are right, sorry. Currently, setLayerProperties only supports properties that are specific to one layer-type, not generic properties like minZoom. I opened #352 to track that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants