flutter-mapbox-gl / maps

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

setFilter losing layer styling #1272

Closed aardrop closed 1 year ago

aardrop commented 1 year ago

I'm trying to have the setFilter toggle on and off a tiling layer but when the layer is getting turned back on it seems to lose all of its styling. Is there a way to fix this?

toggle on

mapController.setFilter(layerId, ["!=", "type_id", layerId]);

toggle off

mapController.setFilter(layerId, ["==", "type_id", layerId]);

Base map with custom tiling layers simulator_screenshot_239C6D52-E04A-412C-BE8B-85E007CA88B6

Custom tiling layers turned off simulator_screenshot_4976D277-9366-465F-8055-9F7395F6173C

Custom tiling layers turned back on simulator_screenshot_AEB89062-43FD-4699-B80C-03F71417A382

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.