-
-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support defining a custom style layer from iOS Swift #3154
Support defining a custom style layer from iOS Swift #3154
Conversation
for more information, see https://pre-commit.ci
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.
Thanks this is awesome!
Got it to compile with the OpenGL backend too.
We're not really supporting that anymore, but I guess it doesn't hurt.
This example doesn't work when I rotate the map. But that can be addressed in a follow-up PR.
I think this is technically a breaking change, but since custom style layers are a somewhat experimental feature I think it is acceptable.
It looks like there is a CI step that still compiles the code without the
I see what you mean, I had just tested it on the simulator before. I guess I need to rotate the matrix too, not just scale it.
👍 |
Oh wow, that is an oversight. I will fix that. |
I think that's fine, the original example didn't implement the projection matrix either. |
…stian-boks/maplibre-native into custom_metal_layer_in_swift
Head branch was pushed to by a user without write access
Bloaty Results (iOS) 🐋Compared to main
Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-3154-compared-to-main.txt |
I wanted to use a custom style layer in a Swift app on iOS, but discovered that the
typedef struct MLNBackendResource
structure used to expose the backend wasn't visible in Swift, so I converted it to an Objective-c interface.And I've also converted the Objective-c example to Swift and added it to the Swift example app, to show how to use it.