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. |
| 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.
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.
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.
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.