简体   繁体   中英

Get Coordinates from Safety cameras in Here Sdk (navigation edition)

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM