feat: add symbolZOffset to symbol layer
Description
Add support for symbol-z-offset
I've filled the values in v8.json based on other values I saw there. I don't exactly know what each field should be (especially in expression and property-type), so I'm not 100% certain that these are correct.
Also, at some point yarn generate added the values at the right places, but for some reason it doesn't anymore for me at the moment and removes everything except for the entry in v8.json. I'm probably doing something wrong here, but I've restored what was initially added by yarn generate.
Checklist
- [x] I've read
CONTRIBUTING.md - [x] I updated the doc/other generated code with running
yarn generatein the root folder - [x] I have tested the new feature on
/exampleapp.- Actually not in the
/exampleapp as I couldn't get it to build, but it does work in our own application FWIW (with both V11 and New Architecture enabled). - [x] In V11 mode/ios
- [x] In New Architecture mode/ios
- [x] In V11 mode/android
- [x] In New Architecture mode/android
- Actually not in the
- [ ] I added/updated a sample - if a new feature was implemented (
/example)
Screenshot OR Video
https://github.com/user-attachments/assets/0bf4f925-ffd5-44ad-a89e-156d76dc5f38
https://github.com/user-attachments/assets/d3815d83-e705-43b7-a38b-ee3a3e3584fc
@mathieupost thanks so much for looking into this.
v8.json is sourced from: https://raw.githubusercontent.com/mapbox/mapbox-gl-js/master/src/style-spec/reference/v8.json
yarn fetch:style:spec should update the v8.json
Thanks for the pointer!
Unfortunately it seems that symbolZOffset is not yet in there, so running that command will remove it from the v8.json
Thanks for the pointer!
Unfortunately it seems that
symbolZOffsetis not yet in there, so running that command will remove it from thev8.json
symbol-z-offset is in the json? Have you tried to update the json file with yarn fetch:style:spec ?
Yeah I've updated with yarn fetch:style:spec. I see that there is actually one in paint_symbol, but I need one in layout_symbol, but that is not yet in https://raw.githubusercontent.com/mapbox/mapbox-gl-js/master/src/style-spec/reference/v8.json
It's still an experimental feature, so maybe that's why it's not yet there.
Yeah I've updated with
yarn fetch:style:spec. I see that there is actually one inpaint_symbol, but I need one inlayout_symbol, but that is not yet in https://raw.githubusercontent.com/mapbox/mapbox-gl-js/master/src/style-spec/reference/v8.jsonIt's still an experimental feature, so maybe that's why it's not yet there.
But why do we need in layout_symbol, we do parse paint_symbol-s as well, don't we?
https://github.com/rnmapbox/maps/blob/main/scripts/autogenHelpers/generateCodeWithEjs.mjs#L102-L103