 #else
   import TripKit
 #endif
+
+public protocol TKUIIdentifiableAnnotation: MKAnnotation {
+  var identity: String? { get }
+}
+
+extension TKNamedCoordinate: TKUIIdentifiableAnnotation {
+  public var identity: String? {
+    if let stop = self as? TKStopCoordinate {
+      return stop.stopCode
+    } else if let id = locationID {
+      return id
+    } else {
+      return nil
+    }
+  }
+}
 
 open class TKUIMapManager: TGMapManager {
   

    // Keep heading
    heading = mapView.camera.heading
    
    // Fetching and updating polygons which can be slow
    if let _ = self.overlayPolygon {
      addOverlay()

  
  override open func cleanUp(_ mapView: MKMapView, animated: Bool) {
    removeOverlay(overlayPolygon)
    
    mapView.removeOverlays(overlays)
    mapView.removeAnnotations(animatedAnnotations)
    mapView.removeAnnotations(dynamicAnnotations)
    
    super.cleanUp(mapView, animated: animated)
  }
