Skip to content
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

Update coordinates of ImageSource #2264

Open
Gomu2024 opened this issue Nov 14, 2024 · 5 comments
Open

Update coordinates of ImageSource #2264

Gomu2024 opened this issue Nov 14, 2024 · 5 comments
Labels
bug 🪲 Something is broken!

Comments

@Gomu2024
Copy link

Environment

  • Xcode version: 15.2
  • iOS version: 17.0
  • Devices affected:
  • Maps SDK Version: 11.3.0

Observed behavior and steps to reproduce

ImageSource does not have update coordinates method. We can only update image using mapView.mapboxMap.style.updateImageSource(withId: <#T##String#>, image: <#T##UIImage#>) method

Required

ImageSource should have update coordinates method. How to update ImageSource coordinates after adding ?

@Gomu2024 Gomu2024 added the bug 🪲 Something is broken! label Nov 14, 2024
@maios
Copy link
Contributor

maios commented Nov 14, 2024

Thank you @Gomu2024, we have created an internal ticket to track this https://mapbox.atlassian.net/browse/MAPSIOS-536. Please stay tune for our future updates with this feature :)

quido3 pushed a commit to SharperShape/mapbox-maps-ios that referenced this issue Nov 26, 2024
@zo0m
Copy link

zo0m commented Jan 3, 2025

Faced with the same issue, my workaround is to remove/add layer and source

@Gomu2024
Copy link
Author

Faced with the same issue, my workaround is to remove/add layer and source

Thank you very much for your reply. I have tried this as well, but frequent location updates will cause flickering and memory shortage.

@zo0m
Copy link

zo0m commented Jan 24, 2025

@Gomu2024 Hello, I've found another solution, you can try:

try mapView.mapboxMap.setSourceProperty(
    for: sourceId,
    property: "coordinates",
    value: coordinates
)

@Gomu2024
Copy link
Author

Gomu2024 commented Feb 8, 2025

Woo oh, it worked, thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something is broken!
Projects
None yet
Development

No branches or pull requests

3 participants