Hi all,
I have a button on my app which is intended to return the user to a 'home' view or default map view.
I can get the extent part to work, but trying to get the map to return to 'North' up, is nigh on impossible. What am I missing?
To force the map to a rotation other than north, on the 'onMapChanged' event, I force the map to rotate to 45° by setting:
//dev
mapView.setViewpointRotation(45)
When I tap the home button, whose code is below, the extent returns, but the rotation doesn't change.
function resetToHomeView() {
console.log("Resetting view")
mapView.setViewpointRotation(mapView.initialMapRotation)
mapView.setViewpoint(bwiViewPoint)
}
For clarity, there is the following property on the mapView:
property real initialMapRotation: 0
Any feedback would be greatly welcomed!
Cheers,
Sean