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 was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
The layers array is ordered from front to back, for consistency with Cocoa, as opposed to mbgl’s back-to-front ordering.
I was mistaken: similar arrays in Cocoa are ordered from back to front (NSView.subviews, UIView.subviews, UIApplication.windows) or specify no explicit order (NSApplication.windows). (Apple Events and AppleScript do treat “front” as a synonym for “first” and “back” as a synonym for “last”, but that shouldn’t inform the API we expose in this SDK.)
I think a last-minute breaking change before the release is probably the right decision in the long run. Reversing the array will simplify MGLStyle somewhat, as it removes an impedance mismatch with mbgl. It’ll also make the iOS and macOS SDKs more consistent with the Android SDK and GL JS. Moreover, the layers property was only published a few days ago in beta 5, along with more convenient methods like -insertLayer:aboveLayer:, so direct indexing into layers should be relatively rare.
Activity
boundsj commentedon Jan 3, 2017
This was fixed by #7484 cc @frederoni @1ec5