首先,我想說我對Swift很陌生。最簡單的答案可能是我的情況最好的。 我目前有一些代碼使用mapkit繪製從我當前位置到大峽谷的路線。起始和結束位置內置代碼: let soucrceCoordinates = locationManager.location?.coordinate
//coordinates off the grand canyon, placeholder
let dest
我有一個MapViewModel用於我的MapViewController。 我有一個MapObjectService與函數fetchMapObjects(currentLocation: CLLocation)返回一個Observable<MapObjects> 在MapViewModel我: var currentLocation: Observable<CLLocation?>
var m