Map Display Api - How to customize vector tiles layers

We are using the Map Display API as a source for our maps.
But now we have a couple of questions:

  1. Is there a way we can optimize the layers we are getting. We don’t need to render all the layers, so we hide them using the styling. But it feels like we could be more efficient if we just could tell the api we aren’t interested in the specific layers, so we don’t even need them to be included in the vector tiles.

  2. Is there a way to hide all the under_construction roads? We can hide them in the styling (visually), but after doing that for a bit, we decided to look in the JSON … and found 113 layers with the mention of under_construction. So we removed all those layers from the JSON… but it turned out that there were also outlines, tunnel outlines, shields, motorway outlines - and also on different levels - displayed.

We can hide them by adding a filter ( under_construction != true ), but we are now adding the filter manually - but those are the things that we can see visually in the Styler. This is not feasible! :frowning:

How can we make sure we hide all the under_construction stuff easily? Is there an option in the API to hide the under_construction parts?

Hi.

Unfortunately, at this moment it’s possible to filer the data only after the API request. There are plans for adding a filtering parameters in future, but there are no official dates yet :frowning:

Regards,
Mateusz

Thanks for your reply, Mateusz.

Is it possible for you to provide me a list of all the layers that will be rendered with the under_construction filter? Otherwise we have to add the filter to all the possible layers, which is a huge performance overhead and also more development work.

We found a couple, but that was all based on our own visual findings. But we are a bit worried there might be usecases where something (like a tunnel or something) isn’t currently underconstruction, but will be in the future and will render without us knowing.

Hi.

Using our default map style, you have a huge amount of layers, unfortunately (around 450 :frowning: ). One of the reasonable solutions would be to create your own map style and inside every layer, you can add a filter which reacts on the under_construction tag: ["!=", "under_construction", true] which will allow you to control what will be rendered and what not.

I hope this helps a little bit.

Regards,
Mateusz