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

Fixed gradient polyline not always fully drawn + stability issues #1960

Merged

Conversation

IjzerenHein
Copy link
Contributor

The new gradient polyline was not always completely visible, because the Matrix transform in the paths was not applied correctly. This happened because the segments were cached and could have the wrong matrix transform applied to them (this happens implicitely during calls to CGPathMoveToPoint & CGPathAddLineToPoint). This could cause the line to not be complete visible, because it was drawn behind the map-tile. (see screenshots below)
Also, I’ve witnessed some rare crashes due to the caching of the segments. Apparently, the class was accessed from multiple threads which led to threading issues. Removing the segments cache fixed this problem as well.

Before fix:
image

After fix:
image

The gradient polyline was not always completely visible, because the Matrix transform in the paths was not applied correctly. This happened, because the segments were cached and could have the wrong matrix transform applied to them. This could cause the line to not visible, because it will below the map-tile.
Also, I’ve witnessed some rare crashes due to the caching of the segments. Apparently, the class was accessed from multiple threads which led to threading issues. Removing the segments cache fixed this problem as well.
@rborn
Copy link
Collaborator

rborn commented Jan 12, 2018

LGTM

@alvelig 🐽

@rborn rborn merged commit 5ec275c into react-native-maps:master Jan 17, 2018
@alvelig
Copy link
Contributor

alvelig commented Jan 18, 2018

Sorry, I missed this one. LGTM and thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants