Rotation in 2D

2901
2
11-18-2015 01:14 AM
StephanMendler
New Contributor III

Can I lock the rotation in the 2D view? I want the map always to be horizontal.

Tags (1)
0 Kudos
2 Replies
MichaelLakey
New Contributor III

There may be a "cleaner" way in beta 4.0, but you could watch the MapView's rotation property and handle it there:

var myRotateWatcher = myMapView.watch('rotation', function (evt) {

    myMapView.rotation = 0; // Ignore map rotation

});

0 Kudos
StephanMendler
New Contributor III

Thanks Mike,

I expected to have a poperty like "lockRotation" = true or something like this in 4.0. Because I think in 2D maps rotation would be confusing for many users.

Thanks for your reply!

0 Kudos