You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
Currently it's possible to set performsPlacementTransitions on MGLStyle, but not on an individual layer. It seems that the API is all (layers) or nothing.
For our purposes, we want to set a shape on a source that is backed by a layer, but setting that shape is animating its icons on the map (a fade-in with duration style.transition.duration. For that particular layer, we want the icons to appear immediately (no fade).
If we set performsPlacementTransitions to false on the style, it works, but now all the style's layers adopt that behavior (no transition), including country names, roads, etc.. we want to keep on animating these other placements with a fade (style's default).
It seems that it is currently impossibly to configure performsPlacementTransitions per layer?
Hi @ronyfadel - yes, performsPlacementTransitions only works on the whole style itself (introduced in mapbox/mapbox-gl-native#13565). I think you may be the first person to ask about allowing this on a per-layer basis, so I'll keep this ticket open to make sure your request is remembered. Thanks!
captainbarbosa
changed the title
Cannot set performsPlacementTransitions on individual layers
Allow MGLStyle.performsPlacementTransitions to be set on individual layers
May 14, 2020
Hi @captainbarbosa, in the meantime, is there a way to set a shape on a source, and have that setting/placement be non-animated, but have all other layers animate?
It seems that setting layer.isVisible is also animated?
Currently it's possible to set
performsPlacementTransitions
onMGLStyle
, but not on an individual layer. It seems that the API is all (layers) or nothing.For our purposes, we want to set a shape on a source that is backed by a layer, but setting that shape is animating its icons on the map (a fade-in with duration
style.transition.duration
. For that particular layer, we want the icons to appear immediately (no fade).If we set
performsPlacementTransitions
to false on the style, it works, but now all the style's layers adopt that behavior (no transition), including country names, roads, etc.. we want to keep on animating these other placements with a fade (style's default).It seems that it is currently impossibly to configure
performsPlacementTransitions
per layer?Mapbox SDK versions: 5.9.0
iOS/macOS versions: iOS 12.4
Device/simulator models: iPhone XR, iOS 12.4
Xcode version: Version 10.3 (10G8)
The text was updated successfully, but these errors were encountered: