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

PointAnnotation load error: `Source <id>_drag is not in style" #2058

Closed
mfazekas opened this issue Nov 21, 2023 · 3 comments
Closed

PointAnnotation load error: `Source <id>_drag is not in style" #2058

mfazekas opened this issue Nov 21, 2023 · 3 comments
Labels
bug 🪲 Something is broken! v11

Comments

@mfazekas
Copy link
Contributor

Environment

  • Xcode version: 14.3.1
  • iOS version: 16.4
  • Devices affected: iOS Simulator
  • Maps SDK Version: 11.0.0-rc.2

Observed behavior and steps to reproduce

When using point annotation I'm getting a Source <id>_drag is not in style

  private var pointAnnotationManager2: MapboxMaps.PointAnnotationManager? = nil
  
  func addSampleAnnotation(mapView: MapView) {
    let pointAnnotationManager2:MapboxMaps.PointAnnotationManager = mapView.annotations.makePointAnnotationManager(id: "point-ann-id")
    var customPointAnnotation = PointAnnotation(coordinate: CLLocationCoordinate2D(latitude: 40.7142, longitude: -74.00597))
    customPointAnnotation.image = .init(image: UIImage(named: "pin")!, name: "rnmbx-custom-image-name")
    pointAnnotationManager2.annotations = [customPointAnnotation]
    self.pointAnnotationManager2 = pointAnnotationManager2
  }

I'm receiving a mapLoadError:

Source point-ann-id_drag is not in style

I was not able to reproduce in Mapbox repo example, so there might be something else on our code that contributes to this error. Looking into it.

Expected behavior

No error when using point annotations.

Notes / preliminary analysis

Additional links and references

See rnmapbox/maps#3121

@pjleonard37
Copy link
Contributor

Hi @mfazekas -

Thanks for reporting. I tried reproducing on our side as well in a range of conditions (including enabling/disabling isDraggable on annotations), but I was not able to replicate the error. The drag source is created (with the _drag suffix) here if that helps with your investigation on your side. We'll keep investigating to see if we can find something. In addition, if you are able to replicate just in the Maps SDK please let us know.

@baleboy baleboy added the v11 label Nov 27, 2023
@mfazekas
Copy link
Contributor Author

mfazekas commented Nov 29, 2023

Thank you for looking into it. Closing this will reopen if I can repro this outside @rnmapbox/maps.

@number1hustler
Copy link

Any solutions?

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

No branches or pull requests

4 participants