-
Notifications
You must be signed in to change notification settings - Fork 149
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
Model Position Incorrectly Changed from Centre for some Coordinates #2176
Comments
Hi @programmer443 - Thanks for sharing this report and the code sample. To help us replicate, could you provide a smaller example with actual values for the variables in your code for latitude, longitude, etc? This will help to isolate if the issue is in the SDK rather than with incorrect data. It would be especially helpful if you could recreate the issue outside of your application in a simple implementation of the SDK. For example, you could modify one of our examples. |
Hi @pjleonard37, Thanks for your reply🙂. I updated my code with actual values for your understanding. Now, I hope so it will help you to reproduce the issue. Here is example project for your reference |
Hi @programmer443 -- Thanks for sharing this sample project; I was able to replicate the behavior in your project. I think the issue is related to how you've set up the SwiftUI <--> UIKit code. I was able to strip down the code a bit more and have made some changes to center the plane model: Instead of using a Swift UI and UIKit together, I just implemented the solution in Swift UI, which resolves the misalignment you were seeing. Note that this code takes advantage of new SDK features released in the
These features are currently experimental, so breaking changes may occur across versions. As we refine these features we are very interested in hearing your feedback! One other note: I'd recommend rotating the access token in your shared project. Instructions can be found here: https://docs.mapbox.com/accounts/guides/tokens/#rotating-access-tokens. |
Hi @pjleonard37 , For model translation I am using this code:
And for camera position I'm using same above code. Video: sample.mp4 |
@pjleonard37 just checking in on the status of this issue—any updates or ETA for a resolution? |
Hi @programmer443 -- I have not been able to reproduce the issue you are seeing locally, and am still investigating. As a friendly reminder, Model layers are an experimental feature. |
Hi @pjleonard37 @astojilj, Related link: #2152 |
Environment
Observed behavior and steps to reproduce
I encountered an issue where the position of a model in my Mapbox implementation is being inaccurately adjusted for certain coordinates but camera position is fine. The model, which should be centered at specified coordinates, is shifting its position unexpectedly. This behavior occurs despite correct implementation of adding the model, setting camera parameters.
Code for adding model
Code for setting camera:
Expected behavior
Model should appear at the centre like camera
Pictures
The text was updated successfully, but these errors were encountered: