mkannotation

    -1熱度

    1回答

    我試圖讓自定義引腳圖像顯示在我的mapView中,它呈現常規的紅色引腳而不是我的自定義圖像。我究竟做錯了什麼? ViewFor譯註: func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { if annotation is MKUserLocation {

    0熱度

    1回答

    經過對HitList和ToDo應用程序的詳盡搜索和構建之後,我還沒有接近實施Core Data和MKAnnotations的使用。我已經看到使用NSFetchedResults,NSUserDefaults或其他廢話的各種建議。我想知道如何實現保存引腳位置,然後從CoreData中檢索它。以下是我徒勞的嘗試。 class ViewController: UIViewController, CLLo

    0熱度

    2回答

    我正在使用MKPointAnnotation個斯威夫特應用程序,我最近碰到了,我需要存儲元數據在我上的註釋的問題,所以我創建下面的自定義類: class BRETTFAnnotation: MKPointAnnotation { var tag: Int64 var name: String init(lat : Double, lon:Double, t :

    0熱度

    2回答

    我創建自定義圖釘的地圖,使用該行 self.mapView.addAnnotation(customMapAnnotationView.annotation!) 但我需要後來通過所有引腳進行迭代,並與將確定是否有鍵與它們匹配他們將被刪除。 for annotation:ChatRoomMapAnnotationView in self.chatMapView.annotations { ..

    0熱度

    1回答

    我正在使用MapKit,我更改了Annotation的圖像,但問題是,用戶位置(藍點)也改變了它的圖片(我不希望那樣)。我怎樣才能恢復正常。另外,我在標註中添加了一個小按鈕(正如您可能已經猜到的那樣),該按鈕已添加到我的位置,但它不應該在那裏。我的代碼如下... func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation)

    1熱度

    2回答

    我有以下代碼,它旨在遍歷當前蘋果地圖視圖上的所有註釋並更新它們的位置座標。 for existingMarker in self.mapView.annotations { existingMarker.coordinate.latitude = 12.12121212 existingMarker.coordinate.longitude = 14.312121121

    0熱度

    1回答

    在我的代碼中,我正在使用Apple地圖,並在View Controller中正確設置了mapView和delegate。 在我的ViewController我也有內部的下面的代碼循環: if userOnMapAlready == false { let annotation = MKPointAnnotation() annotation.coordinate = CLLoc

    1熱度

    1回答

    我正在開發一個項目,其中需要查找從用戶位置到特定MKAnnotation的估計旅行時間。我希望能夠看到其標註的用戶點擊了,所以我可以生成ETA和使用「viewFor註釋」功能annotationCalloutView顯示。 如果以這種方式完成蘋果限制,則無法使用自定義MKAnnotation類來計算ETA:HERE因此必須在註釋標註打開時完成。

    0熱度

    1回答

    我做了一個應用程序,以顯示地圖上的點和點擊重定向到segue我如何檢查用戶是否在註釋點擊。我不知道如何去做,我試圖使用didSelectAnnotationView,但沒有奏效。我希望有一個人可以幫助我! 這是我的代碼! : @IBOutlet weak var mapa: MKMapView! override func viewDidLoad() { super.viewDidLo

    1熱度

    4回答

    我正在嘗試製作annotation.image。但我不知道如何。我將如何去做一個UIImage輪。 //Customize Annotation func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { let annotationIdentifier = "