Rotate the map view in the direction of driving

813
2
09-25-2018 10:08 PM
AsifIsmail
New Contributor III

Hello,

how do i rotate the mapview so that the driving path always become straight to the user(like in google maps)

in esri android and ios 

0 Kudos
2 Replies
RoseeleDahang
New Contributor

if its from current location probably can use sensor event? then 

mMapView.setViewpointRotationAsync([currentHeading_from_sensor_event]);

Not sure if this is the scenario you are facing though..
0 Kudos
CharlesLoftis
New Contributor III

Checkout this sample. Look for AutoPanMode.Navigation in the code:

case 3: 
    // Start Navigation Mode
    // This mode is best suited for in-vehicle navigation.
    Map.this.mLocationDisplay.setAutoPanMode(LocationDisplay.AutoPanMode.NAVIGATION);
    if (!Map.this.mLocationDisplay.isStarted())
        Map.this.mLocationDisplay.startAsync();
    break;
0 Kudos