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 polygon and polyline not re-render when changing tile URL #2057

Conversation

Projects
None yet
3 participants
@LeMinh1995
Copy link
Contributor

LeMinh1995 commented Mar 5, 2018

No description provided.

@LeMinh1995

This comment has been minimized.

Copy link
Contributor Author

LeMinh1995 commented Mar 5, 2018

Hi. Currently, I'm working with UrlTile component. But I found an issue when changing tile URL dynamically. The polygons and polylines are disappeared.

@@ -39,6 +39,13 @@ - (void) update
if (_map == nil) return;
[_map removeOverlay:self];
[_map addOverlay:self level:MKOverlayLevelAboveLabels];
for (id<MKOverlay> overlay in _map.overlays) {

This comment has been minimized.

Copy link
@rborn

rborn Mar 5, 2018

Collaborator

Won't this have performance issues. Isn't there any way to decide the "zIndex" of an overlay so we don't have to remove and add the other overlays?

This comment has been minimized.

Copy link
@LeMinh1995

LeMinh1995 Mar 6, 2018

Author Contributor

I have tried to use insertOverlay with atIndex equals to 0. But it still not working. So this is the solution I came up so far.

This comment has been minimized.

Copy link
@rborn

rborn Mar 6, 2018

Collaborator

I had a look and it seems that it's done the same way for the polylines and the rest of the views. Thank you.

@rborn rborn added the waiting reply label Mar 5, 2018

@rborn

This comment has been minimized.

Copy link
Collaborator

rborn commented Mar 6, 2018

LGTM @alvelig 🐽

@rborn

This comment has been minimized.

Copy link
Collaborator

rborn commented Mar 12, 2018

@alvelig 🐽🐽 - aka double 🐽 😹

@alvelig

This comment has been minimized.

Copy link
Collaborator

alvelig commented Mar 13, 2018

@rborn thank you for pushing us forward. LGTM. At least I don't have another alternative to come up with.

@rborn rborn merged commit 60c562b into react-native-community:master Mar 13, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.