maps icon indicating copy to clipboard operation
maps copied to clipboard

feat: add symbolZOffset to symbol layer

Open m9tdev opened this issue 9 months ago • 5 comments

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 generate in the root folder
  • [x] I have tested the new feature on /example app.
    • Actually not in the /example app 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
  • [ ] 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

m9tdev avatar Mar 07 '25 12:03 m9tdev

@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

mfazekas avatar Apr 05 '25 09:04 mfazekas

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

m9tdev avatar Apr 16 '25 15:04 m9tdev

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

symbol-z-offset is in the json? Have you tried to update the json file with yarn fetch:style:spec ?

mfazekas avatar Apr 17 '25 13:04 mfazekas

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.

m9tdev avatar Apr 17 '25 19:04 m9tdev

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.

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

mfazekas avatar Apr 18 '25 07:04 mfazekas