Chevron not visible

Hi,

Im trying to make the chevron visible but with no luck. I use the example from downloads page:

 let animation = TTChevronAnimationOptionsBuilder.create(withAnimatedCornerRounding: false).build()
        if darkMode {
            chevron = TTChevronObject(normalImage: UIImage(named: "arrowicon50opacity")!, withDimmedImage: UIImage(named: "arrowicon50opacity")!, with: animation)
        }else{
            chevron = TTChevronObject(normalImage: UIImage(named: "arrowicon75opacity")!, withDimmedImage: UIImage(named: "arrowicon75opacity")!, with: animation)
        }
        chevron.setLocation(location.coordinate, withRadius: 0, withBearing: 0, withAccuracy: 0, isDimmed: false)

Hi,
probably you are trying to add a chevron to the map when the map is not yet initialized. Try adding this code.

func onMapReady(_ mapView: TTMapView) {
    self.mapView.trackingManager.add(chevron)
    chevron.isHidden = false
    self.mapView.trackingManager.update(chevron, with: TTLocation(coordinate: location))
}
1 Like

Hi,
Map is ready, i add the chevron after the map is set up and ready. I tried with tracking manager but no luck. If i do chevron.isHidden = false i get a nil exception.

Don’t know why but i reinstalled pods and now its working.

 let animation = TTChevronAnimationOptionsBuilder.create(withAnimatedCornerRounding: false).build()
        if darkMode {
            chevron = TTChevronObject(normalImage: UIImage(named: "arrowicon50opacity")!, withDimmedImage: UIImage(named: "arrowicon50opacity")!, with: animation)
        }else{
            chevron = TTChevronObject(normalImage: UIImage(named: "arrowicon75opacity")!, withDimmedImage: UIImage(named: "arrowicon75opacity")!, with: animation)
        }
        mapView.trackingManager.add(chevron)
        chevron.isHidden = false
        mapView.trackingManager.update(chevron, with: TTLocation(coordinate: location))