Open incanus opened 11 years ago
Hi, we've encountered the same issue reported by jan.klimke. Do you have any news about it?
I've seen that when the infinite loop with crash occurs, in setProjectedConstraintsSouthWest the values (northEast.x - southWest.x) and/or (northEast.y - southWest.y) are negative. fabs() seems to have fixed the issue:
(void)setProjectedConstraintsSouthWest:(RMProjectedPoint)southWest northEast:(RMProjectedPoint)northEast { _constrainMovement = _constrainMovementByUser = YES; _constrainingProjectedBounds = RMProjectedRectMake(southWest.x, southWest.y, fabs(northEast.x - southWest.x), fabs(northEast.y - southWest.y)); _constrainingProjectedBoundsByUser = RMProjectedRectMake(southWest.x, southWest.y, fabs(northEast.x - southWest.x), fabs(northEast.y - southWest.y)); }
To be clear this is map pan constraints, not related to auto layout.
Assigned to MapBox iOS SDK #734. Validate constraints before allowing them to be set.