mapbox / mapbox-maps-ios

Interactive, thoroughly customizable maps for iOS powered by vector tiles and Metal
https://www.mapbox.com/mapbox-mobile-sdk
Other
469 stars 153 forks source link

Failed to load source for Polyline and Polygon annotations in v10.8.0 and later versions #1800

Closed cubexc closed 1 year ago

cubexc commented 1 year ago

Environment

Observed behavior and steps to reproduce

I get an error that ruins appending of lines to annotations in PolylineAnnotationManager and PolygonAnnotationManager after I updated to 10.10.0. Tested down to 10.8.0 and this error still appears. This isn't an issue in 10.7.0.

[Mapbox] [Error, maps-core]: {}[Style]: Failed to load source polyline: A line string must have two or more coordinate points.

[Mapbox] [Error, maps-core]: {}[Style]: Failed to load source polygon: Polygon must be described by 4 or more coordinate points. Improper nesting can also lead to this error. Double check that the coordinates are properly nested and there are 4 or more coordinates.

I double checked the coordinates going into those annotations and there seems to be no problem with them, they are all of valid format.

Expected behavior

There should be no errors when appending a coordinate to annotations, the line should be drawn in the map properly like in 10.7.0

Notes / preliminary analysis

I think that this is a bug in 10.8.0 and later versions

Additional links and references

207197283-8ec81fcb-d369-4cf4-9032-6ac5424ebd6d (1)

ZiZasaurus commented 1 year ago

@cubexc thank you for reporting. Can you please share a code snippet of how you're appending coordinates to your annotations?

pjleonard37 commented 1 year ago

Closing out as not reproducible. Please re-open if you are able to share reproduction code.