-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fixed polygon and polyline not re-render when changing tile URL #2057
Conversation
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
LGTM @alvelig 🐽 |
@alvelig 🐽🐽 - aka double 🐽 😹 |
@rborn thank you for pushing us forward. LGTM. At least I don't have another alternative to come up with. |
No description provided.