-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[core] Add Layer::serialize() method #16231
Conversation
b879b26
to
b68f954
Compare
b68f954
to
88ccea8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is great! cc/ @mapbox/maps-android @mapbox/maps-ios
@alexshalamov does it already work if you want to serialize a runtime source or light object into a Value type, or are you saying these could be enabled in a follow-on pr? |
Not without a big effort from a developer. If and when we would enable full
@chloekraw If source and light serialization would be required, yes, we could try adding that functionality in a follow-up releases / PRs. |
@alexshalamov thanks! for now, could we open tickets to track the work? I think |
Serialization support for sources would be great, light isn't used that much. To me, in the long run, it would be great to be fully compatible with style-spec. This will enable using json across style API with the mbgl value conversion system. This will simplify the generated API downstream even more and make implementing additional APIs on top more flexible. |
New method allows serialization of a layer into a Value type, including all modifications done via runtime style API. New method is also an enabler for
Style
object serialization (sources, layers, etc). PR also fixes several issues in universal style setter / getter code.Related issues: #7600
Fixes: https://github.com/mapbox/mapbox-gl-native-team/issues/194
Launch Checklist
@mapbox/maps-android @mapbox/maps-ios @mapbox/core-sdk
if this PR adds or updates a public APIneeds changelog
label if a changelog is needed (remove label when added)/cc @mapbox/core-sdk