Select to view content in your preferred language

Rotate the map view in the direction of driving

959
2
09-25-2018 10:08 PM
AsifIsmail
Regular Contributor

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
Emerging 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
Occasional Contributor

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