flutter-mapbox-gl / maps

A Mapbox GL flutter package for creating custom maps
Other
1.04k stars 503 forks source link

style.json layer filters breaking zoom layer behavior for vector tile source lines #1275

Closed aardrop closed 1 year ago

aardrop commented 1 year ago

This might be a Mapbox iOS issue, but for some reason, we have two custom layers that work find if they don't have a filter but behave unpredictably when they do.

Layer JSON that breaks. The behavior that breaks is the zoom behavior for our custom source when the filter is present. This same filter works flawlessly with our fill and symbol layers though.

This behavior seems semi-similar to this old issue in Mapbox GL

{
            "id": "line_type",
            "type": "line",
            "source": "custom_line_tiles",
            "source-layer": "default",
            "minzoom": 6,
            "filter": [
                "match",
                [
                    "get",
                    "location_type_id"
                ],
                [
                    142
                ],
                true,
                false
            ],
            "layout": {
                "line-cap": "square",
                "line-round-limit": 1,
                "line-miter-limit": 10,
                "line-join": "round"
            },
            "paint": {
                "line-width": [
                    "interpolate",
                    [
                        "exponential",
                        1.56
                    ],
                    [
                        "zoom"
                    ],
                    10,
                    1,
                    12,
                    2,
                    15,
                    2,
                    18,
                    7.5
                ],
                "line-color": "hsl(23, 8%, 40%)",
                "line-dasharray": [
                    1
                ]
            }
        },

If we remove the filter components it pulls everything from that source and renders it flawlessly, only with the filter do we see this behavior. Any ideas on what can be causing this or how we could solve it?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.