Chapter 5
Advanced iOS & Firebase: Configuring Ride Experience
Section 7
iOS App: Fixing and Removing Duplicate Overlays on MKMapView
In this video, you will fix an issue where the searchMapKitForRouteWithPolyline(_:) function is called twice – once before the route is removed to show a new pickup route, and once after it is removed – thus showing a leftover route when it should be removed. We will add a conditional check using advanced iOS so that only a single route can be added at a time.