0

I'm trying to get the coordinates of the safety camera to display the remaining distance to the camera (the here app do this) I'm adding this listener to the visualNavigator

    visualNavigator.setSafetyCameraWarningListener{
        it.distanceToCameraInMeters
    }

this listener works and I can retrieve to the camera, however the listener only is called again when the camera is reached or passed, is any way to get the coordinates of this safetycamera or another callback for distance to the camera? I'm using here sdk v4.12.11.x for Android

Javier
  • 1,469
  • 2
  • 20
  • 38

1 Answers1

0

The SafetyCameraWarningListener gives you the possibility to get the distance in which the camera is located once it is detected by it, which I think is what you need (however, the geocoordinates of that SafetyCamera are not available).

Here is the documentation about it:

SafetyCameraWarningListener: https://developer.here.com/documentation/android-sdk-navigate/4.12.11.0/api_reference/com/here/sdk/navigation/SafetyCameraWarningListener.html

SafetyCameraWarning: https://developer.here.com/documentation/android-sdk-navigate/4.12.11.0/api_reference/com/here/sdk/navigation/SafetyCameraWarning.html

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • That's exactly the issue, I can add the SafetyCameraWarningListener but I only receive the first event and "passed" event, so I can't update the distance from the camera, for example first event is at "900mts" and then there is no other callback until "passed" event, so is inaccurate – Javier Dec 16 '22 at 08:58