Marker move According to Route MapBox

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Marker move According to Route MapBox



I have two annotations. There is an image on annotation. I want the image head toward route in MapBox.



Here is what I have tried:


func drawAnnoation (orgin :CLLocationCoordinate2D ,destination :CLLocationCoordinate2D){
if annotation == nil {
annotation = CameraAnnotation(coordinate: orgin, title: "SOURCE", subtitle: "D", image:"selfImage" )
let source = orgin
annotation.coordinate = source
annotation.title = "ddd"

map.setCenter(orgin, zoomLevel: 18, animated: false)
map.addAnnotation(annotation)
} else {
UIView.animate(withDuration: 1.5, animations: {
// Here Core Animation calls MapBox using an implicit animation.
self.annotation.coordinate = orgin

})
}
if annotations == nil {
let annotations = NoteAnnotation(coordinate: destination, title: "DESTINATION", subtitle: "E", image: "car")
let sources = destination
annotations.coordinate = sources
annotations.title = "d"
map.addAnnotation(annotations)
}
}



func mapView(_ mapView: MGLMapView, viewFor annotation: MGLAnnotation) -> MGLAnnotationView? {
guard annotation is CameraAnnotation || annotation is NoteAnnotation else {
return nil
}
if annotation is CameraAnnotation {

return dview
} else {

return sdview
}
}



Please help how to achieve this.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

m0i,VLQYM611Yu 0Zj5upZx5cl6,3XY8vt7Jj639jBk5YTuQu1CEU9,FgZoHd,KxcRn4VPcY,jp9EKcfYL3U3
Sex5hzd,8vcN0aNfF7oD6t

Popular posts from this blog

Makefile test if variable is not empty

Visual Studio Code: How to configure includePath for better IntelliSense results

Will Oldham