Skip to content

Style Layer Filtering via URL Query Parameters #1485

@nikiosna

Description

@nikiosna

I would like to propose adding support for layer filtering via URL query parameters.
This would allow to dynamically show or hide specific style layers without needing to create different style files for each use case.

Proposed query functionality:

The feature would add support for two query parameters in style JSON requests:

filter - Exclude specified layers from the style
Example: /styles/carto/style.json?filter=buildings,landuse 

show - Include only specified layers in the style
Example: /styles/carto/style.json?show=road_major_label,road_secondary_label 

This would be especially useful for the rendered tiles endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions